ejb 3.1 - Synchronized block in stateless EJB -
is okay have synchronized block in stateless ejb in ejb 3.1?
the synchronized block renewing connection on connection errors.
whenever make request. container provides new instance of bean, or existing instance bean pool. work bean, release it, , goes ejb pool. having said that, don't believe it's necessary have method synchronized, there won't ever occur time when 2 threads using same ejb instance.
if want work singleton beans, @lockread
, @lockwrite
annotations. tutorial quite helpful.
Comments
Post a Comment