[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Enhancing an ejb-call with aspectj

I hope this can be done with AspectJ but I'm not sure if it's possible.

We have a struts applications that calls EJB's on our server.
Now I want to enhance the EJB call to do the following: the client calls
the EJB - I want to enhance the EJB that it
does fetch debug information from the client and on the  server side
this information is written to a log file.

My idea 1 is that the stubs and skeletions would have to be enhanced
differently. In the client side I weave code in
the stub - on the server into the skeletion at runtime. But stups and
skeletions are sometime generated at runtime
itself - therefore I don't think that this works - if someone thing I'm
wrong - please tell me.

My idea 2 is to add an additional parameter to each session  bean in my
system that is used by the client. On the client
I add an around advice to all calls of an ejb, add this additional
parameter there (hope this can be done) and fill
the information to this additional parameter and extract this info on
the server side.

I think I have to use solution 2 - if anyone thinks solution 1 would
work too or thinks solution 2 does not - please
let me know.

Thank you.