3 Replies Latest reply on Mar 17, 2003 11:59 AM by barrycaceres

    Using HeirarchicalLoaderRepository3

    barrycaceres

      I am trying to follow the instrutions in the 3.0.5
      documentation about isolating my EAR.

      I created a SAR for the purpose of creating my own
      HeirarchicalLoaderRepository3 instances for loading
      classes. Each of my EAR files will contain a
      jboss-app.xml that will instruct it to use its assigned
      repository as opposed to the default one.

      HOWEVER, being new to JMX and the jboss-service.xml
      files, I am at a loss on how to create the named
      repository instances I will use.

      Here is the scoop...
      I have an exploded SAR:
      my-class-loader-repositories.sar
      +-- META-INF
      +-- jboss-service.xml

      The jboss-service.xml is VERY simple... it looks like:

      <?xml versio="1.0" encoding="UTF-8"?>
      <!DOCTYPE server>






      BUT, when JBoss tries to deploy this it warns me that
      HeirarchicalLoaderRepository3 does NOT have a public
      default constructor. I checked the source code and
      sure enough it doesn't. I cannot find another MBean
      instance that lacks a public default constructor.

      Soo....

      Am I suppose to extend HeirarchicalLoaderRepository3?

      - or -

      Is there an XML example of how to construct this MBean
      with a constructor that takes parameters?

      Sorry if this is a stupid question. But I am at a loss,
      and maybe I just don't understand what the documentation
      was saying or left out.

      The best answer would include an example jboss-service.xml
      that I could use.

      Thanks,
      Barry

        • 1. Re: Using HeirarchicalLoaderRepository3

          You declare loader repository in your jboss-app.xml. See the DTD for details. You dont need to create your own SAR for this.

          • 2. Re: Using HeirarchicalLoaderRepository3
            barrycaceres

            Thanks... that did the trick.
            The first time I tried this in the jboss-app.xml I
            left out the "loaderRepositoryClass" attribute and
            JBoss gave me an exception so I guess I was doing
            something wrong with a typo. I misread the exception
            and assumed I needed to defien the MBean service for
            the loader repository before I could refer to it.

            I used the example in the DTD and everything worked
            just fine.

            Thanks for the help.

            • 3. Re: Using HeirarchicalLoaderRepository3
              barrycaceres

              Thanks... that did the trick.
              The first time I tried this in the jboss-app.xml I
              left out the "loaderRepositoryClass" attribute and
              JBoss gave me an exception so I guess I was doing
              something wrong with a typo. I misread the exception
              and assumed I needed to define the MBean service for
              the loader repository before I could refer to it.

              I used the example in the DTD and everything worked
              just fine.

              Thanks for the help.