-
1. Re: Howto get the EJB-Name by an Interceptor
kristoeffy Aug 12, 2003 12:53 PM (in response to kristoeffy)Okay, with:
EnterpriseContext ctx = (EnterpriseContext) mi.getEnterpriseContext();
Container container = ctx.getContainer();
Class beanClass = container.getBeanClass();
I do come to a result.
But there is still the basic problem that I have NOT the EnterpriseContext during create()-calls. But also in that case the EJB must be known anyhow. So my solution lacks generality and therefore seems to be a "hack-around". -
2. Re: Howto get the EJB-Name by an Interceptor
adrian.brock Aug 13, 2003 7:54 AM (in response to kristoeffy)Each interceptor has a setContainer() method.
From that you can get the BeanMetaData.
Regards,
Adrian -
3. Re: Howto get the EJB-Name by an Interceptor
kristoeffy Aug 13, 2003 11:22 AM (in response to kristoeffy)Ahh, I missed this!
Nice that the answer comes so fast.
Thank you very much.
Now the server-side works (org.jboss.ejb.Interceptor)!
But on Client side I have to extend org.jboss.proxy.Interceptor, haven't I?
It hasn't the setContainer().
So we are back to the problem that I still don't know
how the basic information "Which Bean is meant" is passed.
In my opinion this is independant to whether I have access to the Container or not.
Glad, if someone could help and explain. -
4. Re: Howto get the EJB-Name by an Interceptor
adrian.brock Aug 13, 2003 6:41 PM (in response to kristoeffy)On the client side you have the invocation has
an InvocationContext. One of the keys for getValue()
is InvocationKey.JNDI_NAME
Regards,
Adrian