|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.container.JContainer3
public class JContainer3
Defines an EJB3 container.
Field Summary | |
---|---|
private java.io.File |
archive
Archive used by this container. |
private boolean |
available
Container available. |
private java.util.List<EZBContainerLifeCycleCallback> |
callbacksLifeCycle
Callbacks. |
private java.lang.ClassLoader |
classLoader
Classloader use to manage this archive. |
private Deployment |
deployment
Deployment for the managed archive. |
private java.util.Map<java.lang.String,Factory> |
factories
Map of managed ejb3 factories. |
private java.lang.String |
id
Id of this container. |
private static JLog |
logger
Logger. |
private PersistenceUnitManager |
persistenceUnitManager
Persistence manager object which manages all persistence-unit associated to this container. |
Constructor Summary | |
---|---|
JContainer3(java.io.File archive)
Build a new container on the given archive. |
Method Summary | |
---|---|
private void |
bindItf(java.lang.String itf,
java.lang.reflect.InvocationHandler handler,
ClassAnnotationMetadata bean,
java.lang.String mode)
Bind into registry interfaces for a bean making them available from clients. |
java.io.File |
getArchive()
Gets the archive used by this container. |
java.lang.ClassLoader |
getClassLoader()
Gets the classloader. |
private EZBContainerCallbackInfo |
getContainer3CallbackInfo()
Gets information on the container that can be given to container callbacks. |
Factory |
getFactory(java.lang.String factoryName)
Gets a factory with its given name. |
java.lang.String |
getId()
Gets the id of this container. |
java.lang.String |
getName()
Gets the name of this container. |
PersistenceUnitManager |
getPersistenceUnitManager()
Gets the persistence manager object which manages all persistence-unit associated to this container. |
boolean |
isAvailable()
Check if the container is available or not. |
static java.lang.String |
jndiNameEncode(java.lang.String beanClassName,
java.lang.String itfName,
java.lang.String mode)
Encode a given name by prefixing it with given mode. |
void |
setClassLoader(java.lang.ClassLoader classLoader)
Sets the classloader. |
void |
setPersistenceUnitManager(PersistenceUnitManager persistenceUnitManager)
Sets the persistence manager object which manages all persistence-unit associated to this container. |
void |
start()
Start this container. |
void |
stop()
Stop this container. |
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 java.lang.String id
private java.io.File archive
private java.lang.ClassLoader classLoader
private Deployment deployment
private boolean available
private java.util.Map<java.lang.String,Factory> factories
private PersistenceUnitManager persistenceUnitManager
private java.util.List<EZBContainerLifeCycleCallback> callbacksLifeCycle
Constructor Detail |
---|
public JContainer3(java.io.File archive)
archive
- the archive (jar file or exploded).Method Detail |
---|
public java.lang.String getId()
getId
in interface EZBContainer
public void start() throws EZBContainerException
start
in interface EZBContainer
EZBContainerException
- if starting fails.public void stop()
stop
in interface EZBContainer
private EZBContainerCallbackInfo getContainer3CallbackInfo()
private void bindItf(java.lang.String itf, java.lang.reflect.InvocationHandler handler, ClassAnnotationMetadata bean, java.lang.String mode) throws EZBContainerException
itf
- the name of the interface that object will have.handler
- object which will be called on the client side.bean
- the bean class associated to given interface.mode
- Local, Remote, etc
EZBContainerException
- if interface cannot be loaded or if the bind
failspublic Factory getFactory(java.lang.String factoryName)
getFactory
in interface EZBContainer
factoryName
- the factory name.
public java.lang.String getName()
getName
in interface EZBContainer
public java.lang.ClassLoader getClassLoader()
getClassLoader
in interface EZBContainer
public java.io.File getArchive()
getArchive
in interface EZBContainer
public boolean isAvailable()
isAvailable
in interface EZBContainer
public PersistenceUnitManager getPersistenceUnitManager()
getPersistenceUnitManager
in interface EZBContainer
public static java.lang.String jndiNameEncode(java.lang.String beanClassName, java.lang.String itfName, java.lang.String mode)
beanClassName
- name of the bean class.itfName
- name of the interface.mode
- local/remote, etc
public void setClassLoader(java.lang.ClassLoader classLoader)
setClassLoader
in interface EZBContainer
classLoader
- to be used by the containerpublic void setPersistenceUnitManager(PersistenceUnitManager persistenceUnitManager)
setPersistenceUnitManager
in interface EZBContainer
persistenceUnitManager
- persistence unit manager object to set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |