Hi there,
I'm using your new* pax-jdbc-pool-transx* bundle on Karaf,
works fine, but if you have multiple datasources there is an error "*Attempt
to register second resource with name XADataSourceMCF*" because the
DatasourceBulder don't register a name for each datasource.
DataSource mds = ManagedDataSourceBuilder.builder();
If I change your code including a name, works perfectly:
String name=props.getProperty("dataSourceName");
DataSource mds = ManagedDataSourceBuilder.builder().name(name)
2017-08-23T09:06:57,458 | ERROR | features-1-thread-1 |
TransxXaPooledDataSourceFactory | 101 - org.ops4j.pax.jdbc.pool.transx -
1.2.0.SNAPSHOT | Error creating pooled datasourceAttempt to register second
resource with name XADataSourceMCF
java.lang.IllegalStateException: Attempt to register second resource with
name XADataSourceMCF
at
com.atomikos.icatch.config.Configuration.addResource(Configuration.java:245)
~[?:?]
at
org.ops4j.pax.transx.tm.impl.atomikos.TransactionManagerWrapper.registerResource(TransactionManagerWrapper.java:62)
~[?:?]
at
org.ops4j.pax.transx.connector.impl.GenericConnectionManager.<init>(GenericConnectionManager.java:140)
~[?:?]
at
org.ops4j.pax.transx.connector.ConnectionManagerBuilder.build(ConnectionManagerBuilder.java:161)
~[?:?]
at
org.ops4j.pax.transx.jdbc.ManagedDataSourceBuilder.build(ManagedDataSourceBuilder.java:178)
~[?:?]
at
org.ops4j.pax.jdbc.pool.transx.impl.TransxXaPooledDataSourceFactory.create(TransxXaPooledDataSourceFactory.java:59)
~[?:?]
at
org.ops4j.pax.jdbc.config.impl.PoolingWrapper.createDataSource(PoolingWrapper.java:42)
~[?:?]
at
org.ops4j.pax.jdbc.config.impl.DataSourceRegistration.createDs(DataSourceRegistration.java:134)
~[?:?]
--
--
------------------
OPS4J - http://www.ops4j.org - [email protected]
---
You received this message because you are subscribed to the Google Groups
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.