must have missed the start of this one, but we had exactly this problem 
with foreign
keys and Oracle 8.1.6 as well. the first option was to drop the foreign
keys which worked but had the obvious problems. the next thing I tried
was moving to the latest cvs and using the latest 8.1.7 oracle driver
(same database) and the problem went away.  Im pretty sure you wont
get 2-final working if you are doing inserts into 2 tables with a foreign
key relationship.

cheers
craig


At 02:49 PM 1/26/01 -0500, you wrote:

>I have been struggling with getting some BMP beans to work against Oracle. I
>appreciate the help that others have provided, but I am slowly being
>convinced that JBoss 2.0 final will not support BMP if Oracle Foreign Keys
>are involved. We have even done some testing against the latest CVS code
>with no luck.
>
>Consider the Java Pet Store app, which folks have struggled to port to
>Jboss. It has an Orders EJB which has a dependent object class LineItems.
>The code does an INSERT against the orders table and then an insert against
>the LineItems table. Each Insert is in a separate method and each obtains a
>database connection from the DB pool. In essence, this is the exact same
>model that my code has been using, except that I have been using separate
>EJBs for the dependent classes.
>
>I've considered the following courses of action.
>
>1) Use another DB (Our preferred DB is Oracle, so that is a no-go)
>2) Use another EJB server (None of them are free and show promise like
>Jboss)
>3) Refactor my four entity beans, into a single monolithic entity bean. In
>essence this is the EJB 2.0 approach of having course-grained entity beans
>with dependent classes. The problem is that I would still have multiple
>methods, that each would obtain a connection from the DB pool, use it, and
>then release. The OrdersDAO and OrdersDAOOracle code in the pet store is an
>example of something that I would create. In effect, I don't think this will
>work, because the Oracle datasource is not returning a connection that can
>see the previous work. Taking this approach is still a poor usage of the
>connection pool mechanism that the EJB server is providing.
>4) Dropping the Foreign Keys in Oracle. Leads to integrity options.
>
>As it stands right now, I don't have a really viable option. I want to use
>EJBs to encapsulate my database logic, but I am unable to make it work. I
>have been trying various solutions to this problem for seven days now.
>
>Any ideas on how I can get my stalled effort moving?
>
>Thanks, and I apologize for my frustration. I think we've all been where I
>am at one time or another.
>
>Dave
>
>Dave Bolt
>There is always plenty of bandwidth, just none for you.



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to