org.jboss.ejb3.embedded
Class JBossEJBContainer
java.lang.Object
javax.ejb.EJBContainer
org.jboss.ejb3.embedded.JBossEJBContainer
public class JBossEJBContainer
- extends javax.ejb.EJBContainer
| Fields inherited from class javax.ejb.EJBContainer |
EMBEDDABLE_INITIAL, EMBEDDABLE_MODULES_PROPERTY |
|
Constructor Summary |
JBossEJBContainer(java.util.Map<?,?> properties,
java.lang.String... modules)
|
|
Method Summary |
void |
close()
|
protected java.lang.Object |
getBean(java.lang.Object name,
org.jboss.dependency.spi.ControllerState state)
Get a bean |
protected
|
getBean(java.lang.Object name,
org.jboss.dependency.spi.ControllerState state,
java.lang.Class<T> expected)
Get a bean |
protected org.jboss.kernel.spi.dependency.KernelControllerContext |
getControllerContext(java.lang.Object name,
org.jboss.dependency.spi.ControllerState state)
Get a context |
protected org.jboss.kernel.spi.dependency.KernelControllerContext |
handleNotFoundContext(org.jboss.dependency.spi.Controller controller,
java.lang.Object name,
org.jboss.dependency.spi.ControllerState state)
Handle not found context. |
| Methods inherited from class javax.ejb.EJBContainer |
createEJBContainer, createEJBContainer, getContext, getCurrentEJBContainer |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JBossEJBContainer
public JBossEJBContainer(java.util.Map<?,?> properties,
java.lang.String... modules)
throws java.lang.Throwable
- Throws:
java.lang.Throwable
close
public void close()
- Specified by:
close in class javax.ejb.EJBContainer
getBean
protected java.lang.Object getBean(java.lang.Object name,
org.jboss.dependency.spi.ControllerState state)
throws java.lang.IllegalStateException
- Get a bean
- Parameters:
name - the name of the beanstate - the state of the bean
- Returns:
- the bean
- Throws:
java.lang.IllegalStateException - when the bean does not exist at that state
getBean
protected <T> T getBean(java.lang.Object name,
org.jboss.dependency.spi.ControllerState state,
java.lang.Class<T> expected)
throws java.lang.ClassCastException,
java.lang.IllegalStateException
- Get a bean
- Type Parameters:
T - the expected type- Parameters:
name - the name of the beanstate - the state of the beanexpected - the expected type
- Returns:
- the bean
- Throws:
java.lang.ClassCastException - when the bean can not be cast to the expected type
java.lang.IllegalStateException - when the bean does not exist at that state
getControllerContext
protected org.jboss.kernel.spi.dependency.KernelControllerContext getControllerContext(java.lang.Object name,
org.jboss.dependency.spi.ControllerState state)
throws java.lang.IllegalStateException
- Get a context
- Parameters:
name - the name of the beanstate - the state of the bean
- Returns:
- the context
- Throws:
java.lang.IllegalStateException - when the context does not exist at that state
handleNotFoundContext
protected org.jboss.kernel.spi.dependency.KernelControllerContext handleNotFoundContext(org.jboss.dependency.spi.Controller controller,
java.lang.Object name,
org.jboss.dependency.spi.ControllerState state)
throws java.lang.IllegalStateException
- Handle not found context.
- Parameters:
controller - the controllername - the name of the beanstate - the state of the bean
- Returns:
- the context
- Throws:
java.lang.IllegalStateException - when the context does not exist at that state