|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jonas_ejb.container.JFactory | +--org.objectweb.jonas_ejb.container.JEntityFactory
This class is a factory for an Entity Bean. It is responsible for - managing Home and LocalHome. - managing a pool of instances/contexts - keeping the list of PKs and the associated JEntitySwitch's - keeping the JNDI context for this component (java:comp/env)
Field Summary | |
protected java.util.List |
bctxlist
|
protected javax.sql.DataSource |
datasource
|
protected JEntityHome |
home
|
protected int |
instanceCount
|
protected JEntityLocalHome |
localhome
|
protected int |
maxCacheSize
|
protected int |
minPoolSize
|
protected java.util.Hashtable |
pklist
|
protected boolean |
reentrant
|
protected boolean |
shared
|
Fields inherited from class org.objectweb.jonas_ejb.container.JFactory |
beanclass, bn, cont, dd, ejb10Env, ejbname, JNDICtx, naming, tm, txbeanmanaged |
Constructor Summary | |
JEntityFactory()
constructor must be without parameters (required by Jorm) |
Method Summary | |
void |
checkTransaction(RequestCtx rctx)
For Entity beans, the only possible case is "Container Managed Tx" |
int |
getCacheSize()
returns current cache size for Jmx |
javax.sql.DataSource |
getDataSource()
returns the Datasource used for CMP |
JEntitySwitch |
getEJB(java.lang.Object pk)
get EJB by its PK Creates if not exist yet. |
JHome |
getHome()
returns the home if exist |
JEntityContext |
getJContext()
Get a Context from the pool, or create a new one if no more available in the pool. |
JLocalHome |
getLocalHome()
returns the local home if exist |
int |
getMaxCacheSize()
returns max cache size for Jmx |
int |
getMinPoolSize()
returns min pool size for Jmx |
int |
getPoolSize()
|
void |
init(EntityDesc dd,
JContainer cont)
Init this object |
boolean |
isReentrant()
return true if reentrant |
boolean |
isShared()
return true if shared |
void |
reduceCache()
Reduce number of instances in memory |
void |
releaseJContext(JContext ctx)
Release a Context |
void |
removeEJB(java.lang.Object pk)
remove an EJB by its PK |
void |
stop()
stop this EJB. |
void |
sync()
synchronize bean instances if needed |
Methods inherited from class org.objectweb.jonas_ejb.container.JFactory |
checkTransactionContainer, getContainer, getCorbaInitialContext, getDeploymentDescriptor, getEjb10Environment, getEJBName, getEnv, getInitialContext, getTransactionManager, init, isTxBeanManaged, postInvoke, postInvokeRemote, preInvoke, preInvokeRemote, resetComponentContext, setComponentContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected JEntityHome home
protected JEntityLocalHome localhome
protected boolean reentrant
protected boolean shared
protected java.util.List bctxlist
protected int instanceCount
protected int maxCacheSize
protected int minPoolSize
protected java.util.Hashtable pklist
protected javax.sql.DataSource datasource
Constructor Detail |
public JEntityFactory()
Method Detail |
public void init(EntityDesc dd, JContainer cont)
public JEntitySwitch getEJB(java.lang.Object pk)
public void removeEJB(java.lang.Object pk)
public int getPoolSize()
getPoolSize
in class JFactory
public void stop()
public void sync()
public void reduceCache()
public JHome getHome()
public JLocalHome getLocalHome()
public JEntityContext getJContext()
public void releaseJContext(JContext ctx)
public int getMinPoolSize()
public int getMaxCacheSize()
public int getCacheSize()
public boolean isReentrant()
public boolean isShared()
public javax.sql.DataSource getDataSource()
public void checkTransaction(RequestCtx rctx) throws javax.transaction.SystemException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |