4 Replies Latest reply on Aug 13, 2003 6:41 PM by Adrian Brock

    Howto get the EJB-Name by an Interceptor

    kristoeffy Newbie

      Hi! I've implemented an MBean that buffers an flushes TimeStamping-Information, which are given by Interceptors.
      The information is flushed to a DB, and of course I want to safe _which_ EJB was called with which Method and which arguments.

      I'm looking at it from the Interceptor-perspective:

      The Method-name and given arguments are easy...
      But how do I now which EJB is called.
      I can only get the "Object objName" by "mi.getObjectName()" which is an Integer (e.g. -2051066433).
      There must be a registry that does the mapping. Where? Which?
      How do I get the reference?

      I know that the Container (e.g. StatelessSessionContainer) builds itself a "beanMap" which he asks.
      But it does not export any functionality which I could use, does it?

      I just want to get something like the corresponding Class-Obj. for the EJB so I can store "de.uni-erlangen.ejb.myGreatBean" in my DB-Tuple.

      Please answer me anybody out there (perhaps with a few lines of code).

      P.S. During a invokeHome(mi)-call (for example by a create()-method) there is even no EnterpriseContext given. So how the could I get my information then!?!