1 Reply Latest reply on Feb 22, 2007 4:12 PM by weston.price

    Howto retrieve DataSource inside of WrapperDataSource

    aschulz

      Hi,

      I have configured a datasource for oracle connections. The datasource object that i retrieve from the JNDI-Context is of typ WrapperDataSource.

      I need the datasource as parameter for Oracle AQ AQjmsFactory.getTopicConnectionFactory(someds).

      Now I get "JMS-112: Connection is invalid" from Oracle AQ. I think the problem is that getConnection() on a WrapperDataSource doesn't result in an OracleConnection but in some JBoss connection wrapper which does not implement Oracle specific extensions.

      I found a way to retrieve the underlying connection from a WrapperDataSource myself but I can't pass it as parameter for Oracle AQ.

      So I would like to retrieve the Oracle datasource from the WrapperDataSource but I can't figure out how to do that.

      Please can somebody help me.

      Thanks in advance
      Alex

        • 1. Re: Howto retrieve DataSource inside of WrapperDataSource
          weston.price

          This is correct. OracleAQ is expecting it's own DS implementation. While you can call getUnderlyingConnection() from the WrappedConnection Oracle will obviously not call this.

          Best solution is probably not to use JBoss JCA at this point. If Oracle expects it's own connection as part of the OracleAQ implementation then you should use their connection pool. It's either that, or lobby OracleAQ to stick to the standard JDBC API.