org.objectweb.jonas_ejb.container.JMdbEndpointFactory Class Reference

Inherits org.objectweb.jonas_ejb.container.JFactory.

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

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 JMdbEndpointFactory (MessageDrivenDesc dd, JContainer cont, ActivationSpec as)
 JMdbEndpointFactory (MessageDrivenDesc dd, String destination, JContainer cont, ActivationSpec as)
void initInstancePool ()
int getPoolSize ()
void stop ()
void sync ()
JHome getHome ()
JLocalHome getLocalHome ()
MessageEndpoint createEndpoint (XAResource xaResource) throws UnavailableException
boolean isDeliveryTransacted (Method method) throws NoSuchMethodException
JMessageEndpoint getMessageEndpoint () throws Exception
void releaseEndpoint (JMessageEndpoint ep)
TimerService getTimerService ()
int getMinPoolSize ()
int getMaxCacheSize ()
int getCacheSize ()
int getTransactionAttribute ()
void checkTransaction (RequestCtx rctx)
void reduceCache ()
void notifyTimeout (Timer timer)

Protected Attributes

int instanceCount = 0
int minPoolSize = 0
int maxCacheSize = 0

Detailed Description

This class is a factory for a Message Driven Bean Endpoints There is one such class per MDB class. Contains all information related to the bean
Author:
Eric Hardesty

Definition at line 62 of file JMdbEndpointFactory.java.


Constructor & Destructor Documentation

org.objectweb.jonas_ejb.container.JMdbEndpointFactory.JMdbEndpointFactory MessageDrivenDesc  dd,
JContainer  cont,
ActivationSpec  as
 

Constructor

Parameters:
dd Message Driven Descriptor
cont Container where this bean is defined
as ActivationSpec to link the Container to

Definition at line 125 of file JMdbEndpointFactory.java.

References org.objectweb.jonas_ejb.deployment.api.MessageDrivenDesc.getDestinationJndiName(), org.objectweb.jonas_ejb.deployment.api.MessageDrivenDesc.getJonasMdActivationConfigDesc(), and org.objectweb.jonas_ejb.deployment.api.MessageDrivenDesc.getMdActivationConfigDesc().

Here is the call graph for this function:

org.objectweb.jonas_ejb.container.JMdbEndpointFactory.JMdbEndpointFactory MessageDrivenDesc  dd,
String  destination,
JContainer  cont,
ActivationSpec  as
 

Constructor

Parameters:
dd Message Driven Descriptor
destination String of desired destination
cont Container where this bean is defined
as ActivationSpec to link the Container to

Definition at line 147 of file JMdbEndpointFactory.java.

References org.objectweb.jonas_ejb.deployment.api.MessageDrivenDesc.getMdActivationConfigDesc().

Here is the call graph for this function:


Member Function Documentation

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

For Message Driven Beans, only 2 cases are possible: TX_REQUIRED or TX_NOT_SUPPORTED

Parameters:
rctx The Request Context

Implements org.objectweb.jonas_ejb.container.JFactory.

Definition at line 528 of file JMdbEndpointFactory.java.

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

MessageEndpoint org.objectweb.jonas_ejb.container.JMdbEndpointFactory.createEndpoint XAResource  xaResource  )  throws UnavailableException
 

Create the message endpoint

Parameters:
xaResource XAResource object to attach
Returns:
MessageEndpoint to deliver messages to
Exceptions:
UnavailableException exception to throw

Definition at line 406 of file JMdbEndpointFactory.java.

References org.objectweb.jonas_ejb.container.JMessageEndpoint.mep.

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

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

Definition at line 512 of file JMdbEndpointFactory.java.

Referenced by org.objectweb.jonas_ejb.container.JMdbEndpointFactory.reduceCache(), and org.objectweb.jonas_ejb.container.JMdbEndpointFactory.releaseEndpoint().

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

Returns:
the home if exist

Implements org.objectweb.jonas_ejb.container.BeanFactory.

Definition at line 384 of file JMdbEndpointFactory.java.

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

Returns:
the local home if exist

Implements org.objectweb.jonas_ejb.container.BeanFactory.

Definition at line 391 of file JMdbEndpointFactory.java.

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

Returns:
max cache size for Jmx

Definition at line 505 of file JMdbEndpointFactory.java.

JMessageEndpoint org.objectweb.jonas_ejb.container.JMdbEndpointFactory.getMessageEndpoint  )  throws Exception
 

Return an MessageEndpoint from the pool. If pool is empty, creates a new one.

Returns:
an MessageEndpoint from the pool.
Exceptions:
Exception - if an application server fails to return an MessageEndpoint out of its pool.

Definition at line 454 of file JMdbEndpointFactory.java.

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

Returns:
min pool size for Jmx

Definition at line 498 of file JMdbEndpointFactory.java.

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

Returns:
the size of the EndpointPool

Implements org.objectweb.jonas_ejb.container.JFactory.

Definition at line 341 of file JMdbEndpointFactory.java.

Referenced by org.objectweb.jonas_ejb.container.JMdbEndpointFactory.releaseEndpoint().

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

Obtains the TimerService associated for this Bean

Returns:
a JTimerService instance.

Implements org.objectweb.jonas_ejb.container.JFactory.

Definition at line 487 of file JMdbEndpointFactory.java.

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

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

Returns:
the Transaction Attribute

Definition at line 519 of file JMdbEndpointFactory.java.

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

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

Init pool of instances

Implements org.objectweb.jonas_ejb.container.JFactory.

Definition at line 335 of file JMdbEndpointFactory.java.

boolean org.objectweb.jonas_ejb.container.JMdbEndpointFactory.isDeliveryTransacted Method  method  )  throws NoSuchMethodException
 

Determine if the method is transacted

Parameters:
method Method to check
Returns:
boolean whether the specified method is transacted
Exceptions:
NoSuchMethodException exception to throw

Definition at line 432 of file JMdbEndpointFactory.java.

References org.objectweb.jonas_ejb.deployment.api.BeanDesc.getMethodDesc(), org.objectweb.jonas_ejb.deployment.api.MethodDesc.getTxAttribute(), and org.objectweb.jonas_ejb.deployment.api.MethodDesc.TX_REQUIRED.

Here is the call graph for this function:

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

Notify a timeout for this bean

Parameters:
timer timer whose expiration caused this notification.

Definition at line 595 of file JMdbEndpointFactory.java.

References org.objectweb.jonas_ejb.container.JMessageEndpoint.deliverTimeout(), and org.objectweb.jonas_ejb.container.JMdbEndpointFactory.releaseEndpoint().

Here is the call graph for this function:

void org.objectweb.jonas_ejb.container.JMdbEndpointFactory.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 571 of file JMdbEndpointFactory.java.

References org.objectweb.jonas_ejb.container.JMdbEndpointFactory.getCacheSize(), and org.objectweb.jonas_ejb.container.JMdbEndpointFactory.instanceCount.

Here is the call graph for this function:

void org.objectweb.jonas_ejb.container.JMdbEndpointFactory.releaseEndpoint JMessageEndpoint  ep  ) 
 

put the JMessageEndpoint back to the pool

Parameters:
ep the MessageEndpoint

Definition at line 464 of file JMdbEndpointFactory.java.

References org.objectweb.jonas_ejb.container.JMdbEndpointFactory.getCacheSize(), org.objectweb.jonas_ejb.container.JMdbEndpointFactory.getPoolSize(), and org.objectweb.jonas_ejb.container.JMessageEndpoint.setReleasedState().

Referenced by org.objectweb.jonas_ejb.container.JMdbEndpointFactory.notifyTimeout().

Here is the call graph for this function:

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

stop this EJB. call deactivate on the Endpoint Stop the threads and remove the beans

Implements org.objectweb.jonas_ejb.container.BeanFactory.

Definition at line 349 of file JMdbEndpointFactory.java.

References org.objectweb.jonas.resource.Rar.getResourceAdapter(), org.objectweb.jonas_ejb.container.JMdbEndpointFactory.instanceCount, and org.objectweb.jonas_ejb.container.JMessageEndpoint.mdb.

Here is the call graph for this function:

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

synchronize bean instances if needed

Implements org.objectweb.jonas_ejb.container.BeanFactory.

Definition at line 378 of file JMdbEndpointFactory.java.


Member Data Documentation

int org.objectweb.jonas_ejb.container.JMdbEndpointFactory.instanceCount = 0 [protected]
 

count of the instances

Definition at line 72 of file JMdbEndpointFactory.java.

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

int org.objectweb.jonas_ejb.container.JMdbEndpointFactory.maxCacheSize = 0 [protected]
 

maximum number of instances in the cache

Definition at line 82 of file JMdbEndpointFactory.java.

int org.objectweb.jonas_ejb.container.JMdbEndpointFactory.minPoolSize = 0 [protected]
 

minimum pool size

Definition at line 77 of file JMdbEndpointFactory.java.


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