public class EnterpriseBeanstalk
extends java.lang.Object
Constructor and Description |
---|
EnterpriseBeanstalk(java.lang.String name,
java.util.Properties props,
java.util.concurrent.ScheduledExecutorService scheduler)
Constructs a new enterprise beanstalk with the given name and properties.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroys the beanstalk by un-registering MBeans and cleaning up other resources.
|
java.lang.Object |
getEnterpriseBean(java.lang.String className,
java.lang.String sessionId,
java.lang.String jndiName)
Returns a client stub for the EJB with the given class name, bean id and jndi name.
|
java.lang.String |
getName()
Returns the name of the beanstalk.
|
void |
init()
Initialize the current beanstalk by creating the JNDI context, registering the MBean etc.
|
java.lang.Object |
removeEnterpriseBean(java.lang.String className,
java.lang.String sessionId)
Remove the specified client stub from the cache.
|
void |
removeExpiredBeans()
Removes expired stateless and stateful bean stubs from the cache.
|
public EnterpriseBeanstalk(java.lang.String name, java.util.Properties props, java.util.concurrent.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.public void init()
public void destroy()
public java.lang.String getName()
public java.lang.Object getEnterpriseBean(java.lang.String className, java.lang.String sessionId, java.lang.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 java.lang.Object removeEnterpriseBean(java.lang.String className, java.lang.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()
Copyright © 2005-2022 Apache Software Foundation. All Rights Reserved.