I am trying to remove an instance of a CMP entity bean.

The entity bean PK looks like

/**
  |    * @ejb.pk-field
  |    * @ejb.persistence column-name="id" jdbc-type="INTEGER" sql-type="SERIAL"
  |    * @jboss.persistence auto-increment="true"
  |    * @ejb.interface-method view-type="both"
  |    * @ejb.transaction type="Supports"
  |    */
  |   public abstract Integer getId();
  | 
  |   /**
  |    * @ejb.interface-method view-type="both"
  |    */
  |   public abstract void setId(Integer id);
  | 
  | 

The following tags are added to the entity to allow genrating the ids
 * @jboss.entity-command name="informix-serial" 
class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCInformixCreateCommand"
  |  * @jboss.entity-command-attribute name="method" value="getSerial"
  | 


every time I try to execute a "remove" on the remote/local home, I get 

ERROR [STDERR] javax.transaction.TransactionRolledbackException: Internal error 
getting primary key field member id; CausedByException is:
  |     null; nested exception is: 
  |     javax.ejb.EJBException: Internal error getting primary key field member 
id; CausedByException is:
  |     null

To be more specific on how the "remove" call is reached
- a stateful session bean create the entity in the DB
- within the same session bean method, a JMS message is sent to JmsXA queue for 
further processing (JmsXA is used to make sure the messages will be sent AFTER 
commiting the DB creation)
- the MDB is called with the message
- the MDB perform some checks on the entity (this involves instatiating the 
entity by doing find by primary key)
- in some cases the MDB would decide to delete that entity (That's when the 
error happen)

When I try to delete the object directly within the session bean... everything 
works fine ? it looks the problem has somethignto do with the session/MDB 
transaction


Can anyone help please.

Thanks
Hamdy


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3898846#3898846

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3898846


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to