users@glassfish.java.net

Re: SLSB implementing interface with EJB 3.1 simplified packaging/GFv3

From: <glassfish_at_javadesktop.org>
Date: Thu, 18 Jun 2009 10:26:16 PDT

> I get the stack trace below. If I remove the
> "implements IJavaSB", all is well, and my app works.
>

Hi Cay,

The session bean in your example exposes a local business interface as its client
view. In that case, the EJB dependency needs to use the Local business interface
type, not the bean class type.

If you want to use the new EJB 3.1 no-interface client view, the bean class would
look like this :

@Stateless public class JavaSB {
   public String getLanguage() { return "Java"; }
}

Then, the client dependency could be written as

@EJB private JavaSB slsb;

 --ken

>
[Message sent by forum member 'ksak' (ksak)]

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