users@glassfish.java.net

Re: synchronizing methods in ejbs - stateless

From: <glassfish_at_javadesktop.org>
Date: Tue, 19 Feb 2008 11:01:00 PST

You can synchronize against a singleton class, but that won't work in a cluster. The other option is to use JDBC to lock a row a shared database. And you will most likely encounter performance issues by serializing everyone through a single lock. But this only comes in to play if you have a lot of transaction on the same method.
[Message sent by forum member 'whartung' (whartung)]

http://forums.java.net/jive/thread.jspa?messageID=259722