Hello Russell,
could you provide a testcase or detailed info on how I can reproduce
it?
Thanks,
alex
Thursday, June 12, 2003, 11:27:31 PM, Russell Chan wrote:
RC> Hmmm..
RC> I just tried the same code on jboss-3.2.1 and the new 3.2.2rc1
RC> The code was functional, ableit not what I want for 3.2.1.
RC> The same ear file deployed into 3.2.2rc1 blew up.
RC> I'd file a bug, but I'm still not certain that I haven't coded up
RC> something wrong (I'm still new at the relations stuff), and it's not
RC> jboss' fault.
RC> So, I'll try to include some more code samples and debugging output
RC> here. Once again, I'm using xdoclet-1.2b, so you'll see those tags
RC> here. I'll also only include the relevant columns...
RC> TransactionRef is the foreign key which maps to another bean Transaction
RC> whose primary key is transactionRef.
RC> EventQueueBean.java:
RC> Accessor for the foreign key field:
RC> ==
RC> /**
RC> * getTransactionRef - get TRANSACTION_REF
RC> *
RC> * @ejb.interface-method
RC> *
RC> * @ejb.transaction type="NotSupported"
RC> * @ejb.persistence column-name "TRANSACTION_REF"
RC> * @jboss.method-attributes read-only="true"
RC> * @ejb.value-object
RC> * match="Default"
RC> */
RC> public abstract java.lang.String getTransactionRef ();
RC> /**
RC> * setTransactionRef - set TRANSACTION_REF
RC> *
RC> * @ejb.interface-method
RC> * @ejb.value-object
RC> * match="Default"
RC> */
RC> public abstract void setTransactionRef ( java.lang.String aValue
RC> );
RC> ==
RC> Accessor for the foreign key cmr.
RC> /**
RC> * @ejb.interface-method view-type="local"
RC> * @ejb.transaction type="Required"
RC> *
RC> * @ejb.value-object
RC> * match="Tree"
RC> *
RC> aggregate="com.navahonetworks.interfaces.entity.TransactionValue"
RC> * aggregate-name="TransactionValue"
RC> *
RC> members="com.navahonetworks.interfaces.entity.TransactionValue"
RC> * members-name="TransactionValue"
RC> * relation="external"
RC> *
RC> * @ejb.relation
RC> * name="EventQueue-Transaction"
RC> * role-name="EventQueue-has-a-Transaction"
RC> * cascade-delete="false"
RC> * target-ejb="Transaction"
RC> * target-role-name="Transaction-has-an-EventQueue"
RC> * target-multiple="no"
RC> *
RC> *
RC> * @jboss.relation
RC> * fk-column="TRANSACTION_REF"
RC> * related-pk-field="transactionRef"
RC> *
RC> *
RC> * @jboss.method-attributes read-only="true"
RC> *
RC> */
RC> public abstract
RC> com.navahonetworks.interfaces.entity.TransactionLocal getTransaction();
RC> /**
RC> * @ejb.interface-method view-type="local"
RC> * @ejb.transaction type="Required"
RC> */
RC> public abstract void
RC> setTransaction(com.navahonetworks.interfaces.entity.TransactionLocal
RC> transaction);
RC> ==
RC> Relevant portion of jbosscmp-jdbc.xml:
RC>
RC> EventQueue-Transaction
RC>
RC>
RC>
EventQueue-has-a-Transaction
RC>
RC>
RC>
RC>
Transaction-has-EventQueues
RC>
RC>
RC>transactionRef
RC>TRANSACTION_REF
RC>
RC>
RC>
RC>
RC> ==
RC> On Jboss 3.2.1:
RC> Here's the query being executed by jboss cmp on the ejbLoad. Note that
RC> TRANSACTION_REF appears twice... once for the cmr-field, and once for
RC> the cmp-field.
RC> 2003-06-12 16:17:53,522 DEBUG
RC> [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.EventQueue]
RC> Executing SQL: SELECT EVENT_QUEUE_ID,EVENT_QUEUE_GUID, ENTRY_DATE,
RC> EVENT_TYPE, STATE, TRANSACTION_REF, ATTEMPTS, NEXT_ATTEMPT, PRIORITY,
RC> LOCKED, EVENT_DETAILS, VENDOR_ID, VENDOR_ID, TRANSACTION_REF FROM
RC> OFFNET.EVENT_QUEUE WHERE (EVENT_QUEUE_ID=?) OR (EVENT_QUEUE_ID=?) OR
RC> (EVENT_QUEUE_ID=?)
RC> This isn't exactly what I want - I'd rather see just one
RC> "TRANSACTION_REF" show here, but it appears to work. (I'm worried about
RC> what an ejbStore would do - would it try to set it twice? I'll have to
RC> check that).
RC>