|
From: <jue...@we...> - 2004-06-22 18:03:23
|
I guess there's no way around integration for these things, against = multiple versions of those products. Unit tests can just try to mock = specific behavior, which doesn't say much about compatibility with = actual versions of the real product. Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of Colin Sampaleanu Sent: Tuesday, June 22, 2004 8:04 PM To: spr...@li... Subject: Re: [Springframework-developer] JBoss 3.2.4 WrappedResultSet support added in JBossNativeJdbcAdapter Coincidentally, I was actually just working on an integration test for=20 testing that class. Unfortunately JBoss is giving me exceptions on=20 actually trying to call the methods to get the wrapped object, saying=20 something like 'the Subject does not have the required credentials".=20 Will continue digging into this. In general, I think we need to get integration level tests which hit all = of the extra stuff like these helper classes which can not be covered by = unit tests. I actually started down the route of using jMock or EasyMock = to mock the JBoss classes using cglib, but it's problematic since you=20 then need access to a ton of app server classes. Even if jMock or=20 EasyMock do allow you to mock classes (and not just interfaces) via=20 cglib, it's not generally a great practice or practical to mock external = classes. Colin j=FCrgen h=F6ller [werk3AT] wrote: >Colin, > >I've just rewritten all of JBossNativeJdbcExtractor with reflection, to = get entirely rid of any jboss.jar dependency (and also the = jdbc-common-jdbc-wrapper.jar). It caches the retrieved classes and = methods in the constructor now, just like WebLogicNativeJdbcExtractor = and WebSphereNativeJdbcExtractor. > >I've tested the new version against JBoss 3.2.1 - still works nicely. = Could you please test it against JBoss 3.2.4? (I don't want to download = those 50 MB just for testing this...) > >Juergen > > >-----Original Message----- >From: spr...@li... >[mailto:spr...@li...]On Behalf >Of j=FCrgen h=F6ller [werk3AT] >Sent: Monday, June 21, 2004 10:50 AM >To: spr...@li... >Subject: Re: [Springframework-developer] JBoss 3.2.4 WrappedResultSet >support added in JBossNativeJdbcAdapter > > >Colin, >=20 >I second that. Please code it via reflection; we wouldn't wan't to ship = a 1.6 MB jboss.jar just because of that. The 45 KB = jboss-common-jdbc.wrapper.jar is fine, so I guess just coding the = ResultSet unwrapping via reflection should be good enough. >=20 >Juergen >=20 > >________________________________ > >Von: spr...@li... im Auftrag = von Rod Johnson >Gesendet: So 20.06.2004 16:16 >An: spr...@li... >Betreff: Re: [Springframework-developer] JBoss 3.2.4 WrappedResultSet = support added in JBossNativeJdbcAdapter > > > > > > =20 > >>I just realized this ties this class to JBoss 3.2.4. Probably not a >>reasonable thing to do since people might be running 3.2.3 (or 3.2.2) >>for a while yet. Anybody object if I make the wrapped ResultSet access >>via reflection? >> =20 >> > >No, please do. > > > >------------------------------------------------------- >This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference >Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer >Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA >REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code = NWMGYKND >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > =20 > ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 -=20 digital self defense, top technical experts, no vendor pitches,=20 unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |