Ludovic Champenois wrote:
> glassfish_at_javadesktop.org wrote:
>> Hello,
>>
>> I am building a Glassfish v3 application packaged in a maven EAR,
>> with a WAR and an EJB module.
>>
>> I am able to inject the EJB into a JSF managed bean then calling that
>> from the xhtml.
>>
>> However, I would like to be able to take advantage of the seam-like
>> capabilities of injecting full fledged EJB's (not ejb-lite) into the
>> JSF xhtml pages directly, i supposed it would be like this:
>>
>> EJB in ejbApp.jar :
>>
>> package com.ps.peb.ejb;
>> import javax.ejb.Stateless;
>> import javax.inject.Named;
>> @Stateless
>> @Named
>> public class NewSessionBean {
>> public String getHello() {
>> return "Hello World EJB!";
>> }
>> }
>>
>> And in the WAR:
>>
>> 1. an emtpy beans.xml in WEB-INF
>>
>> 2. a facelets XHTML with:
>>
>> <h:outputText value="#{NewSessionBean.hello}"/>
>>
>> This set up however gives the cryptic error:
>>
>> org.glassfish.deployment.common.DeploymentException: Error in linking
>> security policy for com.ps.peb_PEBMaven-ear_ear_1.0-SNAPSHOT --
>> Inconsistent Module State
>> at
>> com.sun.enterprise.security.SecurityUtil.linkPolicyFile(SecurityUtil.java:329)
>>
>>
>> Is it or is it not possible to do this in GlassFish v3 yet??? (using
>> latest nightly build GlassFish v3 b73)
>>
>
> Not sure about that I am not a spec guru and I am not sure how much
> test cases we have in this area,
> but I could reproduce
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=11007
>
> Add your comments on the bug, if needed,
>
Bug is confirmed..
4 things for a current workaround:
1/ undeploy if needed the bad app
2/ delete the domains/domain1/generated/policy/YOURAPPNAME directory
which contain wrong state.
3/ delete the beans.xml in the web app (or make sure it is REALLY empty,
even a space in it would break) Was your beans.xml absolutely
empty???Maybe not the first time you tried to deploy.
4/ create an empty beans.xml as well in the META-INF of the ejb module,
this is necessary to see these named things for weld in the ejbmodule
It should then work. (at least it does for us)
Ludo
> Ludo
>
>> Thanks!!!
>> [Message sent by forum member 'fvela' ]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=371608
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>