Results 1 to 2 of 2

Thread: How to propogate context from web to ejb tier

  1. #1

    Default How to propogate context from web to ejb tier

    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

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    I am not sure if this would work your particular app server, but could you extend your RemoteInvocation to pass your web server-bound ThreadLocal to the server-side? We do something very similar - see code at http://cvs.sourceforge.net/viewcvs.p...curity/ui/rmi/

Similar Threads

  1. Hibernate Long Session Per Flow?
    By akw in forum Web Flow
    Replies: 21
    Last Post: Dec 12th, 2005, 08:06 PM
  2. Replies: 2
    Last Post: Oct 13th, 2005, 02:47 PM
  3. Replies: 2
    Last Post: Oct 10th, 2005, 05:12 PM
  4. Loosing my SecureContext
    By sklakken in forum Security
    Replies: 3
    Last Post: Jul 21st, 2005, 01:44 PM
  5. Stack Overflow
    By rayho222 in forum Container
    Replies: 6
    Last Post: May 17th, 2005, 03:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •