Well, we tested some more with PoolMan and finally got frustrated enough to throw
it out the virtual window.
Once we directly used the mm.mysql drivers it works fine except the
jdbc2.optional.MysqlDataSource has a default of
1306 for the port. Once we overrode this, everything ran smoothly.
In Castor database.xml the:
<database name="testDB" engine="mysql" >
<data-source class-name="org.gjt.mm.mysql.jdbc2.optional.MysqlDataSource"/>
<params user="test" password="test" server-name="localhost" port-number="3306"/>
</data-source>
<mapping href="mapping.xml"/>
</database>
doesn't override the port number default in MysqlDataSource. In order to make it work
we needed to change it to:
<database name="testDB" engine="mysql" >
<driver class-name="org.gjt.mm.mysql.jdbc2.optional.MysqlDataSource"
url="jdbc:mysql://localhost:3306/testDB?user=test&password=test"/>
<mapping href="mapping.xml"/>
</database>
Thanks for heads up about PoolMan heading down the drain.
Cheers,
Tim Ruppert && Ben Cox
Ben Cox wrote:
> That's our next plan, but it will have to wait until tonight or (more
> likely) tomorrow morning. Our sysadmin killed the server!
> We'll keep you posted. Thanks!
>
> Ben Cox && Tim Ruppert
>
> Thomas Yip wrote:
>
> >
> >
> >
> >
> > Can you try it without using PoolMan, and let me know the result?
> >
> >
> >
> >
> >
> >
> >
> > Thomas
> >
> >
> >
> > -----Original Message-----
> >
> > >From: Timothy Ruppert [mailto:[EMAIL PROTECTED]]
> >
> > >Sent: Thursday, February 14, 2002 12:56 PM
> >
> > >To: [EMAIL PROTECTED]
> >
> > >Subject: [castor-dev] RE: transaction hangs
> >
> > >
> >
> > >Frank,
> >
> > > We are experiencing the same problem with the "db.commit()" call
> > on mysql version 3.23.48 for -freebsd 5.0 (i386) with basically the same
> > transaction code. We keep thinking that we must be missing something in
> > our setup of the database connections or the usage of transactions in
> > the Castor API. We have no problem doing a create or an OQL query, but
> > as soon as we attempt an update IN THE SAME PROGRAM, we are hanging.
> > Interestingly enough when you run the three transactions: create,
> > select, and update (didn't get to implement delete because update didn't
> > work) in separate, sequential runs of the program everything works
> > perfectly. Another weirdness is that if (when running all transactions
> > in the same program run) the create fails because the entity is already
> > in the database, the update is posted to the database, but still hangs.
> >
> > > Does anybody have any words of wisdom or working code that they
> > wouldn't mind sharing? In particular, can anybody show us working
> > examples of initializing a db and performing multiple transactions on
> > it. We are getting a PoolMan (verison 2.0.4) via JNDI which wraps the
> > mysql connection thru mm.mysql drivers.
> >
> > >Cheers,
> >
> > >Tim Ruppert && Ben Cox
> >
> >
>>------------------------------------------------------------------------------------------------------------
> >
> > >
> >
> > >Hi,
> >
> > >what can cause a "db.commit()" call that it hangs ?
> >
> > >here is the regarding part of my code:
> >
> > >db.begin()
> >
> > >...
> >
> > >// some reading queries
> >
> > >...
> >
> > >db.commit() // this method never return's or gives an exception
> >
> > >db.close()
> >
> > >the database i'm using is an oracle (8.1.7.).
> >
> > >thanks for any hints,
> >
> > >frank
> >
> > >
> >
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev