On JBoss-4.0.0:
The vast majority of our data is mainly used for read, and very rarely for insert/update.
Therefore we changed our locking policy to SimpleReadWriteEJBLock, which appears to be the equivalent of the default Websphere "Pessimistic Lock - weakest lock on Load" policy, which is what we want.
Now, whenever we try to do anything involving altering CMR relationships, we get a null pointer in jboss code.
javax.ejb.TransactionRolledbackLocalException: null; CausedByException is:
null
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:232)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:342)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:149)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:128)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:514)
at org.jboss.ejb.Container.invoke(Container.java:854)
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.invokeAddRelation(JDBCCMRFieldBridge.java:1179)
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.createRelationLinks(JDBCCMRFieldBridge.java:985)
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.createRelationLinks(JDBCCMRFieldBridge.java:961)
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setInstanceValue(JDBCCMRFieldBridge.java:897)
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setValue(JDBCCMRFieldBridge.java:708)
at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler$FieldSetInvoker.invoke(EntityBridgeInvocationHandler.java:156)
at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:91)
at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:62)
Can someone explain the implications of this locking policy that we might not have foreseen, or is this a bug?