Tiry | 7 May 01:09
Gravatar

Re: Postgresql and XA Datasource

Sean Radford a écrit :
> Hi,
>
> How do you define the schema to use for XA datasources in Nuxeo?
This should not have anything to do with Nuxeo : the datasources are 
managed by JBoss.
Tests have been done with PGSQL in XA.
I don't have a example here.
Just check JBoss doc and check your PGSQL JDBC package.

Do you have this problem on all datasources or only on the jbpm db ?

>
> For example I've tried:
>
> <xa-datasource>
>  <jndi-name>nxworkflowjbpm</jndi-name>
>  
> <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class> 
>
>  <xa-datasource-property 
> name="ServerName">localhost</xa-datasource-property>
>  <xa-datasource-property name="PortNumber">5432</xa-datasource-property>
>  <xa-datasource-property 
> name="DatabaseName">MY_DB</xa-datasource-property>
>  <xa-datasource-property name="Schema">my_schema</xa-datasource-property>
>  <xa-datasource-property name="User">my_user</xa-datasource-property>
>  <xa-datasource-property 
> name="Password">password</xa-datasource-property>
>  <track-connection-by-tx/>
> </xa-datasource>
>
> But this fails with:
>
> 2008-05-06 21:53:45,117 WARN  
> [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] 
> Throwable while attempting to get a new connection: null
> org.jboss.resource.JBossResourceException: Could not create 
> connection; - nested throwable: 
> (org.jboss.resource.JBossResourceException: Could not find accessor on 
> XADataSou
> rce: ; - nested throwable: (java.lang.NoSuchMethodException: 
> org.postgresql.xa.PGXADataSource.setSchema(java.lang.String)))
>        at 
>
org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:164) 
>
>        at 
>
org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:565) 
>
>        at 
>
org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:250) 
>
>
>
> Any ideas?
>
> Thanks in advance.
>
> Sean
>

Gmane