Fwd: PGXADataSource does not implement DataSource

From: "Bill Middleton" <utvikler(at)gmail(dot)com>
To: books(at)ejurka(dot)com, pgsql-jdbc(at)postgresql(dot)org
Subject: Fwd: PGXADataSource does not implement DataSource
Date: 2007-04-20 22:07:50
Message-ID: 4efe54510704201507s6daaf7d6vf0c8cf801952aa4a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I accidentally left the list out of this reply.

---------- Forwarded message ----------
From: Bill Middleton <utvikler(at)gmail(dot)com>
Date: Apr 21, 2007 12:05 AM
Subject: Re: [JDBC] PGXADataSource does not implement DataSource
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>

Heikki wrote:

> I'm not an expert on hibernate or atomikos, but I don't think hibernate
> should ever see the raw PGXADataSource object. Whatever is handling the
> connection pool, either Atomikos or JBoss, should get a connection from
> the XADataSource object, and wrap that in a DataSource implementation of
> it's own. That wrapper object is registered in JNDI, and hibernate gets
> it from there.

Hibernates JTA implementation does use the ordinary usertransaction from
atomikos (or jboss, presumably) as bound in jndi, but it seems to require
the actual datasource to obtain initial information about the db, and
possibly to create table automatically. If I omit it, I get exceptions for
not supplying a jdbc connection. And indeed, the XADataSource cast to
DataSource is cached in DataSourceConnectionProvider, its getConnection()
method is called by several internal classes - but nowhere does it specify
an XAConnection or XAResource so....

I guess I'll slink off and test this a bit more, before I conclude that its
stable.

Thanks again,

Bill Middleton

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message cvp3-3t1p 2007-04-23 08:00:34 Using interval type columns in Hibernate
Previous Message Heikki Linnakangas 2007-04-20 21:16:59 Re: PGXADataSource does not implement DataSource