[weld-issues] [JBoss JIRA] Commented: (WELD-521) Support for dual SE and EE applications that uses weld

Morten Christensen (JIRA) jira-events at lists.jboss.org
Mon May 10 09:14:05 EDT 2010


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

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

Guilty as accused, my description was vague. What I am trying to do is to create a java application that can be deployed as both a WAR file under a Java 6 EE application server AND run as plain Java SE application from commandline (+ maybe run in OSGI environment as well - this is very new). This was inspired by the famous Hudson build server but implemented without a internal web server and just using jersey on top of grizzly when running in SE mode.

The main problem with using Weld for dual Java apps is that it will try to make weld beans out of ALL classes in the jar/war that contains the bean.xml file regardless of if they make sense or not in the given environment. So if my war file also contains a few weld SE classes, Weld will faill under glassfish because it does not know about the weld SE classes. All my java SE stuff (like my main method) is in a separate package, so if I could just tell weld to please ignore this when running under an JEE app server that would be great (i.e. an environment specific package-ignore thing in bean.xml OR if Weld could please completely ignore any classes with a specific annotation when running under a specific environment such as JEE, JSE, OSGI).

BTW: I will attach the dummy weld-se-ee-passifier.jar file that I have created to keep Weld and glassfish happy.

> Support for dual SE and EE applications that uses weld
> ------------------------------------------------------
>
>                 Key: WELD-521
>                 URL: https://jira.jboss.org/jira/browse/WELD-521
>             Project: Weld
>          Issue Type: Feature Request
>         Environment: Java SE and Java EE + weld
>            Reporter: Morten Christensen
>
> 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/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list