[jboss-user] [EJB/JBoss] - Static field volatile
do-not-reply at jboss.com
Fri Apr 13 06:27:23 EDT 2007
I was under an obligation do session bean which method generate
unique identifier ( timestamp (yyyymmddhhmmss) + counter).
I store last value identifier in database and use strict locking condition (db) -
this way I'm sure that it is unique.
I'm looking for more efficient way for solve this problem.
I was thinking about store last value in bean static variable with kev word volatile. I know that EJB specyfication is not favourable for using threads features. Is possible using volatile word for synchronize access to static variable ?
thank in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037024#4037024
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037024
More information about the jboss-user