CVS: jcontainer/loom/engine/src/java/org/jcontainer/loom/components/deployer DefaultDeployer.java,1.23,1.24 PhoenixProfileBuilder.java,1.17,1.18

Peter Donald <pdonald-yCVjj/[email protected]> Sat, 29 Nov 2003 07:44:49 -0600
Newsgroups gmane.comp.java.jcontainer.cvs
Message-ID <[email protected]>
Update of /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/deployer
In directory hogshead.codehaus.org:/tmp/cvs-serv31016/loom/engine/src/java/org/jcontainer/loom/components/deployer

Modified Files:
	DefaultDeployer.java PhoenixProfileBuilder.java 
Log Message:
Remove email addie

Index: DefaultDeployer.java
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/deployer/DefaultDeployer.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- DefaultDeployer.java	3 Nov 2003 06:43:15 -0000	1.23
+++ DefaultDeployer.java	29 Nov 2003 13:44:16 -0000	1.24
@@ -125,7 +125,7 @@
 /**
  * Deploy .sar files into a kernel using this class.
  *
- * @author <a href="mailto:peter at realityforge.org">Peter Donald</a>
+ * @author Peter Donald
  * @dna.component
  * @mx.component
  */
@@ -162,8 +162,11 @@
             lookup( ConfigurationInterceptor.class.getName() );
         m_classLoaderManager = (ClassLoaderManager)locator.
             lookup( ClassLoaderManager.class.getName() );
-        m_logManager = (LogManager)locator.lookup( LogManager.class.getName() );
-        m_validator = (ConfigurationValidator)locator.lookup( ConfigurationValidator.class.getName() );
+        m_logManager =
+        (LogManager)locator.lookup( LogManager.class.getName() );
+        m_validator =
+        (ConfigurationValidator)locator.lookup(
+            ConfigurationValidator.class.getName() );
         m_installer = (Installer)locator.lookup( Installer.class.getName() );
     }
 
@@ -174,8 +177,8 @@
     }
 
     /**
-     * Dispose the dpeloyer which effectively means undeploying
-     * all the currently deployed apps.
+     * Dispose the dpeloyer which effectively means undeploying all the
+     * currently deployed apps.
      */
     public void dispose()
     {
@@ -201,9 +204,9 @@
     }
 
     /**
+     * @throws LoomException if an error occurs
      * @mx.operation description="Redeploy an installation."
      * @mx.parameter name="name" description="the name of deployment"
-     * @throws LoomException if an error occurs
      */
     public void redeploy( final String name )
         throws LoomException
@@ -218,7 +221,8 @@
         }
         try
         {
-            final File source = (File)installation.get( ContainerConstants.INSTALL_SOURCE );
+            final File source = (File)installation.get(
+                ContainerConstants.INSTALL_SOURCE );
             redeploy( name, source.toURL() );
         }
         catch( final LoomException e )
@@ -258,9 +262,9 @@
     }
 
     /**
+     * @throws LoomException if an error occurs
      * @mx.operation description="Undeploy an installation."
      * @mx.parameter name="name" description="the name of deployment"
-     * @throws LoomException if an error occurs
      */
     public void undeploy( final String name )
         throws LoomException
@@ -285,10 +289,10 @@
     }
 
     /**
+     * @throws LoomException if an error occurs
      * @mx.operation description="Deploy an installation."
      * @mx.parameter name="name" description="the name of deployment"
      * @mx.parameter name="sarURL" description="the installation to deploy"
-     * @throws LoomException if an error occurs
      */
     public void deploy( final String name, final String sarURL )
         throws LoomException
@@ -304,10 +308,10 @@
     }
 
     /**
+     * @throws LoomException if an error occurs
      * @mx.operation description="Deploy an installation."
      * @mx.parameter name="name" description="the name of deployment"
      * @mx.parameter name="location" description="the installation to deploy"
-     * @throws LoomException if an error occurs
      */
     public void deploy( final String name, final URL location )
         throws LoomException
@@ -335,9 +339,13 @@
             installation = m_installer.install( name, location );
 
             final Configuration config =
-                getConfigurationFor( installation, ContainerConstants.INSTALL_CONFIG, null );
+                getConfigurationFor( installation,
+                                     ContainerConstants.INSTALL_CONFIG,
+                                     null );
             final Configuration environment =
-                getConfigurationFor( installation, ContainerConstants.INSTALL_ENVIRONMENT, null );
+                getConfigurationFor( installation,
+                                     ContainerConstants.INSTALL_ENVIRONMENT,
+                                     null );
             final Configuration assembly =
                 getConfigurationFor( installation,
                                      ContainerConstants.INSTALL_ASSEMBLY,
@@ -358,7 +366,10 @@
             //specific classloader to load the targets which will cause
             //CastClassExceptions
             final LoggerStore store =
-                m_logManager.createHierarchy( logs, homeDirectory, workDirectory, data );
+                m_logManager.createHierarchy( logs,
+                                              homeDirectory,
+                                              workDirectory,
+                                              data );
 
             final ClassLoaderSet classLoaderSet =
                 m_classLoaderManager.createClassLoaderSet( environment,
@@ -367,16 +378,19 @@
                                                            workDirectory );
             final ClassLoader classLoader = classLoaderSet.getDefaultClassLoader();
 
-            final Configuration newConfig = processConfiguration( name, config );
+            final Configuration newConfig = processConfiguration( name,
+                                                                  config );
 
             final Map parameters = new HashMap();
             parameters.put( ContainerConstants.ASSEMBLY_NAME, name );
             parameters.put( ContainerConstants.ASSEMBLY_DESCRIPTOR, assembly );
             parameters.put( ContainerConstants.CONFIG_DESCRIPTOR, newConfig );
-            parameters.put( ContainerConstants.ASSEMBLY_CLASSLOADER, classLoader );
+            parameters.put( ContainerConstants.ASSEMBLY_CLASSLOADER,
+                            classLoader );
 
             //assemble all the blocks for application
-            final PartitionProfile profile = m_builder.buildProfile( parameters );
+            final PartitionProfile profile = m_builder.buildProfile(
+                parameters );
 
             m_verifier.verifySar( profile, classLoader );
 
@@ -434,26 +448,30 @@
      * @return the Configuration
      * @throws LoomException if an error occurs
      */
-    private Configuration getConfigurationFor( final Map install, final String key, final String schema )
+    private Configuration getConfigurationFor( final Map install,
+                                               final String key,
+                                               final String schema )
         throws LoomException
     {
         final String location = (String)install.get( key );
         try
         {
-            return ConfigurationBuilder.build( new InputSource( location ), schema, getLogger() );
+            return ConfigurationBuilder.build( new InputSource( location ),
+                                               schema,
+                                               getLogger() );
         }
         catch( final Exception e )
         {
-            final String message = REZ.format( "deploy.error.config.create", location );
+            final String message = REZ.format( "deploy.error.config.create",
+                                               location );
             getLogger().error( message, e );
             throw new LoomException( message, e );
         }
     }
 
     /**
-     * Pass the configuration to the configurationManager
-     * and give it a chance to process the configuration in
-     * one form or another.
+     * Pass the configuration to the configurationManager and give it a chance
+     * to process the configuration in one form or another.
      *
      * @param configuration the block configurations.
      * @throws LoomException if an error occurs
@@ -487,7 +505,8 @@
     }
 
     /**
-     * Verify that configuration present in config file is valid for this assembly.
+     * Verify that configuration present in config file is valid for this
+     * assembly.
      *
      * @param profile the PartitionProfile
      * @param config the block configurations.
@@ -522,7 +541,8 @@
     }
 
     /**
-     * Verify that configuration conforms to schema for all components in this assembly.
+     * Verify that configuration conforms to schema for all components in this
+     * assembly.
      *
      * @param profile the PartitionProfile
      * @param classLoader the classloader application is loaded in
@@ -554,7 +574,8 @@
             {
                 final String message =
                     "Unable to validate configuration of component " +
-                    component.getTemplate().getName() + " of type " +
+                    component.getTemplate().getName() +
+                    " of type " +
                     component.getInfo().getType().getName();
                 throw new LoomException( message );
             }

Index: PhoenixProfileBuilder.java
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/deployer/PhoenixProfileBuilder.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- PhoenixProfileBuilder.java	3 Nov 2003 06:43:15 -0000	1.17
+++ PhoenixProfileBuilder.java	29 Nov 2003 13:44:16 -0000	1.18
@@ -23,8 +23,7 @@
 import org.jcontainer.loom.interfaces.ContainerConstants;
 
 /**
- *
- * @author <a href="mailto:peter at realityforge.org">Peter Donald</a>
+ * @author Peter Donald
  * @version $Revision$ $Date$
  */
 public class PhoenixProfileBuilder
@@ -35,17 +34,21 @@
     public PartitionProfile buildProfile( final Map parameters )
         throws Exception
     {
-        final PartitionTemplate metaData = m_assembler.buildAssembly( parameters );
+        final PartitionTemplate metaData = m_assembler.buildAssembly(
+            parameters );
         final ClassLoader classLoader =
-            (ClassLoader)parameters.get( ContainerConstants.ASSEMBLY_CLASSLOADER );
-        final ComponentFactory factory = new DefaultComponentFactory( classLoader );
+            (ClassLoader)parameters.get(
+                ContainerConstants.ASSEMBLY_CLASSLOADER );
+        final ComponentFactory factory = new DefaultComponentFactory(
+            classLoader );
 
         return assembleSarProfile( metaData, factory, classLoader );
     }
 
-    private PartitionProfile assembleSarProfile( final PartitionTemplate metaData,
-                                                 final ComponentFactory factory,
-                                                 final ClassLoader classLoader )
+    private PartitionProfile assembleSarProfile(
+        final PartitionTemplate metaData,
+        final ComponentFactory factory,
+        final ClassLoader classLoader )
         throws Exception
     {
         final PartitionTemplate blockPartition =
@@ -53,34 +56,42 @@
         final PartitionTemplate listenerPartition =
             metaData.getPartition( ContainerConstants.LISTENER_PARTITION );
 
-        final PartitionProfile blockProfile = assembleProfile( blockPartition, factory );
+        final PartitionProfile blockProfile = assembleProfile( blockPartition,
+                                                               factory );
         final PartitionProfile listenerProfile =
             assembleListenerProfile( listenerPartition, classLoader );
 
-        final PartitionProfile[] profiles = new PartitionProfile[]{blockProfile, listenerProfile};
+        final PartitionProfile[] profiles = new PartitionProfile[]{
+            blockProfile, listenerProfile};
         return new PartitionProfile( metaData,
                                      profiles,
                                      ComponentProfile.EMPTY_SET );
     }
 
-    private PartitionProfile assembleListenerProfile( final PartitionTemplate metaData,
-                                                      final ClassLoader classLoader )
-    throws Exception
+    private PartitionProfile assembleListenerProfile(
+        final PartitionTemplate metaData,
+        final ClassLoader classLoader )
+        throws Exception
     {
         final ArrayList componentSet = new ArrayList();
         final ComponentTemplate[] components = metaData.getComponents();
         for( int i = 0; i < components.length; i++ )
         {
             final ComponentTemplate component = components[ i ];
-            final Class type = classLoader.loadClass( component.getImplementationKey() );
+            final Class type = classLoader.loadClass(
+                component.getImplementationKey() );
             final ComponentInfo info = createListenerInfo( type );
-            final ComponentProfile profile = new ComponentProfile( info, component );
+            final ComponentProfile profile = new ComponentProfile( info,
+                                                                   component );
             componentSet.add( profile );
         }
 
         final ComponentProfile[] profiles =
-            (ComponentProfile[])componentSet.toArray( new ComponentProfile[ componentSet.size() ] );
-        return new PartitionProfile( metaData, PartitionProfile.EMPTY_SET, profiles );
+            (ComponentProfile[])componentSet.toArray(
+                new ComponentProfile[ componentSet.size() ] );
+        return new PartitionProfile( metaData,
+                                     PartitionProfile.EMPTY_SET,
+                                     profiles );
     }
 
     private PartitionProfile assembleProfile( final PartitionTemplate metaData,
@@ -92,7 +103,8 @@
         for( int i = 0; i < partitions.length; i++ )
         {
             final PartitionTemplate partition = partitions[ i ];
-            final PartitionProfile profile = assembleProfile( partition, factory );
+            final PartitionProfile profile = assembleProfile( partition,
+                                                              factory );
             partitionSet.add( profile );
         }
 
@@ -103,19 +115,25 @@
             final ComponentTemplate component = components[ i ];
             final ComponentInfo info =
                 factory.createInfo( component.getImplementationKey() );
-            final ComponentProfile profile = new ComponentProfile( info, component );
+            final ComponentProfile profile = new ComponentProfile( info,
+                                                                   component );
             componentSet.add( profile );
         }
 
         final PartitionProfile[] partitionProfiles =
-            (PartitionProfile[])partitionSet.toArray( new PartitionProfile[ partitionSet.size() ] );
+            (PartitionProfile[])partitionSet.toArray(
+                new PartitionProfile[ partitionSet.size() ] );
         final ComponentProfile[] componentProfiles =
-            (ComponentProfile[])componentSet.toArray( new ComponentProfile[ componentSet.size() ] );
-        return new PartitionProfile( metaData, partitionProfiles, componentProfiles );
+            (ComponentProfile[])componentSet.toArray(
+                new ComponentProfile[ componentSet.size() ] );
+        return new PartitionProfile( metaData,
+                                     partitionProfiles,
+                                     componentProfiles );
     }
 
     /**
-     * Create a {@link org.jcontainer.loom.components.util.info.ComponentInfo} for a Listener with specified classname.
+     * Create a {@link org.jcontainer.loom.components.util.info.ComponentInfo}
+     * for a Listener with specified classname.
      *
      * @param type the listener type
      * @return the ComponentInfo for listener