openejb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Cai <greensi...@gmail.com>
Subject Re: Propagating extra context information in remote EJB calls
Date Thu, 29 Oct 2009 09:16:08 GMT
Thanks Jacek for the quick response!

What I want to do is like this -

1. At the client side, intercept the client call before it's sent out, and
attach some extra context information with the call;
2. At the server side, intercept the business method call before the method
is actually executed, so that I can retrieve the extra context information
coming with the call and set it into the server thread's context.

I need to transparently do this for all EJBs. I was hoping I could do the
trick only once in the code, instead of having to take care of all EJBs
(e.g., use AOP to specify to intecept each invidiual remote interface).

So in a word, I guess this is pretty much the same as how
transaction/security context gets propagated today. Does this make more
sense now?

-Jack

On Thu, Oct 29, 2009 at 4:29 PM, Jacek Laskowski <jacek@laskowski.net.pl>wrote:

> On Thu, Oct 29, 2009 at 9:16 AM, Jack Cai <greensight@gmail.com> wrote:
> > I want to propagate some context information in remote EJB calls, and
> > hopefully this can be done transparently, i.e., does not require code
> change
> > to existing applications. Is this possible?
>
> I don't know how it is in OpenEJB itself, but you can use AOP to do
> the trick. Just intercept client calls on a client and add relevant
> data to the stream. I believe you want to pass the additional data to
> another set of remote methods so you could just route the calls to
> remote business methods to their extended counterparts. I'm pretty
> sure it doesn't sound well, but with such a general description I
> couldn't come up with something more elegant :]
>
> Jacek
>
> --
> Jacek Laskowski
> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message