[weld-issues] [JBoss JIRA] Commented: (WELD-521) Introduce a way to exclude classes or packages from scanning

Morten Christensen (JIRA) jira-events at lists.jboss.org
Sun May 30 18:51:08 EDT 2010


    [ https://jira.jboss.org/browse/WELD-521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12533156#action_12533156 ] 

Morten Christensen commented on WELD-521:
-----------------------------------------

This issue is getting more and more important as i am running into more and more situations where weld will explode in class(def) not found because Weld wrongly assumes that all classes in a jar is necessarily valid in all types of deployment. 
My application is distributed in ONE jar file with various subpackages like myapp.container.jse, myapp.container.jee, myapp.container.osgi that contains classes that are only valid in their respective containers. This kind of hybrid application
is simply not possible as long as Weld blindly tries to load all classes in a jar. Java has defined lazy class loading for reason! 

On Weld-SE it seems we will soon be able to work around this by using a custom createDeployment override that works on explicit mentioned classes but what about JavaEE?

I strongly need a way to exclude classes depending on environment that will also work with JavaEE (and consequently in glassfish and JBoss etc.). I also suspect this solution will need to arrive soon in order to have a chance to get included in upcomming glassfish 3.01

P.S. Besides helping with hybrid applications, this will also potentially improve performance in some cases as Weld processing won't need to deal with packages without bean classes.

> Introduce a way to exclude classes or packages from scanning
> ------------------------------------------------------------
>
>                 Key: WELD-521
>                 URL: https://jira.jboss.org/browse/WELD-521
>             Project: Weld
>          Issue Type: Feature Request
>          Components: Bootstrap and Metamodel API
>         Environment: Java SE and Java EE + weld
>            Reporter: Morten Christensen
>         Attachments: weld-se-ee-passifier.jar
>
>
> Better support for dual SE and EE applications. I have some weld-using jar's that can be deployed on a Java EE and work standalone. It is possible to get this to work using both weld SE and weld EE but it is a pain. F.x. when deployed under glassfish weld will fail unless I include a few weld SE dummy classes.... Weld should either combine weld SE and weld EE OR there should at least be some support for having weld ignoring some of my classes/packages depending on which environment it is running under.

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

        


More information about the weld-issues mailing list