2 Replies Latest reply on Feb 27, 2014 5:31 AM by wdfink

    How to allow code in module to get to the resource ?

    mikebrungs

      Using JBoss EAP 6.1 and we have code that gets deployed as a module (JBOSS_HOME\modules\system\layers\....).

      The RAR file is currently being deployed via the Deployments subdirectory.   This results in a class loader issue when

      the modules code attempts to typecast the return from the JNDI lookup, due to the modules and deployments having

      different class loaders.

       

      So.. my thought is that the "jar part of the rar" (Connection classes etc) needs to be loaded by the Modules Classloader

      so that the "deployments code" can set the rar as one of its dependencies.  But.. if I was CERTAIN that I was correct,

      I would not be posting this question.

       

      So... I want to deploy the RAR such that code running as a JBoss module can gain access via the JNDI lookup.  So...

      how do you pull this off and avoid the classloader issues ?

       

      Thanks in advance for the help.

      Mike