I've run into a strange problem over the last few days, and I'm trying
to get a handle on where the root cause might be.

I'm using JBoss 2.4.4 and Oracle's thin JDBC driver (I've tried versions
8.1.7 and 9.0.1 with no difference) against an Oracle 8i instance.

If I issue the following three statements from a JSP using a pooled
connection.  Each statement is in it's own transaction scope, and each
transaction is committed.

drop table test_table cascade constraints
create table test_table ( col1 date, col2 varchar(64) )
insert into test_table ( col1, col2 ) values ( to_date( '12/22/2001
12:23:23 PM', 'MM/DD/YYYY HH:MI:SS AM'), 'test' )

The first time I run this JSP I get an (expected) exception on the drop
(the table doesn't yet exist), then the table is created and the row
inserted.

So far, so good.

The problem:

if I run the JSP again, immediately, everything claims to work (i.e.
there are no exceptions thrown and the return values are 0,0, and 1
respectively) but if I inspect the table using dbvis (or sqlplus)
test_table contains two rows - the second drop isn't working.  If I run
the JSP n times, I end up with n rows in the table.

The strange part:

if I restart jboss and run the jsp, the table get's dropped correctly
and I'm back to one row.

Anyone seen this (or anything similar) before, or have any idea if this
is:

a. an oracle driver issue?
b. a connection pooling issue?
c. stupid user error?

I'm stumped - any suggestions would be appreciated.

-- 
   Dan Berger [[EMAIL PROTECTED]]

   "We are what we repeatedly do.  Excellence, then, is not an act, 
    but a habit."
                                  -- Aristotle

   "It comes in pints?!"
                                  -- Pippin


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to