Why is the JDBCStoreManager.createEntity allowing a null pk:
   public Object createEntity(
         Method createMethod,
         Object[] args,
         EntityEnterpriseContext ctx) throws CreateException
   {

Object pk = createEntityCommand.execute(createMethod, args, ctx);

      // mark the entity as created
      entityBridge.setCreated(ctx);

      return pk;
   }

This guarentees a failure after the fact when the lock is attempted for the null primary key as seen in the updated KeyGenerationUnitTestCase:

20:10:31,272 INFO [MainDeployer] Deployed package: file:/C:/cvs/JBoss3.2/jboss-3.2/testsuite/output/lib/cmp2-keygen.jar
20:10:37,391 ERROR [LogInterceptor] TransactionRolledbackLocalException, causedBy:
java.lang.IllegalArgumentException: Attempt to get lock ref with a null object
at org.jboss.ejb.BeanLockManager.getLock(BeanLockManager.java:80)
at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:81)


Why isn't this failure caught as the source and the create failed?

--
xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx



-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to