Skip to main content

Postgres XA weirdness

No replies
Joined: 2003-06-10

I'm having a weird behavior with Glassfish, JPA and Postgres.

I setup a JDBC resource in Glassfish with the postgresql-8.1-407.jdbc3.jar for Postgres. The database is on Solaris 10 running on an X4100.

In my persistence.xml, I set it to drop and create tables on deployment. If I use the XA datasource driver, this fails, but using the SimpleDataSource driver, it works. After the creation, if I go back onto the server and set the driver back to the XA driver, everything runs fine for inserts, deletes, updates, etc.

It's just the initial creation and dropping of tables with the XA datasource thats an issue. The weirder thing is that no exceptions are thrown, I see a create table statement in the postgres logs, but the tables are not there. The Enterprise application project also deploys fine without an error, but when I actually hookup to the Session bean to read the database, then I get the "table does not exist" sql exception.

I'm using the Netbeans 5.5 IDE, and the latest glassfish UR1 release on Windows for development.

Any thoughts on how to troubleshoot this further?