[jboss-user] [EJB 3.0] - Re: A callback on EJB removal

ALRubinger do-not-reply at jboss.com
Sun Mar 8 18:34:00 EDT 2009


"pete.muir at jboss.org" wrote : What is the best way (that ideally is standard, otherwise we'll need another SPI for identifying an SFSB) to identify an SFSB instance?

You mean the ID of a given proxy?  ATM we'd be diving into implementation details by getting the it out of a field in the InvocationHandler.

http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/trunk/proxy/src/main/java/org/jboss/ejb3/proxy/handler/session/stateful/StatefulProxyInvocationHandlerBase.java

You can't rely upon that now by doing Proxy.getInvocationHandler(proxy) because that's digging too deep into internals.

We could expose this by adding interface support for a JBossStatefulSessionObject in the proxy, which has some method getId():

JBossStatefulSessionObject proxy = (JBossStatefulSessionObject)jndiContext.lookup("address");
  | Serializable id = proxy.getId();

WDYT?

S,
ALR

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4216030#4216030

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4216030



More information about the jboss-user mailing list