Discussions

EJB design: Pass parameter to ejb sessioncontext from servlet

  1. Pass parameter to ejb sessioncontext from servlet (1 messages)

    Hi,

    I need to pass some extra information(some log id from ui layer) to business layer(stateless ejb) without changing the pattern of the ejb function. I have tried putting that info into InitialContext's parameters, but that parameters does not show up anywhare on business layer.

    I know I can put log id as a parameter to every EJB function as a parameter, but that does not seem logical since I have to put that into every function exists and every new function I write. 

    Do you know any way of sending this kind of general parameters to ejbs  that is required by  every function on that layer?

     

    Thanks in advance,

    Burak

     

     

     

     

     

  2. Please, check these out:

    Use ThreadLocal to propagate identity information

    How To Pass Context Between Layers With ThreadLocal And EJB 3.(1)