org.apache.geronimo.j2ee.deployment
Class EARConfigBuilder

java.lang.Object
  extended by org.apache.geronimo.j2ee.deployment.EARConfigBuilder
All Implemented Interfaces:
ConfigurationBuilder, GBeanLifecycle, CorbaGBeanNameSource

public class EARConfigBuilder
extends Object
implements ConfigurationBuilder, CorbaGBeanNameSource, GBeanLifecycle


Field Summary
static GBeanInfo GBEAN_INFO
           
 
Fields inherited from interface org.apache.geronimo.deployment.ConfigurationBuilder
CONFIG_BUILDER
 
Constructor Summary
EARConfigBuilder(Environment defaultEnvironment, AbstractNameQuery transactionManagerAbstractName, AbstractNameQuery connectionTrackerAbstractName, AbstractNameQuery transactionalTimerAbstractName, AbstractNameQuery nonTransactionalTimerAbstractName, AbstractNameQuery corbaGBeanAbstractName, AbstractNameQuery serverName, Collection<? extends Repository> repositories, Collection ejbConfigBuilder, Collection webConfigBuilder, Collection connectorConfigBuilder, Collection resourceReferenceBuilder, Collection appClientConfigBuilder, Collection securityBuilders, Collection serviceBuilders, Collection<ModuleBuilderExtension> persistenceUnitBuilders, Collection<? extends ArtifactResolver> artifactResolvers, Kernel kernel)
           
EARConfigBuilder(Environment defaultEnvironment, AbstractNameQuery transactionManagerAbstractName, AbstractNameQuery connectionTrackerAbstractName, AbstractNameQuery transactionalTimerAbstractName, AbstractNameQuery nonTransactionalTimerAbstractName, AbstractNameQuery corbaGBeanAbstractName, AbstractNameQuery serverName, Collection<? extends Repository> repositories, ModuleBuilder ejbConfigBuilder, ModuleBuilder webConfigBuilder, ModuleBuilder connectorConfigBuilder, ActivationSpecInfoLocator activationSpecInfoLocator, ModuleBuilder appClientConfigBuilder, NamespaceDrivenBuilder securityBuilder, NamespaceDrivenBuilder serviceBuilder, ModuleBuilderExtension persistenceUnitBuilder, Naming naming, Collection<? extends ArtifactResolver> artifactResolvers)
           
 
Method Summary
 DeploymentContext buildConfiguration(boolean inPlaceDeployment, Artifact configId, Object plan, JarFile earFile, Collection configurationStores, ArtifactResolver artifactResolver, ConfigurationStore targetConfigurationStore)
          Build a configuration from a local file
 void doFail()
          Fails the GBean.
 void doStart()
          Starts the GBean.
 void doStop()
          Stops the target.
 Artifact getConfigurationID(Object plan, JarFile module, ModuleIDBuilder idBuilder)
          Checks what configuration URL will be used for the provided module.
 AbstractNameQuery getCorbaGBeanName()
           
 Object getDeploymentPlan(File planFile, JarFile jarFile, ModuleIDBuilder idBuilder)
          Builds a deployment plan specific to this builder from a planFile and/or module if this builder can process it.
static GBeanInfo getGBeanInfo()
           
 
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 GBeanInfo GBEAN_INFO
Constructor Detail

EARConfigBuilder

public EARConfigBuilder(Environment defaultEnvironment,
                        AbstractNameQuery transactionManagerAbstractName,
                        AbstractNameQuery connectionTrackerAbstractName,
                        AbstractNameQuery transactionalTimerAbstractName,
                        AbstractNameQuery nonTransactionalTimerAbstractName,
                        AbstractNameQuery corbaGBeanAbstractName,
                        AbstractNameQuery serverName,
                        Collection<? extends Repository> repositories,
                        Collection ejbConfigBuilder,
                        Collection webConfigBuilder,
                        Collection connectorConfigBuilder,
                        Collection resourceReferenceBuilder,
                        Collection appClientConfigBuilder,
                        Collection securityBuilders,
                        Collection serviceBuilders,
                        Collection<ModuleBuilderExtension> persistenceUnitBuilders,
                        Collection<? extends ArtifactResolver> artifactResolvers,
                        Kernel kernel)

EARConfigBuilder

public EARConfigBuilder(Environment defaultEnvironment,
                        AbstractNameQuery transactionManagerAbstractName,
                        AbstractNameQuery connectionTrackerAbstractName,
                        AbstractNameQuery transactionalTimerAbstractName,
                        AbstractNameQuery nonTransactionalTimerAbstractName,
                        AbstractNameQuery corbaGBeanAbstractName,
                        AbstractNameQuery serverName,
                        Collection<? extends Repository> repositories,
                        ModuleBuilder ejbConfigBuilder,
                        ModuleBuilder webConfigBuilder,
                        ModuleBuilder connectorConfigBuilder,
                        ActivationSpecInfoLocator activationSpecInfoLocator,
                        ModuleBuilder appClientConfigBuilder,
                        NamespaceDrivenBuilder securityBuilder,
                        NamespaceDrivenBuilder serviceBuilder,
                        ModuleBuilderExtension persistenceUnitBuilder,
                        Naming naming,
                        Collection<? extends ArtifactResolver> artifactResolvers)
Method Detail

doStart

public void doStart()
             throws Exception
Description copied from interface: GBeanLifecycle
Starts the GBean. This informs the GBean that it is about to transition to the running state.

Specified by:
doStart in interface GBeanLifecycle
Throws:
Exception - if the target failed to start; this will cause a transition to the failed state

doStop

public void doStop()
Description copied from interface: GBeanLifecycle
Stops the target. This informs the GBean that it is about to transition to the stopped state.

Specified by:
doStop in interface GBeanLifecycle

doFail

public void doFail()
Description copied from interface: GBeanLifecycle
Fails the GBean. This informs the GBean that it is about to transition to the failed state.

Specified by:
doFail in interface GBeanLifecycle

getCorbaGBeanName

public AbstractNameQuery getCorbaGBeanName()
Specified by:
getCorbaGBeanName in interface CorbaGBeanNameSource

getDeploymentPlan

public Object getDeploymentPlan(File planFile,
                                JarFile jarFile,
                                ModuleIDBuilder idBuilder)
                         throws DeploymentException
Description copied from interface: ConfigurationBuilder
Builds a deployment plan specific to this builder from a planFile and/or module if this builder can process it.

Specified by:
getDeploymentPlan in interface ConfigurationBuilder
Parameters:
planFile - the deployment plan to examine; can be null
jarFile - the URL of the module to examine; can be null
Returns:
the deployment plan, or null if this builder can not handle the module
Throws:
DeploymentException - if there was a problem with the configuration

getConfigurationID

public Artifact getConfigurationID(Object plan,
                                   JarFile module,
                                   ModuleIDBuilder idBuilder)
                            throws IOException,
                                   DeploymentException
Description copied from interface: ConfigurationBuilder
Checks what configuration URL will be used for the provided module.

Specified by:
getConfigurationID in interface ConfigurationBuilder
Parameters:
plan - the deployment plan
module - the module to build
Returns:
the ID that will be used for the Configuration
Throws:
IOException - if there was a problem reading or writing the files
DeploymentException - if there was a problem with the configuration

buildConfiguration

public DeploymentContext buildConfiguration(boolean inPlaceDeployment,
                                            Artifact configId,
                                            Object plan,
                                            JarFile earFile,
                                            Collection configurationStores,
                                            ArtifactResolver artifactResolver,
                                            ConfigurationStore targetConfigurationStore)
                                     throws IOException,
                                            DeploymentException
Description copied from interface: ConfigurationBuilder
Build a configuration from a local file

Specified by:
buildConfiguration in interface ConfigurationBuilder
Parameters:
inPlaceDeployment - true if the deployment is in-place.
plan - the deployment plan
earFile - the module to build
Returns:
the deployment context created from the deployment (the contexts must be closed by the caller)
Throws:
IOException - if there was a problem reading or writing the files
DeploymentException - if there was a problem with the configuration

getGBeanInfo

public static GBeanInfo getGBeanInfo()


Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.