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: books@ejurka.com
Cc: pgsql-jdbc@postgresql.org
Subject: Re: PGXADataSource does not implement DataSource
Date: Fri, 20 Apr 2007 22:16:59 +0100
Message-ID: <46292DCB.1010202@enterprisedb.com> (raw)
In-Reply-To: <4efe54510704201356i7f5c1d51i9b73b2e186c81b31@mail.gmail.com>
References: <4efe54510704201300i4636c611r88dbb48c96be7270@mail.gmail.com>
	<4629234B.8050507@enterprisedb.com>
	<4efe54510704201356i7f5c1d51i9b73b2e186c81b31@mail.gmail.com>

Bill Middleton wrote:
> Hello again, and thanks for the feedback.  Yes, I'm likely in way over my
> head here.  However, things are working acceptably with minimal testing so
> far.  I register my modified PGXA as the resource in a
> UserTransactionService and then pass it into hibernate via jndi lookup,
> along with a transactionmanager.  The interesting bits of
> hibernate.cfg.xmlare then:
> 
>    <property name="hibernate.dialect">
> org.hibernate.dialect.PostgreSQLDialect</property>
>    <property name="hibernate.connection.datasource
> ">java:comp:myDS</property>
>    <property name="hibernate.transaction.factory_class">
> org.hibernate.transaction.JTATransactionFactory</property>
> 
> Hibernate accesses the DS in
> org.hibernate.connection.DataSourceConnectionProvider
> 
> I'm using the atomikos TM, and sharing the DS between hibernate and a  
> (also
> slightly modified) up jboss cache.

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.

Where is the connection pool configured? What's in the jboss cache and 
how is it modified?

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



view thread (6+ messages)  latest in thread

Message-ID: <46292DCB.1010202@enterprisedb.com>
Permalink:  ../46292DCB.1010202@enterprisedb.com/
Also on:    postgresql.org/message-id/46292DCB.1010202@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, books@ejurka.com
  Subject: Re: PGXADataSource does not implement DataSource
  In-Reply-To: <46292DCB.1010202@enterprisedb.com>
  References: <4efe54510704201300i4636c611r88dbb48c96be7270@mail.gmail.com> <4629234B.8050507@enterprisedb.com> <4efe54510704201356i7f5c1d51i9b73b2e186c81b31@mail.gmail.com> <46292DCB.1010202@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