[jboss-jira] [JBoss JIRA] Commented: (JBAS-5920) fix org.jboss.test.xslt.test.ScopedXalanUnitTestCase.testScopedXalanDeployment

Adrian Brock (JIRA) jira-events at lists.jboss.org
Wed Sep 3 08:19:39 EDT 2008


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

Adrian Brock commented on JBAS-5920:
------------------------------------

The issue is why does it have (JBoss)AppClientMetaData at all.

The problem is the AppClientScanningDeployer:

         String mainClassName = getMainClassName(unit);
         if(mainClassName == null)
            return;
         
         Class<?> mainClass = unit.getClassLoader().loadClass(mainClassName);
         
         log.info("mainClass = " + mainClass);
         
         if(hasAnnotations(mainClass))
         {
            // add a dummy application client dd to fire up the ejb3 client deployer
            dd = new JBossClientMetaData();
            unit.addAttachment(JBossClientMetaData.class, dd);
         }

   
   // TODO: should we check for type of annotations?
   private boolean hasAnnotations(Class<?> cls) { ... }

The answer to that question is that it should only process jars with a main-class
if it has the EJB3 environment annotations, e.g. @Resource

Otherwise it is going to make most jars with a main-class in the manifest appclients
(with the likely assumption that any modern class has some annotations).

The NPE still needs fixiing:

            JBossAppMetaData earMD = earUnit.getAttachment(JBossAppMetaData.class);
            // oops earMD == null when the parent is not an ear.
            String libDir = earMD.getLibraryDirectory();

The AppClientScanningDeployer should probably include a similar test
for the parent being an ear?


> fix org.jboss.test.xslt.test.ScopedXalanUnitTestCase.testScopedXalanDeployment
> ------------------------------------------------------------------------------
>
>                 Key: JBAS-5920
>                 URL: https://jira.jboss.org/jira/browse/JBAS-5920
>             Project: JBoss Application Server
>          Issue Type: Sub-task
>      Security Level: Public(Everyone can see) 
>          Components: Test Suite
>            Reporter: Dimitris Andreadis
>            Assignee: Scott M Stark
>            Priority: Critical
>             Fix For: JBossAS-5.0.0.CR2
>
>
> http://hudson.qa.jboss.com/hudson/view/JBoss%20AS/job/JBoss-AS-5.0.x-TestSuite-sun15/869/testReport/org.jboss.test.xslt.test/ScopedXalanUnitTestCase/testScopedXalanDeployment/
> It started failing here:
> http://hudson.qa.jboss.com/hudson/view/JBoss%20AS/job/JBoss-AS-5.0.x-TestSuite-sun15/855/changes

-- 
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