|
From: <jue...@we...> - 2004-05-27 16:36:57
|
That's true: If you need access to input parameters, you need to have a = separate RowMapper instance per execution, which again leads to the need = for a separate StoredProcedure instance per execution. One way to make this work with a reusable StoredProcedure instance could = be to introduce a "RowMapperWithParameters" interface that passes in = the stored procedure parameters as argument of the mapRow method = (analogous to MappingSqlQuery and MappingSqlQueryWithParameters). Such a = RowMapperWithParameters could potentially also make sense for = PreparedStatements. Thomas, what do you think? Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of Tim Kettering Sent: Thursday, May 27, 2004 5:33 PM To: spr...@li... Subject: Stored Procedure support (was Re: [Springframework-developer] Preparing for 1.0.2) Hi Juergen, I brought up an question on this list a while ago about the=20 StoredProcedure object, and if there were a way to safely access=20 outside variables in the RowMapper instance, like for instance in a=20 StoredProcedure object that I played aruond with, it worked great as a=20 replacement for the older one I wrote before with one exception. There=20 was a particular place where i relied on a value (a user id) for one of=20 the parameters of the procedure, and there didnt seem to be a=20 threadsafe way to make it available (getting the value from the=20 parameter Map) in the RowMapper, or at least as far as my knowledge of=20 java goes. So I was wondering if you had seen that email and if there's something=20 I'm missing here? The only solution I could think of was to actually=20 set up the sql to place that value as a column so it'd be accessible=20 from the ResultSet, but I was hoping to avoid having to do that. thanks in advance, -tim On May 27, 2004, at 10:53 AM, j=FCrgen h=F6ller [werk3AT] wrote: > Thomas, > > Any chance to review the JDBC changes today, in particular testing=20 > whether the stored procedure stuff still works as expected? I do trust = > unit test suites, but well, you know :-) > > Note that there's also an adapted version of imagedb's=20 > DefaultImageDatabase in CVS, illustrating the use of a RowMapper with=20 > JdbcTemplate rather than a MappingSqlQuery operation object. > > BTW, I'm currently working on Quartz JDBCJobStore integration with=20 > Spring, for a werk3AT project. This won't make it into Spring 1.0.2,=20 > though. If anyone has already prototyped in that direction, please let = > me know! > > Juergen > > > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...]On = Behalf > Of j=FCrgen h=F6ller [werk3AT] > Sent: Thursday, May 27, 2004 10:34 AM > To: spr...@li... > Subject: Re: [Springframework-developer] Preparing for 1.0.2 > > > Oh well, time schedules and my perfectionism... > > I've done some further polishing, committed yesterday morning=20 > respectively today: > > - I've factored out RowMapperResultReader from SqlParameter, to make=20 > RowMapper usable for plain JDBC queries too > - JdbcTemplate.call respectively StoredProcedure supports=20 > ResultSetExtractor as output parameter too > - I've slightly refactored JdbcTemplate.call's implementation to allow = > for a higher level of code reuse > > - AbstractAutowireCapableBeanFactory catches Throwable on bean=20 > creation, rethrowing it as meaningful BeanCreationException > - DefaultListableBeanFactory.preInstantiateSingletons cleans up=20 > already created singletons if it fails > - XmlViewResolver and ResourceBundleViewResolver clean up their view=20 > bean factories on context shutdown > > Thomas, it would be great if you had a chance to review the JDBC=20 > changes, and maybe run a couple of integration tests with stored=20 > procedures - to make sure that I haven't broken anything, even if the=20 > test suite passes. > > As there haven't been any reports on problems with the garbage=20 > collection changes, I plan to go ahead and finalize 1.0.2 for=20 > tomorrow. > > Juergen > > > ________________________________ > > Von: spr...@li... im Auftrag=20 > von j=FCrgen h=F6ller [werk3AT] > Gesendet: Mi 26.05.2004 07:38 > An: spr...@li... > Betreff: Re: [Springframework-developer] Preparing for 1.0.2 > > > > There hasn't been any change in AbstractXsltView since 1.0 final, so I = > guess this is usual behavior... > > BTW, current planned release date: tonight! I know, I know - this time = > for real, provided that there's no showstopper :-) > > Juergen > > > ________________________________ > > Von: spr...@li... im Auftrag=20 > von Darren Davison > Gesendet: Mi 26.05.2004 01:40 > An: spr...@li... > Betreff: Re: [Springframework-developer] Preparing for 1.0.2 > > > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Wednesday 26 May 2004 00:27, Darren Davison wrote: > >> AbstractXsltView (line 143) shown below is throwing a >> TransformerConfigurationException. The stylesheet is correctly = loaded >> and appears valid whether loaded from a servlet context resource or a >> classpath resource (the 2 I tried). > > hmm.. > > it seems that removing any <xsl:output> tags in the stylesheets=20 > themselves > makes the problem disappear. That strikes me as a bit odd though: has > something changed recently in XSL world? I can't find any info on=20 > this.. > > Cheers, > - -- > Darren Davison > Public Key: http://www.davison.uk.net/pages/key.htm > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.4 (GNU/Linux) > > iD8DBQFAs9l7KLMLAN01aw0RAgFCAJ97NbqA547fyx6rCQLiSXkCUFWreQCghOiD > Tle6ycCFcmn5hNf2ZLZznX0=3D > =3D4YWT > -----END PGP SIGNATURE----- > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle=20 > 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id=9966&op=3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle=20 > 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id=9966&op=3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle=20 > 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id=9966&op=3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle=20 > 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id=9966&op=3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > ------------------------------------------------------- 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_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |