2 Replies Latest reply on Oct 20, 2005 11:03 AM by netcetera

    Accessing Local interfaces

    bgonline

      Hello,

      I have created an EAR application, containing a WAR module and an EJB JAR module.
      I'd like to call only the Local interfaces of my EJB.

      In the J2EE specification, it seems that the Local interfaces can only be called when the WAR module and the EJB module reside in the same EAR.

      I made a test, and even if I put my WAR file and my EJB-JAR file in JBoss without grouping them in an EAR unit, it works.
      How is it possible ? I prefer like that, but I don't want my application not to work on others application server if this is not possible.

      Thanks in advance.
      bgOnline

        • 1. Re: Accessing Local interfaces
          felderr

          ... did you give them two different classloaders? Otherwise the unified classloader repository is used, therefor you have access to classes in other war's and ejb's.

          If you want to isolate the war use a jboss-web.xml descriptor such as:

          <?xml version="1.0" encoding="UTF-8"?>
          <jboss-web>
          <class-loading java2ClassLoadingCompliance="true">
          <loader-repository>
          org.jboss:loader=someUniqueName
          <loader-repository-config>
          java2ParentDelegation=true
          </loader-repository-config>
          </loader-repository>
          </class-loading>
          </jboss-web>

          Greets Rene

          • 2. Re: Accessing Local interfaces
            netcetera

            I've a terribly hard time trying to set up exactly this... Do you have an example you can post or a link to a good example?

            Thanks a lot
            Stefan