|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.jonas.lib.ejb21.JFactory
org.ow2.jonas.lib.ejb21.JMdbEndpointFactory
public class JMdbEndpointFactory
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
| Field Summary |
|---|
| Fields inherited from class org.ow2.jonas.lib.ejb21.JFactory |
|---|
beanclass, cont, dd, dispatcher, ejb10Env, ejbname, ejbTimeoutSignature, isClusterReplicated, JNDICtx, myTimerService, naming, passivationDir, stopped, timerTxAttr, tm, txbeanmanaged, wm |
| Constructor Summary | |
|---|---|
JMdbEndpointFactory(MessageDrivenDesc dd,
JContainer cont,
ActivationSpec as,
ResourceService rserv)
Constructor |
|
JMdbEndpointFactory(MessageDrivenDesc dd,
String destination,
JContainer cont,
ActivationSpec as,
ResourceService rserv)
Constructor |
|
| Method Summary | |
|---|---|
void |
checkTransaction(RequestCtx rctx)
For Message Driven Beans, only 2 cases are possible: TX_REQUIRED or TX_NOT_SUPPORTED |
MessageEndpoint |
createEndpoint(XAResource xaResource)
Create the message endpoint |
int |
getCacheSize()
|
JHome |
getHome()
returns the home if exist or null if not |
JLocalHome |
getLocalHome()
returns the local home if exist or null if not |
int |
getMaxCacheSize()
|
JMessageEndpoint |
getMessageEndpoint()
Return an MessageEndpoint from the pool. |
int |
getMinPoolSize()
|
int |
getPoolSize()
Get the size of the instance pool for this bean |
TimerService |
getTimerService()
Obtains the TimerService associated for this Bean |
int |
getTransactionAttribute()
|
void |
initInstancePool()
Init pool of instances |
boolean |
isDeliveryTransacted(Method method)
Determine if the method is transacted |
void |
notifyTimeout(Timer timer)
Notify a timeout for this bean |
void |
reduceCache()
Reduce number of instances in memory in the free list we reduce to the minPoolSize |
void |
releaseEndpoint(JMessageEndpoint ep)
put the JMessageEndpoint back to the pool |
void |
stop()
stop this EJB. call deactivate on the Endpoint Stop the threads and remove the beans |
void |
storeInstances(Transaction tx)
Store intances modified (used before finder ou select methods) |
void |
syncDirty(boolean notused)
synchronize bean instances if needed |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JMdbEndpointFactory(MessageDrivenDesc dd,
JContainer cont,
ActivationSpec as,
ResourceService rserv)
dd - Message Driven Descriptorcont - Container where this bean is definedas - ActivationSpec to link the Container to
public JMdbEndpointFactory(MessageDrivenDesc dd,
String destination,
JContainer cont,
ActivationSpec as,
ResourceService rserv)
dd - Message Driven Descriptordestination - String of desired destinationcont - Container where this bean is definedas - ActivationSpec to link the Container to| Method Detail |
|---|
public void initInstancePool()
initInstancePool in interface BeanFactoryinitInstancePool in class JFactorypublic int getPoolSize()
BeanFactory
getPoolSize in interface BeanFactorygetPoolSize in class JFactorypublic void stop()
stop in interface BeanFactorypublic void syncDirty(boolean notused)
syncDirty in interface BeanFactorynotused - True if store even if passivation timeout not elapsedpublic JHome getHome()
BeanFactory
getHome in interface BeanFactorypublic JLocalHome getLocalHome()
BeanFactory
getLocalHome in interface BeanFactory
public MessageEndpoint createEndpoint(XAResource xaResource)
throws UnavailableException
createEndpoint in interface MessageEndpointFactoryxaResource - XAResource object to attach
UnavailableException - exception to throw
public boolean isDeliveryTransacted(Method method)
throws NoSuchMethodException
isDeliveryTransacted in interface MessageEndpointFactorymethod - Method to check
NoSuchMethodException - exception to throw
public JMessageEndpoint getMessageEndpoint()
throws Exception
Exception - - if an application server fails to return an
MessageEndpoint out of its pool.public void releaseEndpoint(JMessageEndpoint ep)
ep - the MessageEndpointpublic TimerService getTimerService()
getTimerService in class JFactorypublic int getMinPoolSize()
getMinPoolSize in class JFactorypublic int getMaxCacheSize()
getMaxCacheSize in class JFactorypublic int getCacheSize()
getCacheSize in class JFactorypublic int getTransactionAttribute()
public void checkTransaction(RequestCtx rctx)
rctx - The Request Contextpublic void reduceCache()
reduceCache in interface BeanFactorypublic void notifyTimeout(Timer timer)
timer - timer whose expiration caused this notification.public void storeInstances(Transaction tx)
BeanFactory
storeInstances in interface BeanFactorytx - current transaction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||