You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Christian Schneider <ch...@die-schneider.net> on 2016/07/01 06:12:33 UTC
Re: pax-jdbc-dbcp2 and oracle connection pooling
If you look at the stack trace closely you see that
:org.apache.aries.transaction.jdbc
seems to handle the DSF. So it looks like there is a conflict between
pax-jdbc-dbcp2 and aries transaction. Can you try uninstalling aries
transaction jdbc? Do you have any idea why it is installed?
Christian
2016-06-30 20:18 GMT+02:00 dpravin <pr...@gmail.com>:
> Hello,
>
> We are exploring to use pax-jdbc component/utility for managing database
> connections.
>
> My environment is,
>
> Jboss Fuse 6.2.1
> pax-jdbc 0.9.0
> Oracle - 11.2.0.4.0
>
> Installed following features from pax-jdbc,
>
> >features:install transaction jndi pax-jdbc-oracle pax-jdbc-pool-dbcp2
> pax-jdbc-config
>
>
> I am trying to create a XA connection pool for Oracle database with
> following properties,
>
> dataSourceName = abc
> datasource.name=abc
> osgi.jndi.service.name = abc
> osgi.jdbc.driver.name = oracle-pool-xa
> url = jdbc:oracle:thin:@//<<servername>>:1521/<<sid>>
> user = user
> password = pwd
> pool.maxTotal = 3
>
> I use following to get reference to data source in a Camel blueprint
>
> <reference id="abc" interface="javax.sql.DataSource"
> availability="mandatory" filter="(datasource.name=abc)"/>
>
> I am getting following errors when I invoke a getConnection() on the
> datasource,
>
> ******************************
>
> Caused by: java.lang.UnsupportedOperationException
> at
>
> org.apache.commons.dbcp2.PoolingDataSource.getConnection(PoolingDataSource.java:156)[307:org.apache.commons.dbcp2:2.1.0]
> at
>
> org.tranql.connector.jdbc.AbstractLocalDataSourceMCF.getPhysicalConnection(AbstractLocalDataSourceMCF.java:72)[281:org.apache.aries.transaction.jdbc:2.1.1]
> at
>
> org.tranql.connector.jdbc.AbstractLocalDataSourceMCF.createManagedConnection(AbstractLocalDataSourceMCF.java:66)[281:org.apache.aries.transaction.jdbc:2.1.1]
> at
>
> org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getConnection(MCFConnectionInterceptor.java:48)[282:org.apache.geronimo.components.geronimo-connector:3.1.1]
> at
>
> org.apache.geronimo.connector.outbound.LocalXAResourceInsertionInterceptor.getConnection(LocalXAResourceInsertionInterceptor.java:41)[282:org.apache.geronimo.components.geronimo-connector:3.1.1]
> at
>
> org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor.internalGetConnection(SinglePoolConnectionInterceptor.java:70)[282:org.apache.geronimo.components.geronimo-connector:3.1.1]
> at
>
> org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:80)[282:org.apache.geronimo.components.geronimo-connector:3.1.1]
> at
>
> org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getConnection(TransactionEnlistingInterceptor.java:49)[282:org.apache.geronimo.components.geronimo-connector:3.1.1]
> at
>
> org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConnection(TransactionCachingInterceptor.java:109)[282:org.apache.geronimo.components.geronimo-connector:3.1.1]
> at
>
> org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.getConnection(ConnectionHandleInterceptor.java:43)[282:org.apache.geronimo.components.geronimo-connector:3.1.1]
> at
>
> org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(TCCLInterceptor.java:39)[282:org.apache.geronimo.components.geronimo-connector:3.1.1]
> at
>
> org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.getConnection(ConnectionTrackingInterceptor.java:66)[282:org.apache.geronimo.components.geronimo-connector:3.1.1]
> at
>
> org.apache.geronimo.connector.outbound.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:81)[282:org.apache.geronimo.components.geronimo-connector:3.1.1]
> at
>
> org.tranql.connector.jdbc.TranqlDataSource.getConnection(TranqlDataSource.java:62)[281:org.apache.aries.transaction.jdbc:2.1.1]
> at Proxybaa265ff_652c_44b3_9c20_b47e2464e11a.getConnection(Unknown
> Source)[:]
>
> ***************************
>
> Appreciate if someone can help me resolve this issue.
>
> Thanks,
> Pravin
>
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/pax-jdbc-dbcp2-and-oracle-connection-pooling-tp4047028.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
--
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de>
Open Source Architect
http://www.talend.com
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com>
Re: pax-jdbc-dbcp2 and oracle connection pooling
Posted by dpravin <pr...@gmail.com>.
Thank you Tim for your inputs. I will definitely explore this.
- Pravin
--
View this message in context: http://karaf.922171.n3.nabble.com/pax-jdbc-dbcp2-and-oracle-connection-pooling-tp4047028p4047055.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: pax-jdbc-dbcp2 and oracle connection pooling
Posted by Timothy Ward <ti...@paremus.com>.
Hi,
The current transaction control code is built using the OSGi R6 API to compile against, and so the manifest requires R6. I don’t see any reason why it wouldn’t work with OSGi R5 though.
I have tried building the latest 0.0.2-SNAPSHOT against R5 (just by changing the dependency version in the top pom) and it all seems happy (all the tests pass) - feel free to build it and have a play.
Regards,
Tim
> On 1 Jul 2016, at 10:30, Jörn Gersdorf <jo...@gersdorf.info> wrote:
>
> Hi Tim,
>
> Aries Transaction Control is indeed very interesting. Question for us (we are also stuck with JBoss Fuse 6.2.1, based upon Karaf 2.4.x/Felix 4.4.1) if it is backwards compatible with OSGi R5?
>
> Cheers
> - Jörn
>
> Viele Grüße
> Jörn
>
> On Fri, Jul 1, 2016 at 10:40 AM, Timothy Ward <tim.ward@paremus.com <ma...@paremus.com>> wrote:
> Hi Pravin,
>
> If you’re looking for a simpler way to manage database access when using OSGi then you should take a look at the Apache Aries Transaction Control service (http://aries.apache.org/modules/transactioncontrol.html <http://aries.apache.org/modules/transactioncontrol.html>).
>
> This is an implementation of an OSGi RFC and will be part of the next OSGi specification release. It provides a simple effective model for managing resource access without the complexities of having multiple partially complete DataSources in the Service Registry.
>
> Best Regards,
>
> Tim Ward
>
> OSGi IoT Expert Group Chair
> tim.ward@paremus.com <ma...@paremus.com>
>
>> On 1 Jul 2016, at 08:01, dpravin <pravin.deshmukh@gmail.com <ma...@gmail.com>> wrote:
>>
>> Thank you Christian.
>>
>> I uninstalled the connector feature and the issues got resolved. We had
>> created a osgi service for datasource and had installed the connector
>> features for it to handle DSF. Later I came across pax-jdbc utility/feature
>> and decided to explore it instead.
>>
>> I have a basic question. Are there any advantages/differences in using
>> dbcp2, Aries to manage datasources? I have read various threads on the
>> forums however not able to get any specific information.
>>
>> Thanks,
>> Pravin
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.com/pax-jdbc-dbcp2-and-oracle-connection-pooling-tp4047028p4047042.html <http://karaf.922171.n3.nabble.com/pax-jdbc-dbcp2-and-oracle-connection-pooling-tp4047028p4047042.html>
>> Sent from the Karaf - User mailing list archive at Nabble.com <http://nabble.com/>.
>
>
Re: pax-jdbc-dbcp2 and oracle connection pooling
Posted by Jörn Gersdorf <jo...@gersdorf.info>.
Hi Tim,
Aries Transaction Control is indeed very interesting. Question for us (we
are also stuck with JBoss Fuse 6.2.1, based upon Karaf 2.4.x/Felix 4.4.1)
if it is backwards compatible with OSGi R5?
Cheers
- Jörn
Viele Grüße
Jörn
On Fri, Jul 1, 2016 at 10:40 AM, Timothy Ward <ti...@paremus.com> wrote:
> Hi Pravin,
>
> If you’re looking for a simpler way to manage database access when using
> OSGi then you should take a look at the Apache Aries Transaction Control
> service (http://aries.apache.org/modules/transactioncontrol.html).
>
> This is an implementation of an OSGi RFC and will be part of the next OSGi
> specification release. It provides a simple effective model for managing
> resource access without the complexities of having multiple partially
> complete DataSources in the Service Registry.
>
> Best Regards,
>
> Tim Ward
>
> OSGi IoT Expert Group Chair
> tim.ward@paremus.com
>
>
> On 1 Jul 2016, at 08:01, dpravin <pr...@gmail.com> wrote:
>
> Thank you Christian.
>
> I uninstalled the connector feature and the issues got resolved. We had
> created a osgi service for datasource and had installed the connector
> features for it to handle DSF. Later I came across pax-jdbc utility/feature
> and decided to explore it instead.
>
> I have a basic question. Are there any advantages/differences in using
> dbcp2, Aries to manage datasources? I have read various threads on the
> forums however not able to get any specific information.
>
> Thanks,
> Pravin
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/pax-jdbc-dbcp2-and-oracle-connection-pooling-tp4047028p4047042.html
> Sent from the Karaf - User mailing list archive at Nabble.com
> <http://nabble.com>.
>
>
>
Re: pax-jdbc-dbcp2 and oracle connection pooling
Posted by Timothy Ward <ti...@paremus.com>.
Hi Pravin,
If you’re looking for a simpler way to manage database access when using OSGi then you should take a look at the Apache Aries Transaction Control service (http://aries.apache.org/modules/transactioncontrol.html <http://aries.apache.org/modules/transactioncontrol.html>).
This is an implementation of an OSGi RFC and will be part of the next OSGi specification release. It provides a simple effective model for managing resource access without the complexities of having multiple partially complete DataSources in the Service Registry.
Best Regards,
Tim Ward
OSGi IoT Expert Group Chair
tim.ward@paremus.com
> On 1 Jul 2016, at 08:01, dpravin <pr...@gmail.com> wrote:
>
> Thank you Christian.
>
> I uninstalled the connector feature and the issues got resolved. We had
> created a osgi service for datasource and had installed the connector
> features for it to handle DSF. Later I came across pax-jdbc utility/feature
> and decided to explore it instead.
>
> I have a basic question. Are there any advantages/differences in using
> dbcp2, Aries to manage datasources? I have read various threads on the
> forums however not able to get any specific information.
>
> Thanks,
> Pravin
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/pax-jdbc-dbcp2-and-oracle-connection-pooling-tp4047028p4047042.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
Re: pax-jdbc-dbcp2 and oracle connection pooling
Posted by dpravin <pr...@gmail.com>.
Thank you Christian.
I uninstalled the connector feature and the issues got resolved. We had
created a osgi service for datasource and had installed the connector
features for it to handle DSF. Later I came across pax-jdbc utility/feature
and decided to explore it instead.
I have a basic question. Are there any advantages/differences in using
dbcp2, Aries to manage datasources? I have read various threads on the
forums however not able to get any specific information.
Thanks,
Pravin
--
View this message in context: http://karaf.922171.n3.nabble.com/pax-jdbc-dbcp2-and-oracle-connection-pooling-tp4047028p4047042.html
Sent from the Karaf - User mailing list archive at Nabble.com.