Re: PGXADataSource does not implement DataSource
От | Heikki Linnakangas |
---|---|
Тема | Re: PGXADataSource does not implement DataSource |
Дата | |
Msg-id | [email protected] обсуждение исходный текст |
Ответ на | Re: PGXADataSource does not implement DataSource ("Bill Middleton" <[email protected]>) |
Список | 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
В списке pgsql-jdbc по дате отправления: