Tracking Log with EJB3


EJB design: Tracking Log with EJB3

  1. Tracking Log with EJB3 (3 messages)

    Hi there! I'm developing a business core for an application with EJB3. My EJB3 Services can and do calls for others EJB3 Services in same JVM. I'm with a little problem to solve a requesite where my business layer needs make a Tracking Log. What is it? My First EJB3 Service will receive a idSession, and I need use this idSession at every log event that my business layer will do. Thus, I need that this idSession remain at some place that every EJB3 service can access it. But this idSession will be diferent for every new request. Anyone has an idea? How I can resolve this?! Thank's a lot!

    Threaded Messages (3)

  2. use lieght weight session context DTO[ Go to top ]

    my opinion will be create a leight session context DTO with getSessionId. this DTO has to be passed to all methods where logging or monitoring is important. The inteceptors that do logging should simply retrieve this context and access the sessionid.
  3. Re: use lieght weight session context DTO[ Go to top ]

    I think, are you refereing to using context to retrieve some session id? Thanks, Guddu
  4. Re: Tracking Log with EJB3[ Go to top ]

    Hello there I am trying to implement exactly same thing. I have to create an audit token at the entry point and have to use it to log all important data changes. I don’t want to corrupt my API by passing Audit token as a parameter for all method calls. I am looking to track audit token somehow but without making any reference to it inside business logic and want the interceptors to do all the logging work. Has anybody implemented a userID or some kind of session tracking without corrupting core API??? Many thanks in advance for your help. Regards JP