1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[JBoss] What is the difference between adding a module to the application (module) and adding...

Discussão em 'StackOverflow' iniciado por Stack, Novembro 21, 2025.

  1. Stack

    Stack Membro Participativo

    In the quickstart ejb-txn-remote-call I see in dependency added in the pom of the application:

    <!-- for Mock XAResource recovery we need the dependency to Narayana -->
    <dependency>
    <groupId>org.jboss.narayana.jts</groupId>
    <artifactId>narayana-jts-idlj</artifactId>
    <version>${version.narayana}</version>
    <scope>provided</scope>
    </dependency>


    In jboss-deployment-structure.xml I see a module dependency added to the application (module):

    <jboss-deployment-structure>
    <deployment>
    <dependencies>
    <!-- dependency to Narayana transaction module as the deployment uses
    internal Narayana classes to work with XAResource and recovery -->
    <module name="org.jboss.jts" slot="main" export="true" meta-inf="export"/>
    </dependencies>
    </deployment>
    </jboss-deployment-structure>


    If I look at the module, I think both refer to the same,

    >less modules\system\layers\base\org\jboss\jts\main\module.xml
    <resources>
    <resource-root path="narayana-jts-idlj-5.11.3.Final-redhat-00001.jar"/>
    </resources>


    If I add a dependency in the pom of the application, then do I add it to the classpath of the moduleclassloader of the application (module)?

    And what happens if you add a dependency to the application module? Will it appear on the classpath of the moduleclassloader of the application module?

    I have done some tests with own applications, and to see the classpath of the moduleclassloader, I look in the debugger to

    moduleclassloader
    paths
    allPaths


    Is that correct?

    In allPaths I see the dependencies added in the pom of the application, but dependencies of the application module which are added in the jboss-deployment-structure.xml file I do not see. Are those as expected?

    Continue reading...

Compartilhe esta Página