[jboss-user] [EJB3] - Re: Singleton in clustered JBoss AS 6 Final

Ilya Sorokoumov do-not-reply at jboss.com
Tue Jan 25 10:45:19 EST 2011

Ilya Sorokoumov [http://community.jboss.org/people/ilya40umov] created the discussion

"Re: Singleton in clustered JBoss AS 6 Final"

To view the discussion, visit: http://community.jboss.org/message/583104#583104

> h5. Managing Concurrent Access in a Singleton Session Bean
> #
> Singleton session beans are designed for *concurrent access*, situations in which many clients need to access a single instance of a session bean at the same time. A singleton’s client needs only a reference to a singleton in order to invoke any business methods exposed by the singleton and doesn’t need to worry about any other clients that may be simultaneously invoking business methods on the same singleton.
> ##When creating a singleton session bean, concurrent access to the singleton’s business methods can be controlled in two ways: *container-managed concurrency* and *bean-managed concurrency*.
> #The javax.ejb.ConcurrencyManagement annotation is used to specify container-managed or bean-managed concurrency for the singleton. With @ConcurrencyManagement, a type attribute must be set to eitherjavax.ejb.ConcurrencyManagementType.CONTAINER or javax.ejb.ConcurrencyManagementType.BEAN. If no @ConcurrencyManagement annotation is present on the singleton implementation class, the EJB container default of container-managed concurrency is used.

Take a look at this link for the details:
 http://download.oracle.com/javaee/6/tutorial/doc/gipvi.html http://download.oracle.com/javaee/6/tutorial/doc/gipvi.html

Reply to this message by going to Community

Start a new discussion in EJB3 at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110125/cef960dd/attachment.html 

More information about the jboss-user mailing list