0 Replies Latest reply on Jun 18, 2013 3:29 AM by Jan Swaelens

    Use of isolated class loader and MDB

    Jan Swaelens Newbie

      Hello,

       

      We are using JBoss 5 (EAP) to deploy our application which consists of an EAR which contains a JAR (with session and message beans) and a WAR (with servlets).

      In this mix we use Axis2 v1.6.2 to be able to invoke a number of external services.

       

      The use of a recent Axis version usually means that some class loading tweaks are needed on the app server (we need to do this for websphere as well) to get things working as we want to.

       

      To make this work on this particular JBoss version we determined the following strategy:

       

      Equip the ear with the following jboss-classloading.xml file in the META-INF:


      {code}

      <classloading xmlns="urn:jboss:classloading:1.0"

      domain="ourApp.ear"

      export-all="NON_EMPTY"

      import-all="true"

      parent-first="false">

      </classloading>

      {code}

       

      Equip the jar with the following jboss-classloading.xml file in the META-INF:

       

      {code}

      <classloading xmlns="urn:jboss:classloading:1.0"

      domain="ourApp.jar"

      parent-domain="ourApp.ear"

      export-all="NON_EMPTY"

      import-all="true">

      </classloading>


      {code}

       

      Equip the war with the following jboss-classloading.xml file in the WEB-INF:

       

      <classloading xmlns="urn:jboss:classloading:1.0"

      domain="ourApp.war"

      parent-domain="ourApp.ear"

      export-all="NON_EMPTY"

      import-all="true">

      </classloading>

       

       

       

      However, the moment we try to deploy this we get an error that the 'onMessage' method of our MDB is no longer found (messaging works and deploys fine without the class loading tweak) - (The message driven bean must declare one onMessage() method.).

       

      I assume that the class loader is not finding the method due to the class loader isolation somehow? Am I doing something wrong here or is this a genuine issue.

       

       

      thanks.