1 Reply Latest reply on Nov 10, 2012 2:11 AM by Nicklas Karlsson

    CDI Beans not available from remote clients?

    mark boletti Newbie

      Hi all !

      I have an application using Java EE 5 (EJB 3 + JSF Managed Beans). I'm thinking to upgrade it to Java EE 6 turning EJB 3 into CDI Beans. However I have as requirement to allow remote EJB invocation from standalone clients. Is it possible to invoke CDI Beans from remote clients ?

      By doing a little test on the NumberGuess CDI example, I can see that there is no information on the console about binding the CDI beans into the java:jboss/exported contex:


      20:24:11,951 INFO  [org.jboss.web] (MSC service thread 1-7) JBAS018210: Register ing web context: /jboss-as-numberguess

      20:24:11,987 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018 559: Deployed "jboss-as-numberguess.war"


      On the other hand, by putting -for example- both @Stateful and @SessionScoped annotation the CDI Beans will be exported to the java:jboss/exported.

      Is it safe/advisable to use both annotations (EJB and CDI) at the same time ?