org.apache.webbeans.config
Class BeansDeployer

java.lang.Object
  extended by org.apache.webbeans.config.BeansDeployer

public class BeansDeployer
extends Object

Deploys the all beans that are defined in the ScannerService at the scanner phase.


Field Summary
protected  boolean deployed
          Deployment is started or not
protected  boolean discoverEjb
          Discover ejb or not
protected  WebBeansXMLConfigurator xmlConfigurator
          XML Configurator
 
Constructor Summary
BeansDeployer(WebBeansXMLConfigurator xmlConfigurator, WebBeansContext webBeansContext)
          Creates a new deployer with given xml configurator.
 
Method Summary
protected  void addDefaultStereoTypes()
          Adds default stereotypes.
protected  void checkPassivationScope(javax.enterprise.inject.spi.Bean<?> beanObj)
          Check passivations.
protected  void checkSpecializations(ScannerService scanner)
          Checks specialization.
protected  void checkStereoTypes(ScannerService scanner)
          Check steretypes.
protected
<T> void
defineEnterpriseWebBean(Class<T> clazz, javax.enterprise.inject.spi.ProcessAnnotatedType<T> processAnnotatedTypeEvent)
          Defines enterprise bean via plugin.
protected
<T> boolean
defineManagedBean(Class<T> clazz, ProcessAnnotatedTypeImpl<T> processAnnotatedEvent)
          Defines and configures managed bean.
 void deploy(ScannerService scanner)
          Deploys all the defined web beans components in the container startup.
protected  void deployFromClassPath(ScannerService scanner)
          Discovers and deploys classes from class path.
protected  void deployFromXML(ScannerService scanner)
          Discovers and deploys alternatives, interceptors and decorators from XML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deployed

protected boolean deployed
Deployment is started or not


xmlConfigurator

protected WebBeansXMLConfigurator xmlConfigurator
XML Configurator


discoverEjb

protected boolean discoverEjb
Discover ejb or not

Constructor Detail

BeansDeployer

public BeansDeployer(WebBeansXMLConfigurator xmlConfigurator,
                     WebBeansContext webBeansContext)
Creates a new deployer with given xml configurator.

Parameters:
xmlConfigurator - xml configurator
webBeansContext -
Method Detail

deploy

public void deploy(ScannerService scanner)
Deploys all the defined web beans components in the container startup.

It deploys from the web-beans.xml files and from the class files. It uses the ScannerService to get classes.

Throws:
WebBeansDeploymentException - if any deployment exception occurs

deployFromClassPath

protected void deployFromClassPath(ScannerService scanner)
                            throws ClassNotFoundException
Discovers and deploys classes from class path.

Parameters:
scanner - discovery scanner
Throws:
ClassNotFoundException - if class not found

deployFromXML

protected void deployFromXML(ScannerService scanner)
                      throws WebBeansDeploymentException
Discovers and deploys alternatives, interceptors and decorators from XML.

Parameters:
scanner - discovery scanner
Throws:
WebBeansDeploymentException - if a problem occurs

checkSpecializations

protected void checkSpecializations(ScannerService scanner)
Checks specialization.

Parameters:
scanner - scanner instance

checkPassivationScope

protected void checkPassivationScope(javax.enterprise.inject.spi.Bean<?> beanObj)
Check passivations.


checkStereoTypes

protected void checkStereoTypes(ScannerService scanner)
Check steretypes.

Parameters:
scanner - scanner instance

addDefaultStereoTypes

protected void addDefaultStereoTypes()
Adds default stereotypes.


defineManagedBean

protected <T> boolean defineManagedBean(Class<T> clazz,
                                        ProcessAnnotatedTypeImpl<T> processAnnotatedEvent)
Defines and configures managed bean.

Type Parameters:
T - type info
Parameters:
clazz - bean class
Returns:
true if given class is configured as a managed bean

defineEnterpriseWebBean

protected <T> void defineEnterpriseWebBean(Class<T> clazz,
                                           javax.enterprise.inject.spi.ProcessAnnotatedType<T> processAnnotatedTypeEvent)
Defines enterprise bean via plugin.

Type Parameters:
T - bean class type
Parameters:
clazz - bean class


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