org.openejb
Class ContainerIndex

java.lang.Object
  extended byorg.openejb.ContainerIndex
All Implemented Interfaces:
EventListener, org.apache.geronimo.gbean.GBeanLifecycle, org.apache.geronimo.gbean.ReferenceCollectionListener

public class ContainerIndex
extends Object
implements org.apache.geronimo.gbean.ReferenceCollectionListener, org.apache.geronimo.gbean.GBeanLifecycle

This class is a bit crufty. Need something like this, but not static and more along the lines of a collection of containers registered as gbeans


Field Summary
static org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
           
 
Constructor Summary
protected ContainerIndex()
           
  ContainerIndex(Collection ejbContainers, org.apache.geronimo.kernel.Kernel kernel)
           
 
Method Summary
 Integer addContainer(EJBContainer container)
           
 void doFail()
           
 void doStart()
           
 void doStop()
           
 EJBContainer getContainer(int index)
           
 EJBContainer getContainer(Integer index)
           
 EJBContainer getContainer(String containerID)
           
 EJBContainer getContainerByJndiName(String jndiName)
           
 int getContainerIndex(Object containerID)
           
 int getContainerIndex(String containerID)
           
 int getContainerIndexByJndiName(String jndiName)
           
static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
           
static ContainerIndex getInstance()
           
 int length()
           
 void memberAdded(org.apache.geronimo.gbean.ReferenceCollectionEvent event)
           
 void memberRemoved(org.apache.geronimo.gbean.ReferenceCollectionEvent event)
           
 void removeContainer(EJBContainer container)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
Constructor Detail

ContainerIndex

protected ContainerIndex()

ContainerIndex

public ContainerIndex(Collection ejbContainers,
                      org.apache.geronimo.kernel.Kernel kernel)
Method Detail

getInstance

public static ContainerIndex getInstance()

doStart

public void doStart()
             throws Exception
Specified by:
doStart in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
Exception

doStop

public void doStop()
            throws Exception
Specified by:
doStop in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
Exception

doFail

public void doFail()
Specified by:
doFail in interface org.apache.geronimo.gbean.GBeanLifecycle

addContainer

public Integer addContainer(EJBContainer container)

removeContainer

public void removeContainer(EJBContainer container)

memberAdded

public void memberAdded(org.apache.geronimo.gbean.ReferenceCollectionEvent event)
Specified by:
memberAdded in interface org.apache.geronimo.gbean.ReferenceCollectionListener

memberRemoved

public void memberRemoved(org.apache.geronimo.gbean.ReferenceCollectionEvent event)
Specified by:
memberRemoved in interface org.apache.geronimo.gbean.ReferenceCollectionListener

length

public int length()

getContainerIndex

public int getContainerIndex(Object containerID)

getContainerIndex

public int getContainerIndex(String containerID)

getContainerIndexByJndiName

public int getContainerIndexByJndiName(String jndiName)

getContainer

public EJBContainer getContainer(String containerID)
                          throws ContainerNotFoundException
Throws:
ContainerNotFoundException

getContainer

public EJBContainer getContainer(Integer index)

getContainerByJndiName

public EJBContainer getContainerByJndiName(String jndiName)

getContainer

public EJBContainer getContainer(int index)

getGBeanInfo

public static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()


Copyright © 1999-2006 OpenEJB. All Rights Reserved.