1 Reply Latest reply on Dec 20, 2004 8:19 PM by Ken Roberts

    multiple versions and multiple use.

    Ken Roberts Newbie

      Hi folks.

      I just got the $99 documentation subscription, and I would like somebody to point me directly at what I need because scanning the categories isn't getting me there.

      I need to know two things:
      - How do I have two versions of the same bean running from the same server? (eg a production version and a trial version of the same application)
      - How do I configure one version of one bean to operate on more than one database?

      I believe the latter is more of a tutorial question but it's one our entire group can't answer.


        • 1. Re: multiple versions and multiple use.
          Ken Roberts Newbie

          FINALLY, I get to help somebody here!

          I just did that yesterday.

          Here's what you need:

          First thing you need to know is that you need a jboss-app.xml file in your ear's META-INF directory, which will look almost exactly like this, first before version substitution and then after:

          now after substitution where version was set to "1.2.3":


          The above limits your class loader to those classes which exist in the ear specified and the ones loaded into the JBoss server, not to those loaded by another EAR. The current default behavior for JBoss is to share classes from one ear to the next, so if you load version 1.2.2 of the class org.my.software.MyClass first, that's the only one that gets loaded anywhere until you undeploy the 1.2.2 version. First come, first served. The above jboss-app.xml will fix that with probably a slightly bigger footprint.

          Now, the next thing you need to do is make a separate name for each version as follows in application.xml and everything else too:




          Here's a jboss.xml:




          I left out the top couple lines on each file, btw, and just gave the main element.

          In your build.xml, you convert @version@ to 1.2.3 (for example) as follows:

          Hope this helps.