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: Juergen H. <ju...@in...> - 2005-04-27 16:30:53
|
Well, SessionFactoryUtils.closeSessionIfNecessary already catches all
declared exceptions and logs them at error level, exactly because it is
usually called in finally blocks, where the original exception should not
get overridden.
An IllegalStateException is simply unexpected there. I would have expected
an IllegalStateException thrown by a custom type to be wrapped in a
HibernateException. Anyway, I've added a catch(RuntimeException) block
there, logging any RuntimeException at error level too instead of
propagating it.
Thanks for pointing this out, Nick!
Juergen
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...]On Behalf
Of Nick Minutello
Sent: Monday, April 25, 2005 4:14 AM
To: spr...@li...
Subject: [Springframework-developer] OpenSessionInViewFilter - can lose
filter-chain exception causes
Chaps,
Just having spent some time tracking down a problem (a Hibernate
Session leak, in fact) - it seems that The OpenSessionInViewFilter is
hiding some root-cause information that I need.
The problem with try-finally's (ie no catch) is that if we are in the
finally-block because of an exception, and then we get a new exception
in the finally block, the original exception will be lost :-o.
In my particular case, the call to closeSession() on line 181 is
resulting in an IllegalStateException (way deep in a custom type in
hibernate).
This means that the exception coming out of filterChain.doFilter() on
line 172 is lost.
In my particular case the IllegalStateException is occuring as a
result of the original exception.
171 try {
172 filterChain.doFilter(request, response);
173 }
174
175 finally {
176 if (!participate) {
177 if (isSingleSession()) {
178 // single session mode
179 TransactionSynchronizationManager.unbindResource(sessionFactory);
180 logger.debug("Closing single Hibernate session in
OpenSessionInViewFilter");
181 closeSession(session, sessionFactory);
182 }
183 else {
184 // deferred close mode
185 SessionFactoryUtils.processDeferredClose(sessionFactory);
186 }
187 }
188 }
A better approach is to add a catch block and record any exception
that comes out of the filter chain - in case we get a new exception in
the finally bock:
We then have to make a choice about which we throw out. IMO, the first
exception is more interesting (but in any case, we throw one and log
the other- we dont want to lose any information)
Here is what I usually do in this situation:
Exception originalException;
171 try {
172 filterChain.doFilter(request, response);
173 }
174
catch (Exception e) {
originalException = e;
}
175 finally {
try {
176 if (!participate) {
177 if (isSingleSession()) {
178 // single session mode
179 TransactionSynchronizationManager.unbindResource(sessionFactory);
180 logger.debug("Closing single Hibernate session in
OpenSessionInViewFilter");
181 closeSession(session, sessionFactory);
182 }
183 else {
184 // deferred close mode
185 SessionFactoryUtils.processDeferredClose(sessionFactory);
186 }
187 }
catch (Exception e) {
if (originalException != null) {
// yikes we have an exception while cleaning up after
the first one!
log.error("Error while cleaning up after exception from
filter chain", e);
throw originalException;
}
throw e;
}
188 }
In some cases, I would tend towards catching Error as well as Exception.
Its quite conceivable to get a java.lang.Error - like
NoSuchMethodError - because of a runtime jar mismatch... its not
pleasant to have this hidden :-)
I have had this very problem in a home-grown Hibernate session filter...
Cheers,
-Nick
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=ick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Will B. <wil...@ra...> - 2005-04-27 16:19:16
|
So, how can I handle this with web flow? For each "request" in which a bind is not performed, it seems that I will have to add in a state that creates a binder, registers my custom editors, and sticks the bind exception model in my model. Have any other web flow users dealt with this problem? Thanks, Will On Thu, 2005-04-14 at 17:23 +0200, Juergen Hoeller wrote: > Well, the custom property editors are carried by the BindException's > BeanWrapper instance. If there is no BindException in the model, we can only > use a default BeanWrapper to obtain a property value, where there can't be > any custom editors... > > So if you want custom property editors to apply, expose the binder's > BindException through including errors.getModel() in your model. Even if > there are no errors contained in it, this will expose all custom property > editors that apply. > > Juergen > > > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...]On Behalf > Of Will Butler > Sent: Thursday, April 14, 2005 8:50 AM > To: spr...@li... > Subject: [Springframework-developer] BindStatus.value > > > All, > > When there are errors in the model, status.value is obtained from > errors.getFieldValue(expression), which executes a custom property > editor for the field if one exists. > > When there aren't errors in the model, status.value is obtained from the > bean wrapper, and custom property editors are not invoked. Why not? > > Thanks, > > Will > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: William G. T. Jr. <wg...@ru...> - 2005-04-27 12:22:36
|
I tend to agree with John...unfortunately my current status is not=20 leaving any cycles to devote to PortletMVC. We are running it in=20 production and have a continued interested in it...just don't have=20 anyone at the moment who can lead the effort. Bill John Lewis wrote: > Sorry for not weighing in on this sooner. >=20 > I agree that we really need to have a clear path for the portlet=20 > framework ASAP. Both Rainer and I have a number of updates and=20 > improvements that we need to get merged together and made available as=20 > part of the formal code base. >=20 > Bill Thompson doesn't seem to be actively working on this anymore, so I= =20 > don't think there is anyone with commit privileges that has this on=20 > their radar screen. >=20 > Juergen, I'm sure you guys are pretty busy working on getting 1.2=20 > released, but I think we really need some action on this soon. I know=20 > we had several discussions about whether this should be part of Spring'= s=20 > core or some kind of sub-project. Given that there are project like We= b=20 > Flow that are dependent on it, that seems to point more towards it goin= g=20 > into core. How would you like to proceed on this? >=20 > John Lewis > jl...@ar... >=20 >=20 >=20 > Rainer Schmitz wrote: >=20 >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Erwin, >> >> as fas as I know the CVS still holds Bill's initial code from a few >> month ago. >> As you have seen there are some contributions posted to the list or >> attached to the confluence page. I'm holding back some more >> contributions until it is clear _where_ to contribute - it doesn't mak= e >> sence to splatter the code over the mailing lists and wikis. >> >> Rainer >> >> Erwin Vervaet schrieb: >> >>> All, >>> >>> I've been integrating Portlet support into the Spring Web Flow system >>> and today I also added a portlet based version of the PhoneBook sampl= e >>> application. >>> >>> SWF Portlet support builds on the Spring Portlet MVC framework, which >>> brings me to the question: what is the status of Spring Portlet MVC? = A >>> recent discussion on the DEV list states that it will be a key featur= e >>> of Spring 1.3. However, there also seems to be a lot of confusion as = to >>> how up-to-date the sources in CVS are >>> (http://article.gmane.org/gmane.comp.java.springframework.devel/7997) >>> and who is actually working on it/maintaining it. The Wiki page >>> (http://opensource.atlassian.com/confluence/spring/display/JSR168/Hom= e) >>> also seems to given the impression that's it's not ready for prime-ti= me >>> yet. >>> >>> Since SWF is now dependent on Spring Portlet MVC, we need to make sur= e >>> it is ready for release in the 1.3 timeframe. Also, since SWF is alre= ady >>> releasing preview releases (we have preview 2 coming up this weekend!= ), >>> we need to make sure the Portlet MVC code we're shipping with that >>> (which is the code from CVS) is actually in up-to-date! >>> >>> Could somebody please try to clarify the Spring Portlet MVC situation= a >>> bit? >>> >>> Erwin Vervaet >>> erw...@er... >>> >>> >>> ------------------------------------------------------- >>> SF email is sponsored by - The IT Product Guide >>> Read honest & candid reviews on hundreds of IT Products from real use= rs. >>> Discover which products truly live up to the hype. Start reading now. >>> http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick >>> _______________________________________________ >>> Springframework-developer mailing list >>> Spr...@li... >>> https://lists.sourceforge.net/lists/listinfo/springframework-develope= r >>> >> >> >> - -- >> Rainer Schmitz >> ABAS Software AG (http://www.abas.de) >> S=FCdendstr. 42 >> 76135 Karlsruhe >> GERMANY >> |
|
From: <al...@in...> - 2005-04-26 22:35:39
|
View results here -> http://opensource.jteam.nl/build/buildresults/spring?log=log20050427001631Lbuild.255 |
|
From: Nick M. <nic...@gm...> - 2005-04-26 22:32:06
|
Hmm, I sent 2 mails to the list... havent seen any of them actually hit the list.... Regarding Hibernate Filter... If this makes it to the list, I will try again... |
|
From: John L. <jl...@ar...> - 2005-04-26 21:29:59
|
Sorry for not weighing in on this sooner. I agree that we really need to have a clear path for the portlet framework ASAP. Both Rainer and I have a number of updates and improvements that we need to get merged together and made available as part of the formal code base. Bill Thompson doesn't seem to be actively working on this anymore, so I don't think there is anyone with commit privileges that has this on their radar screen. Juergen, I'm sure you guys are pretty busy working on getting 1.2 released, but I think we really need some action on this soon. I know we had several discussions about whether this should be part of Spring's core or some kind of sub-project. Given that there are project like Web Flow that are dependent on it, that seems to point more towards it going into core. How would you like to proceed on this? John Lewis jl...@ar... Rainer Schmitz wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Erwin, > > as fas as I know the CVS still holds Bill's initial code from a few > month ago. > As you have seen there are some contributions posted to the list or > attached to the confluence page. I'm holding back some more > contributions until it is clear _where_ to contribute - it doesn't make > sence to splatter the code over the mailing lists and wikis. > > Rainer > > Erwin Vervaet schrieb: > >>All, >> >>I've been integrating Portlet support into the Spring Web Flow system >>and today I also added a portlet based version of the PhoneBook sample >>application. >> >>SWF Portlet support builds on the Spring Portlet MVC framework, which >>brings me to the question: what is the status of Spring Portlet MVC? A >>recent discussion on the DEV list states that it will be a key feature >>of Spring 1.3. However, there also seems to be a lot of confusion as to >>how up-to-date the sources in CVS are >>(http://article.gmane.org/gmane.comp.java.springframework.devel/7997) >>and who is actually working on it/maintaining it. The Wiki page >>(http://opensource.atlassian.com/confluence/spring/display/JSR168/Home) >>also seems to given the impression that's it's not ready for prime-time >>yet. >> >>Since SWF is now dependent on Spring Portlet MVC, we need to make sure >>it is ready for release in the 1.3 timeframe. Also, since SWF is already >>releasing preview releases (we have preview 2 coming up this weekend!), >>we need to make sure the Portlet MVC code we're shipping with that >>(which is the code from CVS) is actually in up-to-date! >> >>Could somebody please try to clarify the Spring Portlet MVC situation a >>bit? >> >>Erwin Vervaet >>erw...@er... >> >> >>------------------------------------------------------- >>SF email is sponsored by - The IT Product Guide >>Read honest & candid reviews on hundreds of IT Products from real users. >>Discover which products truly live up to the hype. Start reading now. >>http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >>_______________________________________________ >>Springframework-developer mailing list >>Spr...@li... >>https://lists.sourceforge.net/lists/listinfo/springframework-developer >> > > > - -- > Rainer Schmitz > ABAS Software AG (http://www.abas.de) > Südendstr. 42 > 76135 Karlsruhe > GERMANY > > PGP/GPG Id: 0xB03B50E8 > Fingerprint: A748 0A57 D4E8 5F1C A136 1A82 C3EC 6C53 B03B 50E8 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.2 (MingW32) > Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org > > iD8DBQFCWjgHw+xsU7A7UOgRAtcBAJ9Z1zrznUfy0AGSCxuqulwqmhMdcQCeMPHU > 1YIxqrhz4wf7vIcGDfcyyFk= > =BULe > -----END PGP SIGNATURE----- > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_ide95&alloc_id396&op=click |
|
From: Darren D. <da...@sh...> - 2005-04-26 19:29:36
|
1114543772
FAILED
[junit] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
[junit] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
[junit] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
[junit] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
[junit] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
[junit] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
[junit] at java.util.ArrayList.readObject(ArrayList.java:547)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
[junit] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)
[junit] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
[junit] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
[junit] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
[junit] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
[junit] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
[junit] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
[junit] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
[junit] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
[junit] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
[junit] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
[junit] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
[junit] at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:190)
[junit] at org.springframework.ui.jasperreports.JasperReportsUtilsTests.getReport(JasperReportsUtilsTests.java:150)
[junit] at org.springframework.ui.jasperreports.JasperReportsUtilsTests.testRenderAsCsvWithDataSource(JasperReportsUtilsTests.java:51)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
This is an automated mail from one of the SF Compile Farm machines.
The machine name noted in the subject encountered a failure building
or running the Spring test suite. The last few lines of the output
were included for info.
NB: No further mail will be sent from this machine until a
manual reset occurs on the cf-shell machine, although builds will
continue as scheduled.
See http://springframework.sourceforge.net/test/ for further
information.
|
|
From: Darren D. <da...@da...> - 2005-04-26 14:43:57
|
apologies - please ignore failed build notices from this machine or from amd64-linux1 that also may subsequently arrive. --=20 Darren Davison Public Key: 0xDD356B0D |
|
From: Darren D. <da...@sh...> - 2005-04-26 14:37:20
|
1114526237 FAILED Buildfile: build.xml clean: compileattr: This is an automated mail from one of the SF Compile Farm machines. The machine name noted in the subject encountered a failure building or running the Spring test suite. The last few lines of the output were included for info. NB: No further mail will be sent from this machine until a manual reset occurs on the cf-shell machine, although builds will continue as scheduled. See http://springframework.sourceforge.net/test/ for further information. |
|
From: Darren D. <da...@sh...> - 2005-04-26 12:04:25
|
|
From: David H. <dh...@ob...> - 2005-04-26 08:32:39
|
Keith,
On=20transition=20actions,=20I=20can=20see=20the=20benefits=20and=20I=20th=
ink=20I=20would=20use=20them,=20but=20quite=20often=20my=20view-states=20a=
re=20not=20simple=20enough=20for=20this=20feature.=20For=20example,=20if=20=
I=20have=20some=20action=20that=20I=20always=20invoke=20before=20continuin=
g=20to=20the=20view-state=20that=20populates=20the=20request=20with=20some=
=20necessary=20(but=20short-lived)=20reference=20data.With=20a=20transitio=
n=20action=20that=20just=20redisplays=20the=20current=20view-state,=20that=
=20action=20would=20be=20skipped=20and=20the=20reference=20data=20not=20ma=
de=20available=20in=20the=20request.=20What=20would=20be=20really=20nice=20=
would=20be=20a=20kind=20of=20setup=20action=20property=20of=20the=20view-s=
tate,=20for=20preparing=20data=20that=20the=20view=20depends=20on.=20Faili=
ng=20that,=20perhaps=20if=20you=20were=20able=20to=20specify=20a=20specifi=
c=20outcome=20state=20on=20failure,=20rather=20than=20just=20returning=20t=
o=20the=20current=20view.=20
=20
I=20like=20the=20decision=20state=20a=20lot=20as=20I=20frequently=20have=20=
long=20wizards=20with=20several=20optional=20steps,=20and=20making=20decis=
ions=20a=20first=20class=20citizen=20makes=20scanning=20the=20flow=20xml=20=
much=20clearer.=20My=20one=20gripe=20that=20I've=20always=20had=20is=20tha=
t=20if=20I=20have=20a=20bidirectional=20wizard=20with=20a=20step=20that=20=
can=20be=20skipped=20under=20some=20condition,=20I=20have=20to=20check=20s=
eparately=20when=20moving=20forwards=20and=20backwards.=20So,=20if=20your=20=
showCostOverview=20state=20were=20a=20regular=20view-state,=20you=20might=20=
have=20a=20'back'=20transition=20that=20would=20need=20to=20hit=20a=20sepa=
rate=20decision=20like:
=20
=20=20=20<decision-state=20id=3D"requiresShippingBackwards">=20
=20=20=20=20=20=20<if=20test=3D"${flowScope.sale.shipping}"=20then=3D"ente=
rShippingDetails"=20else=3D"enterCategory"/>=20
=20=20=20</decision-state>=20
=20
I=20don't=20know=20of=20a=20way=20round=20this,=20although=20something=20l=
ike=20the=20following=20is=20close=20to=20what=20I=20want=20to=20do:
=20
=20=20=20<action-state=20id=3D"requiresShipping">=20
=20=20=20=20=20=20<action=20class=3D"org.springframework.web.flow.action.D=
ecisionAction">=20
=20=20=20=20=20=20=20=20=20<property=20name=3D"criteria"=20value=3D"${flow=
Scope.sale.shipping}"/>=20
=20=20=20=20=20=20</action>=20
=20=20=20=20=20=20<transition=20on=3D"required"=20to=3D"enterShippingDetai=
ls"/>=20
=20=20=20=20=20=20<transition=20on=3D"skipForward"=20to=3D"showCostOvervie=
w"/>=20
=20=20=20=20=20=20<transition=20on=3D"skipBackward"=20to=3D"enteryCategory=
"/>=20
=20=20=20</action-state>=20
=20
This=20would=20require=20the=20action=20to=20be=20aware=20of=20some=20para=
meter=20indicating=20directionality=20that=20you=20would=20have=20to=20sup=
ply=20in=20the=20invoking=20state=20or=20action.=20Right=20now,=20I'm=20ha=
ppy=20with=20duplicating=20decisions,=20especially=20given=20the=20tersene=
ss=20of=20the=20definition,=20but=20if=20you=20have=20a=20solution=20I'd=20=
be=20keen=20to=20hear=20it!
=20
-Dave
________________________________
From:=20s...@li...=20on=20behal=
f=20of=20Keith=20Donald
Sent:=20Mon=2025/04/2005=2007:26
To:=20s...@li...
Subject:=20[Springframework-developer]=20SWF=20PR3=20features=20-=20seekin=
g=20feedback
The=20SWF=20team=20has=20gotten=20closer=20to=20finalizing=20the=20major=20=
new=20features=20for=20PR3.=20=20After=20debating=20these=20vigorously=20t=
his=20weekend,=20we're=20pretty=20happy=20with=20them-but=20are=20seeking=20=
additional=20feedback.
Here=20they=20are,=20all=20available=20now=20in=20CVS:=20
-=20Transition=20actions:=20on=20the=20occurrence=20of=20an=20event,=20thi=
s=20provides=20the=20ability=20to=20execute=20an=20action=20after=20a=20st=
ate=20transition=20is=20matched=20but=20before=20the=20transition=20is=20e=
xecuted.=20=20In=20this=20case,=20the=20action=20result=20event=20is=20ada=
pted=20to=20a=20boolean=20expression--if=20true,=20the=20transition=20to=20=
the=20target=20state=20proceeds,=20if=20false,=20the=20current=20state=20i=
s=20re-entered.=20By=20default=20a=20'success'=20action=20result=20is=20ma=
pped=20to=20true,=20anything=20else=20is=20mapped=20to=20false.
The=20biggest=20use-case=20for=20this=20is=20in=20executing=20so-called=20=
'cross-cutting'=20actions=20that=20have=20a=20logical=20'success'=20or=20'=
error'=20result=20--=20like=20bindAndValidate.=20
Here's=20an=20example:=20
Code:
=20=20=20<view-state=20id=3D"enterPriceAndItemCount"=20view=3D"priceAndIte=
mCountForm">=20
=20=20=20=20=20=20<transition=20on=3D"submit"=20to=3D"enterCategory">=20
=20=20=20=20=20=20=20=20=20<action=20bean=3D"sellItemAction"=20method=3D"b=
indAndValidate">=20
=20=20=20=20=20=20=20=20=20=20=20=20<property=20name=3D"validatorMethod"=20=
value=3D"validatePriceAndItemCount"/>=20
=20=20=20=20=20=20=20=20=20</action>=20
=20=20=20=20=20=20</transition>=20
=20=20=20</view-state>=20
This=20reduces=20flow=20def=20LoC=20substantially=20in=20the=20typical=20'=
wizard'=20flow=20cases,=20as=20previously=20you=20were=20forced=20to=20def=
ine=20a=20separate=20action=20state=20for=20each=20ViewState=20needing=20'=
on=20submit'=20bindAndValidate=20behaivior.=20
-=20Enhanced=20FlowExecutionListener=20lifecycle=20callbacks,=20including=20=
new=20'flowStarting',=20and=20'stateEntering'=20and=20'stateEntered'=20met=
hods.=20The=20first=20two=20can=20be=20used=20to=20test=20state=20precondi=
tions=20(invariants=20that=20must=20hold=20true=20for=20a=20new=20state=20=
to=20be=20allowed=20to=20enter).=20'stateEntered'=20can=20be=20used=20to=20=
test=20state=20postconditions=20(invariants=20that=20must=20hold=20true=20=
after=20a=20state=20has=20entered).=20The=20new=20'StateConditionTester'=20=
strategy=20makes=20this=20easily=20pluggable=20behind=20a=20simple=20facad=
e=20interface.=20'Sell=20item'=20demonstrates=20this=20in=20CVS=20now-spec=
ifically,=20treating=20a=20user=20role-security-check=20as=20a=20state=20p=
recondition.
-=20State=20properties.=20States=20can=20now=20have=20arbitrary=20property=
=20metadata,=20just=20like=20actions.=20For=20example:=20
Code:
=20=20=20<action-state=20id=3D"setupForm">=20
=20=20=20=20=20=20<action=20bean=3D"sellItemAction"/>=20
=20=20=20=20=20=20<transition=20on=3D"success"=20to=3D"enterPriceAndItemCo=
unt"/>=20
=20=20=20=20=20=20<property=20name=3D"role"=20value=3D"manager"/>=20
=20=20=20</action-state>=20
The=20above=20example=20assigns=20the=20'role'=20property=20to=20the=20'se=
tupForm'=20state=20with=20value=20'manager'.=20
State=20properties=20can=20be=20reasoned=20on=20by=20StateConditionTesters=
,=20views,=20or=20actions.=20For=20example,=20the=20SellItemStateCondition=
Tester=20checks=20the=20'role'=20property=20for=20the=20state=20that=20has=
=20been=20requested=20to=20enter=20and=20verifies=20the=20authenticated=20=
user=20has=20that=20role=20before=20allowing=20the=20state=20transition=20=
to=20complete.=20
-=20A=20decision=20state=20and=20a=20decision=20action.=20These=20construc=
ts=20allow=20you=20to=20evaluate=20one=20or=20more=20expressions=20to=20de=
cide=20"where=20to=20go=20next"=20in=20a=20reusable=20way:=20
The=20decision=20state:=20
Code:
=20=20=20<decision-state=20id=3D"requiresShipping">=20
=20=20=20=20=20=20<if=20test=3D"${flowScope.sale.shipping}"=20then=3D"ente=
rShippingDetails"=20else=3D"showCostOverview"/>=20
=20=20=20</decision-state>=20
The=20equivalent=20decision=20action:=20
Code:
=20=20=20<action-state=20id=3D"requiresShipping">=20
=20=20=20=20=20=20<action=20class=3D"org.springframework.web.flow.action.D=
ecisionAction">=20
=20=20=20=20=20=20=20=20=20<property=20name=3D"criteria"=20value=3D"${flow=
Scope.sale.shipping}"/>=20
=20=20=20=20=20=20</action>=20
=20=20=20=20=20=20<transition=20on=3D"true"=20to=3D"enterShippingDetails"/=
>=20
=20=20=20=20=20=20<transition=20on=3D"false"=20to=3D"showCostOverview"/>=20=
=20=20=20</action-state>=20
Erwin=20and=20I=20have=20debated=20whether=20we=20really=20need=20first=20=
class=20support=20for=20the=20decision=20state=20(as=20you=20could=20use=20=
the=20DecisionAction=20from=20a=20action=20state),=20but=20it=20just=20see=
ms=20so=20elegant=20and=20sexy=20and=20flexible,=20with=20little=20introdu=
ced=20complexity--so=20right=20now=20we=20feel=20its=20a=20keeper.=20Pleas=
e=20let=20us=20know=20if=20you=20agree=20or=20disagree.
Putting=20it=20all=20together,=20from=20sell=20item:=20
Before=20new=20PR3=20features:=20
Code:
<?xml=20version=3D"1.0"=20encoding=3D"UTF-8"?>=20
<!DOCTYPE=20webflow=20PUBLIC=20"-//SPRING//DTD=20WEBFLOW//EN"=20
=20=20=20"http://www.springframework.org/dtd/spring-webflow.dtd">=20
<webflow=20id=3D"sellItem"=20start-state=3D"setupForm">=20
=20=20=20<action-state=20id=3D"setupForm">=20
=20=20=20=20=20=20<action=20bean=3D"sellItemAction"/>=20
=20=20=20=20=20=20<transition=20on=3D"success"=20to=3D"enterPriceAndItemCo=
unt"/>=20
=20=20=20</action-state>=20
=20=20=20<view-state=20id=3D"enterPriceAndItemCount"=20view=3D"priceAndIte=
mCountForm">=20
=20=20=20=20=20=20<transition=20on=3D"submit"=20to=3D"bindAndValidatePrice=
AndItemCount"/>=20
=20=20=20</view-state>=20
=20=20=20=20
=20=20=20<action-state=20id=3D"bindAndValidatePriceAndItemCount">=20
=20=20=20=20=20=20<action=20bean=3D"sellItemAction"=20method=3D"bindAndVal=
idate">=20
=20=20=20=20=20=20=20=20=20<property=20name=3D"validatorMethod"=20value=3D=
"validatePriceAndItemCount"/>=20
=20=20=20=20=20=20</action>=20
=20=20=20=20=20=20<transition=20on=3D"success"=20to=3D"enterCategory"/>=20=
=20=20=20=20=20=20<transition=20on=3D"error"=20to=3D"enterPriceAndItemCoun=
t"/>=20
=20=20=20</action-state>=20
=20=20=20=20
=20=20=20<view-state=20id=3D"enterCategory"=20view=3D"categoryForm">=20
=20=20=20=20=20=20<transition=20on=3D"submit"=20to=3D"bindAndValidateCateg=
ory"/>=20
=20=20=20</view-state>=20
=20=20=20<action-state=20id=3D"bindAndValidateCategory">=20
=20=20=20=20=20=20<action=20bean=3D"sellItemAction"=20method=3D"bindAndVal=
idate"/>=20
=20=20=20=20=20=20<transition=20on=3D"${#result=20=3D=3D=20'success'=20and=
=20flowScope.sale.shipping}"=20to=3D"enterShippingDetails"/>=20
=20=20=20=20=20=20<transition=20on=3D"${#result=20=3D=3D=20'success'=20and=
=20!flowScope.sale.shipping}"=20to=3D"showCostOverview"/>=20
=20=20=20=20=20=20<transition=20on=3D"error"=20to=3D"enterCategory"/>=20
=20=20=20</action-state>=20
=20=20=20=20
=20=20=20<view-state=20id=3D"enterShippingDetails"=20view=3D"shippingDetai=
lsForm">=20
=20=20=20=20=20=20<transition=20on=3D"submit"=20to=3D"bindAndValidateShipp=
ingDetails"/>=20
=20=20=20</view-state>=20
=20=20=20<action-state=20id=3D"bindAndValidateShippingDetails">=20
=20=20=20=20=20=20<action=20bean=3D"sellItemAction"=20method=3D"bindAndVal=
idate"/>=20
=20=20=20=20=20=20<transition=20on=3D"success"=20to=3D"showCostOverview"/>=
=20
=20=20=20=20=20=20<transition=20on=3D"error"=20to=3D"enterShippingDetails"=
/>=20
=20=20=20</action-state>=20
=20=20=20=20
=20=20=20<end-state=20id=3D"showCostOverview"=20view=3D"costOverview"/>=20=
</webflow>=20
After=20New=20PR3=20Features:
Code:
<webflow=20id=3D"sellItem"=20start-state=3D"setupForm">=20
=20=20=20<action-state=20id=3D"setupForm">=20
=20=20=20=20=20=20<action=20bean=3D"sellItemAction"/>=20
=20=20=20=20=20=20<transition=20on=3D"success"=20to=3D"enterPriceAndItemCo=
unt"/>=20
=20=20=20=20=20=20<property=20name=3D"role"=20value=3D"manager"/>=20
=20=20=20</action-state>=20
=20=20=20<view-state=20id=3D"enterPriceAndItemCount"=20view=3D"priceAndIte=
mCountForm">=20
=20=20=20=20=20=20<transition=20on=3D"submit"=20to=3D"enterCategory">=20
=20=20=20=20=20=20=20=20=20<action=20bean=3D"sellItemAction"=20method=3D"b=
indAndValidate">=20
=20=20=20=20=20=20=20=20=20=20=20=20<property=20name=3D"validatorMethod"=20=
value=3D"validatePriceAndItemCount"/>=20
=20=20=20=20=20=20=20=20=20</action>=20
=20=20=20=20=20=20</transition>=20
=20=20=20</view-state>=20
=20=20=20<view-state=20id=3D"enterCategory"=20view=3D"categoryForm">=20
=20=20=20=20=20=20<transition=20on=3D"submit"=20to=3D"requiresShipping">=20=
=20=20=20=20=20=20=20=20=20<action=20bean=3D"sellItemAction"=20method=3D"b=
indAndValidate"/>=20
=20=20=20=20=20=20</transition>=20
=20=20=20</view-state>=20
=20=20=20<decision-state=20id=3D"requiresShipping">=20
=20=20=20=20=20=20<if=20test=3D"${flowScope.sale.shipping}"=20then=3D"ente=
rShippingDetails"=20else=3D"showCostOverview"/>=20
=20=20=20</decision-state>=20
=20=20=20<view-state=20id=3D"enterShippingDetails"=20view=3D"shippingDetai=
lsForm">=20
=20=20=20=20=20=20<transition=20on=3D"submit"=20to=3D"showCostOverview">=20=
=20=20=20=20=20=20=20=20=20<action=20bean=3D"sellItemAction"=20method=3D"b=
indAndValidate"/>=20
=20=20=20=20=20=20</transition>=20
=20=20=20</view-state>=20
=20=20=20<end-state=20id=3D"showCostOverview"=20view=3D"costOverview"/>=20=
</webflow>=20
_________________
Keith=20Donald=20
Interface21=20-=20http://www.springframework.com=20-=20Spring=20Training,=20=
Consulting,=20and=20Support=20-=20"From=20the=20Source"
________________________________________________________________________
This=20e-mail=20has=20been=20scanned=20for=20all=20viruses=20by=20Star.=20=
The
service=20is=20powered=20by=20MessageLabs.=20For=20more=20information=20on=
=20a=20proactive
anti-virus=20service=20working=20around=20the=20clock,=20around=20the=20gl=
obe,=20visit:
http://www.star.net.uk
________________________________________________________________________
________________________________________________________________________
This=20e-mail=20has=20been=20scanned=20for=20all=20viruses=20by=20Star.=20=
The
service=20is=20powered=20by=20MessageLabs.=20For=20more=20information=20on=
=20a=20proactive
anti-virus=20service=20working=20around=20the=20clock,=20around=20the=20gl=
obe,=20visit:
http://www.star.net.uk
________________________________________________________________________ |
|
From: <al...@in...> - 2005-04-25 22:35:20
|
View results here -> http://opensource.jteam.nl/build/buildresults/spring?log=log20050426001630Lbuild.254 |
|
From: Michael E. M. <mm...@re...> - 2005-04-25 20:41:55
|
In HIbernate3 HibernateTemplate.java I see only two places where
SessionFactoryUtils.applyTransactionTimeout()
is being called..
Am I correct that it's called only with queries, and not
inserts/updates????????
(ie; prepareQuery() and prepareCriteria()).
HibernateTemplate.java:
protected void prepareQuery(Query queryObject) {
if (isCacheQueries()) {
queryObject.setCacheable(true);
if (getQueryCacheRegion() != null) {
queryObject.setCacheRegion(getQueryCacheRegion());
}
}
SessionFactoryUtils.applyTransactionTimeout(queryObject,
getSessionFactory());
}
I have been trying to debug why transaction timeout exceptions are not
being thrown when they should.
(setting a timeout value in a
org.springframework.transaction.interceptor.TransactionProxyFactoryBean
config entry)
<bean id="orderService"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="target"><ref local="orderServiceTarget"/></property>
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="validateOrder">PROPAGATION_SUPPORTS,
timeout_5, readOnly</prop>
<prop key="captureOrder">PROPAGATION_REQUIRED,
timeout_5, +CanopicException</prop>
</props>
</property>
</bean>
|
|
From: Roman R. <r.r...@we...> - 2005-04-25 15:13:56
|
> Hi Roman, > > As we have heard about this rather strange behavior before, ContextLoader > has been reworked for 1.2 RC2: It keeps a reference to the root > WebApplicationContext instance that it creates now, closing exactly that > context instance on shutdown of the web application. > > Hence, it doesn't matter anymore whether the ServletContext attribute is > still available when ContextLoaderListener gets called. Arguably, the > Servlet engine should remove the ServletContext attributes *after* calling > all listeners (which all Servlet engines seemed to do) - but we're not > relying on that behavior anymore now. > > Please give Spring 1.2 RC2 a try and let me know whether it works for you! > > Juergen Yes, with RC2 it=B4s working fine. No problems anymore. Thanks! Roman > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...]On Behalf > Of Roman Roelofsen > Sent: Friday, April 22, 2005 11:21 PM > To: spr...@li... > Subject: [Springframework-developer] DisposableBean / destroy-method -> > never gets called > > > Hi Spring developers! > > I=B4m using Spring for my current WebApp project and I found a strange > behaviour of Spring. > > I=B4m not sure if I=B4m doing something wrong or if it=B4s a bug. So, per= haps you > can take a look at. > > First, here is my posting in the Spring forum which describes my problem: > http://forum.springframework.org/viewtopic.php?t=3D5003 > > I tried to debug Spring to track the problem down. Here=B4s what I have: > > 1. All beans which are implementing the interface DisposableBean are stor= ed > in the map AbstractBeanFactory.disposableBeans. But the method > AbstractBeanFactory.destroySingletons() gets only called for the factory > "-servlet.xml", not for the other two xml files. > > 2. On shutdown, ContextLoaderListener.contextDestroyed() calls > ContextLoader.closeWebApplicationContext(). But > > servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CO= NT >E XT_ATTRIBUTE); > > always returns null. Perhaps the ServletContext is destroyed when the > Listener gets informed? While my app is running, > > servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CO= NT >E XT_ATTRIBUTE); > > returns the correct application context. > > I=B4m shutting down my webapp with the url: > http://localhost:8080/manager/stop?path=3D/mywebapp > > My environment: > Tomcat 5.5.7 > Java 1.5 > Spring 1.2RC1 > > Please let me know if you need more information. > > > Best regards, > > Roman |
|
From: Nick M. <nic...@gm...> - 2005-04-25 09:36:33
|
Hmm, either there is a biig delay in the mailing list - or this mail
went missing....
Just in case, here it is again...
Cheese,
Nick
---------- Forwarded message ----------
From: Nick Minutello <nic...@gm...>
Date: Apr 25, 2005 3:13 AM
Subject: OpenSessionInViewFilter - can lose filter-chain exception causes
To: spr...@li...
Chaps,
Just having spent some time tracking down a problem (a Hibernate
Session leak, in fact) - it seems that The OpenSessionInViewFilter is
hiding some root-cause information that I need.
The problem with try-finally's (ie no catch) is that if we are in the
finally-block because of an exception, and then we get a new exception
in the finally block, the original exception will be lost :-o.
In my particular case, the call to closeSession() on line 181 is
resulting in an IllegalStateException (way deep in a custom type in
hibernate).
This means that the exception coming out of filterChain.doFilter() on
line 172 is lost.
In my particular case the IllegalStateException is occuring as a
result of the original exception.
171 try {
172 filterChain.doFilter(request, response);
173 }
174
175 finally {
176 if (!participate) {
177 if (isSingleSession()) {
178 // single session mode
179 TransactionSynchronizationManager.unbindResource(sessionFactory);
180 logger.debug("Closing single Hibernate session in
OpenSessionInViewFilter");
181 closeSession(session, sessionFactory);
182 }
183 else {
184 // deferred close mode
185 SessionFactoryUtils.processDeferredClose(sessionFactory);
186 }
187 }
188 }
A better approach is to add a catch block and record any exception
that comes out of the filter chain - in case we get a new exception in
the finally bock:
We then have to make a choice about which we throw out. IMO, the first
exception is more interesting (but in any case, we throw one and log
the other- we dont want to lose any information)
Here is what I usually do in this situation:
Exception originalException;
171 try {
172 filterChain.doFilter(request, response);
173 }
174
catch (Exception e) {
originalException =3D e;
}
175 finally {
try {
176 if (!participate) {
177 if (isSingleSession()) {
178 // single session mode
179 TransactionSynchronizationManager.unbindResource(sessionFactory);
180 logger.debug("Closing single Hibernate session in
OpenSessionInViewFilter");
181 closeSession(session, sessionFactory);
182 }
183 else {
184 // deferred close mode
185 SessionFactoryUtils.processDeferredClose(sessionFactory);
186 }
187 }
catch (Exception e) {
if (originalException !=3D null) {
// yikes we have an exception while cleaning up after
the first one!
log.error("Error while cleaning up after exception from
filter chain", e);
throw originalException;
}
throw e;
}
188 }
In some cases, I would tend towards catching Error as well as Exception.
Its quite conceivable to get a java.lang.Error - like
NoSuchMethodError - because of a runtime jar mismatch... its not
pleasant to have this hidden :-)
I have had this very problem in a home-grown Hibernate session filter...
Cheers,
-Nick
|
|
From: Keith D. <ke...@in...> - 2005-04-25 06:26:57
|
The SWF team has gotten closer to finalizing the major new features for PR3.
After debating these vigorously this weekend, we're pretty happy with
them-but are seeking additional feedback.
Here they are, all available now in CVS:
- Transition actions: on the occurrence of an event, this provides the
ability to execute an action after a state transition is matched but before
the transition is executed. In this case, the action result event is
adapted to a boolean expression--if true, the transition to the target state
proceeds, if false, the current state is re-entered. By default a 'success'
action result is mapped to true, anything else is mapped to false.
The biggest use-case for this is in executing so-called 'cross-cutting'
actions that have a logical 'success' or 'error' result -- like
bindAndValidate.
Here's an example:
Code:
<view-state id="enterPriceAndItemCount" view="priceAndItemCountForm">
<transition on="submit" to="enterCategory">
<action bean="sellItemAction" method="bindAndValidate">
<property name="validatorMethod"
value="validatePriceAndItemCount"/>
</action>
</transition>
</view-state>
This reduces flow def LoC substantially in the typical 'wizard' flow cases,
as previously you were forced to define a separate action state for each
ViewState needing 'on submit' bindAndValidate behaivior.
- Enhanced FlowExecutionListener lifecycle callbacks, including new
'flowStarting', and 'stateEntering' and 'stateEntered' methods. The first
two can be used to test state preconditions (invariants that must hold true
for a new state to be allowed to enter). 'stateEntered' can be used to test
state postconditions (invariants that must hold true after a state has
entered). The new 'StateConditionTester' strategy makes this easily
pluggable behind a simple facade interface. 'Sell item' demonstrates this in
CVS now-specifically, treating a user role-security-check as a state
precondition.
- State properties. States can now have arbitrary property metadata, just
like actions. For example:
Code:
<action-state id="setupForm">
<action bean="sellItemAction"/>
<transition on="success" to="enterPriceAndItemCount"/>
<property name="role" value="manager"/>
</action-state>
The above example assigns the 'role' property to the 'setupForm' state with
value 'manager'.
State properties can be reasoned on by StateConditionTesters, views, or
actions. For example, the SellItemStateConditionTester checks the 'role'
property for the state that has been requested to enter and verifies the
authenticated user has that role before allowing the state transition to
complete.
- A decision state and a decision action. These constructs allow you to
evaluate one or more expressions to decide "where to go next" in a reusable
way:
The decision state:
Code:
<decision-state id="requiresShipping">
<if test="${flowScope.sale.shipping}" then="enterShippingDetails"
else="showCostOverview"/>
</decision-state>
The equivalent decision action:
Code:
<action-state id="requiresShipping">
<action class="org.springframework.web.flow.action.DecisionAction">
<property name="criteria" value="${flowScope.sale.shipping}"/>
</action>
<transition on="true" to="enterShippingDetails"/>
<transition on="false" to="showCostOverview"/>
</action-state>
Erwin and I have debated whether we really need first class support for the
decision state (as you could use the DecisionAction from a action state),
but it just seems so elegant and sexy and flexible, with little introduced
complexity--so right now we feel its a keeper. Please let us know if you
agree or disagree.
Putting it all together, from sell item:
Before new PR3 features:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE webflow PUBLIC "-//SPRING//DTD WEBFLOW//EN"
"http://www.springframework.org/dtd/spring-webflow.dtd">
<webflow id="sellItem" start-state="setupForm">
<action-state id="setupForm">
<action bean="sellItemAction"/>
<transition on="success" to="enterPriceAndItemCount"/>
</action-state>
<view-state id="enterPriceAndItemCount" view="priceAndItemCountForm">
<transition on="submit" to="bindAndValidatePriceAndItemCount"/>
</view-state>
<action-state id="bindAndValidatePriceAndItemCount">
<action bean="sellItemAction" method="bindAndValidate">
<property name="validatorMethod"
value="validatePriceAndItemCount"/>
</action>
<transition on="success" to="enterCategory"/>
<transition on="error" to="enterPriceAndItemCount"/>
</action-state>
<view-state id="enterCategory" view="categoryForm">
<transition on="submit" to="bindAndValidateCategory"/>
</view-state>
<action-state id="bindAndValidateCategory">
<action bean="sellItemAction" method="bindAndValidate"/>
<transition on="${#result == 'success' and flowScope.sale.shipping}"
to="enterShippingDetails"/>
<transition on="${#result == 'success' and !flowScope.sale.shipping}"
to="showCostOverview"/>
<transition on="error" to="enterCategory"/>
</action-state>
<view-state id="enterShippingDetails" view="shippingDetailsForm">
<transition on="submit" to="bindAndValidateShippingDetails"/>
</view-state>
<action-state id="bindAndValidateShippingDetails">
<action bean="sellItemAction" method="bindAndValidate"/>
<transition on="success" to="showCostOverview"/>
<transition on="error" to="enterShippingDetails"/>
</action-state>
<end-state id="showCostOverview" view="costOverview"/>
</webflow>
After New PR3 Features:
Code:
<webflow id="sellItem" start-state="setupForm">
<action-state id="setupForm">
<action bean="sellItemAction"/>
<transition on="success" to="enterPriceAndItemCount"/>
<property name="role" value="manager"/>
</action-state>
<view-state id="enterPriceAndItemCount" view="priceAndItemCountForm">
<transition on="submit" to="enterCategory">
<action bean="sellItemAction" method="bindAndValidate">
<property name="validatorMethod"
value="validatePriceAndItemCount"/>
</action>
</transition>
</view-state>
<view-state id="enterCategory" view="categoryForm">
<transition on="submit" to="requiresShipping">
<action bean="sellItemAction" method="bindAndValidate"/>
</transition>
</view-state>
<decision-state id="requiresShipping">
<if test="${flowScope.sale.shipping}" then="enterShippingDetails"
else="showCostOverview"/>
</decision-state>
<view-state id="enterShippingDetails" view="shippingDetailsForm">
<transition on="submit" to="showCostOverview">
<action bean="sellItemAction" method="bindAndValidate"/>
</transition>
</view-state>
<end-state id="showCostOverview" view="costOverview"/>
</webflow>
_________________
Keith Donald
Interface21 - http://www.springframework.com - Spring Training, Consulting,
and Support - "From the Source"
|
|
From: Nick M. <nic...@gm...> - 2005-04-25 02:14:00
|
Chaps,=20
Just having spent some time tracking down a problem (a Hibernate
Session leak, in fact) - it seems that The OpenSessionInViewFilter is
hiding some root-cause information that I need.
The problem with try-finally's (ie no catch) is that if we are in the
finally-block because of an exception, and then we get a new exception
in the finally block, the original exception will be lost :-o.
In my particular case, the call to closeSession() on line 181 is
resulting in an IllegalStateException (way deep in a custom type in
hibernate).
This means that the exception coming out of filterChain.doFilter() on
line 172 is lost.
In my particular case the IllegalStateException is occuring as a
result of the original exception.
171 try {
172 filterChain.doFilter(request, response);
173 }
174
175 finally {
176 if (!participate) {
177 if (isSingleSession()) {
178 // single session mode
179 TransactionSynchronizationManager.unbindResource(sessionFactory);
180 logger.debug("Closing single Hibernate session in
OpenSessionInViewFilter");
181 closeSession(session, sessionFactory);
182 }
183 else {
184 // deferred close mode
185 SessionFactoryUtils.processDeferredClose(sessionFactory);
186 }
187 }
188 }
A better approach is to add a catch block and record any exception
that comes out of the filter chain - in case we get a new exception in
the finally bock:
We then have to make a choice about which we throw out. IMO, the first
exception is more interesting (but in any case, we throw one and log
the other- we dont want to lose any information)
Here is what I usually do in this situation:
Exception originalException; =20
171 try {
172 filterChain.doFilter(request, response);
173 }
174
catch (Exception e) {
originalException =3D e;
}
175 finally {
try {
176 if (!participate) {
177 if (isSingleSession()) {
178 // single session mode
179 TransactionSynchronizationManager.unbindResource(sessionFactory);
180 logger.debug("Closing single Hibernate session in
OpenSessionInViewFilter");
181 closeSession(session, sessionFactory);
182 }
183 else {
184 // deferred close mode
185 SessionFactoryUtils.processDeferredClose(sessionFactory);
186 }
187 }
catch (Exception e) {
if (originalException !=3D null) {
// yikes we have an exception while cleaning up after
the first one!
log.error("Error while cleaning up after exception from
filter chain", e);
throw originalException;
}
throw e;
}
188 }
In some cases, I would tend towards catching Error as well as Exception.
Its quite conceivable to get a java.lang.Error - like
NoSuchMethodError - because of a runtime jar mismatch... its not
pleasant to have this hidden :-)
I have had this very problem in a home-grown Hibernate session filter...
Cheers,
-Nick
|
|
From: <al...@in...> - 2005-04-24 22:35:18
|
View results here -> http://opensource.jteam.nl/build/buildresults/spring?log=log20050425001655Lbuild.253 |
|
From: Mark St G. <stg...@ca...> - 2005-04-24 21:11:49
|
Hi Juergen,
I did a little double-checking with WAS 6 and the
WebSphereTransactionManagerFactoryBean.
I created 2 services (Service A and Service B), each of which delegate to a
DAO (Hibernate implementations) to persist one record .
Service A
-> Service B -> DAO B
-> DAO A
PROPAGATION_REQUIRES_NEW
I configured Service A to use standard REQUIRED and Service B to use
REQUIRES_NEW
I tested having Service A call Service B, and I verified that Service B
definitely runs in its own txn.
The outer transaction (Service A) suspends and resumes, even when the inner
(Service B) txn rolls back.
PROPAGATION_NOT_SUPPORTED
I also tried Service B with NOT_SUPPORTED regarding transaction suspension
/ resume
and I expected that the outer transaction to commit and the inner
transaction to have "no transactionality".
However, from looking in the database, I see 2 records.
It seems that the Service B transaction is committed when I expected there
would be no transaction.
The outer transaction should have no affect on the inner (NOT_SUPPORTED)
transaction. (correct ?)
Anyway, I will investigate further... however after testing this a few
times.. it seems that NOT_SUPPORTED propagation
isnt working on WAS 6...
Thoughts?
Cheers,
Mark
"Juergen Hoeller"
<juergen@interfac
e21.com> To
Sent by: <spr...@li...
springframework-d urceforge.net>
eveloper-admin@li cc
sts.sourceforge.n
et Subject
Re: [Springframework-developer] WAS
6.0 TransactionManager Lookup
04/24/2005 09:11
AM
Please respond to
springframework-d
eveloper
Hi Mark,
It would be great if you could double-check that our current
WebSphereTransactionManagerFactoryBean works properly on WebSphere 6.0!
The main feature to test here is transaction suspension as provided by
Spring's JtaTransactionManager, through specifying PROPAGATION_REQUIRES_NEW
for methods that will be run within an existing transaction. This should
lead to suspend and resume calls on the JTA TransactionManager, as located
by WebSphereTransactionManagerFactoryBean.
If transaction suspension works properly on WebSphere 6.0, I see no need to
change anything, in particular no need to use WebSphere's extended JTA
synchronization mechanism. I couldn't figure out what actual problem they
encountered in Hibernate either... but it seemed to have to do with JTA
transaction synchronization, which they need - but we don't.
The advantage of Spring's JTA usage style is that the JTA UserTransaction
is
perfectly sufficient as long as you don't need transaction suspension. Only
when using PROPAGATION_REQUIRES_NEW or PROPAGATION_NOT_SUPPORTED and
actually encountering an existing transaction, a JTA TransactionManager
reference has to be provided.
Juergen
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...]On Behalf
Of Mark St Godard
Sent: Friday, April 22, 2005 5:19 AM
To: spr...@li...
Subject: Re: [Springframework-developer] WAS 6.0 TransactionManager
Lookup
Juergen et al
Was looking a bit more into that Hibernate 3.0.1 changelog entry regarding
WAS 6 Transaction Manager Factory.
Seems to stem from this original Hibernate 3 JIRA issue:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-198
I am using Websphere 6 and I did use the same stock config that I had in
WAS 5.1.
From what I can tell the Transaction Manager Factory class is still:
com.ibm.ws.Transaction.TransactionManagerFactory
I have started a project (and before downgrading my config back to straight
Hibernate transactions)
it seemed to work for me.
After reading the JIRA issue HHH-198... the user that this stemed from...
it looks like he is using WAS 5.1.2?
Why are they talking about WAS 6?
Anyway, seems a little confusing to me.... I am not sure exactly what
they fixed.
From Gavin's code in
com.hibernate.transaction.WebSphereExtendedTransactionLookup
it looks like they implemented an adapter to the Extended JTA Transaction
Manager and Transaction...
Anyway, I am curious if the Spring transaction management codebase needs an
equivilent change?
Again, from reading the Hibernate JIRA posts.. and from actually using WAS
6 with Hibernate 3.0 and Spring 1.2 RC2...
curious what the issue really is?
Thoughts?
Cheers,
Mark
"Juergen Hoeller"
<juergen@interfac
e21.com> To
Sent by: <spr...@li...
springframework-d urceforge.net>
eveloper-admin@li cc
sts.sourceforge.n
et Subject
Re: [Springframework-developer] WAS
6.0 TransactionManager Lookup
04/21/2005 07:03
AM
Please respond to
springframework-d
eveloper
Yes, we should cover WebSphere 6.0 too - I'll do that for 1.2 final.
Juergen
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...]On Behalf
Of Dmitriy Kopylenko
Sent: Thursday, April 21, 2005 2:01 PM
To: spr...@li...
Subject: Re: [Springframework-developer] WAS 6.0 TransactionManager
Lookup
There is WebSphereTransactionManagerFactoryBean which is used to lookup
jta TransactionManager implementation for WebSphere versions 4, 5.0, and
5.1, not 6.0
May be we should modify it to add 6.0 lookup code?
Dmitriy.
Claus Ibsen wrote:
>Hi
>
>I was reading the changelog for Hibernate 3.01 and discovered:
>* fixed TransactionManager lookup (again) for WAS 6.0
>
>I recall there was something about Spring using a similar strategy to
lookup the
>TM in WAS as Hibernate does.
>
>Just though I would raise a flag if there could be a issue.
>
>
>Kind regards
>
>Claus
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: New Crystal Reports XI.
>Version 11 adds new functionality designed to reduce time involved in
>creating, integrating, and deploying reporting solutions. Free runtime
info,
>new features, or free trial, at: http://www.businessobjects.com/devxi/728
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime
info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime
info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Juergen H. <ju...@in...> - 2005-04-24 14:12:03
|
Hi Mark, It would be great if you could double-check that our current WebSphereTransactionManagerFactoryBean works properly on WebSphere 6.0! The main feature to test here is transaction suspension as provided by Spring's JtaTransactionManager, through specifying PROPAGATION_REQUIRES_NEW for methods that will be run within an existing transaction. This should lead to suspend and resume calls on the JTA TransactionManager, as located by WebSphereTransactionManagerFactoryBean. If transaction suspension works properly on WebSphere 6.0, I see no need to change anything, in particular no need to use WebSphere's extended JTA synchronization mechanism. I couldn't figure out what actual problem they encountered in Hibernate either... but it seemed to have to do with JTA transaction synchronization, which they need - but we don't. The advantage of Spring's JTA usage style is that the JTA UserTransaction is perfectly sufficient as long as you don't need transaction suspension. Only when using PROPAGATION_REQUIRES_NEW or PROPAGATION_NOT_SUPPORTED and actually encountering an existing transaction, a JTA TransactionManager reference has to be provided. Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of Mark St Godard Sent: Friday, April 22, 2005 5:19 AM To: spr...@li... Subject: Re: [Springframework-developer] WAS 6.0 TransactionManager Lookup Juergen et al Was looking a bit more into that Hibernate 3.0.1 changelog entry regarding WAS 6 Transaction Manager Factory. Seems to stem from this original Hibernate 3 JIRA issue: http://opensource.atlassian.com/projects/hibernate/browse/HHH-198 I am using Websphere 6 and I did use the same stock config that I had in WAS 5.1. From what I can tell the Transaction Manager Factory class is still: com.ibm.ws.Transaction.TransactionManagerFactory I have started a project (and before downgrading my config back to straight Hibernate transactions) it seemed to work for me. After reading the JIRA issue HHH-198... the user that this stemed from... it looks like he is using WAS 5.1.2? Why are they talking about WAS 6? Anyway, seems a little confusing to me.... I am not sure exactly what they fixed. From Gavin's code in com.hibernate.transaction.WebSphereExtendedTransactionLookup it looks like they implemented an adapter to the Extended JTA Transaction Manager and Transaction... Anyway, I am curious if the Spring transaction management codebase needs an equivilent change? Again, from reading the Hibernate JIRA posts.. and from actually using WAS 6 with Hibernate 3.0 and Spring 1.2 RC2... curious what the issue really is? Thoughts? Cheers, Mark "Juergen Hoeller" <juergen@interfac e21.com> To Sent by: <spr...@li... springframework-d urceforge.net> eveloper-admin@li cc sts.sourceforge.n et Subject Re: [Springframework-developer] WAS 6.0 TransactionManager Lookup 04/21/2005 07:03 AM Please respond to springframework-d eveloper Yes, we should cover WebSphere 6.0 too - I'll do that for 1.2 final. Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of Dmitriy Kopylenko Sent: Thursday, April 21, 2005 2:01 PM To: spr...@li... Subject: Re: [Springframework-developer] WAS 6.0 TransactionManager Lookup There is WebSphereTransactionManagerFactoryBean which is used to lookup jta TransactionManager implementation for WebSphere versions 4, 5.0, and 5.1, not 6.0 May be we should modify it to add 6.0 lookup code? Dmitriy. Claus Ibsen wrote: >Hi > >I was reading the changelog for Hibernate 3.01 and discovered: >* fixed TransactionManager lookup (again) for WAS 6.0 > >I recall there was something about Spring using a similar strategy to lookup the >TM in WAS as Hibernate does. > >Just though I would raise a flag if there could be a issue. > > >Kind regards > >Claus > > > >------------------------------------------------------- >This SF.Net email is sponsored by: New Crystal Reports XI. >Version 11 adds new functionality designed to reduce time involved in >creating, integrating, and deploying reporting solutions. Free runtime info, >new features, or free trial, at: http://www.businessobjects.com/devxi/728 >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > ------------------------------------------------------- This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728 _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728 _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Juergen H. <ju...@in...> - 2005-04-24 13:41:51
|
Hi Roman, As we have heard about this rather strange behavior before, ContextLoader has been reworked for 1.2 RC2: It keeps a reference to the root WebApplicationContext instance that it creates now, closing exactly that context instance on shutdown of the web application. Hence, it doesn't matter anymore whether the ServletContext attribute is still available when ContextLoaderListener gets called. Arguably, the Servlet engine should remove the ServletContext attributes *after* calling all listeners (which all Servlet engines seemed to do) - but we're not relying on that behavior anymore now. Please give Spring 1.2 RC2 a try and let me know whether it works for you! Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of Roman Roelofsen Sent: Friday, April 22, 2005 11:21 PM To: spr...@li... Subject: [Springframework-developer] DisposableBean / destroy-method -> never gets called Hi Spring developers! I´m using Spring for my current WebApp project and I found a strange behaviour of Spring. I´m not sure if I´m doing something wrong or if it´s a bug. So, perhaps you can take a look at. First, here is my posting in the Spring forum which describes my problem: http://forum.springframework.org/viewtopic.php?t=5003 I tried to debug Spring to track the problem down. Here´s what I have: 1. All beans which are implementing the interface DisposableBean are stored in the map AbstractBeanFactory.disposableBeans. But the method AbstractBeanFactory.destroySingletons() gets only called for the factory "-servlet.xml", not for the other two xml files. 2. On shutdown, ContextLoaderListener.contextDestroyed() calls ContextLoader.closeWebApplicationContext(). But servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTE XT_ATTRIBUTE); always returns null. Perhaps the ServletContext is destroyed when the Listener gets informed? While my app is running, servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTE XT_ATTRIBUTE); returns the correct application context. I´m shutting down my webapp with the url: http://localhost:8080/manager/stop?path=/mywebapp My environment: Tomcat 5.5.7 Java 1.5 Spring 1.2RC1 Please let me know if you need more information. Best regards, Roman ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=ick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: <al...@in...> - 2005-04-23 22:35:41
|
View results here -> http://opensource.jteam.nl/build/buildresults/spring?log=log20050424001638Lbuild.252 |
|
From: Steven D. <ste...@gm...> - 2005-04-23 09:23:22
|
Hi all, I'm sorry for posting on the spring dev mailing list regarding spring modules but I'm not sure anyone is reading the spring modules dev mailing list. I'm creating an Eclipse project for spring modules since there's none include in CVS. In the process of doing so I noticed commons-pool is missing from the lib folder. It's required by org.springmodules.resource.interceptor.ResourceProxyFactoryBean. I shall add it unless someone objects. I'm not able to connect to cvs.dev.java.net, is anyone having the same prob= lem? Kind regards Steven --=20 "If you want to be a different fish, you gotta jump out of the school." -- Captain Beefheart |
|
From: Thomas V. de V. <tho...@gm...> - 2005-04-23 07:50:52
|
Personally I'd recommend Maven (http://maven.apache.org). Especially if=20 you're dealing with multiple projects. On 4/22/05, Garvey, Paul M (GE Commercial Finance) <pau...@ge...>=20 wrote: >=20 >=20 > I do use ant to build but now that I am getting familiar with appfuse I= =20 > will > need to convince other developers who are using JBuilder to develop their= =20 > EJB > apps. I have been using ant and IntelliJ for a a while now. >=20 >=20 > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...]On Behalf > Of Eugene Kuleshov > Sent: Friday, April 22, 2005 12:21 PM > To: spr...@li... > Subject: Re: [Springframework-developer] EJBs vs POJOs >=20 > Garvey, Paul M (GE Commercial Finance) wrote: >=20 > > Dmitriy, > > I haven't had a chance to look at Spring EJB support as yet > > but it sounds > > interesting, Will be reading about Spring support this weekend. IDEs > > such as JBuilder > > makes EJB development very easy, testing aside, is Spring EJB support > > easier to code > > than straight EJBs? >=20 > Paul, don't you think that rely your development on IDE is a bad idea? > I believe it is better to setup a common build process (XDoclet, > MiddleGen, Cactus, Ant/Maven, etc) and do not rely on concrete IDE. >=20 > By the way, I have strange feeling about current Spring's EJB > convenience classes. The idea is that they will automatically lookup > Spring's application context for you and then you'll use > getBeanFactory().getBean() in onEjbCreate() method to pull pring-managed > POJO. However it require java:comp/env/ejb/BeanFactoryPath env property > to be set and also custom implementation setSessionContext() in order to > make bean factory a singleton (I don't know who would want non-singleton > factory?). > So, we've ended up with our own EJBM helper classes (very similar to > the Spring but without factory ) and a custom SpringLocator singleton > that I'm using in onEjbCreate() methods instead: >=20 > public class SpringLocator { > private static final ApplicationContext context =3D new > ClassPathXmlApplicationContext( CONTEXT_PATH); >=20 > public static Object getBean(String id) { > return context.getBean(id); > } > .... >=20 > In this case I don't have to override setSessionContext in every bean. > That of course only makes sence and should be used only on facade beans > (session/mdb or transaction) and all inner components should use DI and > not locator. >=20 > regards, > Eugene >=20 > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_ide95&alloc_id=14396&opclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |
|
From: <al...@in...> - 2005-04-22 22:34:32
|
View results here -> http://opensource.jteam.nl/build/buildresults/spring?log=log20050423001555Lbuild.251 |