org.objectweb.easybeans.api
Interface EZBContainer

All Known Implementing Classes:
JContainer3

public interface EZBContainer

This interface represents an EasyBeans EJB Container.

Author:
Florent Benoit

Method Summary
 java.io.File getArchive()
          Gets the archive used by this container.
 java.lang.ClassLoader getClassLoader()
          Gets the classloader of the container.
 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.
 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.
 

Method Detail

getFactory

Factory getFactory(java.lang.String factoryName)
Gets a factory with its given name.

Parameters:
factoryName - the factory name.
Returns:
the factory found or null.

getId

java.lang.String getId()
Gets the id of this container.

Returns:
string id.

getName

java.lang.String getName()
Gets the name of this container.

Returns:
the name.

start

void start()
           throws EZBContainerException
Start this container.

Throws:
EZBContainerException - if the start fails.

stop

void stop()
Stop this container.


getClassLoader

java.lang.ClassLoader getClassLoader()
Gets the classloader of the container. May change at each restart of the container.

Returns:
a classloader.

getArchive

java.io.File getArchive()
Gets the archive used by this container. It can be a .jar file or a directory.

Returns:
the archive.

isAvailable

boolean isAvailable()
Check if the container is available or not.

Returns:
true if the container is available.

getPersistenceUnitManager

PersistenceUnitManager getPersistenceUnitManager()
Gets the persistence manager object which manages all persistence-unit associated to this container.

Returns:
persistence unit manager object

setClassLoader

void setClassLoader(java.lang.ClassLoader classLoader)
Sets the classloader. (if it was not already set else exception).

Parameters:
classLoader - to be used by the container

setPersistenceUnitManager

void setPersistenceUnitManager(PersistenceUnitManager persistenceUnitManager)
Sets the persistence manager object which manages all persistence-unit associated to this container.

Parameters:
persistenceUnitManager - persistence unit manager object to set.