I have a distributed application with a Tomcat 6.x frontend and JBoss 7.1.x backed. JBoss is running in standalone mode and Tomcat is running in a seprate VM. For better log correlation I want each log log statement to contain the servlet session ID. Therfore I store session ID in log4J MDC on frontend and want to propagete this information with each EJB request to backend. This should be done implicitly without changeing the existing EJB interfaces. So I would like to store sessionID in in a "EJB request context" on the client side and read it in an interceptor from the server side.
Solution would look like this:
1) ServletFilter: Store "sessionID" in log4J MDC
2) EJBClientInterceptor: Read "sessionID" from log4J MDC and pack to EJB Request
3) EJBServerInterceptor: Unpack "sessionID" from EJB Request and store in log4J MDC
1) Does such an "EJB Request Context" exist?
2) Does "EJBClientInterceptor" exist I'm only aware of EJBInterceptors on the server side?