2 Replies Latest reply on Jul 8, 2005 2:17 AM by Amit Soni

    Multiple Instances of the Same EAR

    Amit Soni Newbie

      Hi all,

      I was using my ear file for single domain service. But now i want to make this war file as a hosted service.

      So one solution for me is that i have to deploy different war file for different domain. But i want to find any way go get multiple instance of single ear file which is deployed in jboss.

      Here the ear file which i am using has basic (core) class which configures one conf file from it. But the limitation for this is that it has the static block so i can instanciate only one instance of this class so it configures with only one conf file.
      But i want the multiple instance of this class so is there any solution in jboss so that i can get multiple instance of this ear (My Core class).

      Thanks,
      Amit Soni

        • 1. Re: Multiple Instances of the Same EAR
          Frank Langelage Master

          You'll have to use a separate classloader for each ear.
          Look at the wiki's for classloading / scoped classloading config.

          • 2. Re: Multiple Instances of the Same EAR
            Amit Soni Newbie

            Hi,

            Here i think one more option for this. that is i am going to deploy only one war file of my hosted service and for earch domain i need to deply new JAR or EAR file which contains the EJB part.

            Now in each Jar file of an EJB the business logic and all jar files are same but only the deployment description is differnt (ejb-jar.xml and jboss.xml). In this deployment descriptor i can give the different prefix for that JNDI NAME call.

            so when my cllient (From the common war file) call (lookup) an ejb at that it call like ::

            java:comp/env/{PREFIX}/{JNDI_NAME}

            but i need to confirm that when i am going to deploy different jar or ear file for earch domain and only one war file which calls the ejb method for earch domain then the class loader for each jar or ear file are different or same??

            And if it is same then is it possible to make this class loader different ??

            So please help me for this one.

            Thanks,
            Amit Soni