4 Replies Latest reply on Feb 22, 2013 9:18 AM by hamid1982

    Exclude module "javax.resource.api" from javaee

    hamid1982

      Hi,

       

      I want to exclude the javax.resource.api from the the javaee module defined on jboss modules, Below the content of the jboss-deployment-structure.xml :

       

      <sub-deployment name="APP1.war">

                          <exclusions>

                            <module name="javaee.api" />

                          </exclusions>

                          <dependencies>

                                <module name="deployment.APP_EAR.ear.APP2.war">

                                          <imports>

                                    <include path="/**" />

                                    <exclude path="org/apache/commons/lang" />

                                                <exclude path="org/apache/commons/collections" />

                                                <exclude path="org/apache/commons/collections/**" />

                                    <exclude path="org/springframework/**" />

                                                <exclude path="javax/servlet" />

                                                <exclude path="javax/servlet/**" />

                                  </imports>

                                </module>

                    </dependencies>

      </sub-deployment>

       

      I want my APP1.war to use an old jar geronimo-j2ee-connector_1.5_spec-1.1-osgi.jar defined on WEB-INF/lib directory

       

      Could please help me on this issue ?

       

      Best regards.

        • 1. Re: Exclude module "javax.resource.api" from javaee
          nickarls

          Never tried stuff like that but what happens if you exclude the javax.resources.api directly (it appears to be exported from javaee.api)?

          • 2. Re: Exclude module "javax.resource.api" from javaee
            sfcoy

            Hamid RAHMOUNI wrote:

             

            Hi,

             

            ...

            I want my APP1.war to use an old jar geronimo-j2ee-connector_1.5_spec-1.1-osgi.jar defined on WEB-INF/lib directory

             

            ...

             

            What on earth for?

             

            What are you trying to achieve?

             

            JBoss AS7 provides JCA 1.6 interfaces which AFAIK remain compatible with 1.5.

             

            You should not need to deploy any JRE/JDK/JEE jars in your application. In fact doing so is a recipe for a lot of problems.

            • 3. Re: Exclude module "javax.resource.api" from javaee
              hamid1982

              Hi Stephen,

               

              Thank you for your replay. I want to use the old jar because i have a jar on my APP1.war that is using the jca 1.5.

               

              when i used the -verbose options to see the class loaded, i found that jboss is loading classes from jca 1.6 and the application did not  work anymore.

               

              So, in the case of using a tool (jar) which is compatible with version 1.5. how we can keep it working on jboss 7 ?

               

              Best regards.

              • 4. Re: Exclude module "javax.resource.api" from javaee
                hamid1982

                Hi Nicklas,

                 

                 

                Thank you for your replay. I tried to use exclusions of the module javax.resources.api, but it still not working . Any others suggestions or ideas ?

                 

                 

                Best regards.