JBoss Community

EJB3 and Struts2 with CDI

created by rop in EJB3 - View the full discussion

Hi,

 

Under Jboss 6, I am trying to make a Stateless EJB accessible in a Struts2 Action-class with CDI.

 

They are in an ejb-jar and war-app, packed into a common ear-file.

 

Following some examples I found, I created an empty beans.xml in the WEB-INF folder,

I annotated the EJB-class with

  @Stateless @Named("myEjb") public class MyEjb ...

and in the Action-class I try

  @Inject MyEjb myEjbM;

 

Apparanetly, this is not enough, since at deploy-time I get the error below.

Looks like there is some BeanManager item missing in the JNDI-context.

 

How do I get it in there?

Any clues?

 

  DEPLOYMENTS MISSING DEPENDENCIES:

  Deployment "jboss-switchboard:appName=foobar-ear-0.0.1,module=foobar-webapp-0.0.1"

    is missing the following dependencies:

     Dependency "java:global/cdi/foobar-ear-0.0.1/foobar-webapp-0.0.1/BeanManager"

      (should be in state "Installed", but is actually in state "** NOT FOUND

     Depends on 'java:global/cdi/foobar-ear-0.0.1/foobar-webapp-0.0.1/BeanManager' **")

  Deployment "jboss.web.deployment:war=/foobar-webapp" is missing the following dependencies:

    Dependency "vfs:///C:/program1/jboss6/server/default/deploy/foobar-ear-0.0.1.ear_WeldBootstrapBean"

    (should be in state "Create", but is actually in state "**ERROR**")

Reply to this message by going to Community

Start a new discussion in EJB3 at Community