Chapter 8 Creating J2EE Applications for BEA WebLogic


Setting Up Database Locking

You use the deployment descriptors to specify the locking mechanism used for an EJB by setting the concurrency-strategy deployment parameter in weblogic-ejb-jar.xml. concurrency-strategy is set at the individual EJB level, so that you can mix locking mechanisms within the EJB container.

The following excerpt from weblogic-ejb-jar.xml shows an EJB that uses database locking:

<entity-descriptor>
	<entity-cache>
	...
	<concurrency-strategy>Database</concurrency-strategy>
	</entity-cache>
	...
</entity-descriptor>

If you do not specify concurrency-strategy, WebLogic Server performs database locking for entity EJB instances, as described in Exclusive Locking Services.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.