[jboss-user] [Management, JMX/JBoss] - is it possible to overiding patchURL functionality?

patwary_shiva do-not-reply at jboss.com
Thu Sep 11 11:55:04 EDT 2008

I want to control in what order jars(setting classpath) files will be loaded so that java can load the a.class from a.jar rather than b.jar when both a.jar and b.jar has the same class.
this can be done by changing the  way pathcURL picks up jar or zip files.

 The code is in  serverImpl.java of  jboss-system.jar initBootLibraries() 
method which is private.
The code needs to change to accept multiple jar files also and in the order we have specified in patchURL parameter.I am not sure whether it is good idea to modify by ourself as it will be very hard to maintain. Doesanyone  have any suggestion!!.we are in process of buying jboss. should i make a patch request once we buy it or there is another way out.It is pretty urgent as we have a delivery to make.

Below is the code i am talking about..

    * Initialize the boot libraries.
   private RepositoryClassLoader initBootLibraries() throws Exception
      // Build the list of URL for the spine to boot
      List list = new ArrayList();

      // Add the patch URL.  If the url protocol is file, then
      // add the contents of the directory it points to
      URL patchURL = config.getPatchURL();
      if (patchURL != null)
         if (patchURL.getProtocol().equals("file"))
            File dir = new File(patchURL.getFile());
            if (dir.exists())
               // Add the local file patch directory

               // Add the contents of the directory too
               File[] jars = dir.listFiles(new FileSuffixFilter(new String[] { ".jar", ".zip" }, true));

               for (int j = 0; jars != null && j < jars.length; j++)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175905#4175905

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175905

More information about the jboss-user mailing list