User: starksm 
  Date: 02/04/15 10:42:00

  Modified:    catalina/src/main/org/jboss/test/tomcat/ejb/bean Tag:
                        Branch_3_0 StatelessSessionBean.java
  Log:
  Get to build after org.jboss.system class relocation
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +18 -10    
contrib/catalina/src/main/org/jboss/test/tomcat/ejb/bean/StatelessSessionBean.java
  
  Index: StatelessSessionBean.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/contrib/catalina/src/main/org/jboss/test/tomcat/ejb/bean/StatelessSessionBean.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- StatelessSessionBean.java 11 Feb 2002 23:02:15 -0000      1.1
  +++ StatelessSessionBean.java 15 Apr 2002 17:41:59 -0000      1.1.2.1
  @@ -2,20 +2,19 @@
   
   import java.io.PrintWriter;
   import java.io.StringWriter;
  +import java.lang.reflect.Method;
   import java.net.URL;
   import java.net.URLClassLoader;
  -import java.rmi.*;
  +import java.rmi.RemoteException;
   import javax.ejb.*;
  +import javax.management.MBeanServer;
   import javax.naming.InitialContext;
   import javax.naming.Context;
   
  -import org.jboss.system.ServiceLibraries;
  -import org.jboss.system.UnifiedClassLoader;
  -
   /** A simple stateless session bean.
   
   @author [EMAIL PROTECTED]
  -@version $Revision: 1.1 $
  +@version $Revision: 1.1.2.1 $
   */
   public class StatelessSessionBean implements SessionBean
   {
  @@ -63,12 +62,21 @@
            buffer.append("+++ ");
            buffer.append(loader);
            buffer.append('\n');
  -         if( loader instanceof UnifiedClassLoader && sawUnifiedClassLoader == false 
)
  +         String loaderName = loader.getClass().getName();
  +         boolean isUCL = loaderName.startsWith("org.jboss.");
  +         if( isUCL && sawUnifiedClassLoader == false )
            {
               sawUnifiedClassLoader = true;
  -            // Only add the ServiceLibraries.getURLs info once
  -            ServiceLibraries libraries = ServiceLibraries.getLibraries();
  -            URL[] paths = libraries.getURLs();
  +            // Only add the UnifiedLoaderRepository.getURLs info once
  +            URL[] paths = null;
  +            try
  +            {
  +               Method getAllURLs = loader.getClass().getMethod("getAllURLs", new 
Class[0]);
  +               paths = (URL[]) getAllURLs.invoke(loader, new Object[0]);
  +            }
  +            catch(Exception e)
  +            {
  +            }
               int length = paths == null ? 0 : paths.length;
               for(int p = 0; p < length; p ++)
               {
  @@ -101,5 +109,5 @@
         buffer.append(sw.toString());
         return buffer.toString();
      }
  -   
  + 
   }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to