|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ow2.jonas.lib.ejb21.JFactory
public abstract class JFactory
This class is a factory for beans.
Field Summary | |
---|---|
protected Class<?> |
beanclass
|
protected JContainer |
cont
|
protected BeanDesc |
dd
|
protected org.ow2.util.event.api.IEventDispatcher |
dispatcher
Event dispatcher. |
protected Properties |
ejb10Env
|
protected String |
ejbname
|
protected String |
ejbTimeoutSignature
Signature for ejbTimeout. |
protected boolean |
isClusterReplicated
|
protected Context |
JNDICtx
|
protected int |
maxCacheSize
|
protected int |
minPoolSize
initial value for pool size |
protected TimerService |
myTimerService
|
protected JNamingManager |
naming
|
protected File |
passivationDir
|
protected boolean |
stopped
|
protected int |
timerTxAttr
Transactional attribute for ejbTimeout method. |
protected TransactionManager |
tm
|
protected boolean |
txbeanmanaged
|
protected WorkManager |
wm
|
Constructor Summary | |
---|---|
JFactory()
constructor (for entity) must be without parameters (required by Jorm). |
|
JFactory(BeanDesc dd,
JContainer cont)
constructor (for session) |
Method Summary | |
---|---|
protected void |
checkJonasVersion(String clName)
Check if the given class have been generated by GenIC tool with a correct version. |
void |
checkSecurity(EJBInvocation ejbInv)
Check if the access to the bean is authorized |
protected void |
checkTransactionContainer(RequestCtx rctx)
Process Transaction Attribute before calling a business method |
int |
getCacheSize()
|
JContainer |
getContainer()
Returns the JContainer |
BeanDesc |
getDeploymentDescriptor()
Get the Deployement descriptor of this Ejb |
org.ow2.util.event.api.IEventDispatcher |
getDispatcher()
|
Properties |
getEjb10Environment()
|
String |
getEJBName()
get the bean name |
String |
getEjbTimeoutSignature()
|
Hashtable |
getEnv()
Return the JNDI Environment |
String[] |
getFileList(File dir,
String prefix,
String suffix)
|
InitialContext |
getInitialContext()
Returns the InitialContext |
int |
getMaxCacheSize()
|
int |
getMinPoolSize()
|
File |
getPassivationDir()
Get the directory where to store stateful state and timers |
abstract int |
getPoolSize()
Get the size of the instance pool for this bean |
IResourceCheckerManager |
getResourceCheckerManager()
|
abstract TimerService |
getTimerService()
|
int |
getTimerTxAttribute()
|
TransactionManager |
getTransactionManager()
returns the TransactionManager |
WorkManager |
getWorkManager()
|
void |
init(BeanDesc dd,
JContainer cont)
Init this object |
abstract void |
initInstancePool()
Init the pool of instances. |
protected boolean |
isClassAvailable(String className,
boolean unique)
Assess availability of a class in a given class loader |
boolean |
isStopped()
|
boolean |
isTxBeanManaged()
|
ClassLoader |
myClassLoader()
|
void |
postInvoke(RequestCtx rctx)
Common postInvoke |
void |
postInvokeRemote(RequestCtx rctx)
postInvoke for Remote access |
RequestCtx |
preInvoke(int txa)
Common preInvoke |
RequestCtx |
preInvokeRemote(int txa)
preInvoke for Remote access |
void |
resetComponentContext(Context oldctx)
reset old Component Context for JNDI environment |
void |
restartTimers()
Restart Timers |
Context |
setComponentContext()
set the Component Context for JNDI environment |
void |
setDispatcher(org.ow2.util.event.api.IEventDispatcher dispatcher)
|
void |
setResourceCheckerManager(IResourceCheckerManager resourceCheckerManager)
Sets the resource checker manager. |
void |
stopContainer()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.ow2.jonas.lib.ejb21.BeanFactory |
---|
getHome, getLocalHome, reduceCache, stop, storeInstances, syncDirty |
Field Detail |
---|
protected JContainer cont
protected boolean stopped
protected JNamingManager naming
protected TransactionManager tm
protected WorkManager wm
protected Context JNDICtx
protected String ejbname
protected BeanDesc dd
protected Properties ejb10Env
protected TimerService myTimerService
protected boolean txbeanmanaged
protected Class<?> beanclass
protected File passivationDir
protected int minPoolSize
protected int maxCacheSize
protected boolean isClusterReplicated
protected int timerTxAttr
protected String ejbTimeoutSignature
protected org.ow2.util.event.api.IEventDispatcher dispatcher
Constructor Detail |
---|
public JFactory()
public JFactory(BeanDesc dd, JContainer cont)
dd
- The bean deployment descriptorcont
- the container for this beanMethod Detail |
---|
public void stopContainer()
public boolean isStopped()
public File getPassivationDir()
public void init(BeanDesc dd, JContainer cont)
dd
- the deployment descriptorcont
- the Containerpublic WorkManager getWorkManager()
public abstract void initInstancePool()
initInstancePool
in interface BeanFactory
public void restartTimers()
restartTimers
in interface BeanFactory
protected boolean isClassAvailable(String className, boolean unique)
className
- the name of the class without the .class extensionunique
- flag indicating if the class should be found only once in
the classloader
public String getEJBName()
BeanFactory
getEJBName
in interface BeanFactory
public abstract int getPoolSize()
BeanFactory
getPoolSize
in interface BeanFactory
public BeanDesc getDeploymentDescriptor()
getDeploymentDescriptor
in interface BeanFactory
public TransactionManager getTransactionManager()
BeanFactory
getTransactionManager
in interface BeanFactory
public JContainer getContainer()
BeanFactory
getContainer
in interface BeanFactory
public Hashtable getEnv()
BeanFactory
getEnv
in interface BeanFactory
public InitialContext getInitialContext()
BeanFactory
getInitialContext
in interface BeanFactory
public abstract TimerService getTimerService()
public Properties getEjb10Environment()
public boolean isTxBeanManaged()
public Context setComponentContext()
public void resetComponentContext(Context oldctx)
oldctx
- previous Component Context to restore.public int getTimerTxAttribute()
public String getEjbTimeoutSignature()
public int getMinPoolSize()
public int getMaxCacheSize()
public int getCacheSize()
public void checkSecurity(EJBInvocation ejbInv)
ejbInv
- object containing security signature of the method, args of
method, etcpublic RequestCtx preInvoke(int txa)
txa
- Transaction Attribute (Supports, Required, ...)
EJBException
public void postInvoke(RequestCtx rctx)
rctx
- The RequestCtx that was returned at preInvoke()
EJBException
public RequestCtx preInvokeRemote(int txa) throws RemoteException
txa
- Transaction Attribute (Supports, Required, ...)
java.rmi.TransactionRequiredException
java.rmi.TransactionRolledbackException
NoSuchObjectException
RemoteException
- preinvoke raised an EJBExceptionpublic void postInvokeRemote(RequestCtx rctx) throws RemoteException
rctx
- The RequestCtx that was returne t preInvoke()
TransactionRequiredException
TransactionRolledbackException
NoSuchObjectException
RemoteException
- postinvoke failedprotected void checkTransactionContainer(RequestCtx rctx)
rctx
- the Request Context
EJBException
TransactionRequiredLocalException
protected void checkJonasVersion(String clName)
clName
- class namepublic ClassLoader myClassLoader()
public String[] getFileList(File dir, String prefix, String suffix)
public org.ow2.util.event.api.IEventDispatcher getDispatcher()
public void setDispatcher(org.ow2.util.event.api.IEventDispatcher dispatcher)
dispatcher
- the dispatcher to setpublic IResourceCheckerManager getResourceCheckerManager()
getResourceCheckerManager
in interface BeanFactory
public void setResourceCheckerManager(IResourceCheckerManager resourceCheckerManager)
setResourceCheckerManager
in interface BeanFactory
resourceCheckerManager
- the given instance
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |