I did some checking in the code.

In EJB3Deployer there is a method called accept. This method does some simple 
checks to see if something has the possiblity of being an ejb3 jar and if it is 
it exits quickly. If it can't determine if it's an ejb3 jar it eventually calls 
hasEjbAnnotation which scans the jar for class files with ejb3 annotations. 

The problem is it won't find any annotations for libraries so it will end up 
scanning all the class files in it.

I'm new to the code for the jboss deployer but I think something like this 
should fix the problem:

rename the hasEjbAnnotation method to scanForEJB3Annotation

Add this to the EJB3Deployer


  |    private Map annotationCache = new HashMap(); 
  | 
  |    public boolean hasEjbAnnotation(DeploymentInfo di)
  |    {
  |        Boolean bool = (Boolean)annotationCache.get(di.url);
  |        
  |        if (bool == null)
  |        {
  |                bool = Boolean.valueOf(scanForEJB3Annotation(di));
  |                
  |                annotationCache.put(di.url, bool);
  |        }
  |        
  |        return bool.booleanValue();
  |    }
  | 

There may be a better way to do this if jboss keeps track of the libraries 
deployed (won't need the cache).

Jeff Brooks


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3932293#3932293

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3932293


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to