[jboss-jira] [JBoss JIRA] Commented: (JBAS-6842) Unwanted deployment of the shared STLBs

jaikiran pai (JIRA) jira-events at lists.jboss.org
Fri Oct 2 16:48:04 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBAS-6842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12488305#action_12488305 ] 

jaikiran pai commented on JBAS-6842:
------------------------------------

Its the org.jboss.deployment.OptAnnotationMetaDataDeployer which is the culprit. It's implementation of deploy (through it's superclass AnnotationMetaDataDeployer) does this :

protected void deploy(VFSDeploymentUnit unit)
      throws DeploymentException
   {
...
      List<VirtualFile> classpath = unit.getClassPath();
      if(classpath == null || classpath.isEmpty())
         return;

      boolean trace = log.isTraceEnabled();
      if (trace)
         log.trace("Deploying annotations for unit: " + unit + ", classpath: " + classpath);

      try
      {
         processMetaData(unit, webMetaData, clientMetaData, classpath);

...

So for the unit corresponding to the ear file (test-ear.ear), it picks up the .ear/lib/shared-ejb.jar from the unit.getClasspath() and starts creating metadata out of the annotaitons in the shared-ejb.jar since lib/shared-ejb.jar forms the classpath of the ear:

2009-10-03 02:02:19,581 TRACE [org.jboss.deployment.OptAnnotationMetaDataDeployer] (main) Deploying annotations for unit: AbstractVFSDeploymentContext at 9405908{vfszip:/home/jpai/jboss-5.1.0.GA/server/default/deploy/test-ear.ear/}, classpath: [MemoryContextHandler at 25410398[path= context=vfsmemory://3j001-dizj50-g0be59bs-1-g0be5nsz-2d real=vfsmemory://3j001-dizj50-g0be59bs-1-g0be5nsz-2d], DelegatingHandler at 25319602[path=test-ear.ear/lib/shared-ejbs.jar context=file:/home/jpai/jboss-5.1.0.GA/server/default/deploy/ real=file:/home/jpai/jboss-5.1.0.GA/server/default/deploy/test-ear.ear/lib/shared-ejbs.jar], DelegatingHandler at 6213371[path=test-ear.ear context=file:/home/jpai/jboss-5.1.0.GA/server/default/deploy/ real=file:/home/jpai/jboss-5.1.0.GA/server/default/deploy/test-ear.ear]]

So effectively, the ear unit now has a JBossMetaData created and attached to it from the annotation processing on lib/shared-ejb.jar file.


> Unwanted deployment of the shared STLBs
> ---------------------------------------
>
>                 Key: JBAS-6842
>                 URL: https://jira.jboss.org/jira/browse/JBAS-6842
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Deployers, EJB3
>    Affects Versions: JBossAS-5.0.1.GA, JBossAS-5.1.0.GA
>            Reporter: Miroslav Havram
>            Assignee: jaikiran pai
>         Attachments: JBAS-6842.zip
>
>
> STLBs from the EAR's lib are deployed even if they are explicitly excluded from deployment.
> More information can be found on the related forum topic.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list