|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jboss.ejb.plugins.jms.JMSContainerInvoker
ContainerInvoker for JMS MessageDrivenBeans, based on JRMPContainerInvoker.
Field Summary | |
protected int |
acknowledgeMode
JMS acknowledge mode, used when session is not XA. |
protected java.lang.String |
beanName
Description of the Field |
protected javax.jms.Connection |
connection
The JMS connection. |
protected javax.jms.ConnectionConsumer |
connectionConsumer
TH JMS connection consumer. |
protected Container |
container
The container. |
protected static java.lang.String |
DEFAULT_DESTINATION_TYPE
Default destination type. |
protected org.w3c.dom.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
Description of the Field |
protected boolean |
isContainerManagedTx
escription of the Field |
protected boolean |
isNotSupportedTx
Description of the Field |
protected int |
maxMessagesNr
Maximu number provider is allowed to stuff into a session. |
protected int |
maxPoolSize
Maximun pool size of server sessions. |
protected static java.lang.reflect.Method |
ON_MESSAGE
MessageListener.onMessage(javax.jms.Message) reference. |
protected boolean |
optimize
Description of the Field |
protected javax.jms.ServerSessionPool |
pool
Description of the Field |
protected java.lang.String |
providerAdapterJNDI
JNDI name of the provider adapter. |
protected long |
reconnectInterval
Time to wait before retrying to reconnect a lost connection. |
protected java.lang.String |
serverSessionPoolFactoryJNDI
JNDI name of the server session factory. |
protected javax.transaction.TransactionManager |
tm
Description of the Field |
protected boolean |
useDLQ
If Dead letter queue should be used or not. |
Constructor Summary | |
JMSContainerInvoker()
|
Method Summary | |
protected javax.jms.Destination |
createDestination(java.lang.Class type,
javax.naming.Context ctx,
java.lang.String jndiName,
java.lang.String jndiSuffix)
Create and or lookup a JMS destination. |
protected javax.jms.ServerSessionPool |
createSessionPool(javax.jms.Connection connection,
int maxSession,
boolean isTransacted,
int ack,
javax.jms.MessageListener listener)
Create a server session pool for the given connection. |
void |
destroy()
Take down all fixtures. |
protected java.lang.String |
getDestinationType(javax.naming.Context ctx,
java.lang.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. |
javax.ejb.EJBHome |
getEJBHome()
Gets the EJBHome attribute of the JMSContainerInvoker object |
javax.ejb.EJBMetaData |
getEJBMetaData()
Gets the EJBMetaData attribute of the JMSContainerInvoker object |
java.util.Collection |
getEntityCollection(java.util.Collection ids)
Gets the EntityCollection attribute of the JMSContainerInvoker object |
javax.ejb.EJBObject |
getEntityEJBObject(java.lang.Object id)
Gets the EntityEJBObject attribute of the JMSContainerInvoker object |
protected JMSProviderAdapter |
getJMSProviderAdapter()
Return the JMSProviderAdapter that should be used. |
javax.ejb.EJBObject |
getStatefulSessionEJBObject(java.lang.Object id)
Gets the StatefulSessionEJBObject attribute of the JMSContainerInvoker object |
javax.ejb.EJBObject |
getStatelessSessionEJBObject()
Gets the StatelessSessionEJBObject attribute of the JMSContainerInvoker object |
void |
importXml(org.w3c.dom.Element element)
XmlLoadable implementation. |
void |
init()
Initialize the container invoker. |
protected void |
innerStop()
Stop done from inside, we should not stop the exceptionListener in inner stop. |
java.lang.Object |
invoke(java.lang.Object id,
java.lang.reflect.Method m,
java.lang.Object[] args,
javax.transaction.Transaction tx,
java.security.Principal identity,
java.lang.Object credential)
#Description of the Method |
boolean |
isOptimized()
Gets the Optimized attribute of the JMSContainerInvoker object |
protected java.lang.String |
parseJndiSuffix(java.lang.String jndiname,
java.lang.String defautSuffix)
Parse the JNDI suffix from the given JNDI name. |
void |
setContainer(Container container)
Set the container for which this is an invoker to. |
void |
setOptimized(boolean optimize)
Sets the Optimized attribute of the JMSContainerInvoker object |
void |
start()
Start the connection. |
void |
stop()
Stop the connection. |
java.lang.String |
toString()
Return a string representation of the current config state. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static java.lang.reflect.Method ON_MESSAGE
MessageListener.onMessage(javax.jms.Message)
reference.protected static final java.lang.String DEFAULT_DESTINATION_TYPE
protected boolean optimize
protected int maxMessagesNr
protected int maxPoolSize
protected long reconnectInterval
protected boolean useDLQ
protected java.lang.String providerAdapterJNDI
JMSProviderAdapter
protected java.lang.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 javax.transaction.TransactionManager tm
protected javax.jms.ServerSessionPool pool
protected org.jboss.ejb.plugins.jms.JMSContainerInvoker.ExceptionListenerImpl exListener
protected java.lang.String beanName
protected DLQHandler dlqHandler
protected org.w3c.dom.Element dlqConfig
Constructor Detail |
public JMSContainerInvoker()
Method Detail |
public void setContainer(Container container)
setContainer
in interface ContainerPlugin
container
- The container for which this is an invoker to.public void setOptimized(boolean optimize)
optimize
- The new Optimized valuepublic javax.ejb.EJBHome getEJBHome()
getEJBHome
in interface ContainerInvoker
public javax.ejb.EJBMetaData getEJBMetaData()
getEJBMetaData
in interface ContainerInvoker
public java.util.Collection getEntityCollection(java.util.Collection ids)
getEntityCollection
in interface ContainerInvoker
ids
- Description of Parameterpublic javax.ejb.EJBObject getEntityEJBObject(java.lang.Object id)
getEntityEJBObject
in interface ContainerInvoker
id
- Description of Parameterpublic javax.ejb.EJBObject getStatefulSessionEJBObject(java.lang.Object id)
getStatefulSessionEJBObject
in interface ContainerInvoker
id
- Description of Parameterpublic javax.ejb.EJBObject getStatelessSessionEJBObject()
getStatelessSessionEJBObject
in interface ContainerInvoker
public boolean isOptimized()
public void destroy()
destroy
in interface Service
public void importXml(org.w3c.dom.Element element) throws DeploymentException
importXml
in interface XmlLoadable
element
- Description of ParameterDeploymentException
- Description of Exceptionpublic void init() throws java.lang.Exception
init
in interface Service
java.lang.Exception
- Failed to initalize.public java.lang.Object invoke(java.lang.Object id, java.lang.reflect.Method m, java.lang.Object[] args, javax.transaction.Transaction tx, java.security.Principal identity, java.lang.Object credential) throws java.lang.Exception
id
- Description of Parameterm
- Description of Parameterargs
- Description of Parametertx
- Description of Parameteridentity
- Description of Parametercredential
- Description of Parameterjava.lang.Exception
- Description of Exceptionpublic void start() throws java.lang.Exception
start
in interface Service
java.lang.Exception
- Description of Exceptionpublic void stop()
stop
in interface Service
protected java.lang.String getDestinationType(javax.naming.Context ctx, java.lang.String destinationJNDI)
ctx
- The naming context to lookup destinations from.destinationJNDI
- The name to use when looking up destinations.protected JMSProviderAdapter getJMSProviderAdapter() throws javax.naming.NamingException
javax.naming.NamingException
- Description of Exceptionprotected javax.jms.Destination createDestination(java.lang.Class type, javax.naming.Context ctx, java.lang.String jndiName, java.lang.String jndiSuffix) throws java.lang.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.java.lang.IllegalArgumentException
- Type is not Queue or Topic.java.lang.Exception
- Description of Exceptionprotected javax.jms.ServerSessionPool createSessionPool(javax.jms.Connection connection, int maxSession, boolean isTransacted, int ack, javax.jms.MessageListener listener) throws javax.naming.NamingException, javax.jms.JMSException
connection
- The connection to use.maxSession
- The maximum number of sessions.isTransacted
- True if the sessions are transacted.ack
- The session acknowledgement mode.listener
- The message listener.javax.jms.JMSException
- javax.naming.NamingException
- Description of Exceptionprotected void innerStop()
protected java.lang.String parseJndiSuffix(java.lang.String jndiname, java.lang.String defautSuffix)
jndiname
- The JNDI name used to lookup the destination.defautSuffix
- Description of Parameterpublic java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |