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 11:28:42 PDT

Thanks for your quick response, Ken.

I know I can get it to work by dropping the interface. But I got to this example because I wanted to use a Scala class as my SLSB. [b]Every[/b] Scala class implements an interface, and that isn't something I can just turn off.

So, I tried annotating the SLSB with @LocalBean. It did me no good--I got the same error. Maybe I misunderstood @LocalBean? (I read section 4.9.8 of the EJB 3.1 spec, and it sounded to me as if it should work.)

Instead, I annotated the interface with @Local. This worked (except for an intermittent access control exception that I can't seem to reproduce), but of course it takes the fun out of the no-interface client view.

I noticed in the spec that "java.io.Serializable; java.io.Externalizable; any of the interfaces defined by the javax.ejb package" have special status. It would be nice if I could add scala.ScalaObject to those interfaces.

Cheers,

Cay



I am
[Message sent by forum member 'cayhorstmann' (cayhorstmann)]

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