users@jersey.java.net

Session beans as resource classes

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 08 Sep 2008 17:53:56 +0200

Hi,

I have just committed to the trunk support for session beans as
resource classes. You may have to wait a bit for it to propagate to
the trunk.

To enable this you need to do the following:

1) use the Jersey servlet or an extension of (e.g. the spring servlet);

2) annotate remote interfaces as root resource classes; and

3) configure Jersey such that the annotated remote interfaces in 2)
are registered as root resource classes. This
     can be achieved using the package scanning technique and
referencing the package(s) where the remote
     interfaces reside.

Jersey will, if a registered root resource class is an interface look
up a JNDI named object using the fully qualified class name as the
JNDI name. If a named object exists then the root resource class is
removed from the set of registered root resource classes and the named
object is added to the singleton root resource instances.

I am sure this could be refined a little in terms of naming. I have
been using Glassfish v2 ur2 as shipped with NetBeans 6.5 beta. I dunno
if the name scheme works with other app servers.

Now we require a sample :-)

Paul.