EclipseLink 1.0_1.0M2 API Reference - Incubation

org.eclipse.persistence.sessions.remote.jms.mdb
Class ClusteringMDB

java.lang.Object
  extended by org.eclipse.persistence.sessions.remote.jms.mdb.ClusteringMDB

public class ClusteringMDB
extends java.lang.Object

Purpose: To provide a reference implementation for Message Driven Bean that can listen and process TopLink messages.

Descripton: The Message Driven Bean (MDB) must be deployed along with TopLink application and configured to listener the the same destination that clustering services send their cache sync messages to. User must defines an environment variable named with the value of ClusteringMDB.TOPLINK_SESSION_NAME. This environment variable value is session name used by TopLink to load the cosresponding session from the sessions.xml when the MDB is created.

See Also:
CacheSynchronizationManager

Field Summary
protected  REMOVE_MessageListener tlMessageListener
           
 java.lang.String TOPLINK_SESSION_NAME
          This value is the env-entry-name element of the Message Driven Beand configured in the ejb-jar.xml.
 
Constructor Summary
ClusteringMDB()
           
 
Method Summary
 void ejbCreate()
           
 void ejbRemove()
           
 Session getSession()
          PUBLIC: Return the TopLink session that has the session's name configured as an env-entry element in the ejb-jar.xml.
 void onMessage(javax.jms.Message message)
           
 void setMessageDrivenContext(MessageDrivenContext ctx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tlMessageListener

protected REMOVE_MessageListener tlMessageListener

TOPLINK_SESSION_NAME

public final java.lang.String TOPLINK_SESSION_NAME
This value is the env-entry-name element of the Message Driven Beand configured in the ejb-jar.xml. The value is used to lookup the value of the session's name from the environment variable define in JNDI "java:comp/env".

See Also:
Constant Field Values
Constructor Detail

ClusteringMDB

public ClusteringMDB()
Method Detail

setMessageDrivenContext

public void setMessageDrivenContext(MessageDrivenContext ctx)

ejbCreate

public void ejbCreate()

ejbRemove

public void ejbRemove()

getSession

public Session getSession()
PUBLIC: Return the TopLink session that has the session's name configured as an env-entry element in the ejb-jar.xml. User can subclass and overwrite this method to obtain the session differently.

Throws:
JMSProcessingException - if it is unable to lookup the session's name or the session is null

onMessage

public void onMessage(javax.jms.Message message)

EclipseLink 1.0_1.0M2 API Reference - Incubation