001: /**
002: * EasyBeans
003: * Copyright (C) 2006 Bull S.A.S.
004: * Contact: easybeans@ow2.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * --------------------------------------------------------------------------
022: * $Id: EZBContainer.java 1970 2007-10-16 11:49:25Z benoitf $
023: * --------------------------------------------------------------------------
024: */package org.ow2.easybeans.api;
025:
026: import java.util.List;
027:
028: import org.ow2.easybeans.persistence.api.EZBPersistenceUnitManager;
029: import org.ow2.util.ee.deploy.api.archive.IArchive;
030:
031: /**
032: * This interface represents an EasyBeans EJB Container.
033: * @author Florent Benoit
034: *
035: */
036: public interface EZBContainer extends EZBManageableContainer {
037:
038: /**
039: * Gets a factory with its given name.
040: * @param factoryName the factory name.
041: * @return the factory found or null.
042: */
043: Factory getFactory(String factoryName);
044:
045: /**
046: * Gets the classloader of the container. May change at each restart of the container.
047: * @return a classloader.
048: */
049: ClassLoader getClassLoader();
050:
051: /**
052: * @return Returns the Container Configuration.
053: */
054: EZBContainerConfig getConfiguration();
055:
056: /**
057: * Gets the persistence manager object which manages all persistence-unit associated to this container.
058: * @return persistence unit manager object
059: */
060: EZBPersistenceUnitManager getPersistenceUnitManager();
061:
062: /**
063: * Sets the classloader. (if it was not already set else exception).
064: * @param classLoader to be used by the container
065: */
066: void setClassLoader(ClassLoader classLoader);
067:
068: /**
069: * Sets the persistence manager object which manages all persistence-unit associated to this container.
070: * @param persistenceUnitManager persistence unit manager object to set.
071: */
072: void setPersistenceUnitManager(
073: EZBPersistenceUnitManager persistenceUnitManager);
074:
075: /**
076: * Gets the permission manager (that manages EJB permissions).
077: * @return permission manager.
078: */
079: EZBPermissionManager getPermissionManager();
080:
081: /**
082: * Sets the permission manager (that manages EJB permissions).
083: * @param ezbPermissionManager the EasyBeans permission manager.
084: */
085: void setPermissionManager(EZBPermissionManager ezbPermissionManager);
086:
087: /**
088: * Sets the Application Name of this container (EAR case).
089: * @param applicationName the name of the application of this container.
090: */
091: void setApplicationName(final String applicationName);
092:
093: /**
094: * Gets the Application Name of this container (EAR case).
095: * @return the name of the application of this container.
096: */
097: String getApplicationName();
098:
099: /**
100: * Add extra archives for finding classes.
101: * @param extraArchives the given archives.
102: */
103: void setExtraArchives(final List<IArchive> extraArchives);
104:
105: }
|