|
||||||||||
PREV CLASS (src) NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
org.jboss.system.ServiceMBeanSupport (src)
org.jboss.ejb.plugins.jms.JMSContainerInvoker
EJBProxyFactory for JMS MessageDrivenBeans
Nested Class Summary |
Nested classes inherited from class org.jboss.ejb.GenericEntityObjectFactory (src) |
GenericEntityObjectFactory.UTIL (src) |
Field Summary | |
protected int |
acknowledgeMode
JMS acknowledge mode, used when session is not XA. |
protected Connection (src) |
connection
The JMS connection. |
protected ConnectionConsumer (src) |
connectionConsumer
The JMS connection consumer. |
protected Container (src) |
container
The container. |
protected boolean |
createJBossMQDestination
|
protected static java.lang.String |
DEFAULT_DESTINATION_TYPE
Default destination type. |
protected boolean |
deliveryActive
|
protected org.w3c.dom.Element |
dlqConfig
DLQConfig element from MDBConfig element from jboss.xml. |
protected DLQHandler (src) |
dlqHandler
Dead letter queue handler. |
protected org.jboss.ejb.plugins.jms.JMSContainerInvoker.ExceptionListenerImpl |
exListener
|
protected java.lang.String |
invokerBinding
|
protected InvokerProxyBindingMetaData (src) |
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 java.lang.reflect.Method |
ON_MESSAGE
MessageListener.onMessage(javax.jms.Message) reference. |
protected boolean |
optimize
|
protected ServerSessionPool (src) |
pool
|
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 TransactionManager (src) |
tm
|
protected boolean |
useDLQ
If Dead letter queue should be used or not. |
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src) |
server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ServiceMBean (src) |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
JMSContainerInvoker()
|
Method Summary | |
protected Destination (src) |
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 void |
createService()
Initialize the container invoker. |
protected ServerSessionPool (src) |
createSessionPool(Destination (src) destination,
Connection (src) connection,
int minSession,
int maxSession,
long keepAlive,
boolean isTransacted,
int ack,
MessageListener (src) listener)
Create a server session pool for the given connection. |
protected void |
destroyService()
Sub-classes should override this method to provide custum 'destroy' logic. |
protected java.lang.String |
getActivationConfigProperty(java.lang.String property)
|
boolean |
getCreateJBossMQDestination()
|
boolean |
getDeliveryActive()
|
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. |
java.lang.Object |
getEJBHome()
Always throws an Error |
EJBMetaData (src) |
getEJBMetaData()
Always throws an Error |
java.util.Collection |
getEntityCollection(java.util.Collection ids)
Always throws an Error |
java.lang.Object |
getEntityEJBObject(java.lang.Object id)
Always throws an Error |
protected JMSProviderAdapter (src) |
getJMSProviderAdapter()
Return the JMSProviderAdapter that should be used. |
long |
getKeepAliveMillis()
|
int |
getMaxMessages()
|
int |
getMaxPoolSize()
|
MessageDrivenMetaData (src) |
getMetaData()
|
int |
getMinPoolSize()
|
java.lang.Object |
getStatefulSessionEJBObject(java.lang.Object id)
Always throws an Error |
java.lang.Object |
getStatelessSessionEJBObject()
Always throws an Error |
void |
importXml(org.w3c.dom.Element element)
XmlLoadable implementation. |
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,
Transaction (src) tx,
java.security.Principal identity,
java.lang.Object credential)
|
boolean |
isIdentical(Container (src) container,
Invocation (src) mi)
Protocol specific isIdentical implementation |
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. |
protected void |
sendNotification(java.lang.String event,
java.lang.Object userData)
Notify of an event |
void |
setContainer(Container (src) container)
Set the container for which this is an invoker to. |
void |
setInvokerBinding(java.lang.String binding)
Set the invoker jndi binding |
void |
setInvokerMetaData(InvokerProxyBindingMetaData (src) 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()
Sub-classes should override this method to provide custum 'start' logic. |
void |
stopDelivery()
|
protected void |
stopService()
Sub-classes should override this method to provide custum 'stop' logic. |
java.lang.String |
toString()
Return a string representation of the current config state. |
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src) |
create, destroy, 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 (src) |
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 (src) |
create, destroy, start, stop |
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 minPoolSize
protected long keepAlive
protected int maxPoolSize
protected long reconnectInterval
protected boolean useDLQ
protected java.lang.String providerAdapterJNDI
JMSProviderAdapter
(src) protected java.lang.String serverSessionPoolFactoryJNDI
ServerSessionPoolFactory
(src) protected int acknowledgeMode
protected boolean isContainerManagedTx
protected boolean isNotSupportedTx
protected Container (src) container
protected Connection (src) connection
protected ConnectionConsumer (src) connectionConsumer
protected TransactionManager (src) tm
protected ServerSessionPool (src) pool
protected org.jboss.ejb.plugins.jms.JMSContainerInvoker.ExceptionListenerImpl exListener
protected DLQHandler (src) dlqHandler
protected org.w3c.dom.Element dlqConfig
protected InvokerProxyBindingMetaData (src) invokerMetaData
protected java.lang.String invokerBinding
protected boolean deliveryActive
protected boolean createJBossMQDestination
Constructor Detail |
public JMSContainerInvoker()
Method Detail |
public void setInvokerMetaData(InvokerProxyBindingMetaData (src) imd)
setInvokerMetaData
in interface EJBProxyFactory (src)
public void setInvokerBinding(java.lang.String binding)
setInvokerBinding
in interface EJBProxyFactory (src)
public void setContainer(Container (src) container)
setContainer
in interface ContainerPlugin (src)
container
- The container for which this is an invoker to.public int getMinPoolSize()
public void setMinPoolSize(int minPoolSize)
public int getMaxPoolSize()
public void setMaxPoolSize(int maxPoolSize)
public long getKeepAliveMillis()
public void setKeepAliveMillis(long keepAlive)
public int getMaxMessages()
public void setMaxMessages(int maxMessages)
public MessageDrivenMetaData (src) getMetaData()
public boolean getDeliveryActive()
public boolean getCreateJBossMQDestination()
public void startDelivery() throws java.lang.Exception
java.lang.Exception
public void stopDelivery() throws java.lang.Exception
java.lang.Exception
public void setOptimized(boolean optimize)
optimize
- The new Optimized valuepublic boolean isIdentical(Container (src) container, Invocation (src) mi)
EJBProxyFactory (src)
isIdentical
in interface EJBProxyFactory (src)
container
- the containermi
- the invocation
public java.lang.Object getEJBHome()
getEJBHome
in interface EJBProxyFactory (src)
java.lang.Error
- Not valid for MDBpublic EJBMetaData (src) getEJBMetaData()
getEJBMetaData
in interface EJBProxyFactory (src)
java.lang.Error
- Not valid for MDBpublic java.util.Collection getEntityCollection(java.util.Collection ids)
getEntityCollection
in interface EJBProxyFactory (src)
ids
- Enumeration of primary keys.
java.lang.Error
- Not valid for MDBpublic java.lang.Object getEntityEJBObject(java.lang.Object id)
getEntityEJBObject
in interface EJBProxyFactory (src)
id
- The primary key of the entity.
java.lang.Error
- Not valid for MDBpublic java.lang.Object getStatefulSessionEJBObject(java.lang.Object id)
getStatefulSessionEJBObject
in interface EJBProxyFactory (src)
id
- The id of the session.
java.lang.Error
- Not valid for MDBpublic java.lang.Object getStatelessSessionEJBObject()
getStatelessSessionEJBObject
in interface EJBProxyFactory (src)
java.lang.Error
- Not valid for MDBpublic boolean isOptimized()
public void importXml(org.w3c.dom.Element element) throws java.lang.Exception
element
- Description of Parameter
DeploymentException (src)
- Description of Exception
java.lang.Exception
protected void createService() throws java.lang.Exception
createService
in class ServiceMBeanSupport (src)
java.lang.Exception
- Failed to initalize.protected void startService() throws java.lang.Exception
ServiceMBeanSupport (src)
This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
startService
in class ServiceMBeanSupport (src)
java.lang.Exception
protected void stopService() throws java.lang.Exception
ServiceMBeanSupport (src)
This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
stopService
in class ServiceMBeanSupport (src)
java.lang.Exception
protected void innerStop()
protected void destroyService() throws java.lang.Exception
ServiceMBeanSupport (src)
This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
destroyService
in class ServiceMBeanSupport (src)
java.lang.Exception
public java.lang.Object invoke(java.lang.Object id, java.lang.reflect.Method m, java.lang.Object[] args, Transaction (src) tx, java.security.Principal identity, java.lang.Object credential) throws java.lang.Exception
java.lang.Exception
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 (src) getJMSProviderAdapter() throws javax.naming.NamingException
javax.naming.NamingException
protected Destination (src) 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 java.lang.String getActivationConfigProperty(java.lang.String property)
protected ServerSessionPool (src) createSessionPool(Destination (src) destination, Connection (src) connection, int minSession, int maxSession, long keepAlive, boolean isTransacted, int ack, MessageListener (src) listener) throws javax.naming.NamingException, JMSException (src)
destination
- the destinationconnection
- 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.
JMSException (src)
javax.naming.NamingException
- Description of Exceptionprotected void sendNotification(java.lang.String event, java.lang.Object userData)
event
- the eventuserData
- any user data, e.g. the exception on a failureprotected java.lang.String parseJndiSuffix(java.lang.String jndiname, java.lang.String defautSuffix)
jndiname
- The JNDI name used to lookup the destination.defautSuffix
- Description of Parameter
public java.lang.String toString()
|
||||||||||
PREV CLASS (src) NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |