Subsequent EJB server-calls within one Thread?

Discussions

EJB design: Subsequent EJB server-calls within one Thread?

  1. Subsequent EJB server-calls within one Thread? (2 messages)

    Hi all, will all subsequent EJB calls within the server be executed within the same Thread? I didn't find an exact spec of this. The context is that i have remote and local stateless session beans and i want to share the timestamp at which the initial service call took place. So i thought about setting a ThreadLocal variable by an Interceptor and read this in every bean. Maybe there is a better way to do this? Thanks in advance, Andreas
  2. hi, if i understand this contxt well, i think timestmp can be a variable in client tier, such as business delegate and supplied to EJB as parameter to service. what is the need to hold timestamp at EJB tier? thanks, guddu help on Java based Open Source Utilities at http://freesourceutilityhelp.googlepages.com
  3. hey guddu, the reason is that all entities created or changed during all service-calls should have to same createdAt or changedAt property, due to later db-queries or analysis/reporting. For that it is also mandatory that the time will be get from one single, reliable point - so i think that the remote client whould not be the best to get it and pass it the service. This also inculdes passing it to all subsequent methods as parameter!? ciao, Andreas