From: | Heikki Linnakangas <heikki(at)enterprisedb(dot)com> |
---|---|
To: | Bill Middleton <utvikler(at)gmail(dot)com> |
Cc: | books(at)ejurka(dot)com, pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: PGXADataSource does not implement DataSource |
Date: | 2007-04-20 21:16:59 |
Message-ID: | 46292DCB.1010202@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Bill Middleton | 2007-04-20 22:07:50 | Fwd: PGXADataSource does not implement DataSource |
Previous Message | Bill Middleton | 2007-04-20 20:56:41 | Re: PGXADataSource does not implement DataSource |