public class EnterpriseBeanstalk extends Object
Constructor and Description |
---|
EnterpriseBeanstalk(String name,
Properties props,
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.
|
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.
|
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.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()
Copyright © 2005–2024 Apache Software Foundation. All rights reserved.