2 Replies Latest reply on Aug 13, 2009 1:59 PM by Peter Johnson

    Errors running multiple applications inside one Jboss 3 serv

    Ben Draaisma Newbie

      Errors running multiple applications inside one Jboss 3 server instance (multiple application EAR’s inside one “$JBOSS_HOME\Server\MyApps\â€� directory).

      We are developing multiple J2EE applications that run within their own Jboss server instance, but now we have a Case to deploy them all inside one Jboss server instance that I mentioned above.
      Because we have developed the applications independently with the idea to run in separated JBoss server instances, a lot of our applications are using different versions of third party JAR’s.

      By deploying them all in one Jboss server instance will give us the problem of getting class version conflicts during class loading, because application A is using common.whaterver-1.0 jar and application B is using common.whatever-2.0.jar and that works perfectly if they are deployed inside separated server instances, but by putting them together we have to isolated every class/JAR version by letting Jboss know which class to use for which application.

      Jboss has the option to configure isolated class loader, but we can only configure them for one namespace. (Example: com.mycompany.crm.web) but how do we do that if we use multiple versions of third party JAR’s that have other namespace like org.apach. and org.hibernate etc. and application A is using hibernate3 and application B is using hibernate3.2.

      Is it possible to configure this kind of scenarios, or do we have to line-out all our Applications to use the same kind of third party JAR versions? If so than JBoss 3 or newer has not the functionality to run multiple Applications with different class versions inside one Jboss server instance, and the only option would be by lining-out all Applications to run the same third-party JAR versions.

      Please let me know if I’m wrong, and give me the solution to configure this for JBoss 3 or higher.

      Documentations that we already found are:
      http://www.jboss.org/community/wiki/jbossclassloadingusecases
      http://www.jboss.org/community/wiki/ClassLoadingConfiguration
      But how can we do it if we have multiple namespaces and class version that need to use the same class-loading repository for application A and a other class-loading repository for application B etc.?

      Thanks Regards, Ben.

        • 1. Errors running multiple applications inside one Jboss 3 serv
          Ben Draaisma Newbie

          Errors running multiple applications inside one Jboss 3 server instance (multiple application EAR€™s inside one

          €œ$JBOSS_HOME\Server\MyApps\€�
          directory).

          We are developing multiple J2EE applications that run within their own Jboss server instance, but now we have a Case to deploy them all inside one Jboss server instance that I mentioned above.

          Because we have developed the applications independently with the idea to run in separated JBoss server instances, a lot of our applications are using different versions of third party JAR€™s.

          By deploying them all in one Jboss server instance will give us the problem of getting class version conflicts during class loading, because application A is using common.whaterver-1.0 jar and application B is using common.whatever-2.0.jar and that works perfectly if they are deployed inside separated server instances, but by putting them together we have to isolated every class/JAR version by letting Jboss know which class to use for which application.

          Jboss has the option to configure isolated class loader, but we can only configure them for one namespace. (Example: com.mycompany.crm.web) but how do we do that if we use multiple versions of third party JAR€™s that have other namespace like org.apach. and org.hibernate etc. and application A is using hibernate3 and application B is using hibernate3.2.

          Is it possible to configure this kind of scenarios, or do we have to line-out all our Applications to use the same kind of third party JAR versions? If so than JBoss 3 or newer has not the functionality to run multiple Applications with different class versions inside one Jboss server instance, and the only option would be by lining-out all Applications to run the same third-party JAR versions.
          Please let me know if Im wrong, and give me the solution to configure this for JBoss 3 or higher.

          Documentations that we already found are:
          http://www.jboss.org/community/wiki/jbossclassloadingusecases
          http://www.jboss.org/community/wiki/ClassLoadingConfiguration
          But how can we do it if we have multiple namespaces and class version that need to use the same class-loading repository for application A and a other class-loading repository for application B etc.?

          Thanks Regards, Ben.

          • 2. Re: Errors running multiple applications inside one Jboss 3
            Peter Johnson Master

            The classloader repository should do what you want. For each app you will have a different repository, and that repository will be used for all the JARs packaged with your app (the "com.example" used in the wiki pages is not a package name but rather a namespace for the MBean name, and thus has nothing to do with the classes being loaded).