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: Danilo L. R. <da...@fl...> - 2004-10-07 11:22:59
|
Tran, Khiet wrote: > Hi, > > > > I successfully experimented Spring, everything works fine. I am using > the ClasspathXmlApplicationContext. > > Now I am integrating Spring within Eclipse RCP, which causes me some > headaches: > > -My spring application cannot see the spring configuration > file. I manage to solve this problem by subclassing the > ClasspathXmlApplicationContext and ClasspathResource classes. Now > Spring cannot see ResourceBundleMessageSource.class! > > > > My question is then: how could I centralize all resource lookup or > class lookup within Spring without subclassing all its classes. Spring > uses the current Thread as its classloading mechanism, is there a way > to change that globally? I want to define my way of class lookup globally. > I do not have a solution to your problem. I am only sending this email to the Spring developers know I have the same question. I already had post a message about this on the forums : http://forum.springframework.org/viewtopic.php?t=1089 I think the Spring components should access resouces using a interface like this : public interface ResourceLoader { byte[] loadResource(String resourceName); } So any spring components with the need of acess resources will have a setResourceLoader method and they will use a default implementation like the current one. Maybe will be useful to set the default resource loader on the ApplicationContext : ResourceLoader resourceLoader = new MyResourceLoaderImpl(); ClassPathXmlApplicationContext bf = new ClassPathXmlApplicationContext(new String[] {"/spring.xml"},resourceLoader); It will be easy to implement things like chains of resurce loaders to create the support to new protocols. I think this is a good idea. In Spring everything should be a interface, so why not make this with the resource loader ? Danilo. |
|
From: Rainer S. <Rai...@ab...> - 2004-10-07 08:39:57
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Aloha! org.springframework.web.servlet.mvc.AbstractFormController provides the method referenceData() to add additional objects to the view model. SimplePortletFormController does not provide this method. Is there a special reason or is it just not (yet) implemented? Thanks, Rainer -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBZQCcw+xsU7A7UOgRApjZAKCAX9eaq7/FRIWzNCRZ27Yqm7HiuwCdFFSd gULtdJGSwjMPsCwjgsz+Hp4= =mtPz -----END PGP SIGNATURE----- |
|
From: <al...@jt...> - 2004-10-06 22:31:14
|
<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.116</td></tr><tr><td class=3D"header-data"><span class=
=3D"header-label">Date of build: </span>10/07/2004 00:16:50</td></tr><=
tr><td class=3D"header-data"><span class=3D"header-label">Time to build:&nb=
sp;</span>13 minutes 25 seconds</td></tr><tr><td class=3D"header-data"><spa=
n class=3D"header-label">Last changed: </span>10/06/2004 18:58:22</td>=
</tr><tr><td class=3D"header-data"><span class=3D"header-label">Last log en=
try: </span>fixed JDK 1.5 conflicts ("enum" variable name, "getMethod"=
/"invoke" ambiguities)</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: =
(36) </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">test/org/springframework/util=
/ClassUtilsTests.java</td><td class=3D"modifications-data">fixed JDK 1.5 co=
nflicts ("enum" variable name, "getMethod"/"invoke" ambiguities)</td></tr><=
tr class=3D"modifications-oddrow"><td class=3D"modifications-data">modified=
</td><td class=3D"modifications-data">jhoeller</td><td class=3D"modificatio=
ns-data">test/org/springframework/core/DefaultControlFlowTests.java</td><td=
class=3D"modifications-data">fixed JDK 1.5 conflicts ("enum" variable name=
, "getMethod"/"invoke" ambiguities)</td></tr><tr class=3D"modifications-eve=
nrow"><td class=3D"modifications-data">modified</td><td class=3D"modificati=
ons-data">jhoeller</td><td class=3D"modifications-data">test/org/springfram=
ework/transaction/interceptor/AbstractTransactionAspectTests.java</td><td c=
lass=3D"modifications-data">fixed JDK 1.5 conflicts ("enum" variable name, =
"getMethod"/"invoke" ambiguities)</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/transaction/interceptor/AttributesTransactionAttributeSourceTests.java</=
td><td class=3D"modifications-data">fixed JDK 1.5 conflicts ("enum" variabl=
e name, "getMethod"/"invoke" ambiguities)</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">test/org/spri=
ngframework/transaction/interceptor/MatchAlwaysTransactionAttributeSourceTe=
sts.java</td><td class=3D"modifications-data">fixed JDK 1.5 conflicts ("enu=
m" variable name, "getMethod"/"invoke" ambiguities)</td></tr><tr class=3D"m=
odifications-oddrow"><td class=3D"modifications-data">modified</td><td clas=
s=3D"modifications-data">jhoeller</td><td class=3D"modifications-data">test=
/org/springframework/transaction/interceptor/TransactionAttributeSourceEdit=
orTests.java</td><td class=3D"modifications-data">fixed JDK 1.5 conflicts (=
"enum" variable name, "getMethod"/"invoke" ambiguities)</td></tr><tr class=
=3D"modifications-evenrow"><td class=3D"modifications-data">modified</td><t=
d class=3D"modifications-data">jhoeller</td><td class=3D"modifications-data=
">test/org/springframework/aop/framework/MethodInvocationTests.java</td><td=
class=3D"modifications-data">fixed JDK 1.5 conflicts ("enum" variable name=
, "getMethod"/"invoke" ambiguities)</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">test/org/springframe=
work/aop/support/AbstractRegexpMethodPointcutTests.java</td><td class=3D"mo=
difications-data">fixed JDK 1.5 conflicts ("enum" variable name, "getMethod=
"/"invoke" ambiguities)</td></tr><tr class=3D"modifications-evenrow"><td cl=
ass=3D"modifications-data">modified</td><td class=3D"modifications-data">jh=
oeller</td><td class=3D"modifications-data">test/org/springframework/aop/su=
pport/AopUtilsTests.java</td><td class=3D"modifications-data">fixed JDK 1.5=
conflicts ("enum" variable name, "getMethod"/"invoke" ambiguities)</td></t=
r><tr class=3D"modifications-oddrow"><td class=3D"modifications-data">modif=
ied</td><td class=3D"modifications-data">jhoeller</td><td class=3D"modifica=
tions-data">test/org/springframework/aop/support/ComposablePointcutTests.ja=
va</td><td class=3D"modifications-data">fixed JDK 1.5 conflicts ("enum" var=
iable name, "getMethod"/"invoke" ambiguities)</td></tr><tr class=3D"modific=
ations-evenrow"><td class=3D"modifications-data">modified</td><td class=3D"=
modifications-data">jhoeller</td><td class=3D"modifications-data">test/org/=
springframework/aop/support/MethodMatchersTests.java</td><td class=3D"modif=
ications-data">fixed JDK 1.5 conflicts ("enum" variable name, "getMethod"/"=
invoke" ambiguities)</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">test/org/springframework/aop/suppo=
rt/PointcutsTests.java</td><td class=3D"modifications-data">fixed JDK 1.5 c=
onflicts ("enum" variable name, "getMethod"/"invoke" ambiguities)</td></tr>=
<tr class=3D"modifications-evenrow"><td class=3D"modifications-data">modifi=
ed</td><td class=3D"modifications-data">jhoeller</td><td class=3D"modificat=
ions-data">test/org/springframework/beans/support/PagedListHolderTests.java=
</td><td class=3D"modifications-data">fixed JDK 1.5 conflicts ("enum" varia=
ble name, "getMethod"/"invoke" ambiguities)</td></tr><tr class=3D"modificat=
ions-oddrow"><td class=3D"modifications-data">modified</td><td class=3D"mod=
ifications-data">jhoeller</td><td class=3D"modifications-data">src/org/spri=
ngframework/web/util/WebUtils.java</td><td class=3D"modifications-data">fix=
ed JDK 1.5 conflicts ("enum" variable name, "getMethod"/"invoke" ambiguitie=
s)</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">test/org/springframework/aop/framework/adapter/Thro=
wsAdviceInterceptorTests.java</td><td class=3D"modifications-data">fixed JD=
K 1.5 conflicts ("enum" variable name, "getMethod"/"invoke" ambiguities)</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">test/org/springframework/aop/framework/autoproxy/metadata/=
DummyAttributes.java</td><td class=3D"modifications-data">fixed JDK 1.5 con=
flicts ("enum" variable name, "getMethod"/"invoke" ambiguities)</td></tr><t=
r class=3D"modifications-evenrow"><td class=3D"modifications-data">modified=
</td><td class=3D"modifications-data">jhoeller</td><td class=3D"modificatio=
ns-data">src/org/springframework/web/filter/GenericFilterBean.java</td><td =
class=3D"modifications-data">fixed JDK 1.5 conflicts ("enum" variable name,=
"getMethod"/"invoke" ambiguities)</td></tr><tr class=3D"modifications-oddr=
ow"><td class=3D"modifications-data">modified</td><td class=3D"modification=
s-data">jhoeller</td><td class=3D"modifications-data">src/org/springframewo=
rk/web/servlet/HttpServletBean.java</td><td class=3D"modifications-data">fi=
xed JDK 1.5 conflicts ("enum" variable name, "getMethod"/"invoke" ambiguiti=
es)</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/web/servlet/view/AbstractTe=
mplateView.java</td><td class=3D"modifications-data">fixed JDK 1.5 conflict=
s ("enum" variable name, "getMethod"/"invoke" ambiguities)</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/scheduling/quartz/SchedulerFactoryBean.java</td>=
<td class=3D"modifications-data">fixed JDK 1.5 conflicts ("enum" variable n=
ame, "getMethod"/"invoke" ambiguities)</td></tr><tr class=3D"modifications-=
evenrow"><td class=3D"modifications-data">modified</td><td class=3D"modific=
ations-data">jhoeller</td><td class=3D"modifications-data">src/org/springfr=
amework/transaction/jta/WebLogicServerTransactionManagerFactoryBean.java</t=
d><td class=3D"modifications-data">fixed JDK 1.5 conflicts ("enum" variable=
name, "getMethod"/"invoke" ambiguities)</td></tr><tr class=3D"modification=
s-oddrow"><td class=3D"modifications-data">modified</td><td class=3D"modifi=
cations-data">jhoeller</td><td class=3D"modifications-data">src/org/springf=
ramework/transaction/jta/WebSphereTransactionManagerFactoryBean.java</td><t=
d class=3D"modifications-data">fixed JDK 1.5 conflicts ("enum" variable nam=
e, "getMethod"/"invoke" ambiguities)</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/jdbc/support/nativejdbc/CommonsDbcpNativeJdbcExtractor.java</td><td c=
lass=3D"modifications-data">fixed JDK 1.5 conflicts ("enum" variable name, =
"getMethod"/"invoke" ambiguities)</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/jdbc/support/nativejdbc/JBossNativeJdbcExtractor.java</td><td class=3D"mo=
difications-data">fixed JDK 1.5 conflicts ("enum" variable name, "getMethod=
"/"invoke" ambiguities)</td></tr><tr class=3D"modifications-evenrow"><td cl=
ass=3D"modifications-data">modified</td><td class=3D"modifications-data">jh=
oeller</td><td class=3D"modifications-data">src/org/springframework/jdbc/su=
pport/nativejdbc/WebLogicNativeJdbcExtractor.java</td><td class=3D"modifica=
tions-data">fixed JDK 1.5 conflicts ("enum" variable name, "getMethod"/"inv=
oke" ambiguities)</td></tr><tr class=3D"modifications-oddrow"><td class=3D"=
modifications-data">modified</td><td class=3D"modifications-data">jhoeller<=
/td><td class=3D"modifications-data">src/org/springframework/jdbc/support/n=
ativejdbc/WebSphereNativeJdbcExtractor.java</td><td class=3D"modifications-=
data">fixed JDK 1.5 conflicts ("enum" variable name, "getMethod"/"invoke" a=
mbiguities)</td></tr><tr class=3D"modifications-evenrow"><td class=3D"modif=
ications-data">modified</td><td class=3D"modifications-data">jhoeller</td><=
td class=3D"modifications-data">src/org/springframework/orm/jdo/LocalPersis=
tenceManagerFactoryBean.java</td><td class=3D"modifications-data">fixed JDK=
1.5 conflicts ("enum" variable name, "getMethod"/"invoke" ambiguities)</td=
></tr><tr class=3D"modifications-oddrow"><td class=3D"modifications-data">m=
odified</td><td class=3D"modifications-data">jhoeller</td><td class=3D"modi=
fications-data">src/org/springframework/context/support/ResourceMapFactoryB=
ean.java</td><td class=3D"modifications-data">fixed JDK 1.5 conflicts ("enu=
m" variable name, "getMethod"/"invoke" ambiguities)</td></tr><tr class=3D"m=
odifications-evenrow"><td class=3D"modifications-data">modified</td><td cla=
ss=3D"modifications-data">jhoeller</td><td class=3D"modifications-data">src=
/org/springframework/ejb/access/AbstractSlsbInvokerInterceptor.java</td><td=
class=3D"modifications-data">fixed JDK 1.5 conflicts ("enum" variable name=
, "getMethod"/"invoke" ambiguities)</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/jdbc/support/lob/OracleLobHandler.java</td><td class=3D"modifications-d=
ata">fixed JDK 1.5 conflicts ("enum" variable name, "getMethod"/"invoke" am=
biguities)</td></tr><tr class=3D"modifications-evenrow"><td class=3D"modifi=
cations-data">modified</td><td class=3D"modifications-data">jhoeller</td><t=
d class=3D"modifications-data">src/org/springframework/beans/BeanUtils.java=
</td><td class=3D"modifications-data">fixed JDK 1.5 conflicts ("enum" varia=
ble name, "getMethod"/"invoke" ambiguities)</td></tr><tr class=3D"modificat=
ions-oddrow"><td class=3D"modifications-data">modified</td><td class=3D"mod=
ifications-data">jhoeller</td><td class=3D"modifications-data">src/org/spri=
ngframework/beans/BeanWrapperImpl.java</td><td class=3D"modifications-data"=
>fixed JDK 1.5 conflicts ("enum" variable name, "getMethod"/"invoke" ambigu=
ities)</td></tr><tr class=3D"modifications-evenrow"><td class=3D"modificati=
ons-data">modified</td><td class=3D"modifications-data">jhoeller</td><td cl=
ass=3D"modifications-data">src/org/springframework/beans/factory/support/Ab=
stractAutowireCapableBeanFactory.java</td><td class=3D"modifications-data">=
fixed JDK 1.5 conflicts ("enum" variable name, "getMethod"/"invoke" ambigui=
ties)</td></tr><tr class=3D"modifications-oddrow"><td class=3D"modification=
s-data">modified</td><td class=3D"modifications-data">jhoeller</td><td clas=
s=3D"modifications-data">src/org/springframework/beans/factory/config/Prope=
rtiesFactoryBean.java</td><td class=3D"modifications-data">fixed JDK 1.5 co=
nflicts ("enum" variable name, "getMethod"/"invoke" ambiguities)</td></tr><=
tr class=3D"modifications-evenrow"><td class=3D"modifications-data">modifie=
d</td><td class=3D"modifications-data">jhoeller</td><td class=3D"modificati=
ons-data">src/org/springframework/beans/factory/config/PropertyOverrideConf=
igurer.java</td><td class=3D"modifications-data">fixed JDK 1.5 conflicts ("=
enum" variable name, "getMethod"/"invoke" ambiguities)</td></tr><tr class=
=3D"modifications-oddrow"><td class=3D"modifications-data">modified</td><td=
class=3D"modifications-data">jhoeller</td><td class=3D"modifications-data"=
>src/org/springframework/beans/factory/config/PropertyResourceConfigurer.ja=
va</td><td class=3D"modifications-data">fixed JDK 1.5 conflicts ("enum" var=
iable name, "getMethod"/"invoke" ambiguities)</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: Chris N. <ch...@si...> - 2004-10-06 17:11:24
|
Rob Harrop wrote: > I took a look at your suggested workaround and I started the basics of > an implementation. The problem I came up against is that when the > constructor is invoked by CGLIB, which in turn invokes a method, say > setName(), the call to invokeSuper() by the interceptor fails with: Make sure you are passing the proxy as the first argument to invokeSuper, not the target. Also, it may be better to move the logic earlier, i.e. into DynamicAdvisedInterceptor instead of MethodInvocationImpl. Chris |
|
From: Colin S. <col...@ex...> - 2004-10-06 13:46:33
|
Guillaume, Thanks for doing this. I personally can't look at this this week, but can probably look at it next. Your mechanism of using a new <ognl> tag is abviously completely backwards compatible. The other option we were discussing before was in the regular value tag, recognizing a prefix like "ognl:" as an indication that the given value is an ognl expression. I would actually like to also investigate Janino http://www.janino.net/ as an alternative to OGNL. I've used OGNL a fair amount with Tapestry, and it's quite good. That said, the Janino approach of generating bytecode directly from the expressions is pretty intriguing, in terms of performance implications. Colin Guillaume Poirier wrote: > Concerning OGNL, I took at stab at it to see how hard it would be to > integrate. My prototype seems to work correctly, with a few > adjustments needed. Would you guys be interested in a contribution > from me? > > My implementation requires modifications in two areas. First, the a > <ognl> tag should be added in the DTD, available everywhere you can > use the <value> tag. In the XmlBeanDefinitionParser, the <ognl> tag > would be converted to an OGNL implementation of a new Expression > interface that define a class to resolve the expression given a > context/BeanFactory. > > Then, the BeanFactory implementation would need to be modified, when > it resolve ManagedList, RuntimeBeanReference, a new check would be > added for the Expression class, where the expression would be resolved > from the context. > > However, I encountered a minor issue while creating my prototype. The > resolution where the expression would be converted to a value is in > AbstractAutowireCapableBeanFactory, which doesn't implement > ListableBeanFactory. It causes a problem because OGNL ask for a Map > as context, and it calls the keySet() method on it, thus the map > passed to OGNL must be able to return all the bean names in the > context. A quick fix is to cast the > AbstractAutowireCapableBeanFactory instance to ListableBeanFactory, > since all of Spring's concrete BeanFactory implements > ListableBeanFactory anyway, but it's somewhat an hack, and if someone > extend AbstractAutowireCapableBeanFactory and doesn't implement > ListableBeanFactory, then the OGNL wouldn't work properly. I guess > it's unlikely though. > > I've attached the patch to this email, with the prototype for OGNL. > It's working, but it doesn't have any documenation, decent tests, > etc. If you guys are interested in my code, I can polish it, document > it, and add a better test coverage. > > Let me know what you think. > > Regards, > Guillaume > > ----- Original Message ----- From: "Colin Sampaleanu" <col...@ex...> > To: <spr...@li...> > Sent: Monday, October 04, 2004 1:32 PM > Subject: Re: [Springframework-developer] PropertyPathFactoryBean > > >> Good stuff. It overlaps of course with the mythical OGNL or >> expression support which keeps getting pushed back, but in the >> meantime provides some of the benefits for pretty little extra code... >> >> >> jürgen höller [werk3AT] wrote: >> >>> I've just added a PropertyPathFactoryBean, following this suggestion: >>> >>> http://opensource.atlassian.com/projects/spring/browse/SPR-343 >>> >>> >>> Usage examples: >>> >>> // target bean to be referenced by name >>> <bean id="tb" class="org.springframework.beans.TestBean" >>> singleton="false"> >>> <property name="age"><value>10</value></property> >>> <property name="spouse"> >>> <bean class="org.springframework.beans.TestBean"> >>> <property name="age"><value>11</value></property> >>> </bean> >>> </property> >>> </bean> >>> >>> // will result in 12, which is the value of property 'age' of the >>> inner bean >>> <bean id="propertyPath1" >>> class="org.springframework.beans.factory.config.PropertyPathFactoryBean"> >>> >>> <property name="targetObject"> >>> <bean class="org.springframework.beans.TestBean"> >>> <property name="age"><value>12</value></property> >>> </bean> >>> </property> >>> <property name="propertyPath"><value>age</value></property> >>> </bean> >>> >>> // will result in 11, which is the value of property 'spouse.age' of >>> bean 'tb' >>> <bean id="propertyPath2" >>> class="org.springframework.beans.factory.config.PropertyPathFactoryBean"> >>> >>> <property name="targetBeanName"><value>tb</value></property> >>> <property name="propertyPath"><value>spouse.age</value></property> >>> </bean> >>> >>> // will result in 10, which is the value of property 'age' of bean 'tb' >>> <bean id="tb.age" >>> class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/> >>> >>> >>> >>> The last one, interpreting the bean name as 'beanName.property' >>> pattern, is quite concise... >>> >> >> >> >> >> ------------------------------------------------------- >> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal >> Use IT products in your business? Tell us what you think of them. >> Give us >> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find >> out more >> http://productguide.itmanagersjournal.com/guidepromo.tmpl >> _______________________________________________ >> Springframework-developer mailing list >> Spr...@li... >> https://lists.sourceforge.net/lists/listinfo/springframework-developer > > Index: org/springframework/beans/factory/OgnlTests.java > =================================================================== > RCS file: org/springframework/beans/factory/OgnlTests.java > diff -N org/springframework/beans/factory/OgnlTests.java > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ org/springframework/beans/factory/OgnlTests.java 1 Jan 1970 > 00:00:00 -0000 > @@ -0,0 +1,79 @@ > +/* > + * $Id$ > + * $Log$ > + */ > +package org.springframework.beans.factory; > + > +import java.util.Arrays; > +import java.util.List; > + > +import junit.framework.TestCase; > + > +import org.springframework.beans.factory.xml.XmlBeanFactory; > + > +/** > + * @author Guillaume Poirier > + * @version $Revision$, $Date$ > + * @since 2004-10-04 > + */ > +public class OgnlTests extends TestCase { > + public void testOgnlSupport() throws Exception { > + XmlBeanFactory factory = new XmlBeanFactory(OgnlTests.class > + .getResourceAsStream("ognl.xml")); > + Bean test = (Bean) factory.getBean("test"); > + Object list = factory.getBean("list"); > + assertSame(test.one, list); > + assertEquals(test.two, new Integer(Bean.CONSTANT)); > + assertSame(test.three, test.getProperty()); > + List expectedList = Arrays.asList(new Object[] { "Item0", null, > null, > + test.getProperty() }); > + assertEquals(expectedList, list); > + } > + > + public static class Bean { > + public static final int CONSTANT = 15; > + private Object one; > + private Object two; > + private Object three; > + > + public Bean() { > + } > + > + public Bean(Object arg) { > + throw new UnsupportedOperationException(); > + } > + > + public Object getOne() { > + return one; > + } > + > + public void setOne(Object one) { > + this.one = one; > + } > + > + public Object getTwo() { > + return two; > + } > + > + public void setTwo(Object two) { > + this.two = two; > + } > + > + public Object getThree() { > + return three; > + } > + > + public void setThree(Object three) { > + this.three = three; > + } > + > + public String getProperty() { > + return "property!!"; > + } > + > + public String toString() { > + return "OgnlTests$Bean[1='" + one + "', 2='" + two + "', 3='" + > three > + + "']"; > + } > + } > +} > Index: org/springframework/beans/factory/ognl.xml > =================================================================== > RCS file: org/springframework/beans/factory/ognl.xml > diff -N org/springframework/beans/factory/ognl.xml > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ org/springframework/beans/factory/ognl.xml 1 Jan 1970 00:00:00 > -0000 > @@ -0,0 +1,40 @@ > +<?xml version="1.0" encoding="UTF-8"?> > +<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" > "http://www.springframework.org/dtd/spring-beans.dtd"> > + > +<beans> > + <bean id="list" class="java.util.ArrayList"> > + <constructor-arg> > + <list> > + <value>Item0</value> > + <ognl>#test.one</ognl> > + <ognl>#test.two</ognl> > + <ognl>#test.property</ognl> > + </list> > + </constructor-arg> > + </bean> > + + <bean id="test" > class="org.springframework.beans.factory.OgnlTests$Bean"> > + <property name="one"> > + <ognl>#list</ognl> > + </property> > + <property name="two"> > + > <ognl>@org.springframework.beans.factory.OgnlTests$Bean@CONSTANT</ognl> > + </property> > + <property name="three"> > + <ognl>#test.property</ognl> > + </property> > + </bean> > + + <!-- > + - This bean should not be instanciated by the BeanFactory. > + - If it was mistakenly instanciated, an > UnsupportedOperationException > + - would be thrown by the constructor. > + --> > + <bean id="dummy" > class="org.springframework.beans.factory.OgnlTests$Bean"> > + <constructor-arg> > + <list> > + <value>Item0</value> > + </list> > + </constructor-arg> > + </bean> > +</beans> > > Index: > org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java > > =================================================================== > RCS file: > /cvsroot/springframework/spring/src/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java,v > > retrieving revision 1.40 > diff -u -r1.40 AbstractAutowireCapableBeanFactory.java > --- > org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java > 4 Oct 2004 07:59:32 -0000 1.40 > +++ > org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java > 6 Oct 2004 04:05:56 -0000 > @@ -43,6 +43,7 @@ > import org.springframework.beans.factory.BeanNameAware; > import org.springframework.beans.factory.DisposableBean; > import org.springframework.beans.factory.InitializingBean; > +import org.springframework.beans.factory.ListableBeanFactory; > import org.springframework.beans.factory.UnsatisfiedDependencyException; > import > org.springframework.beans.factory.config.AutowireCapableBeanFactory; > import org.springframework.beans.factory.config.BeanDefinition; > @@ -839,10 +840,14 @@ > // May need to resolve contained runtime references. > return resolveManagedSet(beanName, mergedBeanDefinition, > argName, (Set) value); > } > - else if (value instanceof ManagedMap) { > - // May need to resolve contained runtime references. > - return resolveManagedMap(beanName, mergedBeanDefinition, > argName, (Map) value); > - } > + else if (value instanceof ManagedMap) { > + // May need to resolve contained runtime references. > + return resolveManagedMap(beanName, mergedBeanDefinition, > argName, (Map) value); > + } > + else if (value instanceof Expression) { > + // Need to resolve Expression. > + return resolveExpression(beanName, mergedBeanDefinition, > argName, (Expression) value); > + } > else { > // no need to resolve value > return value; > @@ -866,6 +871,13 @@ > return getObjectForSharedInstance(innerBeanName, innerBean); > } > > + private Object resolveExpression( > + String beanName, RootBeanDefinition mergedBeanDefinition, > String argName, Expression expr) > + throws BeansException { > + // TODO Casting to ListableBeanFactory is kind of an hack > + return expr.resolve((ListableBeanFactory) this); > + } > + /** > * Resolve a reference to another bean in the factory. > */ > Index: > org/springframework/beans/factory/xml/DefaultXmlBeanDefinitionParser.java > =================================================================== > RCS file: > /cvsroot/springframework/spring/src/org/springframework/beans/factory/xml/DefaultXmlBeanDefinitionParser.java,v > > retrieving revision 1.41 > diff -u -r1.41 DefaultXmlBeanDefinitionParser.java > --- > org/springframework/beans/factory/xml/DefaultXmlBeanDefinitionParser.java > 4 Oct 2004 08:12:00 -0000 1.41 > +++ > org/springframework/beans/factory/xml/DefaultXmlBeanDefinitionParser.java > 6 Oct 2004 04:05:56 -0000 > @@ -49,6 +49,7 @@ > import org.springframework.beans.factory.support.ManagedMap; > import org.springframework.beans.factory.support.ManagedSet; > import org.springframework.beans.factory.support.MethodOverrides; > +import org.springframework.beans.factory.support.OgnlExpression; > import org.springframework.beans.factory.support.ReplaceOverride; > import org.springframework.beans.factory.support.RootBeanDefinition; > import org.springframework.core.io.Resource; > @@ -132,6 +133,7 @@ > public static final String PROP_ELEMENT = "prop"; > public static final String VALUE_ELEMENT = "value"; > public static final String NULL_ELEMENT = "null"; > + public static final String OGNL_ELEMENT = "ognl"; > > > protected final Log logger = LogFactory.getLog(getClass()); > @@ -554,10 +556,14 @@ > // it's a literal value > return getTextValue(ele, beanName); > } > - else if (ele.getTagName().equals(NULL_ELEMENT)) { > - // it's a distinguished null value > - return null; > - } > + else if (ele.getTagName().equals(NULL_ELEMENT)) { > + // it's a distinguished null value > + return null; > + } > + else if (ele.getTagName().equals(OGNL_ELEMENT)) { > + // it's an OGNL expression > + return getOgnlExpression(ele, beanName); > + } > throw new BeanDefinitionStoreException( > this.resource, beanName, "Unknown subelement of > <property>: <" + ele.getTagName() + ">"); > } > @@ -633,24 +639,29 @@ > * Make the horrible DOM API slightly more bearable: > * get the text value we know this element contains. > */ > - protected String getTextValue(Element ele, String beanName) { > - StringBuffer value = new StringBuffer(); > - NodeList nl = ele.getChildNodes(); > - for (int i = 0; i < nl.getLength(); i++) { > - Node item = nl.item(i); > - if (item instanceof org.w3c.dom.CharacterData) { > - if (!(item instanceof Comment)) { > - value.append(item.getNodeValue()); > - } > - } > - else { > - throw new BeanDefinitionStoreException( > - this.resource, beanName, > - "<value> element is just allowed to have text > and comment nodes, not: " + item.getClass().getName()); > - } > - } > - return value.toString(); > - } > + protected String getTextValue(Element ele, String beanName) { > + StringBuffer value = new StringBuffer(); > + NodeList nl = ele.getChildNodes(); > + for (int i = 0; i < nl.getLength(); i++) { > + Node item = nl.item(i); > + if (item instanceof org.w3c.dom.CharacterData) { > + if (!(item instanceof Comment)) { > + value.append(item.getNodeValue()); > + } > + } > + else { > + throw new BeanDefinitionStoreException( > + this.resource, beanName, > + "<value> element is just allowed to have text and comment > nodes, not: " + item.getClass().getName()); > + } > + } > + return value.toString(); > + } > + + protected OgnlExpression getOgnlExpression(Element ele, String > beanName) { > + String value = getTextValue(ele, beanName); > + return new OgnlExpression(value); > + } > > protected int getDependencyCheck(String att) { > int dependencyCheckCode = > RootBeanDefinition.DEPENDENCY_CHECK_NONE; > Index: org/springframework/beans/factory/xml/spring-beans.dtd > =================================================================== > RCS file: > /cvsroot/springframework/spring/src/org/springframework/beans/factory/xml/spring-beans.dtd,v > > retrieving revision 1.41 > diff -u -r1.41 spring-beans.dtd > --- org/springframework/beans/factory/xml/spring-beans.dtd 5 Oct > 2004 08:37:53 -0000 1.41 > +++ org/springframework/beans/factory/xml/spring-beans.dtd 6 Oct > 2004 04:05:57 -0000 > @@ -280,7 +280,7 @@ > --> > <!ELEMENT constructor-arg ( > description?, > - (bean | ref | idref | list | set | map | props | value | null) > + (bean | ref | idref | list | set | map | props | value | null | > ognl) > )> > > <!-- > @@ -313,7 +313,7 @@ > --> > <!ELEMENT property ( > description?, > - (bean | ref | idref | list | set | map | props | value | null) > + (bean | ref | idref | list | set | map | props | value | null | > ognl) > )> > > <!-- > @@ -435,7 +435,7 @@ > is automatically performed by the BeanFactory. > --> > <!ELEMENT list ( > - (bean | ref | idref | list | set | map | props | value | null)* > + (bean | ref | idref | list | set | map | props | value | null | > ognl)* > )> > > <!-- > @@ -444,7 +444,7 @@ > although references will be strongly typed. > --> > <!ELEMENT set ( > - (bean | ref | idref | list | set | map | props | value | null)* > + (bean | ref | idref | list | set | map | props | value | null | > ognl)* > )> > > <!-- > @@ -460,7 +460,7 @@ > The name of the property is given by the "key" attribute. > --> > <!ELEMENT entry ( > - (bean | ref | idref | list | set | map | props | value | null) > + (bean | ref | idref | list | set | map | props | value | null | > ognl) > )> > > <!-- > @@ -508,3 +508,5 @@ > null value unless a special PropertyEditor does so. > --> > <!ELEMENT null (#PCDATA)> > + > +<!ELEMENT ognl (#PCDATA)> > Index: org/springframework/beans/factory/support/Expression.java > =================================================================== > RCS file: org/springframework/beans/factory/support/Expression.java > diff -N org/springframework/beans/factory/support/Expression.java > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ org/springframework/beans/factory/support/Expression.java 1 Jan > 1970 00:00:00 -0000 > @@ -0,0 +1,16 @@ > +/* > + * $Id$ > + * $Log$ > + */ > +package org.springframework.beans.factory.support; > + > +import org.springframework.beans.factory.ListableBeanFactory; > + > +/** > + * @author Guillaume Poirier > + * @version $Revision$, $Date$ > + * @since 2004-10-05 > + */ > +public interface Expression { > + public Object resolve(ListableBeanFactory factory); > +} > Index: org/springframework/beans/factory/support/OgnlExpression.java > =================================================================== > RCS file: org/springframework/beans/factory/support/OgnlExpression.java > diff -N org/springframework/beans/factory/support/OgnlExpression.java > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ org/springframework/beans/factory/support/OgnlExpression.java 1 > Jan 1970 00:00:00 -0000 > @@ -0,0 +1,50 @@ > +/* > + * $Id$ > + * $Log$ > + */ > +package org.springframework.beans.factory.support; > + > +import java.util.Map; > + > +import org.springframework.beans.factory.BeanCreationException; > +import org.springframework.beans.factory.ListableBeanFactory; > + > +import ognl.Ognl; > +import ognl.OgnlException; > + > +/** > + * @author Guillaume Poirier > + * @version $Revision$, $Date$ > + * @since 2004-10-05 > + */ > +public class OgnlExpression implements Expression { > + > + private Object expr; > + > + public OgnlExpression(String value) { > + try { > + expr = Ognl.parseExpression(value); > + } catch (OgnlException e) { > + throw new BeanCreationException("Failled to parse OGNL > expression", e); > + } > + } > + > + /* > + * (non-Javadoc) > + * + * @see > org.springframework.beans.factory.support.Expression#getValue(java.util.Map) > > + */ > + public Object resolve(ListableBeanFactory factory) { > + try { > + Map ctx = new OgnlExpressionContext(factory); > + return Ognl.getValue(expr, ctx, (Object) null); > + } catch (OgnlException e) { > + throw new BeanCreationException("Failled to resolve OGNL > expression", e); > + } > + } > + + public String toString() { > + return "OgnlExpression[value='" + expr.toString() + "']"; > + } > + > +} > Index: > org/springframework/beans/factory/support/OgnlExpressionContext.java > =================================================================== > RCS file: > org/springframework/beans/factory/support/OgnlExpressionContext.java > diff -N > org/springframework/beans/factory/support/OgnlExpressionContext.java > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ > org/springframework/beans/factory/support/OgnlExpressionContext.java > 1 Jan 1970 00:00:00 -0000 > @@ -0,0 +1,161 @@ > +/* > + * $Id$ > + * $Log$ > + */ > +package org.springframework.beans.factory.support; > + > +import java.util.Collection; > +import java.util.HashSet; > +import java.util.Map; > +import java.util.Set; > + > +import ognl.OgnlContext; > + > +import org.springframework.beans.factory.ListableBeanFactory; > + > +/** > + * @author Guillaume Poirier > + * @version $Revision$, $Date$ > + * @since 2004-10-05 > + */ > +public class OgnlExpressionContext extends OgnlContext { > + > + private ListableBeanFactory factory; > + > + public OgnlExpressionContext(ListableBeanFactory factory) { > + this.factory = factory; > + if (factory == null) { > + throw new NullPointerException("factory"); > + } > + } > + > + /* > + * (non-Javadoc) > + * + * @see java.util.Map#size() > + */ > + public int size() { > + throw new UnsupportedOperationException(); > + } > + > + /* > + * (non-Javadoc) > + * + * @see java.util.Map#clear() > + */ > + public void clear() { > + throw new UnsupportedOperationException(); > + } > + > + /* > + * (non-Javadoc) > + * + * @see java.util.Map#isEmpty() > + */ > + public boolean isEmpty() { > + throw new UnsupportedOperationException(); > + } > + > + /* > + * (non-Javadoc) > + * + * @see java.util.Map#containsKey(java.lang.Object) > + */ > + public boolean containsKey(Object key) { > + return super.containsKey(key) ? true : > factory.containsBean((String) key); > + } > + > + /* > + * (non-Javadoc) > + * + * @see java.util.Map#containsValue(java.lang.Object) > + */ > + public boolean containsValue(Object value) { > + throw new UnsupportedOperationException(); > + } > + > + /* > + * (non-Javadoc) > + * + * @see java.util.Map#values() > + */ > + public Collection values() { > + throw new UnsupportedOperationException(); > + } > + > + /* > + * (non-Javadoc) > + * + * @see java.util.Map#putAll(java.util.Map) > + */ > + public void putAll(Map t) { > + throw new UnsupportedOperationException(); > + } > + > + /* > + * (non-Javadoc) > + * + * @see java.util.Map#entrySet() > + */ > + public Set entrySet() { > + throw new UnsupportedOperationException(); > + } > + > + /* > + * (non-Javadoc) > + * + * @see java.util.Map#keySet() > + */ > + public Set keySet() { > + HashSet set = new HashSet(super.keySet()); > + String[] names = factory.getBeanDefinitionNames(); > + for (int i = 0, n = names.length; i < n; i++) { > + set.add(names[i]); > + } > + return set; > + } > + > + /* > + * (non-Javadoc) > + * + * @see java.util.Map#get(java.lang.Object) > + */ > + public Object get(Object key) { > + Object value = super.get(key); > + return value != null ? value : factory.getBean((String) key); > + } > + > + /* > + * (non-Javadoc) > + * + * @see java.util.Map#remove(java.lang.Object) > + */ > + public Object remove(Object key) { > + throw new UnsupportedOperationException(); > + } > + > + /* > + * (non-Javadoc) > + * + * @see java.util.Map#put(java.lang.Object, java.lang.Object) > + */ > + public Object put(Object key, Object value) { > + throw new UnsupportedOperationException(); > + } > + > + public Map getValues() { > + throw new UnsupportedOperationException(); > + } > + > + public void setValues(Map value) { > + throw new UnsupportedOperationException(); > + } > + > + public boolean equals(Object o) { > + return o == this; > + } > + > + public int hashCode() { > + return System.identityHashCode(this); > + } > +} > |
|
From: Thomas B. <sp...@th...> - 2004-10-06 13:04:52
|
Hi Jürgen, it was my mistake. The jpetstore.war version 1.1-rc2 was extracted in the webapps directory and used instead of the new jpetstore.war 1.1.1. A clean deployment and it works :) Thanx jürgen höller [werk3AT] wrote: > Hi Thomas, > > Thanks for your kind words on Spring and the book! :-) > > Regarding class compatibility: Interoperability should be given for for all versions >= 1.1 final, as the remote invocation classes include the serialVersionUID of Spring 1.1 final. If client and server are the exact same version, it should always work anyway; mixing 1.1 final and 1.1.1 should work too. What combination have you tried? > > I'll fix the readme regarding the directory location. > > Juergen > > > ________________________________ > > Von: spr...@li... im Auftrag von Thomas Baustert > Gesendet: Mi 06.10.2004 00:22 > An: spr...@li... > Betreff: Re: [Springframework-developer] Spring Framework 1.1.1 released > > > > Hi, > > first of all: > > @developer: great work so far with the spring framework! > @rod + @juergen: great "must read by every j2ee developer" book!. > @rod: cool presentation at JAOO. I heard people talking about > spring at breakfast, breaks, lunch, ... people get "spring infected!" :) > > and then: > > I download this release and try to run the jpetstore example. > Everything seems to work, but running the client (test remote service > access) throws the following exception. Running the 1.1.1 jpetstore with > a 1.1-rc2 client works (?!). Is it my fault? > > And by the way, the readme.txt says 'run "client/client.bat 1000"' > but you must be in the directory "client" otherwise the classpath > doesn't fit. > > Not very important to me, just to mentioned it ... > > --- start --- > ... > Calling OrderService 'hessianProxy' with order ID 1000 > Got order with order ID 1000 and order date Tue Oct 05 00:00:00 CEST 2004 > Shipping address is: 901 San Antonio Road > LineItem 1: 1 piece(s) of item EST-9 > > Calling OrderService 'httpInvokerProxy' with order ID 1000 > org.springframework.remoting.RemoteAccessException: Cannot access HTTP > invoker remote service at > [http://localhost:8080/jpetstore/remoting/OrderService-httpinvoker]; > nested exception is java.io.InvalidClassException: > org.springframework.remoting.support.RemoteInvocationResult; local class > incompatible: stream classdesc serialVersionUID = 3460514161585267937, > local class serialVersionUID = 2138555143707773549 > java.io.InvalidClassException: > org.springframework.remoting.support.RemoteInvocationResult; local class > incompatible: stream classdesc serialVersionUID = 3460514161585267937, > local class serialVersionUID = 2138555143707773549 > at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:463) > at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1521) > at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626) > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) > at > org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.readRemoteInvocationResult(AbstractHttpInvokerRequestExecutor.java:126) > at > org.springframework.remoting.httpinvoker.SimpleHttpInvokerRequestExecutor.doExecuteRequest(SimpleHttpInvokerRequestExecutor.java:52) > at > org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.executeRequest(AbstractHttpInvokerRequestExecutor.java:67) > at > org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:86) > at > org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:60) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138) > at > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152) > at $Proxy1.getOrder(Unknown Source) > at > org.springframework.samples.jpetstore.service.client.OrderServiceClient.invokeOrderServices(OrderServiceClient.java:46) > at > org.springframework.samples.jpetstore.service.client.OrderServiceClient.main(OrderServiceClient.java:84) > Exception in thread "main" > > --- end --- > > jürgen höller [werk3AT] wrote: > >>Dear Spring community, >> >>I'm pleased to announce that Spring Framework 1.1.1 has just been released. >>This is a bugfix and minor enhancement release. >> > > > -- > Ciao, > Thomas > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > -- Ciao, Thomas |
|
From: Rob H. <ro...@ca...> - 2004-10-06 09:44:51
|
Chris,
I took a look at your suggested workaround and I started the basics of
an implementation. The problem I came up against is that when the
constructor is invoked by CGLIB, which in turn invokes a method, say
setName(), the call to invokeSuper() by the interceptor fails with:
net.sf.cglib.core.CodeGenerationException:
java.lang.ClassCastException-->null
at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:235)
at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:220)
at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:216)
at net.sf.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:566)
at net.sf.cglib.proxy.Enhancer.firstInstance(Enhancer.java:493)
at
net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:220)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:368)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:280)
at
org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:178)
at
org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:142)
at
org.springframework.aop.framework.CglibProxyTests.testFoo(CglibProxyTests.java:144)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
Caused by: java.lang.ClassCastException
at
org.springframework.aop.framework.CglibTestBean$$EnhancerByCGLIB$$5c148601$$FastClassByCGLIB$$7660a3f6.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:167)
at
org.springframework.aop.framework.Cglib2AopProxy$MethodInvocationImpl.invokeJoinpoint(Cglib2AopProxy.java:914)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:119)
at
org.springframework.aop.interceptor.NopInterceptor.invoke(NopInterceptor.java:39)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:141)
at
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:629)
at
org.springframework.aop.framework.CglibTestBean$$EnhancerByCGLIB$$5c148601.setName(<generated>)
at
org.springframework.aop.framework.CglibTestBean.<init>(CglibTestBean.java:14)
at
org.springframework.aop.framework.CglibTestBean$$EnhancerByCGLIB$$5c148601.<init>(<generated>)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:228)
... 25 more
I'm a little lost at this point, any help you could give would be much
appreciated :)
Rob
Chris Nokleberg wrote:
>Rod Johnson wrote:
>
>
>>Your analysis looked right to me. Unfortunate. There are certainly quite
>>a few negative consequences of the CGLIB subclassing approach. It would
>>be good if there were other options we could consider when proxying
>>classes (the AopProxyFactory interface gives us a choice), but I'm not
>>aware of anything that's equally convenient.
>>
>>
>
>I've posted a comment on how to work around this "feature" of CGLIB (it is a
>feature, really :-)
>
>If you want to proxy concrete classes your options are pretty limited, I
>think. One possibility you may not be aware of is that if you are proxying
>JavaBeans you could use net.sf.cglib.beans.BeanGenerator to generate a bean
>that has the same properties as your target bean. Then use the Enhancer to
>proxy the generated bean, dispatching to the target as appropriate. This
>way you avoid all issues with the superclass constructor being invoked,
>since the generated bean extends Object. Let me know if you want to explore
>this further.
>
>Chris
>
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
>Use IT products in your business? Tell us what you think of them. Give us
>Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
>http://productguide.itmanagersjournal.com/guidepromo.tmpl
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
>
>
|
|
From: <jue...@we...> - 2004-10-06 08:06:13
|
Hi Thomas,
=20
Thanks for your kind words on Spring and the book! :-)
=20
Regarding class compatibility: Interoperability should be given for for =
all versions >=3D 1.1 final, as the remote invocation classes include =
the serialVersionUID of Spring 1.1 final. If client and server are the =
exact same version, it should always work anyway; mixing 1.1 final and =
1.1.1 should work too. What combination have you tried?
=20
I'll fix the readme regarding the directory location.
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von Thomas Baustert
Gesendet: Mi 06.10.2004 00:22
An: spr...@li...
Betreff: Re: [Springframework-developer] Spring Framework 1.1.1 released
Hi,
first of all:
@developer: great work so far with the spring framework!
@rod + @juergen: great "must read by every j2ee developer" book!.
@rod: cool presentation at JAOO. I heard people talking about
spring at breakfast, breaks, lunch, ... people get "spring infected!" :)
and then:
I download this release and try to run the jpetstore example.
Everything seems to work, but running the client (test remote service
access) throws the following exception. Running the 1.1.1 jpetstore with
a 1.1-rc2 client works (?!). Is it my fault?
And by the way, the readme.txt says 'run "client/client.bat 1000"'
but you must be in the directory "client" otherwise the classpath
doesn't fit.
Not very important to me, just to mentioned it ...
--- start ---
...
Calling OrderService 'hessianProxy' with order ID 1000
Got order with order ID 1000 and order date Tue Oct 05 00:00:00 CEST =
2004
Shipping address is: 901 San Antonio Road
LineItem 1: 1 piece(s) of item EST-9
Calling OrderService 'httpInvokerProxy' with order ID 1000
org.springframework.remoting.RemoteAccessException: Cannot access HTTP
invoker remote service at
[http://localhost:8080/jpetstore/remoting/OrderService-httpinvoker];
nested exception is java.io.InvalidClassException:
org.springframework.remoting.support.RemoteInvocationResult; local class
incompatible: stream classdesc serialVersionUID =3D 3460514161585267937,
local class serialVersionUID =3D 2138555143707773549
java.io.InvalidClassException:
org.springframework.remoting.support.RemoteInvocationResult; local class
incompatible: stream classdesc serialVersionUID =3D 3460514161585267937,
local class serialVersionUID =3D 2138555143707773549
at =
java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:463)
at =
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1521)
at =
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)=
at =
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at =
java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
at
org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecut=
or.readRemoteInvocationResult(AbstractHttpInvokerRequestExecutor.java:126=
)
at
org.springframework.remoting.httpinvoker.SimpleHttpInvokerRequestExecutor=
.doExecuteRequest(SimpleHttpInvokerRequestExecutor.java:52)
at
org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecut=
or.executeRequest(AbstractHttpInvokerRequestExecutor.java:67)
at
org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.exe=
cuteRequest(HttpInvokerClientInterceptor.java:86)
at
org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.inv=
oke(HttpInvokerClientInterceptor.java:60)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Refl=
ectiveMethodInvocation.java:138)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAop=
Proxy.java:152)
at $Proxy1.getOrder(Unknown Source)
at
org.springframework.samples.jpetstore.service.client.OrderServiceClient.i=
nvokeOrderServices(OrderServiceClient.java:46)
at
org.springframework.samples.jpetstore.service.client.OrderServiceClient.m=
ain(OrderServiceClient.java:84)
Exception in thread "main"
--- end ---
j=FCrgen h=F6ller [werk3AT] wrote:
> Dear Spring community,
>=20
> I'm pleased to announce that Spring Framework 1.1.1 has just been =
released.
> This is a bugfix and minor enhancement release.
>=20
--
Ciao,
Thomas
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give =
us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out =
more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: katentim @hotmail.c. <kat...@ho...> - 2004-10-06 05:47:21
|
Second attempt at posting source for review. _________________________________________________________________ Smart Saving with ING Direct earn 5.25% p.a. variable rate: http://ad.au.doubleclick.net/clk;7249209;8842331;n?http://www.ingdirect.com.au/burst6offer.asp?id=8 |
|
From: Guillaume P. <gpo...@gl...> - 2004-10-06 04:11:05
|
Concerning OGNL, I took at stab at it to see how hard it would be to integrate. My prototype seems to work correctly, with a few adjustments needed. Would you guys be interested in a contribution from me? My implementation requires modifications in two areas. First, the a <ognl> tag should be added in the DTD, available everywhere you can use the <value> tag. In the XmlBeanDefinitionParser, the <ognl> tag would be converted to an OGNL implementation of a new Expression interface that define a class to resolve the expression given a context/BeanFactory. Then, the BeanFactory implementation would need to be modified, when it resolve ManagedList, RuntimeBeanReference, a new check would be added for the Expression class, where the expression would be resolved from the context. However, I encountered a minor issue while creating my prototype. The resolution where the expression would be converted to a value is in AbstractAutowireCapableBeanFactory, which doesn't implement ListableBeanFactory. It causes a problem because OGNL ask for a Map as context, and it calls the keySet() method on it, thus the map passed to OGNL must be able to return all the bean names in the context. A quick fix is to cast the AbstractAutowireCapableBeanFactory instance to ListableBeanFactory, since all of Spring's concrete BeanFactory implements ListableBeanFactory anyway, but it's somewhat an hack, and if someone extend AbstractAutowireCapableBeanFactory and doesn't implement ListableBeanFactory, then the OGNL wouldn't work properly. I guess it's unlikely though. I've attached the patch to this email, with the prototype for OGNL. It's working, but it doesn't have any documenation, decent tests, etc. If you guys are interested in my code, I can polish it, document it, and add a better test coverage. Let me know what you think. Regards, Guillaume ----- Original Message ----- From: "Colin Sampaleanu" <col...@ex...> To: <spr...@li...> Sent: Monday, October 04, 2004 1:32 PM Subject: Re: [Springframework-developer] PropertyPathFactoryBean > Good stuff. It overlaps of course with the mythical OGNL or expression > support which keeps getting pushed back, but in the meantime provides some > of the benefits for pretty little extra code... > > > jürgen höller [werk3AT] wrote: > >>I've just added a PropertyPathFactoryBean, following this suggestion: >> >>http://opensource.atlassian.com/projects/spring/browse/SPR-343 >> >> >>Usage examples: >> >> // target bean to be referenced by name >> <bean id="tb" class="org.springframework.beans.TestBean" >> singleton="false"> >> <property name="age"><value>10</value></property> >> <property name="spouse"> >> <bean class="org.springframework.beans.TestBean"> >> <property name="age"><value>11</value></property> >> </bean> >> </property> >> </bean> >> >> // will result in 12, which is the value of property 'age' of the inner >> bean >> <bean id="propertyPath1" >> class="org.springframework.beans.factory.config.PropertyPathFactoryBean"> >> <property name="targetObject"> >> <bean class="org.springframework.beans.TestBean"> >> <property name="age"><value>12</value></property> >> </bean> >> </property> >> <property name="propertyPath"><value>age</value></property> >> </bean> >> >> // will result in 11, which is the value of property 'spouse.age' of bean >> 'tb' >> <bean id="propertyPath2" >> class="org.springframework.beans.factory.config.PropertyPathFactoryBean"> >> <property name="targetBeanName"><value>tb</value></property> >> <property name="propertyPath"><value>spouse.age</value></property> >> </bean> >> >> // will result in 10, which is the value of property 'age' of bean 'tb' >> <bean id="tb.age" >> class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/> >> >> >>The last one, interpreting the bean name as 'beanName.property' pattern, >>is quite concise... >> > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out > more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Tran, K. <khi...@me...> - 2004-10-06 01:19:26
|
Hi,
I successfully experimented Spring, everything works fine. I am using the
ClasspathXmlApplicationContext.
Now I am integrating Spring within Eclipse RCP, which causes me some
headaches:
-My spring application cannot see the spring configuration file.
I manage to solve this problem by subclassing the
ClasspathXmlApplicationContext and ClasspathResource classes. Now Spring
cannot see ResourceBundleMessageSource.class!
My question is then: how could I centralize all resource lookup or class
lookup within Spring without subclassing all its classes. Spring uses the
current Thread as its classloading mechanism, is there a way to change that
globally? I want to define my way of class lookup globally.
Thanks, Khiet.
|
|
From: Chris N. <ch...@si...> - 2004-10-06 00:53:18
|
Rod Johnson wrote: > Your analysis looked right to me. Unfortunate. There are certainly quite > a few negative consequences of the CGLIB subclassing approach. It would > be good if there were other options we could consider when proxying > classes (the AopProxyFactory interface gives us a choice), but I'm not > aware of anything that's equally convenient. I've posted a comment on how to work around this "feature" of CGLIB (it is a feature, really :-) If you want to proxy concrete classes your options are pretty limited, I think. One possibility you may not be aware of is that if you are proxying JavaBeans you could use net.sf.cglib.beans.BeanGenerator to generate a bean that has the same properties as your target bean. Then use the Enhancer to proxy the generated bean, dispatching to the target as appropriate. This way you avoid all issues with the superclass constructor being invoked, since the generated bean extends Object. Let me know if you want to explore this further. Chris |
|
From: katentim @hotmail.c. <kat...@ho...> - 2004-10-05 22:52:10
|
I've written a XSL stylesheet (and Ant target) which transforms the spring.tld file into a HTML frameset with menu. I thought this would achieve a couple of things: - Documentation is as up-to-date as the TLD - Documentation is sourced from TLD and XSL (and links to Javadocs) - Benefits of XSL (e.g. consistent and easy to change layout for all tags) Extra tag comments can be added to the XSL file, but it should be more maintainable overall. Some of this documentation can be moved to the TLD according to the TLD DTD (e.g. add "attribute" and "variable" descriptions). This is the best place for the documentation, as long as there isn't so much that file size becomes a concern. In that case the documentation can be moved to the style sheet. Preview: I've already sent this post with a 7KB preview attachment but it has never arrived on the list. Has anyone else had this problem or does it often take more than 12 hours? If people want a preview let me know and if doesn't arrive in the list in another 12 hours I'll post to JIRA. Cheers. _________________________________________________________________ Smart Saving with ING Direct earn 5.25% p.a. variable rate: http://ad.au.doubleclick.net/clk;7249209;8842331;n?http://www.ingdirect.com.au/burst6offer.asp?id=8 |
|
From: <al...@jt...> - 2004-10-05 22:30:50
|
<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.115</td></tr><tr><td class=3D"header-data"><span class=
=3D"header-label">Date of build: </span>10/06/2004 00:16:41</td></tr><=
tr><td class=3D"header-data"><span class=3D"header-label">Time to build:&nb=
sp;</span>13 minutes 24 seconds</td></tr><tr><td class=3D"header-data"><spa=
n class=3D"header-label">Last changed: </span>10/05/2004 18:27:26</td>=
</tr><tr><td class=3D"header-data"><span class=3D"header-label">Last log en=
try: </span>moved configTimeDataSourceHolder from LocalDataSourceJobSt=
ore to SchedulerFactoryBean</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: =
(16) </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/sched=
uling/quartz/LocalDataSourceJobStore.java</td><td class=3D"modifications-da=
ta">moved configTimeDataSourceHolder from LocalDataSourceJobStore to Schedu=
lerFactoryBean</td></tr><tr class=3D"modifications-oddrow"><td class=3D"mod=
ifications-data">modified</td><td class=3D"modifications-data">jhoeller</td=
><td class=3D"modifications-data">src/org/springframework/scheduling/quartz=
/SchedulerFactoryBean.java</td><td class=3D"modifications-data">moved confi=
gTimeDataSourceHolder from LocalDataSourceJobStore to SchedulerFactoryBean<=
/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/aop/framework/DefaultAopProxyFa=
ctory.java</td><td class=3D"modifications-data">polishing</td></tr><tr clas=
s=3D"modifications-oddrow"><td class=3D"modifications-data">modified</td><t=
d class=3D"modifications-data">jhoeller</td><td class=3D"modifications-data=
">src/org/springframework/aop/framework/ProxyConfig.java</td><td class=3D"m=
odifications-data">polishing</td></tr><tr class=3D"modifications-evenrow"><=
td class=3D"modifications-data">modified</td><td class=3D"modifications-dat=
a">jhoeller</td><td class=3D"modifications-data">src/org/springframework/ao=
p/framework/autoproxy/AbstractAutoProxyCreator.java</td><td class=3D"modifi=
cations-data">polishing</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">src/org/springframework/orm/jdo/=
PersistenceManagerFactoryUtils.java</td><td class=3D"modifications-data">ex=
plicit check for matching connection on closeConnectionIfNecessary</td></tr=
><tr class=3D"modifications-evenrow"><td class=3D"modifications-data">modif=
ied</td><td class=3D"modifications-data">jhoeller</td><td class=3D"modifica=
tions-data">src/org/springframework/orm/hibernate/SessionFactoryUtils.java<=
/td><td class=3D"modifications-data">explicit check for matching connection=
on closeConnectionIfNecessary</td></tr><tr class=3D"modifications-oddrow">=
<td class=3D"modifications-data">modified</td><td class=3D"modifications-da=
ta">jhoeller</td><td class=3D"modifications-data">src/org/springframework/j=
dbc/datasource/DataSourceUtils.java</td><td class=3D"modifications-data">ex=
plicit check for matching connection on closeConnectionIfNecessary</td></tr=
><tr class=3D"modifications-evenrow"><td class=3D"modifications-data">modif=
ied</td><td class=3D"modifications-data">jhoeller</td><td class=3D"modifica=
tions-data">src/org/springframework/web/servlet/FrameworkServlet.java</td><=
td class=3D"modifications-data">polishing</td></tr><tr class=3D"modificatio=
ns-oddrow"><td class=3D"modifications-data">modified</td><td class=3D"modif=
ications-data">jhoeller</td><td class=3D"modifications-data">src/org/spring=
framework/web/context/ContextLoader.java</td><td class=3D"modifications-dat=
a">polishing</td></tr><tr class=3D"modifications-evenrow"><td class=3D"modi=
fications-data">modified</td><td class=3D"modifications-data">jhoeller</td>=
<td class=3D"modifications-data">docs/reference/src/dtd.xml</td><td class=
=3D"modifications-data">allow "bean*" rather than "bean+" in XML bean defin=
itions</td></tr><tr class=3D"modifications-oddrow"><td class=3D"modificatio=
ns-data">modified</td><td class=3D"modifications-data">jhoeller</td><td cla=
ss=3D"modifications-data">src/org/springframework/beans/factory/xml/spring-=
beans.dtd</td><td class=3D"modifications-data">allow "bean*" rather than "b=
ean+" in XML bean definitions</td></tr><tr class=3D"modifications-evenrow">=
<td class=3D"modifications-data">modified</td><td class=3D"modifications-da=
ta">jhoeller</td><td class=3D"modifications-data">test/org/springframework/=
beans/factory/config/FieldRetrievingFactoryBeanTests.java</td><td class=3D"=
modifications-data">considers bean name as static field expression if no ot=
her properties specified</td></tr><tr class=3D"modifications-oddrow"><td cl=
ass=3D"modifications-data">modified</td><td class=3D"modifications-data">jh=
oeller</td><td class=3D"modifications-data">src/org/springframework/beans/f=
actory/config/FieldRetrievingFactoryBean.java</td><td class=3D"modification=
s-data">considers bean name as static field expression if no other properti=
es specified</td></tr><tr class=3D"modifications-evenrow"><td class=3D"modi=
fications-data">modified</td><td class=3D"modifications-data">jhoeller</td>=
<td class=3D"modifications-data">src/org/springframework/beans/factory/conf=
ig/PropertyPathFactoryBean.java</td><td class=3D"modifications-data">added =
propertyPath check</td></tr><tr class=3D"modifications-oddrow"><td class=3D=
"modifications-data">modified</td><td class=3D"modifications-data">jhoeller=
</td><td class=3D"modifications-data">docs/taglib/tag/BindErrorsTag.html</t=
d><td class=3D"modifications-data">fixed typos</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: Thomas B. <sp...@th...> - 2004-10-05 22:20:45
|
Hi, first of all: @developer: great work so far with the spring framework! @rod + @juergen: great "must read by every j2ee developer" book!. @rod: cool presentation at JAOO. I heard people talking about spring at breakfast, breaks, lunch, ... people get "spring infected!" :) and then: I download this release and try to run the jpetstore example. Everything seems to work, but running the client (test remote service access) throws the following exception. Running the 1.1.1 jpetstore with a 1.1-rc2 client works (?!). Is it my fault? And by the way, the readme.txt says 'run "client/client.bat 1000"' but you must be in the directory "client" otherwise the classpath doesn't fit. Not very important to me, just to mentioned it ... --- start --- ... Calling OrderService 'hessianProxy' with order ID 1000 Got order with order ID 1000 and order date Tue Oct 05 00:00:00 CEST 2004 Shipping address is: 901 San Antonio Road LineItem 1: 1 piece(s) of item EST-9 Calling OrderService 'httpInvokerProxy' with order ID 1000 org.springframework.remoting.RemoteAccessException: Cannot access HTTP invoker remote service at [http://localhost:8080/jpetstore/remoting/OrderService-httpinvoker]; nested exception is java.io.InvalidClassException: org.springframework.remoting.support.RemoteInvocationResult; local class incompatible: stream classdesc serialVersionUID = 3460514161585267937, local class serialVersionUID = 2138555143707773549 java.io.InvalidClassException: org.springframework.remoting.support.RemoteInvocationResult; local class incompatible: stream classdesc serialVersionUID = 3460514161585267937, local class serialVersionUID = 2138555143707773549 at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:463) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1521) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.readRemoteInvocationResult(AbstractHttpInvokerRequestExecutor.java:126) at org.springframework.remoting.httpinvoker.SimpleHttpInvokerRequestExecutor.doExecuteRequest(SimpleHttpInvokerRequestExecutor.java:52) at org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.executeRequest(AbstractHttpInvokerRequestExecutor.java:67) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:86) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152) at $Proxy1.getOrder(Unknown Source) at org.springframework.samples.jpetstore.service.client.OrderServiceClient.invokeOrderServices(OrderServiceClient.java:46) at org.springframework.samples.jpetstore.service.client.OrderServiceClient.main(OrderServiceClient.java:84) Exception in thread "main" --- end --- jürgen höller [werk3AT] wrote: > Dear Spring community, > > I'm pleased to announce that Spring Framework 1.1.1 has just been released. > This is a bugfix and minor enhancement release. > -- Ciao, Thomas |
|
From: Rod J. <ro...@in...> - 2004-10-05 20:17:57
|
Your analysis looked right to me. Unfortunate. There are certainly quite a few negative consequences of the CGLIB subclassing approach. It would be good if there were other options we could consider when proxying classes (the AopProxyFactory interface gives us a choice), but I'm not aware of anything that's equally convenient. Rod jürgen höller [werk3AT] wrote: > Rod, Rob, CGLIB guys, > > Have a look at the following: > > http://opensource.atlassian.com/projects/spring/browse/SPR-368 > > Is my analysis correct? I've nailed this down with the debugger, so I'm pretty sure that it is. > > I'm not aware of any way to get around this, as it is fundamentally caused by the way CGLIB works... > > Juergen > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > -- ____________________________________________________ Rod Johnson Interface21 - Spring Services from the Source http://www.springframework.com Founder, Spring Framework: http://www.springframework.org Author, "Expert One-on-One J2EE Development Without EJB" (May 2004, with Juergen Hoeller). http://www.amazon.com/exec/obidos/ASIN/0764558315/ Author, "Expert One-on-One J2EE Design and Development" (October 2002). http://www.amazon.com/exec/obidos/tg/detail/-/0764543857/ ____________________________________________________ Interface21 Limited Registered Office Summit House, 2-2a Highfield Road, Dartford, Kent DA1 2JY Registered in England and Wales No. 5187766 ____________________________________________________ |
|
From: Dmitriy K. <dko...@ru...> - 2004-10-05 18:24:58
|
James, that would be very interesting to see. I'll look forward for that! jas...@ma... wrote: > FWIW I'd like to try wrap up ActiveSOAP as a possible remoting > solution for Spring. Plus ActiveSOAP's default configuration mechanism > is gonna be Spring so the two frameworks should work nicely with each > other. > > On 5 Oct 2004, at 18:58, Dmitriy Kopylenko wrote: > >> Are there any plans to provide ActiveSOAP support? >> >> http://activesoap.codehaus.org/ >> >> Regards, >> Dmitriy. >> >> >> ------------------------------------------------------- >> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal >> Use IT products in your business? Tell us what you think of them. >> Give us >> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find >> out more >> http://productguide.itmanagersjournal.com/guidepromo.tmpl >> _______________________________________________ >> Springframework-developer mailing list >> Spr...@li... >> https://lists.sourceforge.net/lists/listinfo/springframework-developer >> >> > > James > ------- > http://radio.weblogs.com/0112098/ > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out > more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: <jas...@ma...> - 2004-10-05 18:18:45
|
FWIW I'd like to try wrap up ActiveSOAP as a possible remoting solution for Spring. Plus ActiveSOAP's default configuration mechanism is gonna be Spring so the two frameworks should work nicely with each other. On 5 Oct 2004, at 18:58, Dmitriy Kopylenko wrote: > Are there any plans to provide ActiveSOAP support? > > http://activesoap.codehaus.org/ > > Regards, > Dmitriy. > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on > ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give > us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out > more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > James ------- http://radio.weblogs.com/0112098/ |
|
From: Dmitriy K. <dko...@ru...> - 2004-10-05 18:03:43
|
Are there any plans to provide ActiveSOAP support? http://activesoap.codehaus.org/ Regards, Dmitriy. |
|
From: Colin S. <col...@ex...> - 2004-10-05 15:48:24
|
This may be of interest to some Spring users. http://www.theserverside.com/news/thread.tss?thread_id=29237 If you check out some of the demos, the apps (based on flash as the drawing engine) look very nice. This seems to be a pretty nice framework, and I think it's worth investigating how well it could integrate with Spring. I'll try to do that in a few weeks' time if nobody else has... Colin |
|
From: B. <jer...@xt...> - 2004-10-05 15:35:51
|
My bad, there is no need for it. After digging intensively in the JDK doc=
o, I
found the following way of using a choice format:
pattern=3DThere {0,choice,0#are no files|1#is one file|1<are {2} files} o=
n {1}
Quite tricky, but hey it works :-)
Too bad for translators! lol
PS: I'm gonna annotate the forum topic I created earlier.
Regards,
Jerome.
|
|
From: <jue...@we...> - 2004-10-05 15:01:49
|
Rod, Rob, CGLIB guys, Have a look at the following: http://opensource.atlassian.com/projects/spring/browse/SPR-368 Is my analysis correct? I've nailed this down with the debugger, so I'm = pretty sure that it is. I'm not aware of any way to get around this, as it is fundamentally = caused by the way CGLIB works... Juergen |
|
From: Colin S. <col...@ex...> - 2004-10-05 14:10:24
|
Take a look at this forum thread: http://forum.springframework.org/viewtopic.php?p=4765 I think it does add some value to allow MessageSourceAccessor to pull the default locale for the methods where the locale is not specified, from a ThreadLocal variable, instead of always using the default locale that was specified on construction. This would allow people to use an interceptor to set the current Locale as a ThreadLocal, and then any controller code would not have to worry about handling the current locale. Currently view code does not have to worry about locale handling, nor does controller code which deals only with the BindException ('errors') instance, but any other controller code has to do a RequestContextUtils.getLocale() call to manually get and use the locale. Additionally, any other objects that extend from ApplicationObjectSupport and use the supplied MessageSourceAccessor have to get the locale from somewhere (not-determined) if they want to override the default locale... What do you guys think? Colin |
|
From: <jue...@we...> - 2004-10-05 12:44:27
|
I'll do it in the course of a couple of commits tonight.
Thanks for pointing this issue out, BTW :-)
Juergen
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...]On Behalf
Of Dmitriy Kopylenko
Sent: Tuesday, October 05, 2004 2:30 PM
To: spr...@li...
Subject: Re: [Springframework-developer] Small change in DataBinder's
bind() behavior
Juergen,
this would work perfectly as well!!! Can you commit this or do you want=20
me to do it?
Thanks,
Dmitriy.
j=FCrgen h=F6ller [werk3AT] wrote:
>Dmitriy,
>=20
>I wouldn't build generic string trimming capability into DataBinder =
itself: We already have StringTrimmerEditor for this, which can be =
registered as custom editor.
>=20
>That said, I do see your use case for required fields. What about =
redefining required fields to accept empty strings? I.e. to change the =
required check as follows:
>=20
> if (pv =3D=3D null || pv.getValue() =3D=3D null ||
> (pv.getValue() instanceof String && !StringUtils.hasText((String) =
pv.getValue()))) {
>
>I consider redefining the required check like this, without an extra =
config property. IMO, this is sensible for a required check anyway, from =
a semantic point of view...
>=20
>Juergen
>=20
>
>________________________________
>
>Von: spr...@li... im Auftrag =
von Dmitriy Kopylenko
>Gesendet: Di 05.10.2004 05:00
>An: spr...@li...
>Betreff: [Springframework-developer] Small change in DataBinder's =
bind() behavior
>
>
>Juergen,
>
>I was browsing the source for DataBinder and co. and playing with =
"required fields" functionality and DataBinder's tests and I've noticed =
the following - it's not possible to configure the DataBinder to trim =
the unwanted spaces from the required fields. Consider the following =
test case:
>
>TestBean alef =3D new TestBean();
>DataBinder binder =3D new DataBinder(alef, "person");
>binder.setRequiredFields(new String[]{"name", "touchy", "date"});
>
>MutablePropertyValues pvs =3D new MutablePropertyValues();
>pvs.addPropertyValue(new PropertyValue("touchy", " "));
>pvs.addPropertyValue(new PropertyValue("name", null));
>
>binder.bind(pvs);
>
>BindException ex =3D binder.getErrors();
>assertEquals("Wrong amount of errors", 3, ex.getErrorCount());
>
>This will fail because it will not recognize required "touchy" field as =
not being present because it contains spaces. It would really be nice to =
control trimming of such "accidentally set spaces" for required fields =
so the bind() method could then treat them as "missing required field".
>
>I've added the flag to DataBinder ("trimSpacesInStringFields") and =
small piece of logic in DataBinder.bind(PropertyValues):
>
>// check for missing fields
> if (this.requiredFields !=3D null) {
> for (int i =3D 0; i < this.requiredFields.length; i++) {
> PropertyValue pv =3D =
pvs.getPropertyValue(this.requiredFields[i]);
> =20
> //This is what I added
> if(this.trimSpacesInStringFields && pv !=3D null && =
pv.getValue() !=3D null && pv.getValue() instanceof String) {
> pv =3D new PropertyValue(pv.getName(), =
((String)pv.getValue()).trim());
> }
> =20
> if (pv =3D=3D null || "".equals(pv.getValue()) || =
pv.getValue() =3D=3D null) {
> // create field error with code "required"
> String field =3D this.requiredFields[i];
> this.errors.addError(
> new FieldError(this.errors.getObjectName(), =
field, "", true,
> =
this.errors.resolveMessageCodes(MISSING_FIELD_ERROR_CODE, field),
> getArgumentsForBindingError(field), "Field =
'" + field + "' is required"));
> }
> }
> }
>...// the rest is omitted
>
>Then by modifying test case a little, it works perfectly:
>
> TestBean alef =3D new TestBean();
>
> DataBinder binder =3D new DataBinder(alef, "person");
> binder.setRequiredFields(new String[]{"name", "touchy", =
"date"});
> =20
> //Set the new flag
> binder.setTrimSpacesInStringFields(true);
>
> MutablePropertyValues pvs =3D new MutablePropertyValues();
> pvs.addPropertyValue(new PropertyValue("touchy", " "));
> pvs.addPropertyValue(new PropertyValue("name", null));
>
> binder.bind(pvs);
>
> BindException ex =3D binder.getErrors();
> System.out.println(alef.getTouchy().length());
> System.out.println(ex);
> assertEquals("Wrong amount of errors", 3, ex.getErrorCount());
>
>I think it would be a very handy feature (for us at least), unless I =
missed something fundamental.
>
>Thoughts?
>
>Regards,
>Dmitriy.
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: IT Product Guide on =
ITManagersJournal
>Use IT products in your business? Tell us what you think of them. Give =
us
>Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out =
more
>http://productguide.itmanagersjournal.com/guidepromo.tmpl
>_______________________________________________
>Springframework-developer mailing list
>Spr...@li...
>https://lists.sourceforge.net/lists/listinfo/springframework-developer
> =20
>
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give =
us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out =
more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Dmitriy K. <dko...@ru...> - 2004-10-05 12:31:50
|
FieldRetrievingFactoryBean looks great! Dmitriy. jürgen höller [werk3AT] wrote: >Well, effectively we already *have* a built-in kind of expression language: BeanWrapper's property path evaluation capabilities, roughly following JSTL EL syntax. All that PropertyPathFactoryBean does is evaluate such BeanWrapper-style property paths on a given target bean. > >I guess that's as convenient as you can get without the BeanFactory knowing about what's going on here (i.e. without the core factory knowing about expressions). > >Regarding constants: Since 1.1 RC2, we have a FieldRetrievingFactoryBean which can be used to retrieve static fields: > >// standard definition for exposing a static field, specifying the "staticField" property ><bean id="myField" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean"> > <property name="staticField"><value>java.sql.Connection.TRANSACTION_SERIALIZABLE</value></property> ></bean> > >// convenience version that specifies a static field pattern as bean name (since 1.1.2) ><bean id="java.sql.Connection.TRANSACTION_SERIALIZABLE" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean"/> > >If it's just about the odd constant in your XML bean definitions, this should be good enough. Of course, full-fledged scripting support *is* desirable for needs that go beyond that: for example, to specify entire bean definitions in scripts. I see those as two different goals, though. > >Juergen > > >________________________________ > >Von: spr...@li... im Auftrag von Rod Johnson >Gesendet: Mo 04.10.2004 22:51 >An: spr...@li... >Betreff: RE: [Springframework-developer] PropertyPathFactoryBean > > > >Have to say that this looks to me like it's making a case for an expression >language instead of a FactoryBean. > >A similar requirement that would also be well addressed by OGNL/whatever: >evaluating a constant. E.g. an AutowireCapableBeanFactory constant, which I >recently had to configure via a property. It would be nice to be able to do >that easily. > >Rgds >Rod > >-----Original Message----- >From: spr...@li... >[mailto:spr...@li...] On Behalf Of >Colin Sampaleanu >Sent: 04 October 2004 18:32 >To: spr...@li... >Subject: Re: [Springframework-developer] PropertyPathFactoryBean > >Good stuff. It overlaps of course with the mythical OGNL or expression >support which keeps getting pushed back, but in the meantime provides some >of the benefits for pretty little extra code... > > >jürgen höller [werk3AT] wrote: > > > >>I've just added a PropertyPathFactoryBean, following this suggestion: >> >>http://opensource.atlassian.com/projects/spring/browse/SPR-343 >> >> >>Usage examples: >> >>// target bean to be referenced by name <bean id="tb" >>class="org.springframework.beans.TestBean" singleton="false"> >> <property name="age"><value>10</value></property> >> <property name="spouse"> >> <bean class="org.springframework.beans.TestBean"> >> <property name="age"><value>11</value></property> >> </bean> >> </property> >></bean> >> >>// will result in 12, which is the value of property 'age' of the >>inner bean <bean id="propertyPath1" >> >> >class="org.springframework.beans.factory.config.PropertyPathFactoryBean"> > > >> <property name="targetObject"> >> <bean class="org.springframework.beans.TestBean"> >> <property name="age"><value>12</value></property> >> </bean> >> </property> >> <property name="propertyPath"><value>age</value></property> >></bean> >> >>// will result in 11, which is the value of property 'spouse.age' of bean >> >> >'tb' > > >><bean id="propertyPath2" >> >> >class="org.springframework.beans.factory.config.PropertyPathFactoryBean"> > > >> <property name="targetBeanName"><value>tb</value></property> >> <property name="propertyPath"><value>spouse.age</value></property> >></bean> >> >>// will result in 10, which is the value of property 'age' of bean 'tb' >><bean id="tb.age" >>class="org.springframework.beans.factory.config.PropertyPathFactoryBea >>n"/> >> >> >>The last one, interpreting the bean name as 'beanName.property' pattern, is >> >> >quite concise... > > >> >> > > > > >------------------------------------------------------- >This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use >IT products in your business? Tell us what you think of them. Give us Your >Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more >http://productguide.itmanagersjournal.com/guidepromo.tmpl >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > >------------------------------------------------------- >This SF.net email is sponsored by: IT Product Guide on ITManagersJournal >Use IT products in your business? Tell us what you think of them. Give us >Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more >http://productguide.itmanagersjournal.com/guidepromo.tmpl >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > >------------------------------------------------------- >This SF.net email is sponsored by: IT Product Guide on ITManagersJournal >Use IT products in your business? Tell us what you think of them. Give us >Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more >http://productguide.itmanagersjournal.com/guidepromo.tmpl >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > |