This application imports an XML document into a
database.  The data contains several one-to-many
relations that are stored using fk's.  There is one
session bean that reads the XML and creates the entity
beans.  The entity beans all have bidirectional
relationships.

When testing, the session bean that does the actually
importing failed, while the entity bean tests past.  A
quick look in the database showed that the fk's were
null when the entity was created by the session bean.

The only difference between my session bean test and
the others that I could think of was the scope of the
transaction.  In the tests that are passing, creation
of object A and B each occur in their own transaction.
 While the session bean creates both object A and B
(and the relation between them), in the same
transaction.  It also seems that I need to create
multiple B's in order to recreate this problem.

To test my theory I changed the transaction type on
the session bean's method from "Required" to
"NotSupported".  This change of transaction type
allows the test to pass.

I'm currently using JBoss 3.0.3 with Windows 2000 and
JDK 1.4.0.  I'm working on a small test case to try
against the 3.0 Branch and Head.  Has anyone else run
into something similar?

Regards,
Leon


__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to