CVS: jcontainer/loom/engine/src/java/org/jcontainer/loom/components/kernel DefaultApplicationContext.java,1.17,1.18 DefaultKernel.java,1.22,1.23 SarEntry.java,1.7,1.8

Peter Donald <pdonald-yCVjj/[email protected]> Thu, 4 Dec 2003 01:57:29 -0600
Newsgroups gmane.comp.java.jcontainer.cvs
Message-ID <[email protected]>
Update of /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/kernel
In directory hogshead.codehaus.org:/tmp/cvs-serv4320/loom/engine/src/java/org/jcontainer/loom/components/kernel

Modified Files:
	DefaultApplicationContext.java DefaultKernel.java 
	SarEntry.java 
Log Message:
Remove access to classloaders via BlockContext as that was not in last release of phoenix-api

Index: DefaultApplicationContext.java
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/kernel/DefaultApplicationContext.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- DefaultApplicationContext.java	3 Dec 2003 10:44:41 -0000	1.17
+++ DefaultApplicationContext.java	4 Dec 2003 07:56:57 -0000	1.18
@@ -90,7 +90,6 @@
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.InputStream;
-import java.util.Map;
 import org.apache.avalon.framework.logger.Logger;
 import org.apache.excalibur.instrument.InstrumentManager;
 import org.codehaus.spice.loggerstore.LoggerStore;
@@ -141,9 +140,6 @@
     private final File m_workDirectory;
     private final File m_homeDirectory;
 
-    /** The map containing all the named loaders. */
-    private final Map m_loaders;
-
     /** The kernel associate with context */
     private Kernel m_kernel;
 
@@ -151,8 +147,7 @@
                                          final File homeDirectory,
                                          final File workDirectory,
                                          final ClassLoader classLoader,
-                                         final LoggerStore store,
-                                         final Map loaders )
+                                         final LoggerStore store )
     {
         if( null == profile )
         {
@@ -179,7 +174,6 @@
         m_store = store;
         m_workDirectory = workDirectory;
         m_homeDirectory = homeDirectory;
-        m_loaders = loaders;
     }
 
     /**
@@ -320,20 +314,6 @@
         throws Exception
     {
         m_blockManager.unregister( name );
-    }
-
-    public ClassLoader getClassLoader( final String name )
-        throws Exception
-    {
-        final ClassLoader classLoader = (ClassLoader)m_loaders.get( name );
-        if( null == classLoader )
-        {
-            final String message =
-                REZ.format( "applicationcontext.error.noloader",
-                            name );
-            throw new Exception( message );
-        }
-        return classLoader;
     }
 
     /**

Index: DefaultKernel.java
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/kernel/DefaultKernel.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- DefaultKernel.java	3 Dec 2003 07:40:19 -0000	1.22
+++ DefaultKernel.java	4 Dec 2003 07:56:57 -0000	1.23
@@ -88,7 +88,6 @@
 
 import java.io.File;
 import java.util.HashMap;
-import java.util.Map;
 import org.apache.avalon.framework.container.ContainerUtil;
 import org.apache.excalibur.instrument.InstrumentManager;
 import org.codehaus.spice.loggerstore.LoggerStore;
@@ -125,7 +124,7 @@
  * configured and initialized.
  *
  * @author Peter Donald
- * @author <a href="mailto:[email protected]">Leo Simons</a>
+ * @author Leo Simons
  * @dna.component
  * @mx.component
  */
@@ -404,8 +403,7 @@
                                 final File homeDirectory,
                                 final File workDirectory,
                                 final ClassLoader classLoader,
-                                final LoggerStore store,
-                                final Map classloaders )
+                                final LoggerStore store )
         throws Exception
     {
 
@@ -413,7 +411,7 @@
         final SarEntry entry =
             new SarEntry( profile, homeDirectory,
                           workDirectory, classLoader,
-                          store, classloaders );
+                          store );
         m_entries.put( name, entry );
 
         try
@@ -422,8 +420,8 @@
         }
         catch( final Exception e )
         {
-            final String message = REZ.format( "kernel.error.entry.start",
-                                               name );
+            final String message =
+                REZ.format( "kernel.error.entry.start", name );
             getLogger().warn( message, e );
             throw e;
         }
@@ -439,14 +437,12 @@
                                            entry.getHomeDirectory(),
                                            entry.getWorkDirectory(),
                                            entry.getClassLoader(),
-                                           entry.getLoggerStore(),
-                                           entry.getClassLoaders() );
+                                           entry.getLoggerStore() );
 
-        org.jcontainer.dna.impl.ContainerUtil.enableLogging( context,
-                                                             createContextLogger(
-                                                                 name ) );
-        org.jcontainer.dna.impl.ContainerUtil.compose( context,
-                                                       createResourceLocator() );
+        org.jcontainer.dna.impl.ContainerUtil.
+            enableLogging( context, createContextLogger( name ) );
+        org.jcontainer.dna.impl.ContainerUtil.
+            compose( context, createResourceLocator() );
         org.jcontainer.dna.impl.ContainerUtil.initialize( context );
         return context;
     }

Index: SarEntry.java
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/kernel/SarEntry.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- SarEntry.java	3 Dec 2003 10:44:41 -0000	1.7
+++ SarEntry.java	4 Dec 2003 07:56:57 -0000	1.8
@@ -87,7 +87,6 @@
 package org.jcontainer.loom.components.kernel;
 
 import java.io.File;
-import java.util.Map;
 import org.codehaus.spice.loggerstore.LoggerStore;
 import org.jcontainer.loom.components.util.profile.PartitionProfile;
 import org.jcontainer.loom.interfaces.Application;
@@ -105,15 +104,13 @@
     private final LoggerStore m_store;
     private final File m_homeDirectory;
     private final File m_workDirectory;
-    private final Map m_classLoaders;
     private Application m_application;
 
     protected SarEntry( final PartitionProfile profile,
                         final File homeDirectory,
                         final File workDirectory,
                         final ClassLoader classLoader,
-                        final LoggerStore store,
-                        final Map classLoaders )
+                        final LoggerStore store )
     {
         if( null == profile )
         {
@@ -135,17 +132,12 @@
         {
             throw new NullPointerException( "homeDirectory" );
         }
-        if( null == classLoaders )
-        {
-            throw new NullPointerException( "classLoaders" );
-        }
 
         m_profile = profile;
         m_classLoader = classLoader;
         m_store = store;
         m_homeDirectory = homeDirectory;
         m_workDirectory = workDirectory;
-        m_classLoaders = classLoaders;
     }
 
     public File getHomeDirectory()
@@ -181,10 +173,5 @@
     public ClassLoader getClassLoader()
     {
         return m_classLoader;
-    }
-
-    public Map getClassLoaders()
-    {
-        return m_classLoaders;
     }
 }