|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.ejb.plugins.jms.JMSContainerInvoker
EJBProxyFactory for JMS MessageDrivenBeans
Nested Class Summary |
Nested classes inherited from class org.jboss.ejb.GenericEntityObjectFactory |
GenericEntityObjectFactory.UTIL |
Field Summary | |
protected int |
acknowledgeMode
JMS acknowledge mode, used when session is not XA. |
protected javax.jms.Connection |
connection
The JMS connection. |
protected javax.jms.ConnectionConsumer |
connectionConsumer
The JMS connection consumer. |
protected Container |
container
The container. |
protected static String |
DEFAULT_DESTINATION_TYPE
Default destination type. |
protected boolean |
deliveryActive
|
protected Element |
dlqConfig
DLQConfig element from MDBConfig element from jboss.xml. |
protected DLQHandler |
dlqHandler
Dead letter queue handler. |
protected org.jboss.ejb.plugins.jms.JMSContainerInvoker.ExceptionListenerImpl |
exListener
|
protected String |
invokerBinding
|
protected InvokerProxyBindingMetaData |
invokerMetaData
|
protected boolean |
isContainerManagedTx
|
protected boolean |
isNotSupportedTx
|
protected long |
keepAlive
Keep alive server sessions. |
protected int |
maxMessagesNr
Maximum number provider is allowed to stuff into a session. |
protected int |
maxPoolSize
Maximun pool size of server sessions. |
protected int |
minPoolSize
Minimun pool size of server sessions. |
protected static Method |
ON_MESSAGE
MessageListener.onMessage(javax.jms.Message) reference. |
protected boolean |
optimize
|
protected javax.jms.ServerSessionPool |
pool
|
protected String |
providerAdapterJNDI
JNDI name of the provider adapter. |
protected long |
reconnectInterval
Time to wait before retrying to reconnect a lost connection. |
protected String |
serverSessionPoolFactoryJNDI
JNDI name of the server session factory. |
protected TransactionManager |
tm
|
protected boolean |
useDLQ
If Dead letter queue should be used or not. |
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ServiceMBean |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
JMSContainerInvoker()
|
Method Summary | |
protected javax.jms.Destination |
createDestination(Class type,
Context ctx,
String jndiName,
String jndiSuffix)
Create and or lookup a JMS destination. |
protected void |
createService()
Initialize the container invoker. |
protected javax.jms.ServerSessionPool |
createSessionPool(javax.jms.Connection connection,
int minSession,
int maxSession,
long keepAlive,
boolean isTransacted,
int ack,
javax.jms.MessageListener listener)
Create a server session pool for the given connection. |
boolean |
getDeliveryActive()
|
protected String |
getDestinationType(Context ctx,
String destinationJNDI)
Try to get a destination type by looking up the destination JNDI, or provide a default if there is not destinationJNDI or if it is not possible to lookup. |
Object |
getEJBHome()
Always throws an Error |
javax.ejb.EJBMetaData |
getEJBMetaData()
Always throws an Error |
Collection |
getEntityCollection(Collection ids)
Always throws an Error |
Object |
getEntityEJBObject(Object id)
Always throws an Error |
protected JMSProviderAdapter |
getJMSProviderAdapter()
Return the JMSProviderAdapter that should be used. |
long |
getKeepAliveMillis()
|
int |
getMaxMessages()
|
int |
getMaxPoolSize()
|
MessageDrivenMetaData |
getMetaData()
|
int |
getMinPoolSize()
|
Object |
getStatefulSessionEJBObject(Object id)
Always throws an Error |
Object |
getStatelessSessionEJBObject()
Always throws an Error |
void |
importXml(Element element)
XmlLoadable implementation. |
protected void |
innerStop()
Stop done from inside, we should not stop the exceptionListener in inner stop. |
Object |
invoke(Object id,
Method m,
Object[] args,
Transaction tx,
Principal identity,
Object credential)
|
boolean |
isOptimized()
Gets the Optimized attribute of the JMSContainerInvoker object |
protected String |
parseJndiSuffix(String jndiname,
String defautSuffix)
Parse the JNDI suffix from the given JNDI name. |
void |
restartDelivery()
|
void |
setContainer(Container container)
Set the container for which this is an invoker to. |
void |
setInvokerBinding(String binding)
Set the invoker jndi binding |
void |
setInvokerMetaData(InvokerProxyBindingMetaData imd)
Set the invoker meta data so that the ProxyFactory can initialize properly |
void |
setKeepAliveMillis(long keepAlive)
|
void |
setMaxMessages(int maxMessages)
|
void |
setMaxPoolSize(int maxPoolSize)
|
void |
setMinPoolSize(int minPoolSize)
|
void |
setOptimized(boolean optimize)
Sets the Optimized attribute of the JMSContainerInvoker object |
void |
startDelivery()
|
protected void |
startService()
|
void |
stopDelivery()
|
protected void |
stopService()
|
String |
toString()
Return a string representation of the current config state. |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
create, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jboss.system.Service |
create, destroy, start, stop |
Methods inherited from interface org.jboss.system.ServiceMBean |
getName, getState, getStateString, jbossInternalLifecycle |
Field Detail |
protected static Method ON_MESSAGE
MessageListener.onMessage(javax.jms.Message)
reference.
protected static final String DEFAULT_DESTINATION_TYPE
protected boolean optimize
protected int maxMessagesNr
protected int minPoolSize
protected int maxPoolSize
protected long keepAlive
protected long reconnectInterval
protected boolean useDLQ
protected String providerAdapterJNDI
JMSProviderAdapter
protected String serverSessionPoolFactoryJNDI
ServerSessionPoolFactory
protected int acknowledgeMode
protected boolean isContainerManagedTx
protected boolean isNotSupportedTx
protected Container container
protected javax.jms.Connection connection
protected javax.jms.ConnectionConsumer connectionConsumer
protected TransactionManager tm
protected javax.jms.ServerSessionPool pool
protected org.jboss.ejb.plugins.jms.JMSContainerInvoker.ExceptionListenerImpl exListener
protected DLQHandler dlqHandler
protected Element dlqConfig
protected InvokerProxyBindingMetaData invokerMetaData
protected String invokerBinding
protected boolean deliveryActive
Constructor Detail |
public JMSContainerInvoker()
Method Detail |
public void setInvokerMetaData(InvokerProxyBindingMetaData imd)
setInvokerMetaData
in interface EJBProxyFactory
public void setInvokerBinding(String binding)
setInvokerBinding
in interface EJBProxyFactory
public void setContainer(Container container)
setContainer
in interface ContainerPlugin
container
- The container for which this is an invoker to.public int getMinPoolSize()
getMinPoolSize
in interface JMSContainerInvokerMBean
public void setMinPoolSize(int minPoolSize)
setMinPoolSize
in interface JMSContainerInvokerMBean
public int getMaxPoolSize()
getMaxPoolSize
in interface JMSContainerInvokerMBean
public void setMaxPoolSize(int maxPoolSize)
setMaxPoolSize
in interface JMSContainerInvokerMBean
public long getKeepAliveMillis()
getKeepAliveMillis
in interface JMSContainerInvokerMBean
public void setKeepAliveMillis(long keepAlive)
setKeepAliveMillis
in interface JMSContainerInvokerMBean
public int getMaxMessages()
getMaxMessages
in interface JMSContainerInvokerMBean
public void setMaxMessages(int maxMessages)
setMaxMessages
in interface JMSContainerInvokerMBean
public MessageDrivenMetaData getMetaData()
getMetaData
in interface JMSContainerInvokerMBean
public boolean getDeliveryActive()
getDeliveryActive
in interface JMSContainerInvokerMBean
public void startDelivery() throws Exception
startDelivery
in interface JMSContainerInvokerMBean
Exception
public void stopDelivery() throws Exception
stopDelivery
in interface JMSContainerInvokerMBean
Exception
public void restartDelivery() throws Exception
restartDelivery
in interface JMSContainerInvokerMBean
Exception
public void setOptimized(boolean optimize)
optimize
- The new Optimized valuepublic Object getEJBHome()
getEJBHome
in interface EJBProxyFactory
Error
- Not valid for MDBpublic javax.ejb.EJBMetaData getEJBMetaData()
getEJBMetaData
in interface EJBProxyFactory
Error
- Not valid for MDBpublic Collection getEntityCollection(Collection ids)
getEntityCollection
in interface EJBProxyFactory
ids
- Enumeration of primary keys.
Error
- Not valid for MDBpublic Object getEntityEJBObject(Object id)
getEntityEJBObject
in interface EJBProxyFactory
id
- The primary key of the entity.
Error
- Not valid for MDBpublic Object getStatefulSessionEJBObject(Object id)
getStatefulSessionEJBObject
in interface EJBProxyFactory
id
- The id of the session.
Error
- Not valid for MDBpublic Object getStatelessSessionEJBObject()
getStatelessSessionEJBObject
in interface EJBProxyFactory
Error
- Not valid for MDBpublic boolean isOptimized()
public void importXml(Element element) throws Exception
element
- Description of Parameter
org.jboss.deployment.DeploymentException
- Description of Exception
Exception
protected void createService() throws Exception
Exception
- Failed to initalize.protected void startService() throws Exception
Exception
protected void stopService() throws Exception
Exception
protected void innerStop()
public Object invoke(Object id, Method m, Object[] args, Transaction tx, Principal identity, Object credential) throws Exception
Exception
protected String getDestinationType(Context ctx, String destinationJNDI)
ctx
- The naming context to lookup destinations from.destinationJNDI
- The name to use when looking up destinations.
protected JMSProviderAdapter getJMSProviderAdapter() throws NamingException
NamingException
protected javax.jms.Destination createDestination(Class type, Context ctx, String jndiName, String jndiSuffix) throws Exception
type
- Either javax.jms.Queue or javax.jms.Topic.ctx
- The naming context to lookup destinations from.jndiName
- The name to use when looking up destinations.jndiSuffix
- The name to use when creating destinations.
IllegalArgumentException
- Type is not Queue or Topic.
Exception
- Description of Exceptionprotected javax.jms.ServerSessionPool createSessionPool(javax.jms.Connection connection, int minSession, int maxSession, long keepAlive, boolean isTransacted, int ack, javax.jms.MessageListener listener) throws NamingException, javax.jms.JMSException
connection
- The connection to use.minSession
- The minumum number of sessionsmaxSession
- The maximum number of sessions.keepAlive
- The time to keep sessions aliveisTransacted
- True if the sessions are transacted.ack
- The session acknowledgement mode.listener
- The message listener.
javax.jms.JMSException
NamingException
- Description of Exceptionprotected String parseJndiSuffix(String jndiname, String defautSuffix)
jndiname
- The JNDI name used to lookup the destination.defautSuffix
- Description of Parameter
public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |