|
From: <bro...@ya...> - 2004-06-01 18:44:20
|
Hi all,
Just to let you know i have run with the
WebLogicNativeJdbcExtractor Thomas checked in (using a
cvs build)all of today and it works a treat, no
problems at all, thank-you for all your help and
thank-you for the nativeExtractor :-)
Bronwen
--- Thomas Risberg <tho...@tr...> wrote: >
Bronwen,
>
> This was a good exercise. Thanks for your help
> tracking things down. I
> have added a WebLogicNativeJdbcExtractor that uses
> reflection. We
> probably should test this in WLS 6.1 and 7.0 as
> well.
>
> Juergen - do you want to wait for 1.0.3 so we have
> more time to test and
> refine it. It's in the sandbox for now.
>
> Thomas
>
>
> Bronwen Cassidy wrote:
>
> >The last message, I got it :-) now I just want to
> laugh.. the method to get
> >the native driver is:
> >
> >// con is cast to
> weblogic.jdbc.wrapper.PoolConnection, this returns
> the
> >oracle.jdbc.OracleConnection and from there it all
> works, now to figure out
> >all the others :-)
> >public Connection getNativeConnection(Connection
> con) throws SQLException {
> > PoolConnection pConnection =
> (PoolConnection) con;
> > return pConnection.getVendorConnection();
> > }
> >
> >I am happy to send this to you, problem would be it
> would need weblogic.jar
> >:-( as it is specific cast, unless I used
> reflection, let me know what you
> >would like, send it, use reflection etc etc.
> >
> >And a million thanx for all your help
> >All the best to spring
> >Bronwen
> >
> >-----Original Message-----
> >From:
>
spr...@li...
>
>[mailto:spr...@li...]
> On Behalf Of
> >jürgen höller [werk3AT]
> >Sent: 31 May 2004 23:39
> >To: spr...@li...
> >Subject: Re: [Springframework-developer]
> OracleLobCreator
> >
> >OK, seems like Weblogic's pool is among the ones
> that completely wrap all
> >JDBC objects: You don't even get the native
> Connection on
> >getMetaData().getConnection()...
> >
> >So I'm afraid you'll have to write a
> WeblogicNativeJdbcExtractor that knows
> >how to unwrap weblogic.jdbc.wrapper.PoolConnection.
> Check the latter's
> >signatures: Does it have a method like
> "getPhysicalConnection()"? Such a
> >method would be that basis for implementing
> getNativeConnection.
> >
> >Juergen
> >
> >
> >________________________________
> >
> >Von:
>
spr...@li...
> im Auftrag von
> >Bronwen Cassidy
> >Gesendet: Di 01.06.2004 01:20
> >An: spr...@li...
> >Betreff: RE: [Springframework-developer] re:
> OracleLobCreator
> >
> >
> >
> >Hi,
> >If I understand your question, OracleLobHandler
> works in a test case without
> >weblogics pool, only using the
> oracle.jdbc.pool.OracleDataSource datasource
> >bean defined as:
> ><bean id="dataSource"
> class="oracle.jdbc.pool.OracleDataSource">
> > <property
>
>name="driverType"><value>oracle.jdbc.OracleDriver</value></property>
> > <property
>
>name="URL"><value>jdbc:oracle:thin:@localhost:1521:ROBIN</value></property>
> > <property
> name="user"><value>talentstudio</value></property>
> > <property
>
>name="password"><value>talentstudio</value></property>
> > </bean>
> >In deployment I have set up a weblogic pool using
> oracle thin driver, not a
> >weblogic oracle driver.
> >
> >So from what I can determine weblogic pool + oracle
> driver +
> >oracleLobHandler throws the exception and
> >Oracle jdbc pool + oracleLobHandler (as in test
> case) works.
> >
> >The printouts:
> >
> >template.getDataSource().getConnection()=
>
>weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_OracleConnection@112
> >
> >connection.getMetaData().getConnection() =
>
>weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_OracleConnection@112
> >
> >-----Original Message-----
> >From:
>
spr...@li...
>
>[mailto:spr...@li...]
> On Behalf Of
> >jürgen höller [werk3AT]
> >Sent: 31 May 2004 22:52
> >To: spr...@li...
> >Subject: Re: [Springframework-developer] re:
> OracleLobCreator
> >
> >Can you check what kind of wrappers the DataSource
> returns? Simply fetch the
> >DataSource, invoke getConnection() and see what
> kind of handle it returns
> >(System.out.println). Furthermore, invoke
> >getConnection().getMetaData().getConnection() and
> see whether this is the
> >native Connection (System.out.println again).
> >
> >However, if you have properly specified
> SimpleNativeJdbcExtractor for
> >OracleLobHandler's "nativeJdbcExtractor" property
> and still get that
> >exception, then I assume that Weblogic's own Oracle
> JDBC driver doesn't use
> >the OracleConnection class at all. This would mean
> that OracleLobHandler
> >cannot be used with it.
> >
> >Do I understand correctly that OracleLobHandler
> plus
> >SimpleNativeJdbcExtractor work properly with
> Oracle's original JDBC driver
> >plus Weblogic's connection pool?
> >
> >Juergen
> >
> >
> >________________________________
> >
> >Von:
>
spr...@li...
> im Auftrag von
> >Bronwen Cassidy
> >Gesendet: Di 01.06.2004 00:24
> >An: spr...@li...
> >Betreff: RE: [Springframework-developer] re:
> OracleLobCreator
> >
> >
> >
> >Hi,
> >
> >OK the results when changing the driver for the
> pool from jdbc:oracle:thin
> >to: jdbc:weblogic:oracle using
> SimpleNativeJdbcExtractor
> >
> >
> >Error:
>
>org.springframework.dao.DataAccessResourceFailureException:
> Could not create
> >Oracle LOB; nested exception is
> org.springframework.dao.In
> >validDataAccessApiUsageException: OracleLobHandler
> needs to work on
> >oracle.jdbc.OracleConnection - specify a proper
> NativeJdbcExtractor
> >
>
>org.springframework.dao.InvalidDataAccessApiUsageException:
> OracleLobHandler
> >needs to work on oracle.jdbc.OracleConnection -
> specify a
> >proper NativeJdbcExtractor
> > at
>
>org.springframework.jdbc.support.lob.OracleLobHandler$OracleLobCreator.getOr
> >acleConnection(OracleLobHandler.java:366)
> > at
>
=== message truncated ===
____________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
|