|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.container.AbsFactory<PoolType>
org.objectweb.easybeans.container.session.SessionFactory<PoolType>
PoolType
- the type of bean instance.public abstract class SessionFactory<PoolType extends EasyBeansSB<PoolType>>
This class manages the session bean and its creation/lifecycle.
Field Summary | |
---|---|
private static JLog |
logger
Logger. |
private SessionBeanInfo |
sessionBeanInfo
Session Desc (deployment info). |
Constructor Summary | |
---|---|
SessionFactory(java.lang.String className,
EZBContainer container)
Builds a new factory with a given name and its container. |
Method Summary | |
---|---|
PoolType |
create(java.lang.Long clue)
Creates an instance with the given hint. |
protected abstract PoolType |
getBean(java.lang.Long beanId)
Gets a bean for the given id. |
IBeanInfo |
getBeanInfo()
Gets the bean information. |
protected abstract java.lang.Long |
getId(java.lang.Long beanId)
Gets a new ID or a null value. |
SessionBeanInfo |
getSessionBeanInfo()
|
abstract EJBResponse |
localCall(long hash,
java.lang.Object[] methodArgs,
java.lang.Long beanId)
Do a local call on a method of this factory. |
EJBResponse |
rpcInvoke(EJBRequest request)
A request comes to the bean factory and needs to be handled. A response is done which contains the answer. |
void |
setSessionBeanInfo(SessionBeanInfo sessionBeanInfo)
Sets the information object for a session bean. |
void |
stop()
Stops the factory. |
Methods inherited from class org.objectweb.easybeans.container.AbsFactory |
---|
getBeanClass, getClassName, getContainer, getHashes, getJavaContext, getNamingManager, getPool, init, injectResources, remove, setBeanClass, setHashes, setJavaContext, setPool |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static JLog logger
private SessionBeanInfo sessionBeanInfo
Constructor Detail |
---|
public SessionFactory(java.lang.String className, EZBContainer container) throws FactoryException
className
- name of this factory (name of class that is managed)container
- the root component of this factory.
FactoryException
- if class can't be loaded.Method Detail |
---|
public void stop()
public IBeanInfo getBeanInfo()
Factory
public SessionBeanInfo getSessionBeanInfo()
public void setSessionBeanInfo(SessionBeanInfo sessionBeanInfo)
sessionBeanInfo
- information on the bean.protected abstract java.lang.Long getId(java.lang.Long beanId)
beanId
- given id.
public PoolType create(java.lang.Long clue) throws PoolException
clue
- a clue given by the Pool. Could be null.
PoolException
- if instance cannot be created.public EJBResponse rpcInvoke(EJBRequest request)
rpcInvoke
in interface Factory<PoolType extends EasyBeansSB<PoolType>,java.lang.Long>
rpcInvoke
in class AbsFactory<PoolType extends EasyBeansSB<PoolType>>
request
- the EJB request.
protected abstract PoolType getBean(java.lang.Long beanId) throws java.lang.IllegalArgumentException
beanId
- id of the expected bean.
java.lang.IllegalArgumentException
- if bean is not found.public abstract EJBResponse localCall(long hash, java.lang.Object[] methodArgs, java.lang.Long beanId)
hash
- the hash of the method to execute.methodArgs
- the arguments of the methodbeanId
- the id of the bean that we want (stateful).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |