|
From: <jue...@we...> - 2004-05-31 20:36:14
|
Changing the pool should just affect the NativeJdbcExtractor choice, =
i.e. a different bean wired to OracleLobHandler's "nativeJdbcExtractor" =
property.
=20
Give SimpleNativeJdbcExtractor a try with a Weblogic pool; there's a =
good chance that it will work, avoiding the need for a specific Weblogic =
implementation of the NativeJdbcExtractor interface.
=20
As of Spring 1.0.2, SimpleNativeJdbcExtractor will even work with =
Commons DBCP too, avoiding the need for a different NativeJdbcExtractor =
configuration when switching between Commons DBCP and another pool.
=20
Side note: The new version of SimpleNativeJdbcExtractor will also work =
with C3P0. This allows the use of C3P0's ComboPooledDataSource as direct =
replacement of Commons DBCP's BasicDataSource.
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von Bronwen Cassidy
Gesendet: Mo 31.05.2004 22:25
An: spr...@li...
Betreff: Re: [Springframework-developer] re: OracleLobCreator
Hi
I have no concern as to the pool i use, i am actually
completely ignorant and have been blindly feeling my
way using the spring test cases, samples, docs and
some googling, until 4 months ago i had never used
oracle and until a week ago i did not need to do more
than work out db agnostic sql queries :-)
so please i am more than happy to use weblogic pool,
which i am using when the app is deployed, hence the
test time passes and deploy time failures most
likely!! I am guessing the changes are needed in the
nativeJdbcExtractor class in the spring.xml needs to
point to a weblogic equivalent??
--- Thomas Risberg <tho...@tr...> wrote:
> Since you are using the Commons DBCP rather than a
> WebLogic pool the
> issue is slightly different. We have to figure out
> why the connection
> returned from the DBCP pool is not unwrapped
> properly.
>
> Thomas
>
>
> Bronwen Cassidy wrote:
>
> >Thank-you Jurgen
> >This was the approach i had come to conclude as the
> >only difference between passing test case and
> failing
> >deployed app is the connection pool handled by
> >weblogic , ahh well another trip into the unknown,
> the
> >best part of being a developer ;-)
> >
> >regards
> >Bronwen
> >
> >--- j=FCrgen_h=F6ller_[werk3AT]
> ><jue...@we...> wrote: >
> >OracleLobHandler needs to work on a native
> >=20
> >
> >>OracleConnection as it comes from the driver. The
> >>usual problem in that respect is not the driver
> but
> >>the connection pool: Every connection pool needs
> to
> >>wrap native connections with pooled connections
> that
> >>at least have different closing behavior.
> >>
> >>To address this, OracleLobHandler has the
> >>"nativeJdbcExtractor" property, taking an
> >>implementation of Spring's NativeJdbcExtractor
> >>interface. Spring includes out-of-the-box
> >>implementations for Commons DBCP, XAPool, and
> JBoss.
> >>I guess what you need to do is write such an
> >>extractor for Weblogic.
> >>
> >>What's odd about your exception is that
> >>OracleLobCreator does not complain that it doesn't
> >>receive an OracleConnection (there's an explicit
> >>check in there). It seems to get a wrapped
> >>connection that is still assignable to
> >>OracleConnection, although it's not the native
> >>OracleConnection from the driver...
> >>
> >>Maybe Weblogic uses some special way of pooling
> >>connections for the Oracle driver, using poolable
> >>OracleConnections? The getPhysicalConnection
> method
> >>will probably be in the OracleConnection class,
> not
> >>in the CLOB class. Try writing a
> NativeJdbcExtractor
> >>that unwraps an OracleConnection with that method.
>
> >>
> >>Juergen
> >>
> >>
> >>________________________________
> >>
> >>Von:
> >>
> >> =20
> >>
>
>spr...@li...
> >=20
> >
> >>im Auftrag von Bronwen Cassidy
> >>Gesendet: Mo 31.05.2004 04:27
> >>An:
> spr...@li...
> >>Betreff: RE: [Springframework-developer] re:
> >>OracleLobCreator
> >>
> >>
> >>
> >>Hi I have:
> >>
> >>Weblogic 8 service pack 2
> >>ojdbc.jar (Oracle9i 9.2.0.1 JDBC Drivers)
> >>Oracle9i
> >>I have set up the connection pool using the
> >>jdbc:oracle:thin (oracle thin
> >>drivers (not weblogic ones)
> >>
> >>Actually I managed to find some information (very
> >>little) one from a
> >>hibernate mail, suggested using the
> >>getPhysicalConnection() instead of
> >>createTemporary, but this method does not seem to
> >>available on the CLOB
> >>class??
> >>
> >>-----Original Message-----
> >>From:
> >>
> >> =20
> >>
>
>spr...@li...
> >=20
> >
>
>[mailto:spr...@li...]
> >=20
> >
> >>On Behalf Of
> >>Thomas Risberg
> >>Sent: 31 May 2004 02:09
> >>To:
> spr...@li...
> >>Subject: Re: [Springframework-developer] re:
> >>OracleLobCreator
> >>
> >>Bronwen,
> >>
> >>In order to pinpoint the problem quicker - what
> >>version of WebLogic,
> >>Oracle and JDBC drivers are you using?
> >>
> >>Thomas
> >>
> >>Bronwen Cassidy wrote:
> >>
> >> =20
> >>
> >>>Hi I have a CLOB column in oracle and in the test
> >>> =20
> >>>
> >>there are no
> >> =20
> >>
> >>>problems, unfortunately deploying to weblogic I
> >>> =20
> >>>
> >>get the exception
> >> =20
> >>
> >>>below. We are using classes12.jar whereas
> weblogic
> >>> =20
> >>>
> >>uses ojdbc14.jar, I
> >> =20
> >>
> >>>firstly replaced weblogics jars and classpath
> >>> =20
> >>>
> >>settings to use the
> >> =20
> >>
> >>>classes12.jar, but got the same error, so I
> pulled
> >>> =20
> >>>
> >>weblogic oracle jar
> >> =20
> >>
> >>>into my test classpath to test if the problem was
> >>> =20
> >>>
> >>with the jars but
> >> =20
> >>
> >>>the test worked fine ?? I am really stuck as to
> >>> =20
> >>>
> >>whom this should go to
> >> =20
> >>
> >>>weblogic, oracle, or . I am hoping there is an
> >>> =20
> >>>
> >>expert there who can
> >> =20
> >>
> >>>shed some light. Google did not have a single
> >>> =20
> >>>
> >>match for variations of
> >> =20
> >>
> >>>the first 2 lines!!
> >>>
> >>>java.lang.ClassCastException
> >>>
> >>>at
> >>>
> >>> =20
> >>>
>
>oracle.jdbc.driver.OracleConnection.unwrapCompletely(OracleConnection.ja=
va:5
> >=20
>
=3D=3D=3D message truncated =3D=3D=3D
=20
=20
=20
____________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|