users@glassfish.java.net

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

From: <glassfish_at_javadesktop.org>
Date: Thu, 12 Nov 2009 11:58:39 PST

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)

Thanks!!!
[Message sent by forum member 'fvela' ]

http://forums.java.net/jive/thread.jspa?messageID=371608