org.apache.webbeans.ejb
Class EjbPlugin

java.lang.Object
  extended by org.apache.webbeans.spi.plugins.AbstractOwbPlugin
      extended by org.apache.webbeans.ejb.EjbPlugin
All Implemented Interfaces:
org.apache.openejb.assembler.classic.DeploymentListener, OpenWebBeansEjbPlugin, OpenWebBeansPlugin

public class EjbPlugin
extends AbstractOwbPlugin
implements OpenWebBeansEjbPlugin, org.apache.openejb.assembler.classic.DeploymentListener

EJB related stuff.

EJB functionality depends on OpenEJB.

Version:
$Rev: 985746 $ $Date: 2010-08-15 22:25:31 +0200 (So, 15 Aug 2010) $

Constructor Summary
EjbPlugin()
           
 
Method Summary
 void afterApplicationCreated(org.apache.openejb.assembler.classic.AppInfo appInfo)
          OpenEJB call back method It is used to get the list of deployed application and store the Stateless and Stateful pools localy.
 void beforeApplicationDestroyed(org.apache.openejb.assembler.classic.AppInfo appInfo)
          OpenEJB callback method Not used.
 org.apache.openejb.assembler.classic.JndiBuilder.JndiNameStrategy createStrategy(org.apache.openejb.assembler.classic.AppInfo appInfo, List<org.apache.openejb.DeploymentInfo> deployments, org.apache.openejb.DeploymentInfo deployment)
          Creates strategy for jndi naming.
<T> Bean<T>
defineSessionBean(Class<T> clazz, ProcessAnnotatedType<T> processAnnotatedTypeEvent)
          
 Map<String,EJBInstanceProxy<?>> getEjbBindings(org.apache.openejb.core.CoreDeploymentInfo deployment)
          Gets map of intfc --> ejb proxy
<T> T
getEjbInstance(String intfName, Class<T> intf)
           
 Object getSessionBeanProxy(Bean<?> bean, Class<?> iface, CreationalContext<?> creationalContext)
          
<T> T
getSupportedService(Class<T> serviceClass)
          
 void isManagedBean(Class<?> clazz)
          
 boolean isSessionBean(Class<?> clazz)
          
 boolean isSingletonBean(Class<?> clazz)
          
 boolean isStatefulBean(Class<?> clazz)
          
 boolean isStatelessBean(Class<?> clazz)
          
 void setUseInTest(boolean useInTest)
           
 void shutDown()
           
 void startUp()
           
 boolean supportService(Class<?> serviceClass)
          
 
Methods inherited from class org.apache.webbeans.spi.plugins.AbstractOwbPlugin
supportsJavaEeComponentInjections
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.webbeans.spi.plugins.OpenWebBeansPlugin
supportsJavaEeComponentInjections
 

Constructor Detail

EjbPlugin

public EjbPlugin()
Method Detail

shutDown

public void shutDown()
              throws WebBeansConfigurationException
Specified by:
shutDown in interface OpenWebBeansPlugin
Overrides:
shutDown in class AbstractOwbPlugin
Throws:
WebBeansConfigurationException

getEjbInstance

public <T> T getEjbInstance(String intfName,
                            Class<T> intf)
                 throws Exception
Throws:
Exception

startUp

public void startUp()
             throws WebBeansConfigurationException
Specified by:
startUp in interface OpenWebBeansPlugin
Overrides:
startUp in class AbstractOwbPlugin
Throws:
WebBeansConfigurationException

setUseInTest

public void setUseInTest(boolean useInTest)

afterApplicationCreated

public void afterApplicationCreated(org.apache.openejb.assembler.classic.AppInfo appInfo)
OpenEJB call back method It is used to get the list of deployed application and store the Stateless and Stateful pools localy.

Specified by:
afterApplicationCreated in interface org.apache.openejb.assembler.classic.DeploymentListener
Parameters:
appInfo - applications informations

beforeApplicationDestroyed

public void beforeApplicationDestroyed(org.apache.openejb.assembler.classic.AppInfo appInfo)
OpenEJB callback method Not used.

Specified by:
beforeApplicationDestroyed in interface org.apache.openejb.assembler.classic.DeploymentListener

defineSessionBean

public <T> Bean<T> defineSessionBean(Class<T> clazz,
                                     ProcessAnnotatedType<T> processAnnotatedTypeEvent)

Specified by:
defineSessionBean in interface OpenWebBeansEjbPlugin

isSessionBean

public boolean isSessionBean(Class<?> clazz)

Specified by:
isSessionBean in interface OpenWebBeansEjbPlugin

isManagedBean

public void isManagedBean(Class<?> clazz)
                   throws WebBeansConfigurationException

Specified by:
isManagedBean in interface OpenWebBeansPlugin
Overrides:
isManagedBean in class AbstractOwbPlugin
Throws:
WebBeansConfigurationException

isSingletonBean

public boolean isSingletonBean(Class<?> clazz)

Specified by:
isSingletonBean in interface OpenWebBeansEjbPlugin

isStatefulBean

public boolean isStatefulBean(Class<?> clazz)

Specified by:
isStatefulBean in interface OpenWebBeansEjbPlugin

isStatelessBean

public boolean isStatelessBean(Class<?> clazz)

Specified by:
isStatelessBean in interface OpenWebBeansEjbPlugin

getSessionBeanProxy

public Object getSessionBeanProxy(Bean<?> bean,
                                  Class<?> iface,
                                  CreationalContext<?> creationalContext)

Specified by:
getSessionBeanProxy in interface OpenWebBeansEjbPlugin

getSupportedService

public <T> T getSupportedService(Class<T> serviceClass)

Specified by:
getSupportedService in interface OpenWebBeansPlugin
Overrides:
getSupportedService in class AbstractOwbPlugin

supportService

public boolean supportService(Class<?> serviceClass)

Specified by:
supportService in interface OpenWebBeansPlugin
Overrides:
supportService in class AbstractOwbPlugin

createStrategy

public org.apache.openejb.assembler.classic.JndiBuilder.JndiNameStrategy createStrategy(org.apache.openejb.assembler.classic.AppInfo appInfo,
                                                                                        List<org.apache.openejb.DeploymentInfo> deployments,
                                                                                        org.apache.openejb.DeploymentInfo deployment)
                                                                                 throws org.apache.openejb.OpenEJBException
Creates strategy for jndi naming.

Parameters:
appInfo - app info
deployments - deployments
deployment - deployment
Returns:
strategy
Throws:
org.apache.openejb.OpenEJBException - if any exception

getEjbBindings

public Map<String,EJBInstanceProxy<?>> getEjbBindings(org.apache.openejb.core.CoreDeploymentInfo deployment)
Gets map of intfc --> ejb proxy

Parameters:
deployment - deployment info
Returns:
map of ejb proxy instance with interface


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.