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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -