How can I use external banks on JBoss 7?

Now I can load banks that are under EAR / lib. But I want to put banks on a common path in order to use another application. I found that this jboss-deployment-structure.xml tag can do this. But that will not work. I got a ClassNotFound exception. I do not know why?

<deployment>
   <resources>
        <resource-root path="/common/test.jar" />
   </resources>
 </deployment>
+5
source share
1 answer

One of the ways to use global libraries in different applications can be achieved due to their availability in the form of modules. To do this, expand the modules with the library that you provide as the server provider.

: test.jar , main (, modules/commons/test/main).

module.xml. :

<module xmlns="urn:jboss:module:1.0" name="commons.test">
    <resources>
        <resource-root path="test.jar"/>
    </resources>
</module>

. , .

MANIFEST.MF:


Dependencies: commons.test

maven . https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7

, . , . commons.test , .

+11

All Articles