|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.synapse.commons.beanstalk.enterprise.EnterpriseBeanstalk
public class EnterpriseBeanstalk
An enterprise beanstalk is used to retrieve Enterprise JavaBean (EJB) client stubs. This class supports stateless and stateful session beans. Enterprise beanstalks can be configured in synapse.properties file. Parameters of the JNDI service to be looked up for EJBs should be provided in that configuration. Enterprise beanstalks cache EJB client stubs to improve efficiency by omitting excessive JNDI look ups. Cache timeout for both stateless and stateful session beans could be configured separately.
| Constructor Summary | |
|---|---|
EnterpriseBeanstalk(String name,
Properties props,
ScheduledExecutorService scheduler)
Constructs a new enterprise beanstalk with the given name and properties. |
|
| Method Summary | |
|---|---|
void |
destroy()
Destroys the beanstalk by un-registering MBeans and cleaning up other resources. |
Object |
getEnterpriseBean(String className,
String sessionId,
String jndiName)
Returns a client stub for the EJB with the given class name, bean id and jndi name. |
String |
getName()
Returns the name of the beanstalk. |
void |
init()
Initialize the current beanstalk by creating the JNDI context, registering the MBean etc. |
Object |
removeEnterpriseBean(String className,
String sessionId)
Remove the specified client stub from the cache. |
void |
removeExpiredBeans()
Removes expired stateless and stateful bean stubs from the cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EnterpriseBeanstalk(String name,
Properties props,
ScheduledExecutorService scheduler)
name - Name of the enterprise beanstalk.props - Configuration properties. This should include properties of the JNDI service
to be looked up for EJBs.scheduler - ScheduledExecutorService for cleaning up timed-out stubs.| Method Detail |
|---|
public void init()
public void destroy()
public String getName()
public Object getEnterpriseBean(String className,
String sessionId,
String jndiName)
className - Fully qualified name of the remote interface of the session bean.sessionId - Session id for stateful beans. null for stateless ones.jndiName - JNDI name of the EJB. null could be used if the bean is already available in
the cache.
public Object removeEnterpriseBean(String className,
String sessionId)
className - Fully qualified name of the remote interface of the session beansessionId - Session id for stateful session beans, null for stateless ones.
public void removeExpiredBeans()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||