smcardle
Dec 14th, 2004, 08:09 AM
Hi all,
We are using AOP to inject Audit keys into our Web Tier requests for logging. I need to propogate this Audit Key to the EJB Tier. i.e. When my Web Tier calls an EJB in another JVM I need to pass to the SLSB the Audit key that was generated in the Web Tier for logging in the EJB tier.
Can anybody tell me how I can pass the Audit key from my Tomcat Web Tier running on one JVM to an SLSB EJB called via RMI running on another JVM without modifying the public methods called on the SLSB via the Web Tier.
I want to do something like marshal the Audit Key along with all other parameters when making the remote call and then have an aspect on the unmarshal (server side) call a method to set a ThreadLocal with Audit Key value while unmarshelling or just prior to executing the remote method.
If I am on the wrong track and there is another (prefered/easier) way please let me know. Any help here would be a great help for my project and a great selling point with my management regarding bringing Spring and AOP into our main line development.
Regards
We are using AOP to inject Audit keys into our Web Tier requests for logging. I need to propogate this Audit Key to the EJB Tier. i.e. When my Web Tier calls an EJB in another JVM I need to pass to the SLSB the Audit key that was generated in the Web Tier for logging in the EJB tier.
Can anybody tell me how I can pass the Audit key from my Tomcat Web Tier running on one JVM to an SLSB EJB called via RMI running on another JVM without modifying the public methods called on the SLSB via the Web Tier.
I want to do something like marshal the Audit Key along with all other parameters when making the remote call and then have an aspect on the unmarshal (server side) call a method to set a ThreadLocal with Audit Key value while unmarshelling or just prior to executing the remote method.
If I am on the wrong track and there is another (prefered/easier) way please let me know. Any help here would be a great help for my project and a great selling point with my management regarding bringing Spring and AOP into our main line development.
Regards