pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Bill Middleton <utvikler@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: PGXADataSource does not implement DataSource
Date: Fri, 20 Apr 2007 21:32:11 +0100
Message-ID: <4629234B.8050507@enterprisedb.com> (raw)
In-Reply-To: <4efe54510704201300i4636c611r88dbb48c96be7270@mail.gmail.com>
References: <4efe54510704201300i4636c611r88dbb48c96be7270@mail.gmail.com>

Bill Middleton wrote:
> Hello and thanks for for the efforts.  I've noticed that your XA
> implementation does not formally implement javax.sql.DataSource.  I felt
> pretty sure that this was a simple oversight, given that BaseDataSource
> provides complete compatibility with the DataSource interface.  I patched
> thusly:

I'm not sure that's a smart a smart thing to do. I don't think there's a 
requirement for XADataSource implementations to implement DataSource as 
well. If that was the case, surely XADataSource interface would inherit 
DataSource to enforce that. If we declare that PGXADataSource implements 
DataSource, then one can erroneously configure the container to use 
PGXADataSource in normal DataSource-mode. In fact I suspect that's the 
case in your environment as well.

Can you provide a simple test case involving Hibernate so that I can try 
this out myself? What's in your hibernate config file?

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com



view thread (6+ messages)  latest in thread

Message-ID: <4629234B.8050507@enterprisedb.com>
Permalink:  ../4629234B.8050507@enterprisedb.com/
Also on:    postgresql.org/message-id/4629234B.8050507@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: heikki@enterprisedb.com, utvikler@gmail.com
  Subject: Re: PGXADataSource does not implement DataSource
  In-Reply-To: <4629234B.8050507@enterprisedb.com>
  References: <4efe54510704201300i4636c611r88dbb48c96be7270@mail.gmail.com> <4629234B.8050507@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox