2 Replies Latest reply on Oct 6, 2003 7:09 AM by jorans

    Multiple application instances, with seperate scopes

    jorans

      Hi
      I need to deploy two instances of my application (myApp.ear, containig myApp.war and myEjb.jar ), I use JBoss.3.2.1-Tomcat4.1.24.

      The problem is that servlet/JSP's and ejb's share a property-file (application specific), through a PropertyProvider-class with static methods. The application's reads the same property-file if they are deployed in the same directory. The property-file is located at the same place as the PropertyProvider-class.

      According to the "JBoss Adm&Dev (307)" a solution would be to enable EAR specific loader repository in jboss-app.xml. I tried this but it didn't change which property-file that was read:-(

      What have I missed?
      Does anyone have any suggestions how I can solve this problem?

      I would also prefere to not have the property-file located at the same place as the PropertyProvider-class, as this makes it more difficult to maintain the files, any tips?

      jboss-app.xml in myAppY.ear:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss-app
      PUBLIC "-//JBoss//DTD J2EE Application 1.3V2//EN"
      "http://www.jboss.org/j2ee/dtd/jboss-app_3_2.dtd">
      <jboss-app>
      <loader-repository>dot.com:loader=myAppY.ear</loader-repository>
      </jboss-app>


      -- Joran

        • 1. Re: Multiple application instances, with seperate scopes
          frito

          Use an ear for every application instance and for their distinct resources. Configure an own loader-repository for every ear with java2parent delegation false.
          Deploy the common resources in a separate .jar without defining a loader-repository (or put them in the server/lib ;-)
          That should make it.

          Greetings,
          Frito

          • 2. Re: Multiple application instances, with seperate scopes
            jorans

            Thanx Frito, it works now!!
            I thought I defined separate loader-repositories for my EAR's, but I missed the java2parent-directive.....

            In addition, I had to place my EAR's directly in the deploy directory; can only define separate loader-repositories for top-level classloaders.

            --Joran