Subject Re: [IB-Java] Re: Built in pooling added to jca-jdbc driver
Author David Jencks
On 2002.01.06 18:58:06 -0500 jwcanada wrote:
> David,
>
> Thank you. As the transaction problems, I could not further test it.
> How to start a transaction on a connection?
>
> jw
>

Do nothing >> autocommit, just don't use blobs

Set autocommit false >> transactions are started for you automatically and
last until you call commit.

If you have java.sql.Connection c, and do not change the autocommit
setting,

javax.resource.cci.LocalTransaction lt =
((FBConnection)c).getLocalTransaction();

allows you to explicitly control the begin and commit of your transactions:

lt.begin();
//do some work

lt.commit();

//work done here will be autocommitted

Have you tried modifying the TestConst db location as appropriate and
running some tests?

The constants for the jca tests are still a little messed up. I'll see if
I can come up with something a little more portable.

One solution might be to create a dir for the dbs, find its location, and
use the ant filter task to put that into your local classes. Or at least
into a property file.

david jencks
>
> --- In IB-Java@y..., David Jencks <davidjencks@d...> wrote:
> After a good deal of study I find that on my machine the problem was
> different formats for database urls for the Driver and the DataSource.
>
> Driver url looks like:
>
> jdbc:firebirdsql:localhost/3050:/usr/local/firebird/dev/client-
> java/db/fbmctest.\
> gdb
>
> DataSource url looks like:
>
> localhost/3050:/usr/local/firebird/dev/client-java/db/fbmctest.gdb
>
> Due to the internal connection swapping to allow the appearance of xa
> transactions, you don't actually open the first connection to the db
> until
> you try to start a transaction on a connection. Therefore you get some
> extremely confusing messages about transaction problems when really,
> you
> couldn't even get to the db.
>
> Thanks for pointing this out!
>
> Let me know if you have other problems with it.
>
> david jencks
>
>
> On 2002.01.06 15:24:12 -0500 jwcanada wrote:
> > David,
> >
> > Thank you for writting the database pooling. I am able to compile
> it
> > and abtainning the pooled connection. However, when I use it, it
> gave
> > me the following message as soon as I executeQuery("select MyMemo
> > from Mytable":
> >
> > java.sql.SQLException: ResourceException:
> > javax.resource.ResourceException: couldn't start local transaction:
> > javax.transaction.xa.XAException:
> > at org.firebirdsql.jdbc.FBStatement.executeQuery
> > (FBStatement.java:110)
> >
> > This error happens even though I setAutocommit false.
> >
> > Your help would be greatly appreciated.
> >
> > jw
>
>
>
>
> To unsubscribe from this group, send an email to:
> IB-Java-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>