hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hivemind-...@jakarta.apache.org
Subject [Jakarta HiveMind Wiki] Updated: PluggingIntoStruts
Date Wed, 20 Oct 2004 10:35:41 GMT
   Date: 2004-10-20T03:35:41
   Editor: KurtHoehn <khoehn@etechstudios.com>
   Wiki: Jakarta HiveMind Wiki
   Page: PluggingIntoStruts
   URL: http://wiki.apache.org/jakarta-hivemind/PluggingIntoStruts

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -78,7 +78,7 @@
         {
             try
             {
-                resolver = initializeClassResolver();
+                resolver = (ClassResolver) initializeClass( _classResolver );
             }
             catch( Exception e )
             {
@@ -94,7 +94,7 @@
         {
             try
             {
-                ErrorHandler errorHandler = initializeErrorHandler();
+                ErrorHandler errorHandler = (ErrorHandler initializeClass( _errorHandler
);
                 builder = new RegistryBuilder( errorHandler );
             }
             catch( Exception e )
@@ -170,20 +170,12 @@
         }
     }
 
-    protected ErrorHandler initializeErrorHandler() throws Exception
+    protected Object initializeClass( String type ) throws Exception
     {
         Thread thread = Thread.currentThread();
         ClassLoader loader = thread.getContextClassLoader();
-        Class clazz =  loader.loadClass( _errorHandler);
-        return (ErrorHandler) clazz.newInstance();
-    }
-
-    protected ClassResolver initializeClassResolver() throws Exception
-    {
-        Thread thread = Thread.currentThread();
-        ClassLoader loader = thread.getContextClassLoader();
-        Class clazz =  loader.loadClass( _classResolver);
-        return (ClassResolver) clazz.newInstance();
+        Class clazz =  loader.loadClass( type );
+        return clazz.newInstance();
     }
 }
 }}}

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-cvs-help@jakarta.apache.org


Mime
View raw message