org.objectweb.jonas_ejb.container.JMdbFactory Class Reference

Inherits org.objectweb.jonas_ejb.container.JFactory.

Inheritance diagram for org.objectweb.jonas_ejb.container.JMdbFactory:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.jonas_ejb.container.JMdbFactory:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 JMdbFactory (MessageDrivenDesc dd, JContainer cont, ThreadPool thp)
void initInstancePool ()
int getPoolSize ()
void stop ()
void sync ()
JHome getHome ()
JLocalHome getLocalHome ()
ServerSession getServerSession () throws JMSException
void releaseServerSession (ServerSession ss)
TimerService getTimerService ()
int getMinPoolSize ()
int getMaxCacheSize ()
int getCacheSize ()
int getTransactionAttribute ()
void checkTransaction (RequestCtx rctx)
void reduceCache ()
void notifyTimeout (Timer timer)

Protected Attributes

ThreadPool threadpool = null
XATopicConnection tconn = null
XAQueueConnection qconn = null

Package Attributes

ConnectionConsumer cc = null

Detailed Description

This class is a factory for a Message Driven Bean There is one such class per MDB class. Contains all information related to the bean and set up all JMS environment for the bean It manages a ServerSession pool to server MDB requests.
Author:
Philippe Coq, Philippe Durieux

Definition at line 66 of file JMdbFactory.java.


Constructor & Destructor Documentation

org.objectweb.jonas_ejb.container.JMdbFactory.JMdbFactory MessageDrivenDesc  dd,
JContainer  cont,
ThreadPool  thp
 

Constructor

Parameters:
dd Message Driven Descriptor
cont Container where this bean is defined
thp Thread pool that will be used to process MDB requests

Definition at line 112 of file JMdbFactory.java.

References org.objectweb.jonas_ejb.container.JMdbFactory.cc, org.objectweb.jonas_ejb.deployment.api.BeanDesc.getCacheMax(), org.objectweb.jonas_ejb.deployment.api.MessageDrivenDesc.getDestinationJndiName(), org.objectweb.jonas_ejb.deployment.api.BeanDesc.getEjbName(), org.objectweb.jonas_ejb.container.JContainer.getJmsManager(), org.objectweb.jonas_ejb.deployment.api.BeanDesc.getPoolMin(), org.objectweb.jonas_jms.api.JmsManager.getQueue(), org.objectweb.jonas_ejb.deployment.api.MessageDrivenDesc.getSelector(), org.objectweb.jonas_jms.api.JmsManager.getTopic(), org.objectweb.jonas_jms.api.JmsManager.getXAQueueConnectionFactory(), org.objectweb.jonas_jms.api.JmsManager.getXATopicConnectionFactory(), org.objectweb.jonas_ejb.deployment.api.MessageDrivenDesc.isBeanManagedTransaction(), org.objectweb.jonas_ejb.deployment.api.MessageDrivenDesc.isSubscriptionDurable(), org.objectweb.jonas_ejb.deployment.api.MessageDrivenDesc.isTopicDestination, org.objectweb.jonas_ejb.container.JMdbFactory.qconn, org.objectweb.jonas_ejb.container.JMdbFactory.tconn, and org.objectweb.jonas_ejb.container.JMdbFactory.threadpool.

Here is the call graph for this function:


Member Function Documentation

void org.objectweb.jonas_ejb.container.JMdbFactory.checkTransaction RequestCtx  rctx  )  [virtual]
 

For Message Driven Beans, only 2 cases are possible.

Parameters:
rctx The Request Context

Implements org.objectweb.jonas_ejb.container.JFactory.

Definition at line 344 of file JMdbFactory.java.

References org.objectweb.jonas_ejb.container.RequestCtx.currTx, org.objectweb.jonas_ejb.container.RequestCtx.mustCommit, and org.objectweb.jonas_ejb.container.RequestCtx.txAttr.

int org.objectweb.jonas_ejb.container.JMdbFactory.getCacheSize  ) 
 

Returns:
current cache size ( = nb of instance created) for Jmx

Definition at line 329 of file JMdbFactory.java.

Referenced by org.objectweb.jonas_ejb.container.JMdbFactory.reduceCache(), and org.objectweb.jonas_ejb.container.JMdbFactory.releaseServerSession().

JHome org.objectweb.jonas_ejb.container.JMdbFactory.getHome  ) 
 

Returns:
the home if exist

Implements org.objectweb.jonas_ejb.container.BeanFactory.

Definition at line 239 of file JMdbFactory.java.

JLocalHome org.objectweb.jonas_ejb.container.JMdbFactory.getLocalHome  ) 
 

Returns:
the local home if exist

Implements org.objectweb.jonas_ejb.container.BeanFactory.

Definition at line 246 of file JMdbFactory.java.

int org.objectweb.jonas_ejb.container.JMdbFactory.getMaxCacheSize  ) 
 

Returns:
max cache size for Jmx

Definition at line 321 of file JMdbFactory.java.

int org.objectweb.jonas_ejb.container.JMdbFactory.getMinPoolSize  ) 
 

Returns:
min pool size for Jmx

Definition at line 313 of file JMdbFactory.java.

int org.objectweb.jonas_ejb.container.JMdbFactory.getPoolSize  )  [virtual]
 

Returns:
the size of the ServerSessionPool

Implements org.objectweb.jonas_ejb.container.JFactory.

Definition at line 206 of file JMdbFactory.java.

ServerSession org.objectweb.jonas_ejb.container.JMdbFactory.getServerSession  )  throws JMSException
 

Return a server session from the pool. If pool is empty, creates a new one.

Returns:
a server session from the pool.
Exceptions:
JMSException - if an application server fails to return a Server Session out of its server session pool.

Definition at line 261 of file JMdbFactory.java.

TimerService org.objectweb.jonas_ejb.container.JMdbFactory.getTimerService  )  [virtual]
 

Obtains the TimerService associated for this Bean

Returns:
a JTimerService instance.

Implements org.objectweb.jonas_ejb.container.JFactory.

Definition at line 301 of file JMdbFactory.java.

Referenced by org.objectweb.jonas_ejb.container.JMessageDrivenBean.getTimerService().

int org.objectweb.jonas_ejb.container.JMdbFactory.getTransactionAttribute  ) 
 

Returns:
the Transaction Attribute

Definition at line 336 of file JMdbFactory.java.

Referenced by org.objectweb.jonas_ejb.container.JMessageDrivenBean.JMessageDrivenBean().

void org.objectweb.jonas_ejb.container.JMdbFactory.initInstancePool  )  [virtual]
 

Init pool of instances

Implements org.objectweb.jonas_ejb.container.JFactory.

Definition at line 183 of file JMdbFactory.java.

References org.objectweb.jonas_ejb.container.JMessageDrivenBean.mdb.

void org.objectweb.jonas_ejb.container.JMdbFactory.notifyTimeout Timer  timer  ) 
 

Notify a timeout for this bean

Parameters:
timer timer whose expiration caused this notification.

Definition at line 399 of file JMdbFactory.java.

References org.objectweb.jonas_ejb.container.JMessageDrivenBean.deliverTimeout(), and org.objectweb.jonas_ejb.container.JMdbFactory.releaseServerSession().

Here is the call graph for this function:

void org.objectweb.jonas_ejb.container.JMdbFactory.reduceCache  ) 
 

Reduce number of instances in memory in the free list we reduce to the minPoolSize

Implements org.objectweb.jonas_ejb.container.BeanFactory.

Definition at line 371 of file JMdbFactory.java.

References org.objectweb.jonas_ejb.container.JMdbFactory.getCacheSize().

Here is the call graph for this function:

void org.objectweb.jonas_ejb.container.JMdbFactory.releaseServerSession ServerSession  ss  ) 
 

put the ServerSession back to the pool

Parameters:
ss The ServerSession

Definition at line 277 of file JMdbFactory.java.

References org.objectweb.jonas_ejb.container.JMdbFactory.getCacheSize(), and org.objectweb.jonas_ejb.container.JMessageDrivenBean.mdb.

Referenced by org.objectweb.jonas_ejb.container.JMdbFactory.notifyTimeout(), and org.objectweb.jonas_ejb.container.JMessageDrivenBean.run().

Here is the call graph for this function:

void org.objectweb.jonas_ejb.container.JMdbFactory.stop  ) 
 

stop this EJB. call ejbRemove on all MDB close the connection consumer Stop the threads and remove the beans

Implements org.objectweb.jonas_ejb.container.BeanFactory.

Definition at line 216 of file JMdbFactory.java.

References org.objectweb.jonas_ejb.container.JMdbFactory.cc, org.objectweb.jonas_ejb.container.JMessageDrivenBean.mdb, org.objectweb.jonas_ejb.container.JMdbFactory.qconn, and org.objectweb.jonas_ejb.container.JMdbFactory.tconn.

void org.objectweb.jonas_ejb.container.JMdbFactory.sync  ) 
 

synchronize bean instances if needed

Implements org.objectweb.jonas_ejb.container.BeanFactory.

Definition at line 232 of file JMdbFactory.java.


Member Data Documentation

ConnectionConsumer org.objectweb.jonas_ejb.container.JMdbFactory.cc = null [package]
 

Connection Consumer for this message driven bean

Definition at line 76 of file JMdbFactory.java.

Referenced by org.objectweb.jonas_ejb.container.JMdbFactory.JMdbFactory(), and org.objectweb.jonas_ejb.container.JMdbFactory.stop().

XAQueueConnection org.objectweb.jonas_ejb.container.JMdbFactory.qconn = null [protected]
 

JMS Queue Connection (Topic or Queue) always use XA Connections for transactions.

Definition at line 104 of file JMdbFactory.java.

Referenced by org.objectweb.jonas_ejb.container.JMdbFactory.JMdbFactory(), and org.objectweb.jonas_ejb.container.JMdbFactory.stop().

XATopicConnection org.objectweb.jonas_ejb.container.JMdbFactory.tconn = null [protected]
 

JMS Topic Connection always use XA Connections for transactions.

Definition at line 98 of file JMdbFactory.java.

Referenced by org.objectweb.jonas_ejb.container.JMdbFactory.JMdbFactory(), and org.objectweb.jonas_ejb.container.JMdbFactory.stop().

ThreadPool org.objectweb.jonas_ejb.container.JMdbFactory.threadpool = null [protected]
 

Threadpool used to run ServerSessions

Definition at line 92 of file JMdbFactory.java.

Referenced by org.objectweb.jonas_ejb.container.JMdbFactory.JMdbFactory().


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:10:29 2005 for JOnAS by  doxygen 1.3.9.1