Daniel Berg [https://community.jboss.org/people/danielgreb] created the 
discussion

"excluding classes from being exported from rar"

To view the discussion, visit: https://community.jboss.org/message/790445#790445

--------------------------------------------------------------
Hello
I have a resource adapter using jca 1.6 deployed on jboss 7.1.1.Final, the 
problem is that the classloader exports all classes included in the rar. Im 
trying to exclude the classes that are only used internally(implementation 
details..)
Using various versions of jboss-deployment-structure files I have been unable 
to archive this.
So I have a rar containing a few jar files with my implementation and some 
dependencies.

adapter.rar
- common_v1.jar (contains a class named A)
- adapter.jar (contains connection factories, mdb interfaces, activation spec 
and so on..) placed in packages below int_.nato.adapter.*
-META-INF/ jboss-deployment-structure.xml

I want my adapter to export the content of adapter.jar to modules using it, but 
not the other stuff in common_v1.jar..

I tried quite a few variations of the below without success..
jboss-deployment-structure.xml
<jboss-deployment-structure>
  <deployment>
    <exports>
                    <exclude path="/**"/>
                    <include path=" int_/nato/adapter/"**/>
  </exports>
  </deployment>
   </jboss-deployment-structure>


The problem arrises when we try to use the adapter from a web application
webapp.war
-WEB-INF/lib/common_v2.jar(contains new version of class A and a class B)
test.jsp

in test.jsp I add 
<%= A.class.getCLassLoader()%>
<%= A.class.getProtectionDomain().getCodeSource().getLocation()%>
<%= B.class.getCLassLoader()%>
<%= B.class.getProtectionDomain().getCodeSource().getLocation()%>

*Now for A.class I get the class packaged insite the rar*
*For the B.class I get the class packaged inside the war.*
I also tried several variations of jboss-deployment-structure.xml to exclude 
the classes from import in the webapp (WEB-INF/jboss-deployment-structure.xml) 
doing so is not preffered as several applications are to be using the adapter..*
*

In production I end up with NoSuchMethodError since in version 2 of class A 
there are new methods used within the webapp, that does not exist in v1.

Deploys by copying the rar and war to the deployments directory, and 
everythings works nicely if I just use the same version of common.jar, or just 
not include it in the webapp..
Any pointers will be appreciated.
*
*
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/790445#790445]

Start a new discussion in IronJacamar at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2098]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to