-
1. Re: Optimistic Locking policy in jboss
indyzone Feb 23, 2006 11:54 PM (in response to sriramp_here)Hi,
First of all, I think your jboss.xml is not properly written. It should be like this :<jboss> <enterprise-beans> <entity> <ejb-name>CacheBuilderMDB</ejb-name> <local-jndi-name>mercury-catalog-admin-1.0/ejb/com.ketera.catalog.service.FilterBuilderService</local-jndi-name> <configuration-name>CMP 2.x Optimistic Locking</configuration-name> </entity> <message-driven> <ejb-name>CacheBuilderMDB</ejb-name> <destination-jndi-name>queue/CatalogQueue</destination-jndi-name> </message-driven> </enterprise-beans> <container-configurations> <container-configuration extends="Standard CMP 2.x EntityBean"> <container-name>CMP 2.x Optimistic Locking</container-name> <locking-policy>org.jboss.ejb.plugins.lock.JDBCOptimisticLock</locking-policy> </container-configuration> </container-configurations> </jboss>
Remember, if you change the container configuration and want to apply the new configuration to beans, you have to specify the new configuration name under each bean's <configuration-name> tag, otherwise, the default configuration will be used.
Hope this helps.
Regards,
Indy. -
2. Re: Optimistic Locking policy in jboss
sriramp_here Feb 27, 2006 1:26 AM (in response to sriramp_here)Hi
I tried what you have mentioned in the reply. But still it is not working.
Please have a look at my jboss.xml. I have purposefully added a space for session tag. So do consider that as a mistake. Other than than can you tell me is there something else where i am going wrong.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd">
<enterprise-beans>
< session>
<ejb-name>FilterBuilderService</ejb-name>
<local-jndi-name>mercury-catalog-admin-1.0/ejb/com.ketera.catalog.service.FilterBuilderService</local-jndi-name>
</ session>
<message-driven>
<ejb-name>CacheBuilderMDB</ejb-name>
<destination-jndi-name>queue/CatalogQueue</destination-jndi-name>
<container-name>CMP 2.x Optimistic Locking</container-name>
</message-driven>
<container-configurations>
<container-configuration extends="Standard CMP 2.x EntityBean">
<container-name>CMP 2.x Optimistic Locking</container-name>
<locking-policy>org.jboss.ejb.plugins.lock.JDBCOptimisticLock</locking-policy>
</container-configuration>
</container-configurations>
</enterprise-beans> -
3. Re: Optimistic Locking policy in jboss
sriramp_here Feb 27, 2006 2:42 AM (in response to sriramp_here)Hi,
To add to my above comments i also looked in to the standardjboss.xml where, i saw different container configurations. There i noticed that the <locking-policy> is only applied on Entity Beans ( Container managed as well as Bean Managed). Is it possible to apply a <locking-policy> for Session Beans as well as Message Driven Beans.
Regards
Sriram