You can subscribe to this list here.
| 2003 |
Jan
|
Feb
(55) |
Mar
(100) |
Apr
(203) |
May
(330) |
Jun
(190) |
Jul
(302) |
Aug
(323) |
Sep
(197) |
Oct
(245) |
Nov
(490) |
Dec
(330) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(194) |
Feb
(400) |
Mar
(416) |
Apr
(415) |
May
(359) |
Jun
(381) |
Jul
(491) |
Aug
(311) |
Sep
(291) |
Oct
(273) |
Nov
(355) |
Dec
(266) |
| 2005 |
Jan
(306) |
Feb
(303) |
Mar
(520) |
Apr
(346) |
May
(255) |
Jun
(221) |
Jul
(171) |
Aug
(247) |
Sep
(147) |
Oct
(125) |
Nov
(165) |
Dec
(65) |
| 2006 |
Jan
(90) |
Feb
(53) |
Mar
(121) |
Apr
(103) |
May
(113) |
Jun
(103) |
Jul
(104) |
Aug
(67) |
Sep
(78) |
Oct
(82) |
Nov
(78) |
Dec
(70) |
| 2007 |
Jan
(77) |
Feb
(76) |
Mar
(63) |
Apr
(30) |
May
(47) |
Jun
(41) |
Jul
(44) |
Aug
(44) |
Sep
(49) |
Oct
(33) |
Nov
(25) |
Dec
(21) |
| 2008 |
Jan
(45) |
Feb
(13) |
Mar
(15) |
Apr
(12) |
May
(9) |
Jun
(33) |
Jul
(30) |
Aug
(7) |
Sep
(20) |
Oct
(17) |
Nov
(20) |
Dec
(10) |
| 2009 |
Jan
(8) |
Feb
(5) |
Mar
(12) |
Apr
(17) |
May
(19) |
Jun
(97) |
Jul
(77) |
Aug
(33) |
Sep
(24) |
Oct
(41) |
Nov
(16) |
Dec
(32) |
| 2010 |
Jan
(24) |
Feb
(14) |
Mar
(50) |
Apr
(71) |
May
(70) |
Jun
(64) |
Jul
(45) |
Aug
(62) |
Sep
(32) |
Oct
(4) |
Nov
(12) |
Dec
(2) |
| 2011 |
Jan
(1) |
Feb
(3) |
Mar
(4) |
Apr
(3) |
May
(6) |
Jun
(1) |
Jul
(4) |
Aug
(3) |
Sep
(4) |
Oct
(6) |
Nov
(3) |
Dec
(3) |
| 2012 |
Jan
(4) |
Feb
(8) |
Mar
(6) |
Apr
(10) |
May
(2) |
Jun
(3) |
Jul
(11) |
Aug
(10) |
Sep
(4) |
Oct
|
Nov
(1) |
Dec
(1) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
(9) |
Apr
(1) |
May
(8) |
Jun
(2) |
Jul
(5) |
Aug
(2) |
Sep
|
Oct
(3) |
Nov
(10) |
Dec
(8) |
| 2014 |
Jan
(3) |
Feb
(12) |
Mar
(9) |
Apr
(12) |
May
(2) |
Jun
|
Jul
(3) |
Aug
(1) |
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(2) |
| 2015 |
Jan
(1) |
Feb
(3) |
Mar
(4) |
Apr
(9) |
May
(2) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(7) |
Oct
(9) |
Nov
(7) |
Dec
(9) |
| 2016 |
Jan
(7) |
Feb
(5) |
Mar
(5) |
Apr
(5) |
May
(8) |
Jun
(4) |
Jul
(5) |
Aug
(4) |
Sep
(6) |
Oct
(7) |
Nov
(2) |
Dec
(3) |
| 2017 |
Jan
(7) |
Feb
(8) |
Mar
(7) |
Apr
(3) |
May
(4) |
Jun
(3) |
Jul
(5) |
Aug
(8) |
Sep
(4) |
Oct
(2) |
Nov
(3) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2021 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(2) |
Aug
(5) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
| 2026 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <jue...@we...> - 2004-06-20 21:13:13
|
Darren, Have you already checked this enhancement request out? http://opensource.atlassian.com/projects/spring/browse/SPR-170 Juergen |
|
From: <jue...@we...> - 2004-06-20 21:11:31
|
Who cares for our ibiblio uploads, usually? We have a request to upload = Spring 1.0.2 there... =20 http://opensource.atlassian.com/projects/spring/browse/SPR-171 =20 Juergen |
|
From: Rod J. <rod...@in...> - 2004-06-20 14:16:54
|
> 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? No, please do. |
|
From: Colin S. <col...@ex...> - 2004-06-20 14:12:59
|
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? Colin Sampaleanu wrote: > JBoss 3.2.4 added wrapping of ResultSets, with a new WrappedResultSet > class. I have added support to JBossNativeJdbcAdapter for getting the > real result set from within this. > > The only complication is that because Eclipse has recently started > being pretty insistent on seeing the entire class hierarchy of a > library, with the newer version of jboss-common-jdbc-wrapper.jar it > was no longer happy about being able to properly resolve > WrappedStatement, which apparently inherits from a class only found in > jboss.jar (looks like somebody at JBoss actually messed up their > dependencies). So to make Eclipse happy I added in the big (1.5 MB) > jboss.jar as well. The other option is to just check in a modified jar > with only that class, or alternately I guess we could use reflection > too... > > (mentioned on user list too, in case somebody gets hit with this when > upgrading to JBoss 3.2.4). |
|
From: Colin S. <col...@ex...> - 2004-06-20 03:44:15
|
JBoss 3.2.4 added wrapping of ResultSets, with a new WrappedResultSet class. I have added support to JBossNativeJdbcAdapter for getting the real result set from within this. The only complication is that because Eclipse has recently started being pretty insistent on seeing the entire class hierarchy of a library, with the newer version of jboss-common-jdbc-wrapper.jar it was no longer happy about being able to properly resolve WrappedStatement, which apparently inherits from a class only found in jboss.jar (looks like somebody at JBoss actually messed up their dependencies). So to make Eclipse happy I added in the big (1.5 MB) jboss.jar as well. The other option is to just check in a modified jar with only that class, or alternately I guess we could use reflection too... (mentioned on user list too, in case somebody gets hit with this when upgrading to JBoss 3.2.4). Regards, Colin |
|
From: <jue...@we...> - 2004-06-20 00:30:26
|
I read that in the Oracle driver manual; that's why I coded the =
releaseSavepoint call with a try/catch block around it :-) Basically, =
Oracle doesn't seem to support eager releasing of a savepoint but just =
auto-release on transaction completion. They could have implemented =
releaseSavepoint as no-op, but rather decided to throw a SQLException...
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von Thomas Risberg
Gesendet: Sa 19.06.2004 16:10
An: spr...@li...
Betreff: Re: [Springframework-developer] Nested transactions
Ooops, the 10g driver complains about the releaseSavepoint as well -
must have missed that in the log earlier. Still works though.
Thomas
Thomas Risberg wrote:
> Yes, it does work against a 9i db using both 9i (9.2.0.3) and 10g
> drivers. Nice job coding in the "dark" :-)
>
> 9i driver complains about not supporting "releaseSavepoint"
> (java.sql.SQLException: Unsupported feature), but it still seems to
> work. 10g driver had no problems at all.
>
> PostgreSQL (7.4) failed nicely. No support for savepoints.
>
> MS SQL Server (driver 2.2.0029) errored out with a
> "java.lang.AbstractMethodError". It must only support JDBC 2 --
> supportsSavepoints was added in JDBC 3. I added a try/catch for that
> to provide a nicer error.
>
> Any way you can get this to work in a managed environment with JTA :-)
>
> Thomas
>
>
> j=FCrgen h=F6ller [werk3AT] wrote:
>
>> Thomas, Alef, Colin, everybody,
>>
>> Motivated by Rod, I've added support for nested transactions to our
>> transaction infrastructure, via the new propagation behavior
>> PROPAGATION_NESTED. The transaction manager needs to open a true
>> nested transaction which can be rolled back individually while still
>> being able to continue with the surrounding transaction.
>>
>> Furthermore, application code can also use custom savepoints: The
>> TransactionStatus interface now has a SavepointManager
>> superinterface, which provides generic means to create savepoints and
>> roll back to them. This is only intended for advanced needs where the
>> declarative nested transaction model is not sufficient.
>>
>> DataSourceTransactionManager implements nested transaction support
>> via JDBC 3.0 Savepoints: basically, create a Savepoint on nested
>> transaction begin, release it on nested transaction commit, roll back
>> to it on nested transaction rollback. Of course,
>> DataSourceTransactionManager is still compatible with JDBC 2.0 if not
>> using nested transactions.
>>
>> HibernateTransactionManager and JdoTransactionManager offer support
>> for JDBC 3.0 Savepoints too, but it's deactivated by default there:
>> Savepoints are just able to roll back the underlying JDBC Connection,
>> not the Session respectively PersistenceManager with its object
>> cache. Savepoints are still useful for JDBC access code that
>> participates in a Hibernate/JDO transaction, though, when used with
>> care.
>>
>> All of this is already fully covered by unit tests. Unfortunately, I
>> don't have a database with savepoint support available here, i.e. no
>> Oracle; so I've just been able to test that it fails nicely against
>> MySQL (on JDK 1.4 and 1.3). Thomas, do you have a chance to test this
>> against a live database?
>>
>> An example for how PROPAGATION_NESTED is supposed to work. Note that
>> the nested transaction sets the rollback-only flag: This should just
>> cause a rollback of the second update statement but still allow the
>> surrounding transaction to commit the first update statement.
>>
>> DataSource ds =3D ...;
>> final PlatformTransactionManager tm =3D new
>> DataSourceTransactionManager(ds);
>> final JdbcTemplate jt =3D new JdbcTemplate(ds);
>>
>> TransactionTemplate tt1 =3D new TransactionTemplate(tm);
>> =
tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
>> tt1.execute(new TransactionCallbackWithoutResult() {
>> protected void doInTransactionWithoutResult(TransactionStatus
>> status) {
>> jt.update("first update statement");
>>
>> TransactionTemplate tt1 =3D new TransactionTemplate(tm);
>> =20
>> tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_NESTED);
>> tt1.execute(new TransactionCallbackWithoutResult() {
>> protected void doInTransactionWithoutResult(TransactionStatus
>> status) {
>> jt.update("second update statement");
>> status.setRollbackOnly();
>> }
>> });
>> }
>> });
>>
>> An example for the same effect via manual savepoint management:
>>
>> TransactionTemplate tt1 =3D new TransactionTemplate(tm);
>> =
tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
>> tt1.execute(new TransactionCallbackWithoutResult() {
>> protected void doInTransactionWithoutResult(TransactionStatus
>> status) {
>> jt.update("first update statement");
>>
>> Object savepoint =3D status.createSavepoint();
>> jt.update("second update statement");
>> status.rollbackToSavepoint(savepoint);
>>
>> }
>> });
>>
>> Juergen
>>
>>
>>
>> -------------------------------------------------------
>> 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 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
>
>
>
-------------------------------------------------------
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
|
|
From: Rod J. <rod...@in...> - 2004-06-19 22:38:15
|
Alef >While setting up a configuration at work, I made a slight mistake and added a TransactionManager as an interceptor to the ProxyFactoryBean instead of the TransactionInterceptor itself. I finally found it out after an hour or so but was wondering why it's possible to mention a targetsource as an interceptor in the first place. >Secondly, it's now possible to have a PFB mentioning two target sources, where only the one added to the interceptor (or list of advices, like you refactored it to last week) will be used and the one references using the targetSource property is completely ignored. >I've added a corresponding testcase to ProxyFactoryBeanTests (testDoubleTargetSource) to show this behavior. >Would it be wise to add a check preventing users from mentioning both properties? Also, I'm still wondering why one would add a target source to the list of interceptors instead of just mentioning it separately using the targetSource property. It might be better (just for clarity) to not even allow it, or are there any clear use cases? These are good points. Basically the reason for this is historical. The "old" way of specifying a TargetSource--in the days when a similar role was performed by an InvokerInterceptor--was to add it to the end of the interceptor list. When I introduced the TargetSource, I permitted the old specification method in interceptorNames, for backward compatibility. (The most important case is where you specify a target directly, from which it will create a target source). I have changed ProxyFactoryBean so that double specification is not possible. Thanks for adding the test: you did most of the work. I just had to change what the test required to pass. I've taken no action on allowing the TargetSource in the list of interceptors. It's a bit of a shorthand, so it arguably has some value. However, it's good to avoid needless duplication of ways to do something. So maybe we should transition it out. However, as it isn't a method it can't be deprecated -:) I have also checked to ensure that double specification of the TargetSource via 2 entries in the interceptorNames list is prevented also. Rgds Rod ------------------------------------------------------- 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 |
|
From: Norris, T. <tys...@be...> - 2004-06-19 22:32:51
|
Thanks Colin. It all makes sense now.
Thanks
Tyson
-----Original Message-----
From: Colin Sampaleanu [mailto:col...@ex...]=20
Sent: Saturday, June 19, 2004 12:27 PM
To: spr...@li...
Subject: Re: [Springframework-developer] Nested transactions
Tyson,
REQUIRES_NEW actually just suspends the current transaction, and then=20
starts a new, unrelated transaction transaction to run the contained=20
code in. If you commit the inner, new transaction, then rollback the=20
outer, the inner transaciton will still be committed, as they are=20
unrelated. This should work properly inside any JTA environment (as long =
as spring can get at the jta transaction manager) and the model is also=20
essentially the same as the requires new support in the EJB spec.
PROPOGATION_NESTED means that a new nested, or child transaction is=20
created inside the outer one. If you commit the child (nested)=20
transaction, but roll back the outer, parent transaction, the effects of =
the child are also rolled back. JTA (and EJB) doesn't actually support=20
nested transactions. You essentially need a DB and JDBC driver, such as=20
Oracle, that does, which you can use directly.
Hope this clears things up,
Colin
Norris, Tyson wrote:
>Hi Juergen -=20
>How does this differ from the REQUIRES_NEW propagation?
>Thanks
>Tyson
>
>-----Original Message-----
>From: j=FCrgen h=F6ller [werk3AT] [mailto:jue...@we...]=20
>Sent: Saturday, June 19, 2004 3:02 AM
>To: spr...@li...
>Subject: [Springframework-developer] Nested transactions
>
>Thomas, Alef, Colin, everybody,
>=20
>Motivated by Rod, I've added support for nested transactions to our =
transaction infrastructure, via the new propagation behavior =
PROPAGATION_NESTED. The transaction manager needs to open a true nested =
transaction which can be rolled back individually while still being able =
to continue with the surrounding transaction.
>=20
>Furthermore, application code can also use custom savepoints: The =
TransactionStatus interface now has a SavepointManager superinterface, =
which provides generic means to create savepoints and roll back to them. =
This is only intended for advanced needs where the declarative nested =
transaction model is not sufficient.
>=20
>DataSourceTransactionManager implements nested transaction support via =
JDBC 3.0 Savepoints: basically, create a Savepoint on nested transaction =
begin, release it on nested transaction commit, roll back to it on =
nested transaction rollback. Of course, DataSourceTransactionManager is =
still compatible with JDBC 2.0 if not using nested transactions.
>=20
>HibernateTransactionManager and JdoTransactionManager offer support for =
JDBC 3.0 Savepoints too, but it's deactivated by default there: =
Savepoints are just able to roll back the underlying JDBC Connection, =
not the Session respectively PersistenceManager with its object cache. =
Savepoints are still useful for JDBC access code that participates in a =
Hibernate/JDO transaction, though, when used with care.
>=20
>All of this is already fully covered by unit tests. Unfortunately, I =
don't have a database with savepoint support available here, i.e. no =
Oracle; so I've just been able to test that it fails nicely against =
MySQL (on JDK 1.4 and 1.3). Thomas, do you have a chance to test this =
against a live database?
>=20
>An example for how PROPAGATION_NESTED is supposed to work. Note that =
the nested transaction sets the rollback-only flag: This should just =
cause a rollback of the second update statement but still allow the =
surrounding transaction to commit the first update statement.
>=20
> DataSource ds =3D ...;
> final PlatformTransactionManager tm =3D new =
DataSourceTransactionManager(ds);
> final JdbcTemplate jt =3D new JdbcTemplate(ds);
>
> TransactionTemplate tt1 =3D new TransactionTemplate(tm);
> =
tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
> tt1.execute(new TransactionCallbackWithoutResult() {
> protected void doInTransactionWithoutResult(TransactionStatus =
status) {
> jt.update("first update statement");
>
> TransactionTemplate tt1 =3D new TransactionTemplate(tm);
> =
tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_NESTED);
> tt1.execute(new TransactionCallbackWithoutResult() {
> protected void doInTransactionWithoutResult(TransactionStatus =
status) {
> jt.update("second update statement");
> status.setRollbackOnly();
> }
> });
> }
> });
>
>An example for the same effect via manual savepoint management:
>=20
> TransactionTemplate tt1 =3D new TransactionTemplate(tm);
> =
tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
> tt1.execute(new TransactionCallbackWithoutResult() {
> protected void doInTransactionWithoutResult(TransactionStatus =
status) {
> jt.update("first update statement");
>
> Object savepoint =3D status.createSavepoint();
> jt.update("second update statement");
> status.rollbackToSavepoint(savepoint);
>
> }
> });
>=20
>Juergen
>=20
>
>
>-------------------------------------------------------
>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
>
>
>
>-------------------------------------------------------
>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 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
|
|
From: <al...@jt...> - 2004-06-19 22:16:08
|
<html><head>
<style>
.white { color:#FFFFFF }.index { background-color:#FFFFFF }.index-passed { =
color:#004400 }.index-failed { color:#FF0000; font-weight:bold }.index-head=
er { font-weight:bold }.link { font-family:arial,helvetica,sans-serif; font=
-size:10pt; color:#FFFFFF; text-decoration:none; }.tab-table { margin: 0em =
0em 0.5em 0em; }.tabs { font-family:arial,helvetica,sans-serif; font-size:8=
pt; color:#000000; font-weight:bold; padding: 0em 2em; background-color:#EE=
EEEE; }.tabs-link { color:#000000; text-decoration:none; }.tabs-link:visite=
d { color:#000000; text-decoration:none; }.tabs-selected { font-family:aria=
l,helvetica,sans-serif; font-size:8pt; color:#000000; font-weight:bold; pad=
ding: 0em 2em; }.tabs-selected { border: inset; }.header-title { font-famil=
y:arial,helvetica,sans-serif; font-size:12pt; color:#000000; font-weight:bo=
ld; }.header-label { font-weight:bold; }.header-data { font-family:arial,he=
lvetica,sans-serif; font-size:10pt; color:#000000; }.modifications-data { f=
ont-family:arial,helvetica,sans-serif; font-size:8pt; color:#000000; }.modi=
fications-sectionheader { background-color:#000066; font-family:arial,helve=
tica,sans-serif; font-size:10pt; color:#FFFFFF; }.modifications-oddrow { ba=
ckground-color:#CCCCCC }.modifications-evenrow { background-color:#FFFFCC }=
.changelists-oddrow { background-color:#CCCCCC }.changelists-evenrow { back=
ground-color:#FFFFCC }.changelists-file-spacer { background-color:#FFFFFF }=
.changelists-file-evenrow { background-color:#EEEEEE }.changelists-file-odd=
row { background-color:#FFFFEE }.changelists-file-header { background-color=
:#666666; font-family:arial,helvetica,sans-serif; font-size:8pt; color:#FFF=
FFF; }.compile-data { font-family:arial,helvetica,sans-serif; font-size:8pt=
; color:#000000; }.compile-error-data { font-family:arial,helvetica,sans-se=
rif; font-size:8pt; color:#FF0000; }.compile-warn-data { font-family:arial,=
helvetica,sans-serif; font-size:8pt; color:#CC9900; }.compile-sectionheader=
{ background-color:#000066; font-family:arial,helvetica,sans-serif; font-s=
ize:10pt; color:#FFFFFF; }.distributables-data { font-family:arial,helvetic=
a,sans-serif; font-size:8pt; color:#000000; }.distributables-sectionheader =
{ background-color:#000066; font-family:arial,helvetica,sans-serif; font-si=
ze:10pt; color:#FFFFFF; }.distributables-oddrow { background-color:#CCCCCC =
}.unittests-sectionheader { background-color:#000066; font-family:arial,hel=
vetica,sans-serif; font-size:10pt; color:#FFFFFF; }.unittests-oddrow { back=
ground-color:#CCCCCC }.unittests-data { font-family:arial,helvetica,sans-se=
rif; font-size:8pt; color:#000000; }.unittests-error { font-family:arial,he=
lvetica,sans-serif; font-size:8pt; color:#FF0000; }.checkstyle-oddrow { bac=
kground-color:#CCCCCC }.checkstyle-data { font-family:arial,helvetica,sans-=
serif; font-size:8pt; color:#000000; }.checkstyle-sectionheader { backgroun=
d-color:#000066; font-family:arial,helvetica,sans-serif; font-size:10pt; co=
lor:#FFFFFF; }
</style>
</head><body>
<p>
<table width=3D"98%" border=3D"0" cellspacing=3D"0" cellpadding=3D"2" align=
=3D"center"><tr><td class=3D"header-title">BUILD COMPLETE - =
build.30</td></tr><tr><td class=3D"header-data"><span class=
=3D"header-label">Date of build: </span>06/20/2004 00:16:42</td></tr><=
tr><td class=3D"header-data"><span class=3D"header-label">Time to build:&nb=
sp;</span>13 minutes 20 seconds</td></tr><tr><td class=3D"header-data"><spa=
n class=3D"header-label">Last changed: </span>06/19/2004 16:33:28</td>=
</tr><tr><td class=3D"header-data"><span class=3D"header-label">Last log en=
try: </span>Added test to show behavior when using both targetSource a=
nd interceptor list containing target source as well</td></tr></table><p>
<table xmlns=3D"http://www.w3.org/TR/html4/strict.dtd" width=3D"98%" border=
=3D"0" cellspacing=3D"0" cellpadding=3D"2" align=3D"center"/><p>
<p>
<table xmlns=3D"http://www.w3.org/TR/html4/strict.dtd" width=3D"98%" border=
=3D"0" cellspacing=3D"0" cellpadding=3D"2" align=3D"center"><tr><td class=
=3D"compile-sectionheader"> Errors/Warnings: (=
6) </td></tr><tr><td><pre class=3D"compile-error-data">N=
ote: Some input files use or override a deprecated API.<br class=3D"none"/>=
Note: Recompile with -deprecation for details.Note: /jteam/build/checkout/s=
pring/spring/mock/org/springframework/mock/web/MockHttpSession.java uses or=
overrides a deprecated API.<br class=3D"none"/>Note: Recompile with -depre=
cation for details.<br class=3D"none"/>Note: Some input files use or overri=
de a deprecated API.<br class=3D"none"/>Note: Recompile with -deprecation f=
or details.<br class=3D"none"/></pre></td></tr></table><p>
<p>
<table width=3D"98%" border=3D"0" cellspacing=3D"0" cellpadding=3D"2" align=
=3D"center"><tr><td colspan=3D"4" class=3D"unittests-sectionheader"> =
Unit Tests: (1470) </td></tr><tr><td><tabl=
e width=3D"98%" border=3D"0" cellspacing=3D"0" cellpadding=3D"2" align=3D"c=
enter"><tr><td class=3D"unittests-data"> failure =
</td><td width=3D"40%" class=3D"unittests-data">testHomePage</td><td width=
=3D"40%" class=3D"unittests-data">org.springframework.apptests.buildtest.Al=
lTests</td></tr></table></td></tr><tr></tr><tr><td colspan=3D"2"> </td=
></tr><tr><td colspan=3D"4" class=3D"unittests-sectionheader"> =
Unit Test Error Details: (1) </td></tr><tr=
><td class=3D"unittests-data" colspan=3D"2"> Test: test=
HomePage</td></tr><tr><td class=3D"unittests-data" colspan=3D"2"> =
Class: org.springframework.apptests.buildtest.AllTests</td></tr>=
<tr><td class=3D"unittests-data" colspan=3D"2"> Type: junit.=
framework.AssertionFailedError</td></tr><tr><td class=3D"unittests-data" co=
lspan=3D"2"> Message: Exception while testing URL http://loc=
alhost:13084/buildtest:java.io.IOException</td></tr><tr><td class=3D"unitte=
sts-error" colspan=3D"2"><pre>junit.framework.AssertionFailedError: Excepti=
on while testing URL http://localhost:13084/buildtest:java.io.IOException<b=
r>=09at org.springframework.apptests.buildtest.AllTests.testHomePage(Unknow=
n Source)<br>=09at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Meth=
od)<br>=09at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess=
orImpl.java:39)<br>=09at sun.reflect.DelegatingMethodAccessorImpl.invoke(De=
legatingMethodAccessorImpl.java:25)<br></pre></td></tr><tr><td colspan=3D"2=
"> </td></tr></table><p>
<table width=3D"98%" border=3D"0" cellspacing=3D"0" cellpadding=3D"2" align=
=3D"center"><tr><td colspan=3D"4" class=3D"modifications-sectionheader"> =
Modifications since last build: =
(30) </td></tr><tr class=3D"modifications-evenrow"><td =
class=3D"modifications-data">modified</td><td class=3D"modifications-data">=
aarendsen</td><td class=3D"modifications-data">test/org/springframework/aop=
/framework/ProxyFactoryBeanTests.java</td><td class=3D"modifications-data">=
Added test to show behavior when using both targetSource and interceptor li=
st containing target source as well</td></tr><tr class=3D"modifications-odd=
row"><td class=3D"modifications-data">added</td><td class=3D"modifications-=
data">aarendsen</td><td class=3D"modifications-data">test/org/springframewo=
rk/aop/framework/proxyFactoryDoubleTargetSourceTests.xml</td><td class=3D"m=
odifications-data">Added test to show behavior when using both targetSource=
and interceptor list containing target source as well</td></tr><tr class=
=3D"modifications-evenrow"><td class=3D"modifications-data">modified</td><t=
d class=3D"modifications-data">aarendsen</td><td class=3D"modifications-dat=
a">docs/.cvsignore</td><td class=3D"modifications-data">Added clover to .cv=
signore</td></tr><tr class=3D"modifications-oddrow"><td class=3D"modificati=
ons-data">modified</td><td class=3D"modifications-data">trisberg</td><td cl=
ass=3D"modifications-data">src/org/springframework/jdbc/datasource/JdbcTran=
sactionObjectSupport.java</td><td class=3D"modifications-data">added a try/=
catch to provide a nicer error for JDBC 2 drivers that does not have suppor=
tsSavepoints method</td></tr><tr class=3D"modifications-evenrow"><td class=
=3D"modifications-data">modified</td><td class=3D"modifications-data">jhoel=
ler</td><td class=3D"modifications-data">/changelog.txt</td><td class=3D"mo=
difications-data">introduced support for nested transactions</td></tr><tr c=
lass=3D"modifications-oddrow"><td class=3D"modifications-data">modified</td=
><td class=3D"modifications-data">jhoeller</td><td class=3D"modifications-d=
ata">test/org/springframework/orm/jdo/JdoTransactionManagerTests.java</td><=
td class=3D"modifications-data">introduced support for nested transactions<=
/td></tr><tr class=3D"modifications-evenrow"><td class=3D"modifications-dat=
a">modified</td><td class=3D"modifications-data">jhoeller</td><td class=3D"=
modifications-data">src/org/springframework/transaction/support/DefaultTran=
sactionStatus.java</td><td class=3D"modifications-data">introduced support =
for nested transactions</td></tr><tr class=3D"modifications-oddrow"><td cla=
ss=3D"modifications-data">modified</td><td class=3D"modifications-data">jho=
eller</td><td class=3D"modifications-data">test/org/springframework/jdbc/da=
tasource/DataSourceTransactionManagerTests.java</td><td class=3D"modificati=
ons-data">introduced support for nested transactions</td></tr><tr class=3D"=
modifications-evenrow"><td class=3D"modifications-data">modified</td><td cl=
ass=3D"modifications-data">jhoeller</td><td class=3D"modifications-data">te=
st/org/springframework/orm/hibernate/HibernateTransactionManagerTests.java<=
/td><td class=3D"modifications-data">introduced support for nested transact=
ions</td></tr><tr class=3D"modifications-oddrow"><td class=3D"modifications=
-data">added</td><td class=3D"modifications-data">jhoeller</td><td class=3D=
"modifications-data">src/org/springframework/transaction/NestedTransactionN=
otSupportedException.java</td><td class=3D"modifications-data">introduced s=
upport for nested transactions</td></tr><tr class=3D"modifications-evenrow"=
><td class=3D"modifications-data">added</td><td class=3D"modifications-data=
">jhoeller</td><td class=3D"modifications-data">src/org/springframework/tra=
nsaction/SavepointManager.java</td><td class=3D"modifications-data">introdu=
ced support for nested transactions</td></tr><tr class=3D"modifications-odd=
row"><td class=3D"modifications-data">modified</td><td class=3D"modificatio=
ns-data">jhoeller</td><td class=3D"modifications-data">src/org/springframew=
ork/transaction/TransactionDefinition.java</td><td class=3D"modifications-d=
ata">introduced support for nested transactions</td></tr><tr class=3D"modif=
ications-evenrow"><td class=3D"modifications-data">modified</td><td class=
=3D"modifications-data">jhoeller</td><td class=3D"modifications-data">src/o=
rg/springframework/transaction/TransactionStatus.java</td><td class=3D"modi=
fications-data">introduced support for nested transactions</td></tr><tr cla=
ss=3D"modifications-oddrow"><td class=3D"modifications-data">modified</td><=
td class=3D"modifications-data">jhoeller</td><td class=3D"modifications-dat=
a">src/org/springframework/transaction/support/AbstractPlatformTransactionM=
anager.java</td><td class=3D"modifications-data">introduced support for nes=
ted transactions</td></tr><tr class=3D"modifications-evenrow"><td class=3D"=
modifications-data">modified</td><td class=3D"modifications-data">jhoeller<=
/td><td class=3D"modifications-data">src/org/springframework/orm/jdo/JdoTra=
nsactionManager.java</td><td class=3D"modifications-data">introduced suppor=
t for nested transactions</td></tr><tr class=3D"modifications-oddrow"><td c=
lass=3D"modifications-data">modified</td><td class=3D"modifications-data">j=
hoeller</td><td class=3D"modifications-data">src/org/springframework/orm/jd=
o/JdoTransactionObject.java</td><td class=3D"modifications-data">introduced=
support for nested transactions</td></tr><tr class=3D"modifications-evenro=
w"><td class=3D"modifications-data">modified</td><td class=3D"modifications=
-data">jhoeller</td><td class=3D"modifications-data">src/org/springframewor=
k/orm/hibernate/HibernateTransactionManager.java</td><td class=3D"modificat=
ions-data">introduced support for nested transactions</td></tr><tr class=3D=
"modifications-oddrow"><td class=3D"modifications-data">modified</td><td cl=
ass=3D"modifications-data">jhoeller</td><td class=3D"modifications-data">sr=
c/org/springframework/orm/hibernate/HibernateTransactionObject.java</td><td=
class=3D"modifications-data">introduced support for nested transactions</t=
d></tr><tr class=3D"modifications-evenrow"><td class=3D"modifications-data"=
>modified</td><td class=3D"modifications-data">jhoeller</td><td class=3D"mo=
difications-data">src/org/springframework/jdbc/datasource/DataSourceTransac=
tionObject.java</td><td class=3D"modifications-data">introduced support for=
nested transactions</td></tr><tr class=3D"modifications-oddrow"><td class=
=3D"modifications-data">added</td><td class=3D"modifications-data">jhoeller=
</td><td class=3D"modifications-data">src/org/springframework/jdbc/datasour=
ce/JdbcTransactionObjectSupport.java</td><td class=3D"modifications-data">i=
ntroduced support for nested transactions</td></tr><tr class=3D"modificatio=
ns-evenrow"><td class=3D"modifications-data">modified</td><td class=3D"modi=
fications-data">jhoeller</td><td class=3D"modifications-data">src/org/sprin=
gframework/jdbc/datasource/DataSourceTransactionManager.java</td><td class=
=3D"modifications-data">introduced support for nested transactions</td></tr=
><tr class=3D"modifications-oddrow"><td class=3D"modifications-data">modifi=
ed</td><td class=3D"modifications-data">jhoeller</td><td class=3D"modificat=
ions-data">test/org/springframework/context/support/ClassPathXmlApplication=
ContextTestSuite.java</td><td class=3D"modifications-data">added "parent" o=
ption to "ref" tag in spring-beans.dtd, allowing to explicitly reference a =
bean in the parent factory</td></tr><tr class=3D"modifications-evenrow"><td=
class=3D"modifications-data">added</td><td class=3D"modifications-data">jh=
oeller</td><td class=3D"modifications-data">test/org/springframework/contex=
t/support/childWithProxy.xml</td><td class=3D"modifications-data">added "pa=
rent" option to "ref" tag in spring-beans.dtd, allowing to explicitly refer=
ence a bean in the parent factory</td></tr><tr class=3D"modifications-oddro=
w"><td class=3D"modifications-data">modified</td><td class=3D"modifications=
-data">jhoeller</td><td class=3D"modifications-data">test/org/springframewo=
rk/context/support/contextA.xml</td><td class=3D"modifications-data">added =
"parent" option to "ref" tag in spring-beans.dtd, allowing to explicitly re=
ference a bean in the parent factory</td></tr><tr class=3D"modifications-ev=
enrow"><td class=3D"modifications-data">modified</td><td class=3D"modificat=
ions-data">jhoeller</td><td class=3D"modifications-data">src/org/springfram=
ework/beans/factory/support/AbstractAutowireCapableBeanFactory.java</td><td=
class=3D"modifications-data">added "parent" option to "ref" tag in spring-=
beans.dtd, allowing to explicitly reference a bean in the parent factory</t=
d></tr><tr class=3D"modifications-oddrow"><td class=3D"modifications-data">=
modified</td><td class=3D"modifications-data">jhoeller</td><td class=3D"mod=
ifications-data">src/org/springframework/beans/factory/xml/DefaultXmlBeanDe=
finitionParser.java</td><td class=3D"modifications-data">added "parent" opt=
ion to "ref" tag in spring-beans.dtd, allowing to explicitly reference a be=
an in the parent factory</td></tr><tr class=3D"modifications-evenrow"><td c=
lass=3D"modifications-data">modified</td><td class=3D"modifications-data">j=
hoeller</td><td class=3D"modifications-data">src/org/springframework/beans/=
factory/xml/spring-beans.dtd</td><td class=3D"modifications-data">added "pa=
rent" option to "ref" tag in spring-beans.dtd, allowing to explicitly refer=
ence a bean in the parent factory</td></tr><tr class=3D"modifications-oddro=
w"><td class=3D"modifications-data">modified</td><td class=3D"modifications=
-data">jhoeller</td><td class=3D"modifications-data">src/org/springframewor=
k/beans/factory/config/RuntimeBeanReference.java</td><td class=3D"modificat=
ions-data">added "parent" option to "ref" tag in spring-beans.dtd, allowing=
to explicitly reference a bean in the parent factory</td></tr><tr class=3D=
"modifications-evenrow"><td class=3D"modifications-data">modified</td><td c=
lass=3D"modifications-data">jhoeller</td><td class=3D"modifications-data">t=
est/org/springframework/beans/factory/DefaultListableBeanFactoryTestSuite.j=
ava</td><td class=3D"modifications-data">added "parent" option to "ref" tag=
in spring-beans.dtd, allowing to explicitly reference a bean in the parent=
factory</td></tr><tr class=3D"modifications-oddrow"><td class=3D"modificat=
ions-data">modified</td><td class=3D"modifications-data">kdonald</td><td cl=
ass=3D"modifications-data">sandbox/src/org/springframework/enum/support/Cod=
edEnumUserType.java</td><td class=3D"modifications-data">polishing</td></tr=
></table><p>
<table width=3D"98%" border=3D"0" cellspacing=3D"0" cellpadding=3D"2" align=
=3D"center"><tr><td class=3D"distributables-sectionheader"> =
Deployments by this build: (8) </td><=
/tr><tr><td class=3D"distributables-data">Building jar: /jteam/build/checko=
ut/spring/spring/dist/spring.jar</td></tr><tr class=3D"distributables-oddro=
w"><td class=3D"distributables-data">Building war: /jteam/build/checkout/sp=
ring/spring/autobuilds/apps/buildtest/dist/buildtest.war</td></tr><tr><td c=
lass=3D"distributables-data">Building war: /jteam/build/checkout/spring/spr=
ing/autobuilds/apps/buildtest/dist/buildtest.war</td></tr><tr class=3D"dist=
ributables-oddrow"><td class=3D"distributables-data">Building war: /jteam/b=
uild/checkout/spring/spring/autobuilds/apps/buildtest/dist/buildtest.war</t=
d></tr><tr><td class=3D"distributables-data">Building jar: /jteam/build/che=
ckout/spring/spring/autobuilds/apps/jpetstore/war/WEB-INF/lib/jpetstore.jar=
</td></tr><tr class=3D"distributables-oddrow"><td class=3D"distributables-d=
ata">Building war: /jteam/build/checkout/spring/spring/autobuilds/apps/jpet=
store/dist/jpetstore.war</td></tr><tr><td class=3D"distributables-data">Bui=
lding jar: /jteam/build/checkout/spring/spring/autobuilds/apps/jpetstore/wa=
r/WEB-INF/lib/jpetstore.jar</td></tr><tr class=3D"distributables-oddrow"><t=
d class=3D"distributables-data">Building war: /jteam/build/checkout/spring/=
spring/autobuilds/apps/jpetstore/dist/jpetstore.war</td></tr></table>
</body></html> |
|
From: Rod J. <rod...@in...> - 2004-06-19 21:17:03
|
Thomas > Any way you can get this to work in a managed environment with JTA :-) Not without: - having all savepoint-capable resources (not unlikely, for example, if you're using DB2 and Oracle, say) - being able to get at the underlying API of the transaction manager, rather than purely via JTA. This is conceivable, but won't make the 1.1 timeframe. - not having an ORM tool like Hibernate, which doesn't understand savepoints, involved in the transactions. Otherwise its cache will be unaware of the reversion to a savepoint. Of course if the ORM tool is only used for data that isn't modified and reverted that's fine. I think these transaction enhancements are an important feature, although it's important to understand that they work only in certain scenarios. Basically we're taking a different approach to JTA (but of course without sacrificing our excellent support for JTA). The JTA philosophy is that "nested transactions are not supported by all resource managers, so forget about them, or use the resource manager's local transaction API directly." We're saying: "here's a feature that works with some resource managers in certain situations. We provide access to it." This is an important distinction. For example, I have a client who have a huge Oracle database. They need to do very high transaction volumes, but they will never use another transactional resources. Yet some of the transaction processing they need to do is complex and requires nested transactions, not PROPAGATION_NEW. It's hard to work around that; they've paid for the database, and should be able to use its features without reverting to direct JDBC transaction management, loss of declarative transactions etc. Those parts of their tx processing use JDBC, rather than any ORM solution, to absolutely minimize overhead. This is what led to my desire for this feature: I can see a significant business value, in a certain range of situations. Hopefully, over time, the range of resources supporting sophisticated tx management concepts will grow. Rgds Rod |
|
From: Colin S. <col...@ex...> - 2004-06-19 19:22:53
|
Tyson,
REQUIRES_NEW actually just suspends the current transaction, and then
starts a new, unrelated transaction transaction to run the contained
code in. If you commit the inner, new transaction, then rollback the
outer, the inner transaciton will still be committed, as they are
unrelated. This should work properly inside any JTA environment (as long
as spring can get at the jta transaction manager) and the model is also
essentially the same as the requires new support in the EJB spec.
PROPOGATION_NESTED means that a new nested, or child transaction is
created inside the outer one. If you commit the child (nested)
transaction, but roll back the outer, parent transaction, the effects of
the child are also rolled back. JTA (and EJB) doesn't actually support
nested transactions. You essentially need a DB and JDBC driver, such as
Oracle, that does, which you can use directly.
Hope this clears things up,
Colin
Norris, Tyson wrote:
>Hi Juergen -
>How does this differ from the REQUIRES_NEW propagation?
>Thanks
>Tyson
>
>-----Original Message-----
>From: jürgen höller [werk3AT] [mailto:jue...@we...]
>Sent: Saturday, June 19, 2004 3:02 AM
>To: spr...@li...
>Subject: [Springframework-developer] Nested transactions
>
>Thomas, Alef, Colin, everybody,
>
>Motivated by Rod, I've added support for nested transactions to our transaction infrastructure, via the new propagation behavior PROPAGATION_NESTED. The transaction manager needs to open a true nested transaction which can be rolled back individually while still being able to continue with the surrounding transaction.
>
>Furthermore, application code can also use custom savepoints: The TransactionStatus interface now has a SavepointManager superinterface, which provides generic means to create savepoints and roll back to them. This is only intended for advanced needs where the declarative nested transaction model is not sufficient.
>
>DataSourceTransactionManager implements nested transaction support via JDBC 3.0 Savepoints: basically, create a Savepoint on nested transaction begin, release it on nested transaction commit, roll back to it on nested transaction rollback. Of course, DataSourceTransactionManager is still compatible with JDBC 2.0 if not using nested transactions.
>
>HibernateTransactionManager and JdoTransactionManager offer support for JDBC 3.0 Savepoints too, but it's deactivated by default there: Savepoints are just able to roll back the underlying JDBC Connection, not the Session respectively PersistenceManager with its object cache. Savepoints are still useful for JDBC access code that participates in a Hibernate/JDO transaction, though, when used with care.
>
>All of this is already fully covered by unit tests. Unfortunately, I don't have a database with savepoint support available here, i.e. no Oracle; so I've just been able to test that it fails nicely against MySQL (on JDK 1.4 and 1.3). Thomas, do you have a chance to test this against a live database?
>
>An example for how PROPAGATION_NESTED is supposed to work. Note that the nested transaction sets the rollback-only flag: This should just cause a rollback of the second update statement but still allow the surrounding transaction to commit the first update statement.
>
> DataSource ds = ...;
> final PlatformTransactionManager tm = new DataSourceTransactionManager(ds);
> final JdbcTemplate jt = new JdbcTemplate(ds);
>
> TransactionTemplate tt1 = new TransactionTemplate(tm);
> tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
> tt1.execute(new TransactionCallbackWithoutResult() {
> protected void doInTransactionWithoutResult(TransactionStatus status) {
> jt.update("first update statement");
>
> TransactionTemplate tt1 = new TransactionTemplate(tm);
> tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_NESTED);
> tt1.execute(new TransactionCallbackWithoutResult() {
> protected void doInTransactionWithoutResult(TransactionStatus status) {
> jt.update("second update statement");
> status.setRollbackOnly();
> }
> });
> }
> });
>
>An example for the same effect via manual savepoint management:
>
> TransactionTemplate tt1 = new TransactionTemplate(tm);
> tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
> tt1.execute(new TransactionCallbackWithoutResult() {
> protected void doInTransactionWithoutResult(TransactionStatus status) {
> jt.update("first update statement");
>
> Object savepoint = status.createSavepoint();
> jt.update("second update statement");
> status.rollbackToSavepoint(savepoint);
>
> }
> });
>
>Juergen
>
>
>
>-------------------------------------------------------
>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
>
>
>
>-------------------------------------------------------
>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
>
>
|
|
From: Norris, T. <tys...@be...> - 2004-06-19 16:30:18
|
Hi Juergen -=20
How does this differ from the REQUIRES_NEW propagation?
Thanks
Tyson
-----Original Message-----
From: j=FCrgen h=F6ller [werk3AT] [mailto:jue...@we...]=20
Sent: Saturday, June 19, 2004 3:02 AM
To: spr...@li...
Subject: [Springframework-developer] Nested transactions
Thomas, Alef, Colin, everybody,
=20
Motivated by Rod, I've added support for nested transactions to our =
transaction infrastructure, via the new propagation behavior =
PROPAGATION_NESTED. The transaction manager needs to open a true nested =
transaction which can be rolled back individually while still being able =
to continue with the surrounding transaction.
=20
Furthermore, application code can also use custom savepoints: The =
TransactionStatus interface now has a SavepointManager superinterface, =
which provides generic means to create savepoints and roll back to them. =
This is only intended for advanced needs where the declarative nested =
transaction model is not sufficient.
=20
DataSourceTransactionManager implements nested transaction support via =
JDBC 3.0 Savepoints: basically, create a Savepoint on nested transaction =
begin, release it on nested transaction commit, roll back to it on =
nested transaction rollback. Of course, DataSourceTransactionManager is =
still compatible with JDBC 2.0 if not using nested transactions.
=20
HibernateTransactionManager and JdoTransactionManager offer support for =
JDBC 3.0 Savepoints too, but it's deactivated by default there: =
Savepoints are just able to roll back the underlying JDBC Connection, =
not the Session respectively PersistenceManager with its object cache. =
Savepoints are still useful for JDBC access code that participates in a =
Hibernate/JDO transaction, though, when used with care.
=20
All of this is already fully covered by unit tests. Unfortunately, I =
don't have a database with savepoint support available here, i.e. no =
Oracle; so I've just been able to test that it fails nicely against =
MySQL (on JDK 1.4 and 1.3). Thomas, do you have a chance to test this =
against a live database?
=20
An example for how PROPAGATION_NESTED is supposed to work. Note that the =
nested transaction sets the rollback-only flag: This should just cause a =
rollback of the second update statement but still allow the surrounding =
transaction to commit the first update statement.
=20
DataSource ds =3D ...;
final PlatformTransactionManager tm =3D new =
DataSourceTransactionManager(ds);
final JdbcTemplate jt =3D new JdbcTemplate(ds);
TransactionTemplate tt1 =3D new TransactionTemplate(tm);
=
tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
tt1.execute(new TransactionCallbackWithoutResult() {
protected void doInTransactionWithoutResult(TransactionStatus =
status) {
jt.update("first update statement");
TransactionTemplate tt1 =3D new TransactionTemplate(tm);
=
tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_NESTED);
tt1.execute(new TransactionCallbackWithoutResult() {
protected void doInTransactionWithoutResult(TransactionStatus =
status) {
jt.update("second update statement");
status.setRollbackOnly();
}
});
}
});
An example for the same effect via manual savepoint management:
=20
TransactionTemplate tt1 =3D new TransactionTemplate(tm);
=
tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
tt1.execute(new TransactionCallbackWithoutResult() {
protected void doInTransactionWithoutResult(TransactionStatus =
status) {
jt.update("first update statement");
Object savepoint =3D status.createSavepoint();
jt.update("second update statement");
status.rollbackToSavepoint(savepoint);
}
});
=20
Juergen
=20
-------------------------------------------------------
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
|
|
From: Alef A. <al...@jt...> - 2004-06-19 14:34:03
|
Rod, While setting up a configuration at work, I made a slight mistake and added a TransactionManager as an interceptor to the ProxyFactoryBean instead of the TransactionInterceptor itself. I finally found it out after an hour or so but was wondering why it's possible to mention a targetsource as an interceptor in the first place. Secondly, it's now possible to have a PFB mentioning two target sources, where only the one added to the interceptor (or list of advices, like you refactored it to last week) will be used and the one references using the targetSource property is completely ignored. =20 I've added a corresponding testcase to ProxyFactoryBeanTests (testDoubleTargetSource) to show this behavior. Would it be wise to add a check preventing users from mentioning both properties? Also, I'm still wondering why one would add a target source to the list of interceptors instead of just mentioning it separately using the targetSource property. It might be better (just for clarity) to not even allow it, or are there any clear use cases? Alef |
|
From: Thomas R. <tho...@tr...> - 2004-06-19 14:10:12
|
Ooops, the 10g driver complains about the releaseSavepoint as well -
must have missed that in the log earlier. Still works though.
Thomas
Thomas Risberg wrote:
> Yes, it does work against a 9i db using both 9i (9.2.0.3) and 10g
> drivers. Nice job coding in the "dark" :-)
>
> 9i driver complains about not supporting "releaseSavepoint"
> (java.sql.SQLException: Unsupported feature), but it still seems to
> work. 10g driver had no problems at all.
>
> PostgreSQL (7.4) failed nicely. No support for savepoints.
>
> MS SQL Server (driver 2.2.0029) errored out with a
> "java.lang.AbstractMethodError". It must only support JDBC 2 --
> supportsSavepoints was added in JDBC 3. I added a try/catch for that
> to provide a nicer error.
>
> Any way you can get this to work in a managed environment with JTA :-)
>
> Thomas
>
>
> jürgen höller [werk3AT] wrote:
>
>> Thomas, Alef, Colin, everybody,
>>
>> Motivated by Rod, I've added support for nested transactions to our
>> transaction infrastructure, via the new propagation behavior
>> PROPAGATION_NESTED. The transaction manager needs to open a true
>> nested transaction which can be rolled back individually while still
>> being able to continue with the surrounding transaction.
>>
>> Furthermore, application code can also use custom savepoints: The
>> TransactionStatus interface now has a SavepointManager
>> superinterface, which provides generic means to create savepoints and
>> roll back to them. This is only intended for advanced needs where the
>> declarative nested transaction model is not sufficient.
>>
>> DataSourceTransactionManager implements nested transaction support
>> via JDBC 3.0 Savepoints: basically, create a Savepoint on nested
>> transaction begin, release it on nested transaction commit, roll back
>> to it on nested transaction rollback. Of course,
>> DataSourceTransactionManager is still compatible with JDBC 2.0 if not
>> using nested transactions.
>>
>> HibernateTransactionManager and JdoTransactionManager offer support
>> for JDBC 3.0 Savepoints too, but it's deactivated by default there:
>> Savepoints are just able to roll back the underlying JDBC Connection,
>> not the Session respectively PersistenceManager with its object
>> cache. Savepoints are still useful for JDBC access code that
>> participates in a Hibernate/JDO transaction, though, when used with
>> care.
>>
>> All of this is already fully covered by unit tests. Unfortunately, I
>> don't have a database with savepoint support available here, i.e. no
>> Oracle; so I've just been able to test that it fails nicely against
>> MySQL (on JDK 1.4 and 1.3). Thomas, do you have a chance to test this
>> against a live database?
>>
>> An example for how PROPAGATION_NESTED is supposed to work. Note that
>> the nested transaction sets the rollback-only flag: This should just
>> cause a rollback of the second update statement but still allow the
>> surrounding transaction to commit the first update statement.
>>
>> DataSource ds = ...;
>> final PlatformTransactionManager tm = new
>> DataSourceTransactionManager(ds);
>> final JdbcTemplate jt = new JdbcTemplate(ds);
>>
>> TransactionTemplate tt1 = new TransactionTemplate(tm);
>> tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
>> tt1.execute(new TransactionCallbackWithoutResult() {
>> protected void doInTransactionWithoutResult(TransactionStatus
>> status) {
>> jt.update("first update statement");
>>
>> TransactionTemplate tt1 = new TransactionTemplate(tm);
>>
>> tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_NESTED);
>> tt1.execute(new TransactionCallbackWithoutResult() {
>> protected void doInTransactionWithoutResult(TransactionStatus
>> status) {
>> jt.update("second update statement");
>> status.setRollbackOnly();
>> }
>> });
>> }
>> });
>>
>> An example for the same effect via manual savepoint management:
>>
>> TransactionTemplate tt1 = new TransactionTemplate(tm);
>> tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
>> tt1.execute(new TransactionCallbackWithoutResult() {
>> protected void doInTransactionWithoutResult(TransactionStatus
>> status) {
>> jt.update("first update statement");
>>
>> Object savepoint = status.createSavepoint();
>> jt.update("second update statement");
>> status.rollbackToSavepoint(savepoint);
>>
>> }
>> });
>>
>> Juergen
>>
>>
>>
>> -------------------------------------------------------
>> 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
>>
>>
>>
>>
>>
>
>
>
> -------------------------------------------------------
> 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
>
>
>
|
|
From: Alef A. <al...@jt...> - 2004-06-19 13:56:23
|
Good stuff Juergen.
It would be nice to have those kind of features tested regularly. =
Unfortunately I still haven't managed to setup an Oracle instance on the =
Linux box we've got here. I've been running into problems with Oracle =
and the distro we're using (RedHat ES 3) several times.
Alef
> -----Original Message-----
> From: spr...@li...
> [mailto:spr...@li...] On =
Behalf
> Of j=FCrgen h=F6ller [werk3AT]
> Sent: Saturday, June 19, 2004 12:16 PM
> To: spr...@li...
> Subject: [Springframework-developer] Nested transactions
>=20
> Thomas, Alef, Colin, everybody,
>=20
> Motivated by Rod, I've added support for nested transactions to our
> transaction infrastructure, via the new propagation behavior
> PROPAGATION_NESTED. The transaction manager needs to open a true =
nested
> transaction which can be rolled back individually while still being =
able
> to continue with the surrounding transaction.
>=20
> Furthermore, application code can also use custom savepoints: The
> TransactionStatus interface now has a SavepointManager superinterface,
> which provides generic means to create savepoints and roll back to =
them.
> This is only intended for advanced needs where the declarative nested
> transaction model is not sufficient.
>=20
> DataSourceTransactionManager implements nested transaction support via
> JDBC 3.0 Savepoints: basically, create a Savepoint on nested =
transaction
> begin, release it on nested transaction commit, roll back to it on =
nested
> transaction rollback. Of course, DataSourceTransactionManager is still
> compatible with JDBC 2.0 if not using nested transactions.
>=20
> HibernateTransactionManager and JdoTransactionManager offer support =
for
> JDBC 3.0 Savepoints too, but it's deactivated by default there: =
Savepoints
> are just able to roll back the underlying JDBC Connection, not the =
Session
> respectively PersistenceManager with its object cache. Savepoints are
> still useful for JDBC access code that participates in a Hibernate/JDO
> transaction, though, when used with care.
>=20
> All of this is already fully covered by unit tests. Unfortunately, I =
don't
> have a database with savepoint support available here, i.e. no Oracle; =
so
> I've just been able to test that it fails nicely against MySQL (on JDK =
1.4
> and 1.3). Thomas, do you have a chance to test this against a live
> database?
>=20
> An example for how PROPAGATION_NESTED is supposed to work. Note that =
the
> nested transaction sets the rollback-only flag: This should just cause =
a
> rollback of the second update statement but still allow the =
surrounding
> transaction to commit the first update statement.
>=20
> DataSource ds =3D ...;
> final PlatformTransactionManager tm =3D new
> DataSourceTransactionManager(ds);
> final JdbcTemplate jt =3D new JdbcTemplate(ds);
>=20
> TransactionTemplate tt1 =3D new TransactionTemplate(tm);
> =
tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
> tt1.execute(new TransactionCallbackWithoutResult() {
> protected void doInTransactionWithoutResult(TransactionStatus =
status)
> {
> jt.update("first update statement");
>=20
> TransactionTemplate tt1 =3D new TransactionTemplate(tm);
>=20
> tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_NESTED);
> tt1.execute(new TransactionCallbackWithoutResult() {
> protected void doInTransactionWithoutResult(TransactionStatus
> status) {
> jt.update("second update statement");
> status.setRollbackOnly();
> }
> });
> }
> });
>=20
> An example for the same effect via manual savepoint management:
>=20
> TransactionTemplate tt1 =3D new TransactionTemplate(tm);
> =
tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
> tt1.execute(new TransactionCallbackWithoutResult() {
> protected void doInTransactionWithoutResult(TransactionStatus =
status)
> {
> jt.update("first update statement");
>=20
> Object savepoint =3D status.createSavepoint();
> jt.update("second update statement");
> status.rollbackToSavepoint(savepoint);
>=20
> }
> });
>=20
> Juergen
>=20
>=20
>=20
> -------------------------------------------------------
> 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
>=20
|
|
From: Thomas R. <tho...@tr...> - 2004-06-19 13:52:20
|
Yes, it does work against a 9i db using both 9i (9.2.0.3) and 10g
drivers. Nice job coding in the "dark" :-)
9i driver complains about not supporting "releaseSavepoint"
(java.sql.SQLException: Unsupported feature), but it still seems to
work. 10g driver had no problems at all.
PostgreSQL (7.4) failed nicely. No support for savepoints.
MS SQL Server (driver 2.2.0029) errored out with a
"java.lang.AbstractMethodError". It must only support JDBC 2 --
supportsSavepoints was added in JDBC 3. I added a try/catch for that to
provide a nicer error.
Any way you can get this to work in a managed environment with JTA :-)
Thomas
jürgen höller [werk3AT] wrote:
>Thomas, Alef, Colin, everybody,
>
>Motivated by Rod, I've added support for nested transactions to our transaction infrastructure, via the new propagation behavior PROPAGATION_NESTED. The transaction manager needs to open a true nested transaction which can be rolled back individually while still being able to continue with the surrounding transaction.
>
>Furthermore, application code can also use custom savepoints: The TransactionStatus interface now has a SavepointManager superinterface, which provides generic means to create savepoints and roll back to them. This is only intended for advanced needs where the declarative nested transaction model is not sufficient.
>
>DataSourceTransactionManager implements nested transaction support via JDBC 3.0 Savepoints: basically, create a Savepoint on nested transaction begin, release it on nested transaction commit, roll back to it on nested transaction rollback. Of course, DataSourceTransactionManager is still compatible with JDBC 2.0 if not using nested transactions.
>
>HibernateTransactionManager and JdoTransactionManager offer support for JDBC 3.0 Savepoints too, but it's deactivated by default there: Savepoints are just able to roll back the underlying JDBC Connection, not the Session respectively PersistenceManager with its object cache. Savepoints are still useful for JDBC access code that participates in a Hibernate/JDO transaction, though, when used with care.
>
>All of this is already fully covered by unit tests. Unfortunately, I don't have a database with savepoint support available here, i.e. no Oracle; so I've just been able to test that it fails nicely against MySQL (on JDK 1.4 and 1.3). Thomas, do you have a chance to test this against a live database?
>
>An example for how PROPAGATION_NESTED is supposed to work. Note that the nested transaction sets the rollback-only flag: This should just cause a rollback of the second update statement but still allow the surrounding transaction to commit the first update statement.
>
> DataSource ds = ...;
> final PlatformTransactionManager tm = new DataSourceTransactionManager(ds);
> final JdbcTemplate jt = new JdbcTemplate(ds);
>
> TransactionTemplate tt1 = new TransactionTemplate(tm);
> tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
> tt1.execute(new TransactionCallbackWithoutResult() {
> protected void doInTransactionWithoutResult(TransactionStatus status) {
> jt.update("first update statement");
>
> TransactionTemplate tt1 = new TransactionTemplate(tm);
> tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_NESTED);
> tt1.execute(new TransactionCallbackWithoutResult() {
> protected void doInTransactionWithoutResult(TransactionStatus status) {
> jt.update("second update statement");
> status.setRollbackOnly();
> }
> });
> }
> });
>
>An example for the same effect via manual savepoint management:
>
> TransactionTemplate tt1 = new TransactionTemplate(tm);
> tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
> tt1.execute(new TransactionCallbackWithoutResult() {
> protected void doInTransactionWithoutResult(TransactionStatus status) {
> jt.update("first update statement");
>
> Object savepoint = status.createSavepoint();
> jt.update("second update statement");
> status.rollbackToSavepoint(savepoint);
>
> }
> });
>
>Juergen
>
>
>
>-------------------------------------------------------
>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
>
>
>
>
>
|
|
From: <jue...@we...> - 2004-06-19 10:02:06
|
Thomas, Alef, Colin, everybody,
=20
Motivated by Rod, I've added support for nested transactions to our =
transaction infrastructure, via the new propagation behavior =
PROPAGATION_NESTED. The transaction manager needs to open a true nested =
transaction which can be rolled back individually while still being able =
to continue with the surrounding transaction.
=20
Furthermore, application code can also use custom savepoints: The =
TransactionStatus interface now has a SavepointManager superinterface, =
which provides generic means to create savepoints and roll back to them. =
This is only intended for advanced needs where the declarative nested =
transaction model is not sufficient.
=20
DataSourceTransactionManager implements nested transaction support via =
JDBC 3.0 Savepoints: basically, create a Savepoint on nested transaction =
begin, release it on nested transaction commit, roll back to it on =
nested transaction rollback. Of course, DataSourceTransactionManager is =
still compatible with JDBC 2.0 if not using nested transactions.
=20
HibernateTransactionManager and JdoTransactionManager offer support for =
JDBC 3.0 Savepoints too, but it's deactivated by default there: =
Savepoints are just able to roll back the underlying JDBC Connection, =
not the Session respectively PersistenceManager with its object cache. =
Savepoints are still useful for JDBC access code that participates in a =
Hibernate/JDO transaction, though, when used with care.
=20
All of this is already fully covered by unit tests. Unfortunately, I =
don't have a database with savepoint support available here, i.e. no =
Oracle; so I've just been able to test that it fails nicely against =
MySQL (on JDK 1.4 and 1.3). Thomas, do you have a chance to test this =
against a live database?
=20
An example for how PROPAGATION_NESTED is supposed to work. Note that the =
nested transaction sets the rollback-only flag: This should just cause a =
rollback of the second update statement but still allow the surrounding =
transaction to commit the first update statement.
=20
DataSource ds =3D ...;
final PlatformTransactionManager tm =3D new =
DataSourceTransactionManager(ds);
final JdbcTemplate jt =3D new JdbcTemplate(ds);
TransactionTemplate tt1 =3D new TransactionTemplate(tm);
=
tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
tt1.execute(new TransactionCallbackWithoutResult() {
protected void doInTransactionWithoutResult(TransactionStatus =
status) {
jt.update("first update statement");
TransactionTemplate tt1 =3D new TransactionTemplate(tm);
=
tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_NESTED);
tt1.execute(new TransactionCallbackWithoutResult() {
protected void doInTransactionWithoutResult(TransactionStatus =
status) {
jt.update("second update statement");
status.setRollbackOnly();
}
});
}
});
An example for the same effect via manual savepoint management:
=20
TransactionTemplate tt1 =3D new TransactionTemplate(tm);
=
tt1.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
tt1.execute(new TransactionCallbackWithoutResult() {
protected void doInTransactionWithoutResult(TransactionStatus =
status) {
jt.update("first update statement");
Object savepoint =3D status.createSavepoint();
jt.update("second update statement");
status.rollbackToSavepoint(savepoint);
}
});
=20
Juergen
=20
|
|
From: Seth L. <se...@eh...> - 2004-06-19 02:58:52
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I've been using the Handler/Interceptor feature of Spring MVC and I really like it. I'd like to propose an enhancement to it that I think will make it more flexible and easier to configure in the *-servlet.xml file. Right now, you must specify a new HandlerMapping class when you want to create different combinations of Interceptors.I'd like to propose that Interceptor -> Handler binding is done more like Filters and outside of the HandlerMapping class. One solution would be an InterceptorMapping class, which is configured like a HandlerMapping class. It could contain a map of URIs to interceptors. This InterceptorMapping class would be given to the HandlerMapping class. The HandlerMapping class then calls something like interceptorMapping.findInterceptors(servletRequest) when it's ready to build a HandlerExecutionChain. This would allow for all Handlers to use BeanNameHandlerMapping (or a single HandlerMapping), but be configured with different Interceptors. The binding of which Interceptor to be applied to which Handler is now not part of the HandlerMapping. This cuts down on the number of HandlerMappings to specify and configure, especially in high-Interceptor usage scenarios. Thoughts? Comments? If this is unclear, please let me know. Also, if there's a better way to do this with existing code, then even better. :) Mahalo! Seth -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3-nr1 (Windows XP) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFA06veKZsFSwtW+wIRAm+/AJ4hW4eVNWZgoZfe0Mk/WaBzhzZgXACfV1zP O5hGTiOJRmxYO+mfntWlHOE= =0RPV -----END PGP SIGNATURE----- |
|
From: <al...@jt...> - 2004-06-18 22:15:52
|
<html><head>
<style>
.white { color:#FFFFFF }.index { background-color:#FFFFFF }.index-passed { =
color:#004400 }.index-failed { color:#FF0000; font-weight:bold }.index-head=
er { font-weight:bold }.link { font-family:arial,helvetica,sans-serif; font=
-size:10pt; color:#FFFFFF; text-decoration:none; }.tab-table { margin: 0em =
0em 0.5em 0em; }.tabs { font-family:arial,helvetica,sans-serif; font-size:8=
pt; color:#000000; font-weight:bold; padding: 0em 2em; background-color:#EE=
EEEE; }.tabs-link { color:#000000; text-decoration:none; }.tabs-link:visite=
d { color:#000000; text-decoration:none; }.tabs-selected { font-family:aria=
l,helvetica,sans-serif; font-size:8pt; color:#000000; font-weight:bold; pad=
ding: 0em 2em; }.tabs-selected { border: inset; }.header-title { font-famil=
y:arial,helvetica,sans-serif; font-size:12pt; color:#000000; font-weight:bo=
ld; }.header-label { font-weight:bold; }.header-data { font-family:arial,he=
lvetica,sans-serif; font-size:10pt; color:#000000; }.modifications-data { f=
ont-family:arial,helvetica,sans-serif; font-size:8pt; color:#000000; }.modi=
fications-sectionheader { background-color:#000066; font-family:arial,helve=
tica,sans-serif; font-size:10pt; color:#FFFFFF; }.modifications-oddrow { ba=
ckground-color:#CCCCCC }.modifications-evenrow { background-color:#FFFFCC }=
.changelists-oddrow { background-color:#CCCCCC }.changelists-evenrow { back=
ground-color:#FFFFCC }.changelists-file-spacer { background-color:#FFFFFF }=
.changelists-file-evenrow { background-color:#EEEEEE }.changelists-file-odd=
row { background-color:#FFFFEE }.changelists-file-header { background-color=
:#666666; font-family:arial,helvetica,sans-serif; font-size:8pt; color:#FFF=
FFF; }.compile-data { font-family:arial,helvetica,sans-serif; font-size:8pt=
; color:#000000; }.compile-error-data { font-family:arial,helvetica,sans-se=
rif; font-size:8pt; color:#FF0000; }.compile-warn-data { font-family:arial,=
helvetica,sans-serif; font-size:8pt; color:#CC9900; }.compile-sectionheader=
{ background-color:#000066; font-family:arial,helvetica,sans-serif; font-s=
ize:10pt; color:#FFFFFF; }.distributables-data { font-family:arial,helvetic=
a,sans-serif; font-size:8pt; color:#000000; }.distributables-sectionheader =
{ background-color:#000066; font-family:arial,helvetica,sans-serif; font-si=
ze:10pt; color:#FFFFFF; }.distributables-oddrow { background-color:#CCCCCC =
}.unittests-sectionheader { background-color:#000066; font-family:arial,hel=
vetica,sans-serif; font-size:10pt; color:#FFFFFF; }.unittests-oddrow { back=
ground-color:#CCCCCC }.unittests-data { font-family:arial,helvetica,sans-se=
rif; font-size:8pt; color:#000000; }.unittests-error { font-family:arial,he=
lvetica,sans-serif; font-size:8pt; color:#FF0000; }.checkstyle-oddrow { bac=
kground-color:#CCCCCC }.checkstyle-data { font-family:arial,helvetica,sans-=
serif; font-size:8pt; color:#000000; }.checkstyle-sectionheader { backgroun=
d-color:#000066; font-family:arial,helvetica,sans-serif; font-size:10pt; co=
lor:#FFFFFF; }
</style>
</head><body>
<p>
<table width=3D"98%" border=3D"0" cellspacing=3D"0" cellpadding=3D"2" align=
=3D"center"><tr><td class=3D"header-title">BUILD COMPLETE - =
build.29</td></tr><tr><td class=3D"header-data"><span class=
=3D"header-label">Date of build: </span>06/19/2004 00:15:55</td></tr><=
tr><td class=3D"header-data"><span class=3D"header-label">Time to build:&nb=
sp;</span>13 minutes 33 seconds</td></tr><tr><td class=3D"header-data"><spa=
n class=3D"header-label">Last changed: </span>06/18/2004 19:08:10</td>=
</tr><tr><td class=3D"header-data"><span class=3D"header-label">Last log en=
try: </span>type converter polishing</td></tr></table><p>
<table xmlns=3D"http://www.w3.org/TR/html4/strict.dtd" width=3D"98%" border=
=3D"0" cellspacing=3D"0" cellpadding=3D"2" align=3D"center"/><p>
<p>
<table xmlns=3D"http://www.w3.org/TR/html4/strict.dtd" width=3D"98%" border=
=3D"0" cellspacing=3D"0" cellpadding=3D"2" align=3D"center"><tr><td class=
=3D"compile-sectionheader"> Errors/Warnings: (=
6) </td></tr><tr><td><pre class=3D"compile-error-data">N=
ote: Some input files use or override a deprecated API.<br class=3D"none"/>=
Note: Recompile with -deprecation for details.Note: /jteam/build/checkout/s=
pring/spring/mock/org/springframework/mock/web/MockHttpSession.java uses or=
overrides a deprecated API.<br class=3D"none"/>Note: Recompile with -depre=
cation for details.<br class=3D"none"/>Note: Some input files use or overri=
de a deprecated API.<br class=3D"none"/>Note: Recompile with -deprecation f=
or details.<br class=3D"none"/></pre></td></tr></table><p>
<p>
<table width=3D"98%" border=3D"0" cellspacing=3D"0" cellpadding=3D"2" align=
=3D"center"><tr><td colspan=3D"4" class=3D"unittests-sectionheader"> =
Unit Tests: (1470) </td></tr><tr><td><tabl=
e width=3D"98%" border=3D"0" cellspacing=3D"0" cellpadding=3D"2" align=3D"c=
enter"><tr><td class=3D"unittests-data"> failure =
</td><td width=3D"40%" class=3D"unittests-data">testHomePage</td><td width=
=3D"40%" class=3D"unittests-data">org.springframework.apptests.buildtest.Al=
lTests</td></tr></table></td></tr><tr></tr><tr><td colspan=3D"2"> </td=
></tr><tr><td colspan=3D"4" class=3D"unittests-sectionheader"> =
Unit Test Error Details: (1) </td></tr><tr=
><td class=3D"unittests-data" colspan=3D"2"> Test: test=
HomePage</td></tr><tr><td class=3D"unittests-data" colspan=3D"2"> =
Class: org.springframework.apptests.buildtest.AllTests</td></tr>=
<tr><td class=3D"unittests-data" colspan=3D"2"> Type: junit.=
framework.AssertionFailedError</td></tr><tr><td class=3D"unittests-data" co=
lspan=3D"2"> Message: Exception while testing URL http://loc=
alhost:13084/buildtest:java.io.IOException</td></tr><tr><td class=3D"unitte=
sts-error" colspan=3D"2"><pre>junit.framework.AssertionFailedError: Excepti=
on while testing URL http://localhost:13084/buildtest:java.io.IOException<b=
r>=09at org.springframework.apptests.buildtest.AllTests.testHomePage(Unknow=
n Source)<br>=09at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Meth=
od)<br>=09at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess=
orImpl.java:39)<br>=09at sun.reflect.DelegatingMethodAccessorImpl.invoke(De=
legatingMethodAccessorImpl.java:25)<br></pre></td></tr><tr><td colspan=3D"2=
"> </td></tr></table><p>
<table width=3D"98%" border=3D"0" cellspacing=3D"0" cellpadding=3D"2" align=
=3D"center"><tr><td colspan=3D"4" class=3D"modifications-sectionheader"> =
Modifications since last build: =
(8) </td></tr><tr class=3D"modifications-evenrow"><td c=
lass=3D"modifications-data">modified</td><td class=3D"modifications-data">k=
donald</td><td class=3D"modifications-data">sandbox/src/org/springframework=
/rules/values/TypeConverter.java</td><td class=3D"modifications-data">type =
converter polishing</td></tr><tr class=3D"modifications-oddrow"><td class=
=3D"modifications-data">modified</td><td class=3D"modifications-data">jhoel=
ler</td><td class=3D"modifications-data">src/org/springframework/mail/javam=
ail/JavaMailSenderImpl.java</td><td class=3D"modifications-data">added acce=
ssors for "session", "protocol", "host", "port", "username", "password"</td=
></tr><tr class=3D"modifications-evenrow"><td class=3D"modifications-data">=
modified</td><td class=3D"modifications-data">johnsonr</td><td class=3D"mod=
ifications-data">src/org/springframework/aop/framework/Advised.java</td><td=
class=3D"modifications-data">Added xxAdvice methods: deprecated old xxInte=
rceptor etc.</td></tr><tr class=3D"modifications-oddrow"><td class=3D"modif=
ications-data">modified</td><td class=3D"modifications-data">johnsonr</td><=
td class=3D"modifications-data">src/org/springframework/aop/framework/Advis=
edSupport.java</td><td class=3D"modifications-data">Added xxAdvice methods:=
deprecated old xxInterceptor etc.</td></tr><tr class=3D"modifications-even=
row"><td class=3D"modifications-data">modified</td><td class=3D"modificatio=
ns-data">johnsonr</td><td class=3D"modifications-data">test/org/springframe=
work/aop/framework/ProxyFactoryBeanTests.java</td><td class=3D"modification=
s-data">Added inner bean test for ProxyFactoryBean usage</td></tr><tr class=
=3D"modifications-oddrow"><td class=3D"modifications-data">added</td><td cl=
ass=3D"modifications-data">johnsonr</td><td class=3D"modifications-data">te=
st/org/springframework/aop/framework/innerBeanTarget.xml</td><td class=3D"m=
odifications-data">Added inner bean test for ProxyFactoryBean usage</td></t=
r><tr class=3D"modifications-evenrow"><td class=3D"modifications-data">modi=
fied</td><td class=3D"modifications-data">johnsonr</td><td class=3D"modific=
ations-data">test/org/springframework/aop/framework/throwsAdvice.xml</td><t=
d class=3D"modifications-data">Tidied up</td></tr><tr class=3D"modification=
s-oddrow"><td class=3D"modifications-data">modified</td><td class=3D"modifi=
cations-data">johnsonr</td><td class=3D"modifications-data">docs/reference/=
src/aop.xml</td><td class=3D"modifications-data">Added inner bean example; =
addInterceptor -> addAdvice</td></tr></table><p>
<table width=3D"98%" border=3D"0" cellspacing=3D"0" cellpadding=3D"2" align=
=3D"center"><tr><td class=3D"distributables-sectionheader"> =
Deployments by this build: (8) </td><=
/tr><tr><td class=3D"distributables-data">Building jar: /jteam/build/checko=
ut/spring/spring/dist/spring.jar</td></tr><tr class=3D"distributables-oddro=
w"><td class=3D"distributables-data">Building war: /jteam/build/checkout/sp=
ring/spring/autobuilds/apps/buildtest/dist/buildtest.war</td></tr><tr><td c=
lass=3D"distributables-data">Building war: /jteam/build/checkout/spring/spr=
ing/autobuilds/apps/buildtest/dist/buildtest.war</td></tr><tr class=3D"dist=
ributables-oddrow"><td class=3D"distributables-data">Building war: /jteam/b=
uild/checkout/spring/spring/autobuilds/apps/buildtest/dist/buildtest.war</t=
d></tr><tr><td class=3D"distributables-data">Building jar: /jteam/build/che=
ckout/spring/spring/autobuilds/apps/jpetstore/war/WEB-INF/lib/jpetstore.jar=
</td></tr><tr class=3D"distributables-oddrow"><td class=3D"distributables-d=
ata">Building war: /jteam/build/checkout/spring/spring/autobuilds/apps/jpet=
store/dist/jpetstore.war</td></tr><tr><td class=3D"distributables-data">Bui=
lding jar: /jteam/build/checkout/spring/spring/autobuilds/apps/jpetstore/wa=
r/WEB-INF/lib/jpetstore.jar</td></tr><tr class=3D"distributables-oddrow"><t=
d class=3D"distributables-data">Building war: /jteam/build/checkout/spring/=
spring/autobuilds/apps/jpetstore/dist/jpetstore.war</td></tr></table>
</body></html> |
|
From: Darren D. <da...@da...> - 2004-06-18 14:40:36
|
Darren Davison wrote: > Does anyone have strong views on what the scope of these should be? My > reasons for askBinding, and my own opinions on the issues are: not quite sure why the word 'Bind' has been randomly scattered through the text of my original mail! Sorry about that - hope you can still understand it. -- Darren Davison Public Key: http://www.davison.uk.net/pages/key.htm |
|
From: Tom T. <tom...@pr...> - 2004-06-18 14:30:05
|
Hello Darren, > I'm doing some work on the Velocity/FreeMarker support to try and offer > standardised (as far as poss) macros and tags in the web ui for html > forms. That would be useful! > 1. Some of the constructs are more powerful than others (ie FreeMarker > and > JSP 2.0 can do more than Velocity, but thBinden the syntax is arguably > more > complex). This has implications for consistency in the framework. My > opinion here is that consistency is better at the price of reduced > standard > functionality in the more powerful languages. Those features can go into > a > cookbook section on the wiki for example rather than a standard framework > library.Bind I'd prefer consistency, e.g. consistent as much as possible with the existing spring jsp tags? > 2. Should the standard macros and tags output any markup (HTML) or simply > make values available in simple variable names to be used in client code > markup. The fBindormer is very convenient for userBinds but means they > put > up with our HTML, the latter should be fine for everyone but means more > typing in your templates. My opinion here again is that less is more. > HTML for me is VERY application specific and I would feel that Spring was > starting to cross the line from framework/library domain to application > domain. No HTML output please! Again consistent with the existing spring jsp tags? Kind regards, Tom. |
|
From: Colin S. <col...@ex...> - 2004-06-18 13:58:39
|
I agree. Now what I usually have done in the past (which is not really an option for Spring in this case), is define a convenience method to close the triad of result, statement, and connection. The method also takes an 'exceptOnError' flag. Basically, I call the method from the finally block, but if an exception handler above the finally block catches a SQLException, I set the flag which will be passed to the convenience method to not throw an exception on error, so the original exception can still bubble up. But for this case, I think logging is probably best... We could also add a new variant of the closeConnectionIfNecessary method, which takes a boolean as to whether an exception should be thrown, or just logged. That way, code which knows that it is calling the method from an error free area can still call with the flag set appropriately to get the existing behaviour. Colin Thomas Risberg wrote: > I would agree that logging is more appropriate in the finally clause > in this case. > > Thomas > > jürgen höller [werk3AT] wrote: > >> Thomas, Rod, everybody, >> >> There is an issue regarding >> DataSourceUtils.closeConnectionIfNecessary in our JIRA: >> >> http://opensource.atlassian.com/projects/spring/browse/SPR-172 >> >> This is indeed undesirable. Of course, Connection.close hardly ever >> throws an exception, so it's not a big problem. We could still simply >> log the exception as an error and proceed, like we do in >> JdbcUtils.closeStatement/closeResultSet. >> >> What do you think? >> >> Juergen >> |
|
From: Guillaume P. <gpo...@gl...> - 2004-06-18 13:18:45
|
There=27s also the method below that is in the same situation=3A org=2Espringframework=2Eorm=2Ehibernate=2ESessionFactoryUtils=2EcloseSess= ionIfNecessary(Session session=2C SessionFactory sessionFactory) throws C= leanupFailureDataAccessException=3B Guillaume ---- Messages d=B4origine ---- De=3A Thomas Risberg =3Cthomas=2Erisberg=40tridb=2Ecom=3E Date=3A vendredi=2C juin 18=2C 2004 8=3A13 am Objet=3A Re=3A =5BSpringframework-developer=5D Exception from closeConnec= tionIfNecessary =3E I would agree that logging is more appropriate in the finally = =3E clause in = =3E this case=2E =3E = =3E Thomas =3E = =3E j=FCrgen h=F6ller =5Bwerk3AT=5D wrote=3A =3E = =3E =3EThomas=2C Rod=2C everybody=2C =3E =3E = =3E =3EThere is an issue regarding = =3E DataSourceUtils=2EcloseConnectionIfNecessary in our JIRA=3A =3E =3E = =3E =3Ehttp=3A//opensource=2Eatlassian=2Ecom/projects/spring/browse/SPR-1= 72 =3E =3E = =3E =3EThis is indeed undesirable=2E Of course=2C Connection=2Eclose hard= ly = =3E ever throws an exception=2C so it=27s not a big problem=2E We could = =3E still simply log the exception as an error and proceed=2C like we do = =3E in JdbcUtils=2EcloseStatement/closeResultSet=2E =3E =3E = =3E =3EWhat do you think=3F =3E =3E = =3E =3EJuergen =3E =3E =3E =3E =3E =3E------------------------------------------------------- =3E =3EThis SF=2ENet email is sponsored by The 2004 JavaOne(SM) Conferenc= e =3E =3ELearn from the experts at JavaOne(SM)=2C Sun=27s Worldwide Java De= veloper =3E =3EConference=2C June 28 - July 1 at the Moscone Center in San = =3E Francisco=2C CA =3E =3EREGISTER AND SAVE! http=3A//java=2Esun=2Ecom/javaone/sf Priority C= ode = =3E NWMGYKND=3E=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F =3E =3ESpringframework-developer mailing list =3E =3ESpringframework-developer=40lists=2Esourceforge=2Enet =3E =3Ehttps=3A//lists=2Esourceforge=2Enet/lists/listinfo/springframework= - =3E developer=3E =3E =3E =3E =3E =3E =3E = =3E =3E =3E = =3E = =3E = =3E ------------------------------------------------------- =3E This SF=2ENet email is sponsored by The 2004 JavaOne(SM) Conference =3E Learn from the experts at JavaOne(SM)=2C Sun=27s Worldwide Java Devel= oper =3E Conference=2C June 28 - July 1 at the Moscone Center in San = =3E Francisco=2C CA =3E REGISTER AND SAVE! http=3A//java=2Esun=2Ecom/javaone/sf Priority Code= = =3E NWMGYKND=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F =3E Springframework-developer mailing list =3E Springframework-developer=40lists=2Esourceforge=2Enet =3E https=3A//lists=2Esourceforge=2Enet/lists/listinfo/springframework-de= veloper =3E |
|
From: Darren D. <da...@da...> - 2004-06-18 13:06:18
|
=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm doing some work on the Velocity/FreeMarker support to try and offer=20
standardised (as far as poss) macros and tags in the web ui for html forms.
Does anyone have strong views on what the scope of these should be? My=20
reasons for askBinding, and my own opinions on the issues are:
1. Some of the constructs are more powerful than others (ie FreeMarker and=
=20
JSP 2.0 can do more than Velocity, but thBinden the syntax is arguably more=
=20
complex). This has implications for consistency in the framework. My=20
opinion here is that consistency is better at the price of reduced standard=
=20
functionality in the more powerful languages. Those features can go into a=
=20
cookbook section on the wiki for example rather than a standard framework=20
library.Bind
2. Should the standard macros and tags output any markup (HTML) or simply=20
make values available in simple variable names to be used in client code=20
markup. The fBindormer is very convenient for userBinds but means they put=
=20
up with our HTML, the latter should be fine for everyone but means more=20
typing in your templates. My opinion here again is that less is more. =20
HTML for me is VERY application specific and I would feel that Spring was=20
starting to cross the line from framework/library domain to application=20
domain.
Quick example in Velocity of what is working right now with no effort=20
required from users:
<form method=3D"POST" action=3D"">
Name:=20
#springBind( "command" "name" )
<input type=3D"text" name=3D"name" value=3D"$!fieldValue" /><br>
$fieldErrors
<br>
Age:=20
#springBind( "command" "age" )
<input type=3D"text" name=3D"age" value=3D"$!fieldValue" /><br>
$fieldErrorsinclusion.
<br>
<input type=3D"submit" value=3D"submit"/>
</form>
In the above example, the springBind macro is made available to the Velocit=
y=20
runtime from the classpath with the actual file being stored in the=20
spring.jar itslef. This should wok regardless of where the application is=
=20
currently loading other templates from. Similar applies to FreeMarker.
inclusion.
What *could* be available if we output HTML is something like the following=
=20
where the input tags, values and errors are automatically output:=20
<form method=3D"POST" action=3D"">
Name:=20
#springText( "command" "name" )
<br>
Age:=20
#springText( "command" "age" )
<br>
Fav. Colors:
#springCheckbox( "command" "colorList" )
<br>
<input type=3D"submit" value=3D"submit"/>
</form>
In the latter example, it would be very difficult for a user to style the=20
HTML output efficiently. We could have them pass a variable in to the=20
macro specifying a set of attributes like a style or class attribute, but=20
it may not be enough and I just think there's no way to make this truly=20
useful for enough people to warrant doing it.
Any thoughts?
=2D --=20
Darren Davison
Public Key: http://www.davison.uk.net/pages/key.htm
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFA0ujFKLMLAN01aw0RAmDPAJ0cT6sUORY9K45xdRTpjnI+c0v+IQCePnLu
2Zq9EkkflvpOjoL3Myz2HQc=3D
=3DmnHX
=2D----END PGP SIGNATURE-----
|
|
From: Thomas R. <tho...@tr...> - 2004-06-18 12:13:27
|
I would agree that logging is more appropriate in the finally clause in this case. Thomas jürgen höller [werk3AT] wrote: >Thomas, Rod, everybody, > >There is an issue regarding DataSourceUtils.closeConnectionIfNecessary in our JIRA: > >http://opensource.atlassian.com/projects/spring/browse/SPR-172 > >This is indeed undesirable. Of course, Connection.close hardly ever throws an exception, so it's not a big problem. We could still simply log the exception as an error and proceed, like we do in JdbcUtils.closeStatement/closeResultSet. > >What do you think? > >Juergen > > >------------------------------------------------------- >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 > > > > > |