commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-commons/modeler/src/java/org/apache/commons/modeler BaseModelMBean.java
Date Thu, 17 Apr 2003 04:31:37 GMT
costin      2003/04/16 21:31:37

  Modified:    modeler/src/java/org/apache/commons/modeler
                        BaseModelMBean.java
  Log:
  More testing, more fixes :-)
  
  Use the thread loader when creating the param classes. We could do this
  when we load the definition - but it would be teribly slow. We could
  also save a class loader in the definition.
  
  We really need to figure out how the class loading would work with
  modeler. JMX has the nice concept of flat loader ( similar with
  Jboss), but in many cases this won't work ( containers, etc ).
  
  Revision  Changes    Path
  1.22      +11 -5     jakarta-commons/modeler/src/java/org/apache/commons/modeler/BaseModelMBean.java
  
  Index: BaseModelMBean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/modeler/src/java/org/apache/commons/modeler/BaseModelMBean.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- BaseModelMBean.java	16 Apr 2003 06:00:51 -0000	1.21
  +++ BaseModelMBean.java	17 Apr 2003 04:31:36 -0000	1.22
  @@ -529,6 +529,12 @@
               return Short.TYPE;
           else {
               try {
  +                ClassLoader cl=Thread.currentThread().getContextClassLoader();
  +                if( cl!=null )
  +                    return cl.loadClass(signature); 
  +            } catch( ClassNotFoundException e ) {
  +            }
  +            try {
                   return Class.forName(signature);
               } catch (ClassNotFoundException e) {
                   throw new ReflectionException
  @@ -1359,7 +1365,7 @@
       }
   
       // -------------------- Registration  --------------------
  -    // XXX We can add some method patterns here - like setName() and
  +    // XXX We can add some method patterns here- like setName() and
       // setDomain() for code that doesn't implement the Registration
   
       public ObjectName preRegister(MBeanServer server,
  
  
  

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


Mime
View raw message