4 Replies Latest reply on Sep 29, 2004 10:39 AM by bill.burke

    multiple jboss-aop.xml files?

    hany_bee

      It is possible to have multiple jboss-aop.xml files in one application? We have a few developers, each person is responsible for some components. We'd like to have each person working in their own jboss-aop.xml file, instead of everything messing in the same file.

      Is it possible to have multiple files?

        • 1. Re: multiple jboss-aop.xml files?

          Hi. I'm not an expert about JBossAOP packaging, but this is what I use:

          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE aop [
           ENTITY developer1.ent SYSTEM "etc/developer1.ent"
           ENTITY bad-developer2.ent SYSTEM "etc/bad_developer1.ent"
          ]>
          <aop>
          
           &developer1.ent;
          <!-- &bad_developer2.ent;-->
          </aop>
          


          On Windows, you must change "/" to "\" I think.

          You may also use Ant task, to join several XML files into one.

          Regards,
          Tomasz

          • 2. Re: multiple jboss-aop.xml files?
            bill.burke

            Short answer is YES

            For our new doco here:

            http://docs.jboss.org/aop/aspect-framework/reference/en/html/running.html




            You need to tell JBoss AOP where the xml configuration files of your bindings are. This can be done in one of these two ways:

            * Set the jboss.aop.path system property. (You can specify multiple files or directories separated by ':' (*nix) or ';' (Windows), i.e. -Djboss.aop.path=jboss-aop.xml;metadata-aop.xml) If you specify a directory, all aop.xml files will be loaded from there as well.
            * Package your classes in a jar where /META-INF/jboss-aop.xml contains your bindings.


            • 3. Re: multiple jboss-aop.xml files?
              hany_bee

              Thanks, that works fine. But how do I make it work if I package the app as a jar file? How can I make it read multiple binding files from the jar file?

              thx

              • 4. Re: multiple jboss-aop.xml files?
                bill.burke

                you can't have multiple XML's per Jar file. BUT... You can have multiple JAR files that have an xml file within them.

                We could implement this though....Interested in doing it?

                Bill