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.
 javax.persistence.EntityManagerFactory getEntityManagerFactory()
          Gets the entity manager factory used by this container if any.
 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.
 PersistenceUnitInfo getPersistenceUnitInfo()
          Gets the persistence info object used by this container.
 boolean isAvailable()
          Check if the container is available or not.
 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.

getPersistenceUnitInfo

PersistenceUnitInfo getPersistenceUnitInfo()
Gets the persistence info object used by this container.

Returns:
persistence info object.

getEntityManagerFactory

javax.persistence.EntityManagerFactory getEntityManagerFactory()
Gets the entity manager factory used by this container if any.

Returns:
an instance of an entity manager factory