This content has been marked as final.
Show 3 replies
-
1. Re: use of synchronized methods
hstech Sep 17, 2001 8:29 PM (in response to jseaman)Hi Jeff,
You shouldn't have any problems with synchronized methods in helper classes, but it seems to be a very strange request. Each EJB instance will be single threaded, so there should be no need to synchronize at your helper class methods.
What are you trying to do?
Cheers,
Aaron. -
2. Re: use of synchronized methods
jseaman Sep 19, 2001 1:35 PM (in response to jseaman)Thanks Aaron,
What I was trying to do is make the helper a singleton to be shared by stateless session beans. Where the helper would have a cache and manage shadow objects from my database. I think this is all a no no and a kludge - probably what I should do is just use entity beans from a session bean facade.
Any ideas or comments?
Thanks,
Jeff -
3. Re: use of synchronized methods
juha Sep 21, 2001 7:25 PM (in response to jseaman)There's alot of information available on singletons in J2EE, check the resources on theserverside.com for example.