hi!

 > The other day, I was thinking of doing the same thing for the purposes of
 > "injecting" my own code before and after each method call.  I wanted to
 > allow this functionality at any API call, so I did not want to make explicit
 > modification to all of my beans.  However, I was not able to achieve this
 > due to the fact that the container interspects the .class file for proper
 > method.  A proxy would not have a class file to examine, so the container
 > would fail to deploy the bean.

that's understandable.

for such purposes, I think you can try .class file modification method:
try BCEL's helloify example at: http://bcel.sourceforge.net/ - then [examples].
this is working fine for me, both to modify bean .class file itself and also
container (my case->JRun) generated stub files (even after deployment).

funky :) way to do this might be http://www.aspectj.org (AspectJ),
but this seems to be a bit unstable for very complicated code (as far as
last time I have tried it was so; might be different today).
(but it's very FUN to try - I recommend this:))

 > I recon you can modify ANT to create such a proxy automatically for you,
 > however, it would take a place of a .java file and be more like a statically
 > generated file.

what I'm doing right now is a bit like proxy server for EJB servers
(although an application dependant one; ...doing generic EJB proxy
server might be challenging/interesting but it's currently beyond my
scope/knowledge -- does someone know of anything).
my program right now enumerates the beans deployed on the target server
and then generates stubs for all of the beans found there (for itself).
this part is working but the resulting files look a bit cluttered; and
I'd rather like to have a more beautiful looking method... (any idea?)

 > If you ever solve your problem dynamically, tell me.

so far it appears like, I'm stuck with the static file generation scheme :p

regards,
kenji

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to