org.jboss.ejb3.embedded
Class JBossEJBContainer

java.lang.Object
  extended by javax.ejb.EJBContainer
      extended by org.jboss.ejb3.embedded.JBossEJBContainer

public class JBossEJBContainer
extends javax.ejb.EJBContainer

Version:
$Revision: $
Author:
Carlo de Wolf

Field Summary
 
Fields inherited from class javax.ejb.EJBContainer
EMBEDDABLE_APP_NAME_PROPERTY, EMBEDDABLE_INITIAL, EMBEDDABLE_INITIAL_PROPERTY, EMBEDDABLE_MODULES_PROPERTY
 
Constructor Summary
JBossEJBContainer(Map<?,?> properties, String... modules)
           
 
Method Summary
 void close()
           
 void deploy(org.jboss.deployers.client.spi.Deployment... deployments)
           
 org.jboss.deployers.client.spi.Deployment deploy(URL url)
           
protected  void deployDeployDirectory()
           
protected  Object getBean(Object name, org.jboss.dependency.spi.ControllerState state)
          Get a bean
protected
<T> T
getBean(Object name, org.jboss.dependency.spi.ControllerState state, Class<T> expected)
          Get a bean
protected  org.jboss.kernel.spi.dependency.KernelControllerContext getControllerContext(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, Object name, org.jboss.dependency.spi.ControllerState state)
          Handle not found context.
static JBossEJBContainer on(javax.ejb.EJBContainer container)
           
 
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
 

Constructor Detail

JBossEJBContainer

public JBossEJBContainer(Map<?,?> properties,
                         String... modules)
                  throws Throwable
Throws:
Throwable
Method Detail

on

public static JBossEJBContainer on(javax.ejb.EJBContainer container)

close

public void close()
Specified by:
close in class javax.ejb.EJBContainer

deploy

public void deploy(org.jboss.deployers.client.spi.Deployment... deployments)
            throws org.jboss.deployers.spi.DeploymentException,
                   IOException
Throws:
org.jboss.deployers.spi.DeploymentException
IOException

deploy

public org.jboss.deployers.client.spi.Deployment deploy(URL url)
                                                 throws org.jboss.deployers.spi.DeploymentException,
                                                        IOException
Throws:
org.jboss.deployers.spi.DeploymentException
IOException

deployDeployDirectory

protected void deployDeployDirectory()
                              throws org.jboss.deployers.spi.DeploymentException,
                                     IOException
Throws:
org.jboss.deployers.spi.DeploymentException
IOException

getBean

protected Object getBean(Object name,
                         org.jboss.dependency.spi.ControllerState state)
                  throws IllegalStateException
Get a bean

Parameters:
name - the name of the bean
state - the state of the bean
Returns:
the bean
Throws:
IllegalStateException - when the bean does not exist at that state

getBean

protected <T> T getBean(Object name,
                        org.jboss.dependency.spi.ControllerState state,
                        Class<T> expected)
             throws ClassCastException,
                    IllegalStateException
Get a bean

Type Parameters:
T - the expected type
Parameters:
name - the name of the bean
state - the state of the bean
expected - the expected type
Returns:
the bean
Throws:
ClassCastException - when the bean can not be cast to the expected type
IllegalStateException - when the bean does not exist at that state

getControllerContext

protected org.jboss.kernel.spi.dependency.KernelControllerContext getControllerContext(Object name,
                                                                                       org.jboss.dependency.spi.ControllerState state)
                                                                                throws IllegalStateException
Get a context

Parameters:
name - the name of the bean
state - the state of the bean
Returns:
the context
Throws:
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,
                                                                                        Object name,
                                                                                        org.jboss.dependency.spi.ControllerState state)
                                                                                 throws IllegalStateException
Handle not found context.

Parameters:
controller - the controller
name - the name of the bean
state - the state of the bean
Returns:
the context
Throws:
IllegalStateException - when the context does not exist at that state


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.