-
Subsequent EJB server-calls within one Thread? (2 messages)
- Posted by: Andreas S
- Posted on: May 16 2008 05:40 EDT
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, AndreasThreaded Messages (2)
- Re: Subsequent EJB server-calls within one Thread? by guddu sk on May 18 2008 02:13 EDT
- Re: Subsequent EJB server-calls within one Thread? by Andreas S on May 18 2008 06:26 EDT
-
Re: Subsequent EJB server-calls within one Thread?[ Go to top ]
- Posted by: guddu sk
- Posted on: May 18 2008 02:13 EDT
- in response to Andreas S
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 -
Re: Subsequent EJB server-calls within one Thread?[ Go to top ]
- Posted by: Andreas S
- Posted on: May 18 2008 06:26 EDT
- in response to guddu sk
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