users@glassfish.java.net

Dynamic lookup of a local session bean

From: <glassfish_at_javadesktop.org>
Date: Mon, 04 Feb 2008 15:39:58 PST

First of all, I have read the EJB FAQ.

Glassfish appears to be different from many other application servers in the way how it exposes local session beans, by requiring an explicit reference on the managed object/context.

This makes it impossible to port an application that relies on dynamic access to services such as local session beans. Suppose a simple scenario when a certain service needs to be executed asynchronously:

1. There is an MDB that accepts a callback object with service name and parameters to execute.

2. MDB invokes the callback.

3. The MDB is generic and is not aware of JNDI names and business interfaces that it might invoke

There are plenty other scenario like this.

I am looking for any solution to circumvent this issue. Is there a way (I don't mind if it is vendor specific) to generate an ejb link at runtime and thus make a local session bean accessible through java:comp/env?

I would like to avoid generation of annotated code or ejb /web xml descriptors. And switching to remote interface is not an option as well.

Any help is highly appreciated.

Mikhail
[Message sent by forum member 'mshapirov' (mshapirov)]

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