[jboss-user] [EJB 3.0] - @Service POJOs information

8forty do-not-reply at jboss.com
Thu Jun 21 14:01:25 EDT 2007


I'm experimenting with the @Service POJOs on a new project, and I really like the concept, but I have a few questions about what I've discovered.

I've confirmed that the single instance created allows multiple active simultaneous threads.  Therefore if I have any fields, I need to synchronize them.

1) Is it therefore safe to use the synchronized keyword in my @Service POJO methods (in violation of the EJB spec)?

2) If I build a JBoss cluster, is there still just a single instance regardless of the number of machines in the cluster?

3) Do @Service POJOs have the same transaction semantics as stateful session beans?  (e.g. can I use an extended persistence context in the same way?)



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056621#4056621

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056621



More information about the jboss-user mailing list