users@glassfish.java.net

Re: Glassfish v3, ejb, CDI, jsr299, webbeans and weld ... oh my!

From: Ludovic Champenois <Ludovic.Champenois_at_Sun.COM>
Date: Thu, 12 Nov 2009 14:46:40 -0800

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,

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