Hi, Pls. help. us with the following problem.

We have a SB function f1 that calls a CMP ejbCreate(EJB2.0) and another SB function
f2. The CMP ejbCreate creates a tuple in tableA, and f2 batch updates tuples
in tableB. TableB's fk is
tableA's primary key. When the tuple in tableB is created, the fk field can be
null. After a
tuple in tableA is created, tuples in tableB will be batch updated with the pk
of tableA.

We config the transaction attribute of f1, f2 and CMP ejbCreate as Required.

Our problem is that, at executing of f2, exception
ORA-02291 integrity constraint (%s.%s) violated - parent key not found
is throwed.
But the CMP ejbCreate successfully insert a record into tableA which should be

also rollbacked as part of the f1 transaction.

We have tried to config the transaction attribute of CMP ejbCreate as RequiresNew
that the
exception will not be throwed but the transaction requirement of f1 is not satisfied.
Using CMPs iteration instead of the batch updates for SB function f2 and ctx.setRollbackOnly()
in f1's exception handling can solve our problem but we think batch updates provide
more efficiency than CMP solution.

Any suggestions, idea on how to solve the problem? And/or any suggestions on
relavent
documentations?

We are using WebLogic 8.1 and JBuilder X.

Thank you.

Li Xu