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: Colin S. <col...@ex...> - 2004-07-17 02:18:46
|
It would still be nice to get all or most of the tests working in Eclipse again, but it'll have to wait a while. In the meantime, it's reasonable to run tests individually in Eclispe while writing code, and then run everything from ant right before checking in to make sure nothing's broken. Colin Thomas Risberg wrote: > Colin, > > This is excellent. It seems like I can run the tests faster than I > can type this email :-) The failing JUnit tests within Eclipse were > starting to bother me and testing with Ant was too slow. Now the Ant > tests take only 10% extra compared to running within Eclipse. > Definitely worth the upgrade!!!! Thanks for figuring this out. > > Thomas > > Colin Sampaleanu wrote: > >> I spent a bit more time and got this going. Running the "tests" >> target from command-line went down for me from about 6:40 to 1:37. >> Note bad! >> >> To get things going, I set the <junit> element forkmode to >> 'perBatch'. Then I excluded the 3 tests from the main <batchtest> >> element, and added them as 3 separate single test <batchtests> (still >> kept as <batchtest> instead of <test> so the default excludes would >> still work. It's not that great to have to name tests individually >> like this, but it's just a few. If this has to be done for a few >> more, it will actually get less verbose to just use a separate junit >> task instance, then one instance would have forkMode="perBatch", and >> one forkMode="perTest" (the default). >> >> Regards, >> Colin >> >> Colin Sampaleanu wrote: >> >>> Ant 1.6.2 is out, and with it support for a forkmode="once" on the >>> junit task, which allows ant to still fork for junit tests, but only >>> once for the entire task (instead of for each testcase). >>> Alternately, forkmode="perBatch" allows forking once per batch element. >>> >>> This is pretty promising, since it could bring the time to run the >>> test suite from ant down to a similar value to when running in an >>> IDE, which is currently much faster. >>> >>> I've tried to give it a go (making sure to remove the ant 1.6.1 in >>> the lib dir, otherwise that will interfere), by adding >>> forkmode="once" to the junit element in the tests target. It is >>> currently breaking on SqlStateExceptionTranslatorTests, due to the >>> initial context factory builder already being set. This should be >>> resolvable by using a separate batch for that test, or some other >>> strategy. I am curious however why this doesn't break in the IDE >>> though. >>> >>> I don't have time to play with this any longer, but will give it a >>> go at some later date. If anybody feels like playing around with >>> this themselves, please go ahead by all means. >>> >>> Regards, >>> Colin >>> >>> ----- >>> >>> [junit] Testsuite: >>> org.springframework.jdbc.support.SQLStateExceptionTransla >>> torTests >>> [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0 sec >>> >>> [junit] Testcase: testBadSqlGrammar took 0 sec >>> [junit] Testcase: testInvalidSqlStateCode took 0 sec >>> [junit] Testcase: testMalformedSqlStateCodes took 0 sec >>> [junit] java.lang.ExceptionInInitializerError >>> [junit] at java.lang.Class.forName0(Native Method) >>> [junit] at java.lang.Class.forName(Class.java:141) >>> [junit] at >>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner. >>> <init>(JUnitTestRunner.java:204) >>> [junit] at >>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner. >>> <init>(JUnitTestRunner.java:177) >>> [junit] at >>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner. >>> launch(JUnitTestRunner.java:651) >>> [junit] at >>> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner. >>> main(JUnitTestRunner.java:537) >>> [junit] Caused by: java.lang.IllegalStateException: >>> InitialContextFactoryBui >>> lder already set >>> [junit] at >>> javax.naming.spi.NamingManager.setInitialContextFactoryBuilde >>> r(NamingManager.java:687) >>> [junit] at >>> org.springframework.jms.JmsTestCase.<clinit>(JmsTestCase.java >>> :93) >> |
|
From: Thomas R. <tho...@tr...> - 2004-07-17 01:39:44
|
Colin, This is excellent. It seems like I can run the tests faster than I can type this email :-) The failing JUnit tests within Eclipse were starting to bother me and testing with Ant was too slow. Now the Ant tests take only 10% extra compared to running within Eclipse. Definitely worth the upgrade!!!! Thanks for figuring this out. Thomas Colin Sampaleanu wrote: > I spent a bit more time and got this going. Running the "tests" target > from command-line went down for me from about 6:40 to 1:37. Note bad! > > To get things going, I set the <junit> element forkmode to 'perBatch'. > Then I excluded the 3 tests from the main <batchtest> element, and > added them as 3 separate single test <batchtests> (still kept as > <batchtest> instead of <test> so the default excludes would still > work. It's not that great to have to name tests individually like > this, but it's just a few. If this has to be done for a few more, it > will actually get less verbose to just use a separate junit task > instance, then one instance would have forkMode="perBatch", and one > forkMode="perTest" (the default). > > Regards, > Colin > > Colin Sampaleanu wrote: > >> Ant 1.6.2 is out, and with it support for a forkmode="once" on the >> junit task, which allows ant to still fork for junit tests, but only >> once for the entire task (instead of for each testcase). Alternately, >> forkmode="perBatch" allows forking once per batch element. >> >> This is pretty promising, since it could bring the time to run the >> test suite from ant down to a similar value to when running in an >> IDE, which is currently much faster. >> >> I've tried to give it a go (making sure to remove the ant 1.6.1 in >> the lib dir, otherwise that will interfere), by adding >> forkmode="once" to the junit element in the tests target. It is >> currently breaking on SqlStateExceptionTranslatorTests, due to the >> initial context factory builder already being set. This should be >> resolvable by using a separate batch for that test, or some other >> strategy. I am curious however why this doesn't break in the IDE though. >> >> I don't have time to play with this any longer, but will give it a go >> at some later date. If anybody feels like playing around with this >> themselves, please go ahead by all means. >> >> Regards, >> Colin >> >> ----- >> >> [junit] Testsuite: >> org.springframework.jdbc.support.SQLStateExceptionTransla >> torTests >> [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0 sec >> >> [junit] Testcase: testBadSqlGrammar took 0 sec >> [junit] Testcase: testInvalidSqlStateCode took 0 sec >> [junit] Testcase: testMalformedSqlStateCodes took 0 sec >> [junit] java.lang.ExceptionInInitializerError >> [junit] at java.lang.Class.forName0(Native Method) >> [junit] at java.lang.Class.forName(Class.java:141) >> [junit] at >> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner. >> <init>(JUnitTestRunner.java:204) >> [junit] at >> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner. >> <init>(JUnitTestRunner.java:177) >> [junit] at >> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner. >> launch(JUnitTestRunner.java:651) >> [junit] at >> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner. >> main(JUnitTestRunner.java:537) >> [junit] Caused by: java.lang.IllegalStateException: >> InitialContextFactoryBui >> lder already set >> [junit] at >> javax.naming.spi.NamingManager.setInitialContextFactoryBuilde >> r(NamingManager.java:687) >> [junit] at >> org.springframework.jms.JmsTestCase.<clinit>(JmsTestCase.java >> :93) > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > |
|
From: <al...@jt...> - 2004-07-16 23:21:36
|
<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.55</td></tr><tr><td class=3D"header-data"><span class=
=3D"header-label">Date of build: </span>07/17/2004 00:16:06</td></tr><=
tr><td class=3D"header-data"><span class=3D"header-label">Time to build:&nb=
sp;</span>13 minutes 16 seconds</td></tr><tr><td class=3D"header-data"><spa=
n class=3D"header-label">Last changed: </span>07/16/2004 06:24:09</td>=
</tr><tr><td class=3D"header-data"><span class=3D"header-label">Last log en=
try: </span>keep on working on tests</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: =
(17) </td></tr><tr class=3D"modifications-evenrow"><td =
class=3D"modifications-data">modified</td><td class=3D"modifications-data">=
colins</td><td class=3D"modifications-data">autobuilds/apps/ejbtest/src/web=
app/WEB-INF/classes/servicelayer-applicationContext.xml</td><td class=3D"mo=
difications-data">keep on working on tests</td></tr><tr class=3D"modificati=
ons-oddrow"><td class=3D"modifications-data">modified</td><td class=3D"modi=
fications-data">kdonald</td><td class=3D"modifications-data">sandbox/src/or=
g/springframework/rules/Operator.java</td><td class=3D"modifications-data">=
initial support for dirty forms</td></tr><tr class=3D"modifications-evenrow=
"><td class=3D"modifications-data">modified</td><td class=3D"modifications-=
data">kdonald</td><td class=3D"modifications-data">sandbox/src/org/springfr=
amework/rules/reporting/PropertyResults.java</td><td class=3D"modifications=
-data">initial support for dirty forms</td></tr><tr class=3D"modifications-=
oddrow"><td class=3D"modifications-data">added</td><td class=3D"modificatio=
ns-data">kdonald</td><td class=3D"modifications-data">sandbox/src/org/sprin=
gframework/rules/values/AbstractFormObject.java</td><td class=3D"modificati=
ons-data">initial support for dirty forms</td></tr><tr class=3D"modificatio=
ns-evenrow"><td class=3D"modifications-data">added</td><td class=3D"modific=
ations-data">kdonald</td><td class=3D"modifications-data">sandbox/src/org/s=
pringframework/rules/values/AbstractPropertyChangePublisher.java</td><td cl=
ass=3D"modifications-data">initial support for dirty forms</td></tr><tr cla=
ss=3D"modifications-oddrow"><td class=3D"modifications-data">modified</td><=
td class=3D"modifications-data">kdonald</td><td class=3D"modifications-data=
">sandbox/src/org/springframework/rules/values/BufferedValueModel.java</td>=
<td class=3D"modifications-data">initial support for dirty forms</td></tr><=
tr class=3D"modifications-evenrow"><td class=3D"modifications-data">modifie=
d</td><td class=3D"modifications-data">kdonald</td><td class=3D"modificatio=
ns-data">sandbox/src/org/springframework/rules/values/CompoundFormModel.jav=
a</td><td class=3D"modifications-data">initial support for dirty forms</td>=
</tr><tr class=3D"modifications-oddrow"><td class=3D"modifications-data">mo=
dified</td><td class=3D"modifications-data">kdonald</td><td class=3D"modifi=
cations-data">sandbox/src/org/springframework/rules/values/DefaultFormModel=
.java</td><td class=3D"modifications-data">initial support for dirty forms<=
/td></tr><tr class=3D"modifications-evenrow"><td class=3D"modifications-dat=
a">added</td><td class=3D"modifications-data">kdonald</td><td class=3D"modi=
fications-data">sandbox/src/org/springframework/rules/values/FormError.java=
</td><td class=3D"modifications-data">initial support for dirty forms</td><=
/tr><tr class=3D"modifications-oddrow"><td class=3D"modifications-data">mod=
ified</td><td class=3D"modifications-data">kdonald</td><td class=3D"modific=
ations-data">sandbox/src/org/springframework/rules/values/FormModel.java</t=
d><td class=3D"modifications-data">initial support for dirty forms</td></tr=
><tr class=3D"modifications-evenrow"><td class=3D"modifications-data">added=
</td><td class=3D"modifications-data">kdonald</td><td class=3D"modification=
s-data">sandbox/src/org/springframework/rules/values/FormObject.java</td><t=
d class=3D"modifications-data">initial support for dirty forms</td></tr><tr=
class=3D"modifications-oddrow"><td class=3D"modifications-data">modified</=
td><td class=3D"modifications-data">kdonald</td><td class=3D"modifications-=
data">sandbox/src/org/springframework/rules/values/MutableAspectAccessStrat=
egy.java</td><td class=3D"modifications-data">initial support for dirty for=
ms</td></tr><tr class=3D"modifications-evenrow"><td class=3D"modifications-=
data">modified</td><td class=3D"modifications-data">kdonald</td><td class=
=3D"modifications-data">sandbox/src/org/springframework/rules/values/Mutabl=
eFormModel.java</td><td class=3D"modifications-data">initial support for di=
rty forms</td></tr><tr class=3D"modifications-oddrow"><td class=3D"modifica=
tions-data">modified</td><td class=3D"modifications-data">kdonald</td><td c=
lass=3D"modifications-data">sandbox/src/org/springframework/rules/values/Va=
lidatingFormModel.java</td><td class=3D"modifications-data">initial support=
for dirty forms</td></tr><tr class=3D"modifications-evenrow"><td class=3D"=
modifications-data">modified</td><td class=3D"modifications-data">colins</t=
d><td class=3D"modifications-data">autobuilds/apps/ejbtest/src/webapp/WEB-I=
NF/classes/servicelayer-applicationContext.xml</td><td class=3D"modificatio=
ns-data">add unit test (BasicMappedPersistenceTest) to test basic Hibernate=
mapping without having to run integration test</td></tr><tr class=3D"modif=
ications-oddrow"><td class=3D"modifications-data">modified</td><td class=3D=
"modifications-data">colins</td><td class=3D"modifications-data">autobuilds=
/apps/ejbtest/.classpath</td><td class=3D"modifications-data">add unit test=
(BasicMappedPersistenceTest) to test basic Hibernate mapping without havin=
g to run integration test</td></tr><tr class=3D"modifications-evenrow"><td =
class=3D"modifications-data">modified</td><td class=3D"modifications-data">=
colins</td><td class=3D"modifications-data">autobuilds/apps/ejbtest/build.x=
ml</td><td class=3D"modifications-data">add unit test (BasicMappedPersisten=
ceTest) to test basic Hibernate mapping without having to run integration t=
est</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: Colin S. <col...@ex...> - 2004-07-16 21:16:47
|
Of course, the build will break for you if you do not upgrade to ant 1.6.2 (or use build.bat which hits the internal ant copy). Colin Sampaleanu wrote: > I spent a bit more time and got this going. Running the "tests" target > from command-line went down for me from about 6:40 to 1:37. Note bad! > > To get things going, I set the <junit> element forkmode to 'perBatch'. > Then I excluded the 3 tests from the main <batchtest> element, and > added them as 3 separate single test <batchtests> (still kept as > <batchtest> instead of <test> so the default excludes would still > work. It's not that great to have to name tests individually like > this, but it's just a few. If this has to be done for a few more, it > will actually get less verbose to just use a separate junit task > instance, then one instance would have forkMode="perBatch", and one > forkMode="perTest" (the default). > > Regards, > Colin > > Colin Sampaleanu wrote: > >> Ant 1.6.2 is out, and with it support for a forkmode="once" on the >> junit task, which allows ant to still fork for junit tests, but only >> once for the entire task (instead of for each testcase). Alternately, >> forkmode="perBatch" allows forking once per batch element. >> >> This is pretty promising, since it could bring the time to run the >> test suite from ant down to a similar value to when running in an >> IDE, which is currently much faster. >> >> I've tried to give it a go (making sure to remove the ant 1.6.1 in >> the lib dir, otherwise that will interfere), by adding >> forkmode="once" to the junit element in the tests target. It is >> currently breaking on SqlStateExceptionTranslatorTests, due to the >> initial context factory builder already being set. This should be >> resolvable by using a separate batch for that test, or some other >> strategy. I am curious however why this doesn't break in the IDE though. >> >> I don't have time to play with this any longer, but will give it a go >> at some later date. If anybody feels like playing around with this >> themselves, please go ahead by all means. >> >> Regards, >> Colin >> >> ----- >> >> [junit] Testsuite: >> org.springframework.jdbc.support.SQLStateExceptionTransla >> torTests >> [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0 sec >> >> [junit] Testcase: testBadSqlGrammar took 0 sec >> [junit] Testcase: testInvalidSqlStateCode took 0 sec >> [junit] Testcase: testMalformedSqlStateCodes took 0 sec >> [junit] java.lang.ExceptionInInitializerError >> [junit] at java.lang.Class.forName0(Native Method) >> [junit] at java.lang.Class.forName(Class.java:141) >> [junit] at >> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner. >> <init>(JUnitTestRunner.java:204) >> [junit] at >> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner. >> <init>(JUnitTestRunner.java:177) >> [junit] at >> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner. >> launch(JUnitTestRunner.java:651) >> [junit] at >> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner. >> main(JUnitTestRunner.java:537) >> [junit] Caused by: java.lang.IllegalStateException: >> InitialContextFactoryBui >> lder already set >> [junit] at >> javax.naming.spi.NamingManager.setInitialContextFactoryBuilde >> r(NamingManager.java:687) >> [junit] at >> org.springframework.jms.JmsTestCase.<clinit>(JmsTestCase.java >> :93) > > > > |
|
From: Colin S. <col...@ex...> - 2004-07-16 21:15:53
|
I spent a bit more time and got this going. Running the "tests" target from command-line went down for me from about 6:40 to 1:37. Note bad! To get things going, I set the <junit> element forkmode to 'perBatch'. Then I excluded the 3 tests from the main <batchtest> element, and added them as 3 separate single test <batchtests> (still kept as <batchtest> instead of <test> so the default excludes would still work. It's not that great to have to name tests individually like this, but it's just a few. If this has to be done for a few more, it will actually get less verbose to just use a separate junit task instance, then one instance would have forkMode="perBatch", and one forkMode="perTest" (the default). Regards, Colin Colin Sampaleanu wrote: > Ant 1.6.2 is out, and with it support for a forkmode="once" on the > junit task, which allows ant to still fork for junit tests, but only > once for the entire task (instead of for each testcase). Alternately, > forkmode="perBatch" allows forking once per batch element. > > This is pretty promising, since it could bring the time to run the > test suite from ant down to a similar value to when running in an IDE, > which is currently much faster. > > I've tried to give it a go (making sure to remove the ant 1.6.1 in the > lib dir, otherwise that will interfere), by adding forkmode="once" to > the junit element in the tests target. It is currently breaking on > SqlStateExceptionTranslatorTests, due to the initial context factory > builder already being set. This should be resolvable by using a > separate batch for that test, or some other strategy. I am curious > however why this doesn't break in the IDE though. > > I don't have time to play with this any longer, but will give it a go > at some later date. If anybody feels like playing around with this > themselves, please go ahead by all means. > > Regards, > Colin > > ----- > > [junit] Testsuite: > org.springframework.jdbc.support.SQLStateExceptionTransla > torTests > [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0 sec > > [junit] Testcase: testBadSqlGrammar took 0 sec > [junit] Testcase: testInvalidSqlStateCode took 0 sec > [junit] Testcase: testMalformedSqlStateCodes took 0 sec > [junit] java.lang.ExceptionInInitializerError > [junit] at java.lang.Class.forName0(Native Method) > [junit] at java.lang.Class.forName(Class.java:141) > [junit] at > org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner. > <init>(JUnitTestRunner.java:204) > [junit] at > org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner. > <init>(JUnitTestRunner.java:177) > [junit] at > org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner. > launch(JUnitTestRunner.java:651) > [junit] at > org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner. > main(JUnitTestRunner.java:537) > [junit] Caused by: java.lang.IllegalStateException: > InitialContextFactoryBui > lder already set > [junit] at > javax.naming.spi.NamingManager.setInitialContextFactoryBuilde > r(NamingManager.java:687) > [junit] at > org.springframework.jms.JmsTestCase.<clinit>(JmsTestCase.java > :93) |
|
From: Stefan D S. <ste...@us...> - 2004-07-16 17:19:54
|
Hello, I am using Spring 1.0.2 and using the XSLTViewResolver. I know there was a problem getting the include directive in the stylesheet to work (e.g. include="includedfile.xslt") so that the path can be relative to the WEB-INF rather than your system home directory (e.g. file:///c:\................). Can anyone provide the solution to this. I have to use the latter way right now and it is obviously not preferred since moving the app to different environments or having different developers working with the stylesheet requires this path update in the 'include' directive. Thank you. |
|
From: Guillaume P. <gpo...@gl...> - 2004-07-16 15:53:16
|
Claudio, I'm not completely sure to understand correctly your question, but I will try to answer as best as I can. WeakHashMap is implemented with WeakReference for keys, and strong reference for values. That means if the value has a strong reference on the key, then the key cannot be garbage collected until the WeakHashMap is ready for collection. However, if the value has no strong reference on its key, then being in the WeakHashMap won't prevent the key and value from being garbage collected if it is otherwise ready. The WeakHashMap knows when to remove the key (and the value with it) by using the notification provided by the java.lang.ref package. For more information on this, see: http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ref/package-summary.html So the problem here with the CachedIntrospectionResults is that it uses BeanInfo and PropertyDescriptor that both have strong reference to the class (indirectly by a reference on Methods of the class). That will be solved with JDK 1.5 that uses a combinaison of Weak and Soft Reference to the Class and Method objects, but for 1.4.2, there's not really any better solution than to flush the Introspector's cache and/or use WeakReference on CachedIntrospectionResults. Using WeakReference on the CachedIntrospectionResults is safer, but decrease performance, and in such case a manual Instrospector.flushFromCaches(Class) must be used, so that the Instrospector does not keep a strong reference on the BeanInfo. When a webapp is hot-redeployed, a new ClassLoader is created to load the webapp, and the old one is thrown away, expected to be garbage collected. For the collection to happen, the server must clear any strong reference to the ClassLoader or its classes, and also the webapp must make sure that any code in parent ClassLoaders (or siblings) clear any reference it might have to any of the webapp's class. Hopefully this answers your question, but if it does not (or if it's not clear enough), please give me more details of what information you need. Regards, Guillaume Claudio D'Angelo wrote: > Thank's Guillaume. > I'm studing about the WeakHashMap and I've seen that WeakHashMap build > a weak reference on the key (it's right??), when the key hasn't any > reference the entity is removed by map. > > Spring use a class type to save the key. When the class object haven't > any reference? When the Classloader is shutdown? > > Can you explain to me (or advise to me if exists an article or > tutorial) about? > > Thanks, > Claudio > > > At 10.05 15/07/2004 -0400, you wrote: > >> As Juergen pointed out, if you find a static member hasn't been >> garbage collected, it just means its ClassLoader cannot be garbage >> collected yet, the static member is not necessarly at fault there. >> For an explanation of the current behavior, see below. >> >> For the solution, you can use a ServletContextListener to call >> java.beans.Introspector.flushCaches() when the ServletContext is >> detroy (which causes the ClassLoader to be thrown away). >> >>> if (results == null) { >>> // can throw BeansException >>> results = new CachedIntrospectionResults(clazz); >>> boolean cacheSafe = isCacheSafe(clazz); >>> if (logger.isDebugEnabled()) { >>> logger.debug("Class [" + >>> clazz.getName() + "] is " + (!cacheSafe ? "not " : "") + "cache-safe"); >>> } >>> * classCache.put(clazz, new >>> WeakReference(results)); >>> * } >> >> Since Spring 1.0.2, the current code of this method is the following : >> >> if (results == null) { >> // can throw BeansException >> results = new CachedIntrospectionResults(clazz); >> boolean cacheSafe = isCacheSafe(clazz); >> if (logger.isDebugEnabled()) { >> logger.debug("Class [" + clazz.getName() + "] is " + >> (!cacheSafe ? "not " : "") + "cache-safe"); >> } >> if (cacheSafe) { >> classCache.put(clazz, results); >> } >> else { >> classCache.put(clazz, new WeakReference(results)); >> } >> } >> >> What the isCacheSafe(Class) method does is check if the clazz's >> ClassLoader is the >> same as CachedIntrospectionResults, or a parent of it. Because what >> prevent garbage >> collection of a ClassLoader A is if a class of a ClassLoader B that >> is not for garbage >> collection has a reference on a class (or instance) of the >> ClassLoader A. However, if >> A is a parent of B (or B == A), then A cannot be collected anyway. >> Which is why if clazz >> is considered "cacheSafe", no WeakReference is necessary, and in such >> case it improve >> performance. For example, if the class introspected is a JDK class, >> or a Spring class, its >> ClassLoader can never be collected before the >> CachedIntrospectionResults class. >> >>> I don't understand about memory leak, weark or soft referance but >>> I've see that CachedIntrospectionResults is referenced by >>> CachedIntrospectionResults.classCache and there are 2 instances >>> (org.springframework.context.support.ResourceBundleMessageSource and >>> org.springframework.web.servlet.DispatcherServlet) >> >> I don't know what causes the ClassLoader to be retained, but you >> cannot easily know what is the cause, just knowning that singletons >> instances are still in the JVM only proves that the ClassLoader has >> not been garbage collected. The problem is that something in a >> parent (or sibling) ClassLoader still has a reference on a Class of >> your webapp's ClassLoader. The trick is to find what is. >> >> Guillaume >> >> Claudio D'Angelo wrote: >> >>> I've deployed the minimal application (see the spring's sample). >>> There isn't Quarts, ibatis or hibernate. There is a controller with >>> a test.jsp only. >>> >>> I don't understand about memory leak, weark or soft referance but >>> I've see that CachedIntrospectionResults is referenced by >>> CachedIntrospectionResults.classCache and there are 2 instances >>> (org.springframework.context.support.ResourceBundleMessageSource and >>> org.springframework.web.servlet.DispatcherServlet) >>> >>> >>> Where I can call the java.beans.Introspector.flushCaches()? >>> >>> Please help. After 20 redeploy Tomcat goes in OutOfMemory and ELS >>> craches >>> >>> At 15.17 15/07/2004 +0200, you wrote: >>> >>>> If this happens with Spring 1.0.2, it is typically caused by >>>> *other* code that causes a leak. The ClassLoader is then still >>>> around, also showing Spring classes like >>>> CachedIntrospectionResults. This is not Spring's fault: Spring >>>> classes just keep hanging around as a side effect. >>>> >>>> Try calling "java.beans.Introspector.flushCaches()" on application >>>> shutdown. This is a typical source of such leaks: The JavaBeans >>>> Introspector might still refer to application classes. This is not >>>> caused by Spring: It's rather other libraries that use the >>>> Introspector, for example Quartz. >>>> >>>> Juergen >>>> >>>> >>>> ________________________________ >>>> >>>> Von: spr...@li... >>>> <mailto:spr...@li...> im >>>> Auftrag von Rod Johnson >>>> Gesendet: Do 15.07.2004 14:38 >>>> An: spr...@li... >>>> <mailto:spr...@li...> >>>> Betreff: Re: [Springframework-developer] CachedIntrospectionResults >>>> classCache leak >>>> >>>> >>>> >>>> Claudio >>>> >>>> What version of Spring is your analysis against? >>>> >>>> R >>>> >>>> ----- Original Message ----- >>>> From: "Claudio D'Angelo" <cla...@ob...> >>>> <mailto:cla...@ob...> >>>> To: <spr...@li...> >>>> <mailto:spr...@li...> >>>> Sent: Thursday, July 15, 2004 10:26 AM >>>> Subject: [Springframework-developer] CachedIntrospectionResults >>>> classCache >>>> leak >>>> >>>> >>>> > Hi, >>>> > I'm analyzing with OptimizeIt my web application: >>>> > when I redeploy the application I note that instances of >>>> > CachedIntrospectionResults still in memory and for any redeploy the >>>> > instances raise. >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------- >>>> This SF.Net email is sponsored by BEA Weblogic Workshop >>>> FREE Java Enterprise J2EE developer tools! >>>> Get your free copy of BEA WebLogic Workshop 8.1 today. >>>> http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click >>>> <http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click> >>>> _______________________________________________ >>>> Springframework-developer mailing list >>>> Spr...@li... >>>> <mailto:Spr...@li...> >>>> https://lists.sourceforge.net/lists/listinfo/springframework-developer >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------- >>>> This SF.Net email is sponsored by BEA Weblogic Workshop >>>> FREE Java Enterprise J2EE developer tools! >>>> Get your free copy of BEA WebLogic Workshop 8.1 today. >>>> _______________________________________________ >>>> Springframework-developer mailing list >>>> Spr...@li... >>>> <mailto:Spr...@li...> >>>> https://lists.sourceforge.net/lists/listinfo/springframework-developer >>> >>> >>> Grazie e buon lavoro >>> ------------------------------------------------------------------------ >>> *Claudio D'Angelo >>> *Software Consultant >>> *ObjectWay S.p.A. >>> *Via G.A. Boltraffio 7 >>> 20159 Milano (MI) >>> *http://www.objectway.it <http://www.objectway.it/> >>> >>> * >>> -- >>> La presente comunicazione potrebbe contenere informazioni riservate >>> e/o protette >>> da segreto professionale ed e' indirizzata esclusivamente ai >>> destinatari della >>> medesima qui indicati. Se avete ricevuto per errore la presente >>> comunicazione, >>> siete invitati a segnalarcelo, rispondendo a questo stesso indirizzo >>> di e-mail, >>> e a cancellare il presente messaggio dal Vostro sistema. E' >>> strettamente proibito >>> e potrebbe essere fonte di violazione di legge qualsiasi uso, >>> comunicazione, copia >>> o diffusione dei contenuti di questa comunicazione da parte di chi >>> la abbia >>> ricevuta per errore o in violazione degli scopi della presente. >>> Il messaggio e' stato analizzato alla ricerca di virus o contenuti >>> pericolosi ed >>> e' risultato NON infetto. >> > Grazie e buon lavoro > ------------------------------------------------------------------------ > *Claudio D'Angelo > *Software Consultant > *ObjectWay S.p.A. > *Via G.A. Boltraffio 7 > 20159 Milano (MI) > *http://www.objectway.it <http://www.objectway.it/> > > * > -- > La presente comunicazione potrebbe contenere informazioni riservate > e/o protette > da segreto professionale ed e' indirizzata esclusivamente ai > destinatari della > medesima qui indicati. Se avete ricevuto per errore la presente > comunicazione, > siete invitati a segnalarcelo, rispondendo a questo stesso indirizzo > di e-mail, > e a cancellare il presente messaggio dal Vostro sistema. E' > strettamente proibito > e potrebbe essere fonte di violazione di legge qualsiasi uso, > comunicazione, copia > o diffusione dei contenuti di questa comunicazione da parte di chi la > abbia > ricevuta per errore o in violazione degli scopi della presente. > Il messaggio e' stato analizzato alla ricerca di virus o contenuti > pericolosi ed > e' risultato NON infetto. > |
|
From: Colin S. <col...@ex...> - 2004-07-16 15:47:06
|
Ant 1.6.2 is out, and with it support for a forkmode="once" on the junit
task, which allows ant to still fork for junit tests, but only once for
the entire task (instead of for each testcase). Alternately,
forkmode="perBatch" allows forking once per batch element.
This is pretty promising, since it could bring the time to run the test
suite from ant down to a similar value to when running in an IDE, which
is currently much faster.
I've tried to give it a go (making sure to remove the ant 1.6.1 in the
lib dir, otherwise that will interfere), by adding forkmode="once" to
the junit element in the tests target. It is currently breaking on
SqlStateExceptionTranslatorTests, due to the initial context factory
builder already being set. This should be resolvable by using a separate
batch for that test, or some other strategy. I am curious however why
this doesn't break in the IDE though.
I don't have time to play with this any longer, but will give it a go at
some later date. If anybody feels like playing around with this
themselves, please go ahead by all means.
Regards,
Colin
-----
[junit] Testsuite:
org.springframework.jdbc.support.SQLStateExceptionTransla
torTests
[junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0 sec
[junit] Testcase: testBadSqlGrammar took 0 sec
[junit] Testcase: testInvalidSqlStateCode took 0 sec
[junit] Testcase: testMalformedSqlStateCodes took 0 sec
[junit] java.lang.ExceptionInInitializerError
[junit] at java.lang.Class.forName0(Native Method)
[junit] at java.lang.Class.forName(Class.java:141)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.
<init>(JUnitTestRunner.java:204)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.
<init>(JUnitTestRunner.java:177)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.
launch(JUnitTestRunner.java:651)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.
main(JUnitTestRunner.java:537)
[junit] Caused by: java.lang.IllegalStateException:
InitialContextFactoryBui
lder already set
[junit] at
javax.naming.spi.NamingManager.setInitialContextFactoryBuilde
r(NamingManager.java:687)
[junit] at
org.springframework.jms.JmsTestCase.<clinit>(JmsTestCase.java
:93)
|
|
From: James C. <jim...@do...> - 2004-07-16 12:33:12
|
I'm not against a choice in AOP, but what do you mean by: > I don't like Spring AOP, I think it's not transparent enough > to client code and it seems always interface/impl combo. Spring allows you to advise classes (using CGLIB) and interfaces (DP). Also, what are you referring to when you say it's "not transparent enough."? |
|
From: Colin S. <col...@ex...> - 2004-07-16 11:29:35
|
Timo, Factory methods to create beans, and the factory-method attribute, are only available in the CVS head version of Spring. Colin Timo Verhoeven wrote: >Hi! > >I'm using a factory to create a bean as written in the documentation: > ><bean id="exampleBean" class="examples.ExampleBean" > factory-method="createInstance"> >... ></bean> > >On app startup I get: org.xml.sax.SAXParseException: Attribute >"factory-method" must be declared for element type "bean". > >The current spring-beans.dtd at >http://www.springframework.org/dtd/spring-beans.dtd does not contain >the factory-method attribute. > >Is the documentation out of date here or is something missing in the >dtd/implementation? > >Regards, > >Timo > > |
|
From: Timo V. <sic...@gm...> - 2004-07-16 10:19:54
|
Hi!
I'm using a factory to create a bean as written in the documentation:
<bean id="exampleBean" class="examples.ExampleBean"
factory-method="createInstance">
...
</bean>
On app startup I get: org.xml.sax.SAXParseException: Attribute
"factory-method" must be declared for element type "bean".
The current spring-beans.dtd at
http://www.springframework.org/dtd/spring-beans.dtd does not contain
the factory-method attribute.
Is the documentation out of date here or is something missing in the
dtd/implementation?
Regards,
Timo
|
|
From: Claudio D'A. <cla...@ob...> - 2004-07-16 08:15:04
|
Thank's Guillaume.
I'm studing about the WeakHashMap and I've seen that WeakHashMap build a
weak reference on the key (it's right??), when the key hasn't any reference
the entity is removed by map.
Spring use a class type to save the key. When the class object haven't any
reference? When the Classloader is shutdown?
Can you explain to me (or advise to me if exists an article or tutorial) about?
Thanks,
Claudio
At 10.05 15/07/2004 -0400, you wrote:
>As Juergen pointed out, if you find a static member hasn't been garbage
>collected, it just means its ClassLoader cannot be garbage collected yet,
>the static member is not necessarly at fault there. For an explanation of
>the current behavior, see below.
>
>For the solution, you can use a ServletContextListener to call
>java.beans.Introspector.flushCaches() when the ServletContext is detroy
>(which causes the ClassLoader to be thrown away).
>
>> if (results == null) {
>> // can throw BeansException
>> results = new CachedIntrospectionResults(clazz);
>> boolean cacheSafe = isCacheSafe(clazz);
>> if (logger.isDebugEnabled()) {
>> logger.debug("Class [" + clazz.getName()
>> + "] is " + (!cacheSafe ? "not " : "") + "cache-safe");
>> }
>> classCache.put(clazz, new WeakReference(results));
>> }
>Since Spring 1.0.2, the current code of this method is the following :
>
> if (results == null) {
> // can throw BeansException
> results = new CachedIntrospectionResults(clazz);
> boolean cacheSafe = isCacheSafe(clazz);
> if (logger.isDebugEnabled()) {
> logger.debug("Class [" + clazz.getName() + "] is " +
> (!cacheSafe ? "not " : "") + "cache-safe");
> }
> if (cacheSafe) {
> classCache.put(clazz, results);
> }
> else {
> classCache.put(clazz, new WeakReference(results));
> }
> }
>
>What the isCacheSafe(Class) method does is check if the clazz's
>ClassLoader is the
>same as CachedIntrospectionResults, or a parent of it. Because what
>prevent garbage
>collection of a ClassLoader A is if a class of a ClassLoader B that is not
>for garbage
>collection has a reference on a class (or instance) of the ClassLoader
>A. However, if
>A is a parent of B (or B == A), then A cannot be collected anyway. Which
>is why if clazz
>is considered "cacheSafe", no WeakReference is necessary, and in such case
>it improve
>performance. For example, if the class introspected is a JDK class, or a
>Spring class, its
>ClassLoader can never be collected before the CachedIntrospectionResults
>class.
>
>>I don't understand about memory leak, weark or soft referance but I've
>>see that CachedIntrospectionResults is referenced
>>by CachedIntrospectionResults.classCache and there are 2 instances
>>(org.springframework.context.support.ResourceBundleMessageSource and
>>org.springframework.web.servlet.DispatcherServlet)
>I don't know what causes the ClassLoader to be retained, but you cannot
>easily know what is the cause, just knowning that singletons instances are
>still in the JVM only proves that the ClassLoader has not been garbage
>collected. The problem is that something in a parent (or sibling)
>ClassLoader still has a reference on a Class of your webapp's
>ClassLoader. The trick is to find what is.
>
>Guillaume
>
>Claudio D'Angelo wrote:
>>I've deployed the minimal application (see the spring's sample). There
>>isn't Quarts, ibatis or hibernate. There is a controller with a test.jsp only.
>>
>>I don't understand about memory leak, weark or soft referance but I've
>>see that CachedIntrospectionResults is referenced
>>by CachedIntrospectionResults.classCache and there are 2 instances
>>(org.springframework.context.support.ResourceBundleMessageSource and
>>org.springframework.web.servlet.DispatcherServlet)
>>
>>
>>Where I can call the java.beans.Introspector.flushCaches()?
>>
>>Please help. After 20 redeploy Tomcat goes in OutOfMemory and ELS craches
>>
>>At 15.17 15/07/2004 +0200, you wrote:
>>>If this happens with Spring 1.0.2, it is typically caused by *other*
>>>code that causes a leak. The ClassLoader is then still around, also
>>>showing Spring classes like CachedIntrospectionResults. This is not
>>>Spring's fault: Spring classes just keep hanging around as a side effect.
>>>
>>>Try calling "java.beans.Introspector.flushCaches()" on application
>>>shutdown. This is a typical source of such leaks: The JavaBeans
>>>Introspector might still refer to application classes. This is not
>>>caused by Spring: It's rather other libraries that use the Introspector,
>>>for example Quartz.
>>>
>>>Juergen
>>>
>>>
>>>________________________________
>>>
>>>Von:
>>><mailto:spr...@li...>spr...@li...
>>>im Auftrag von Rod Johnson
>>>Gesendet: Do 15.07.2004 14:38
>>>An:
>>><mailto:spr...@li...>spr...@li...
>>>Betreff: Re: [Springframework-developer] CachedIntrospectionResults
>>>classCache leak
>>>
>>>
>>>
>>>Claudio
>>>
>>>What version of Spring is your analysis against?
>>>
>>>R
>>>
>>>----- Original Message -----
>>>From: "Claudio D'Angelo"
>>><mailto:cla...@ob...><cla...@ob...>
>>>To:
>>><mailto:spr...@li...><spr...@li...>
>>>Sent: Thursday, July 15, 2004 10:26 AM
>>>Subject: [Springframework-developer] CachedIntrospectionResults classCache
>>>leak
>>>
>>>
>>> > Hi,
>>> > I'm analyzing with OptimizeIt my web application:
>>> > when I redeploy the application I note that instances of
>>> > CachedIntrospectionResults still in memory and for any redeploy the
>>> > instances raise.
>>>
>>>
>>>
>>>
>>>-------------------------------------------------------
>>>This SF.Net email is sponsored by BEA Weblogic Workshop
>>>FREE Java Enterprise J2EE developer tools!
>>>Get your free copy of BEA WebLogic Workshop 8.1 today.
>>>http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
>>>_______________________________________________
>>>Springframework-developer mailing list
>>><mailto:Spr...@li...>Spr...@li...
>>>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>>>
>>>
>>>
>>>
>>>-------------------------------------------------------
>>>This SF.Net email is sponsored by BEA Weblogic Workshop
>>>FREE Java Enterprise J2EE developer tools!
>>>Get your free copy of BEA WebLogic Workshop 8.1 today.
>>>_______________________________________________
>>>Springframework-developer mailing list
>>><mailto:Spr...@li...>Spr...@li...
>>>https://lists.sourceforge.net/lists/listinfo/springframework-developer
>>
>>Grazie e buon lavoro
>>
>>----------
>>Claudio D'Angelo
>>Software Consultant
>>ObjectWay S.p.A.
>>Via G.A. Boltraffio 7
>>20159 Milano (MI)
>>http://www.objectway.it
>>
>>
>>--
>>La presente comunicazione potrebbe contenere informazioni riservate e/o
>>protette
>>da segreto professionale ed e' indirizzata esclusivamente ai destinatari
>>della
>>medesima qui indicati. Se avete ricevuto per errore la presente
>>comunicazione,
>>siete invitati a segnalarcelo, rispondendo a questo stesso indirizzo di
>>e-mail,
>>e a cancellare il presente messaggio dal Vostro sistema. E' strettamente
>>proibito
>>e potrebbe essere fonte di violazione di legge qualsiasi uso,
>>comunicazione, copia
>>o diffusione dei contenuti di questa comunicazione da parte di chi la abbia
>>ricevuta per errore o in violazione degli scopi della presente.
>>Il messaggio e' stato analizzato alla ricerca di virus o contenuti
>>pericolosi ed
>>e' risultato NON infetto.
Grazie e buon lavoro
----------
Claudio D'Angelo
Software Consultant
ObjectWay S.p.A.
Via G.A. Boltraffio 7
20159 Milano (MI)
http://www.objectway.it
--
La presente comunicazione potrebbe contenere informazioni riservate e/o
protette
da segreto professionale ed e' indirizzata esclusivamente ai destinatari della
medesima qui indicati. Se avete ricevuto per errore la presente comunicazione,
siete invitati a segnalarcelo, rispondendo a questo stesso indirizzo di
e-mail,
e a cancellare il presente messaggio dal Vostro sistema. E' strettamente
proibito
e potrebbe essere fonte di violazione di legge qualsiasi uso, comunicazione,
copia
o diffusione dei contenuti di questa comunicazione da parte di chi la abbia
ricevuta per errore o in violazione degli scopi della presente.
Il messaggio e' stato analizzato alla ricerca di virus o contenuti pericolosi
ed
e' risultato NON infetto.
|
|
From: Colin S. <col...@ex...> - 2004-07-16 04:11:26
|
In a quest to figure out why the spurious "closing connection for you, please close it yourself" INFO error messages that some CMT+SpringTx applications exhibited in JBoss 3.2.3, developed into the same INFO message in JBoss 3.2.5, along with an ERROR, I've updated the ejbtest integration sample. There is now a test for calling into a CMT ejb which delegates to a SpringTx wrapped POJO, as well, as one which does this, then delegates to a further SpringTx wrapped POJO which does a Hibernate transaction. I haven't gotten so far as duplicating the connection problem, since I'm getting a situation where Spring is getting a null pointer expression on trying to close a Hibernate Session. This may be a config error of some sort. Will keep digging (since the JBoss connection issue has turned from annoying to dangerous and needs to be pinpointed as either a Spring or JBoss bug), possibly only in a week or so since this has taken too much time already. I do however think these real life integration tests are good for trying to pick up all the obscure stuff we can't unit test, and people using the lib get only under certain combinations of configs. Colin |
|
From: Seth L. <set...@gm...> - 2004-07-16 00:34:43
|
On Thu, 15 Jul 2004 16:18:53 -0700, Andy Depue <an...@ma...> wrote: > I may have discovered a bug in Spring, but I want to make sure it is not > already known (and that it is really a bug). > Say you have these beans defined: By chance, your classes aren't being wrapped by an AOP Factory or Proxy? Seth |
|
From: Colin S. <col...@ex...> - 2004-07-15 23:59:23
|
Hmm, you should actually get a circularity error, since a reference b,
and b references a.
If you are not, then _that's_ what I would consider a bug.
Colin
-------- Original Message --------
Subject: [Springframework-developer] Possible bug in Spring
Date: Thu, 15 Jul 2004 16:18:53 -0700
From: Andy Depue <an...@ma...>
Reply-To: spr...@li...
Organization: Marathon Computer Systems
To: <spr...@li...>
I may have discovered a bug in Spring, but I want to make sure it is not
already known (and that it is really a bug).
Say you have these beans defined:
----
<bean id="a" class="mypackage.A">
<property name="b"><ref bean="b"/></property>
</bean>
<bean id="b" class="mypackage.B">
<constructor-arg index="0"><ref bean="a"/></constructor-arg>
</bean>
<bean id="c" class="mypackage.C">
<property name="b"><ref bean="b"/></property>
</bean>
----
If you write the code below, you get "different instances":
A a = (A)ac.getBean("a");
C c = (C)ac.getBean("c");
if(a.getB() != c.getB()) {
System.out.println("different instances");
}
---
Basically, bean "b" is instantiated twice, even though it is a singleton. At
the very least, I would want to have an exception thrown rather than Spring
silently creating two instances of "b". I should note that this is against a
version of spring that was obtained from cvs about 3 weeks ago. I currently
do not have time to test against a newer Spring, but thought I'd put this out
there anyway so that if it is known, then I won't spend any more time on the
problem.
Thanks,
Andy
|
|
From: <al...@jt...> - 2004-07-15 23:22:21
|
<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.54</td></tr><tr><td class=3D"header-data"><span class=
=3D"header-label">Date of build: </span>07/16/2004 00:15:44</td></tr><=
tr><td class=3D"header-data"><span class=3D"header-label">Time to build:&nb=
sp;</span>13 minutes 22 seconds</td></tr><tr><td class=3D"header-data"><spa=
n class=3D"header-label">Last changed: </span>07/15/2004 18:11:44</td>=
</tr><tr><td class=3D"header-data"><span class=3D"header-label">Last log en=
try: </span>a little revision...</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: =
(32) </td></tr><tr class=3D"modifications-evenrow"><td =
class=3D"modifications-data">modified</td><td class=3D"modifications-data">=
markpollack</td><td class=3D"modifications-data">docs/reference/src/jms.xml=
</td><td class=3D"modifications-data">a little revision...</td></tr><tr cla=
ss=3D"modifications-oddrow"><td class=3D"modifications-data">modified</td><=
td class=3D"modifications-data">markpollack</td><td class=3D"modifications-=
data">docs/reference/src/jms.xml</td><td class=3D"modifications-data">clean=
up</td></tr><tr class=3D"modifications-evenrow"><td class=3D"modifications-=
data">modified</td><td class=3D"modifications-data">markpollack</td><td cla=
ss=3D"modifications-data">docs/reference/src/jms.xml</td><td class=3D"modif=
ications-data">updates</td></tr><tr class=3D"modifications-oddrow"><td clas=
s=3D"modifications-data">modified</td><td class=3D"modifications-data">coli=
ns</td><td class=3D"modifications-data">src/org/springframework/orm/hiberna=
te/support/HibernateDaoSupport.java</td><td class=3D"modifications-data">al=
low the default value of the allowCreate flag for new HibernateTemplates to=
be specified.</td></tr><tr class=3D"modifications-evenrow"><td class=3D"mo=
difications-data">modified</td><td class=3D"modifications-data">colins</td>=
<td class=3D"modifications-data">autobuilds/apps/ejbtest/src/webapp/WEB-INF=
/classes/servicelayer-applicationContext.xml</td><td class=3D"modifications=
-data">actually transactionally wrap pojo service object</td></tr><tr class=
=3D"modifications-oddrow"><td class=3D"modifications-data">modified</td><td=
class=3D"modifications-data">colins</td><td class=3D"modifications-data">a=
utobuilds/apps/ejbtest/build.xml</td><td class=3D"modifications-data">add t=
est for CMT wrapped EJB delegating to Spring Tx wrapped EJB</td></tr><tr cl=
ass=3D"modifications-evenrow"><td class=3D"modifications-data">modified</td=
><td class=3D"modifications-data">kdonald</td><td class=3D"modifications-da=
ta">sandbox/src/org/springframework/enum/AbstractCodedEnum.java</td><td cla=
ss=3D"modifications-data">enum convenience methods; rules operator class po=
lishing / negation method</td></tr><tr class=3D"modifications-oddrow"><td c=
lass=3D"modifications-data">modified</td><td class=3D"modifications-data">k=
donald</td><td class=3D"modifications-data">sandbox/src/org/springframework=
/rules/LogicalOperator.java</td><td class=3D"modifications-data">enum conve=
nience methods; rules operator class polishing / negation method</td></tr><=
tr class=3D"modifications-evenrow"><td class=3D"modifications-data">modifie=
d</td><td class=3D"modifications-data">kdonald</td><td class=3D"modificatio=
ns-data">sandbox/src/org/springframework/rules/Operator.java</td><td class=
=3D"modifications-data">enum convenience methods; rules operator class poli=
shing / negation method</td></tr><tr class=3D"modifications-oddrow"><td cla=
ss=3D"modifications-data">modified</td><td class=3D"modifications-data">kdo=
nald</td><td class=3D"modifications-data">sandbox/src/org/springframework/r=
ules/RelationalOperator.java</td><td class=3D"modifications-data">enum conv=
enience methods; rules operator class polishing / negation method</td></tr>=
<tr class=3D"modifications-evenrow"><td class=3D"modifications-data">modifi=
ed</td><td class=3D"modifications-data">colins</td><td class=3D"modificatio=
ns-data">autobuilds/apps/ejbtest/src/webapp/WEB-INF/classes/servicelayer-ap=
plicationContext.xml</td><td class=3D"modifications-data">add test for CMT =
wrapped EJB delegating to Spring Tx wrapped EJB</td></tr><tr class=3D"modif=
ications-oddrow"><td class=3D"modifications-data">modified</td><td class=3D=
"modifications-data">colins</td><td class=3D"modifications-data">autobuilds=
/apps/ejbtest/src/ejb/ejb-jar.xml</td><td class=3D"modifications-data">Add =
test of local ejb proxy as well</td></tr><tr class=3D"modifications-evenrow=
"><td class=3D"modifications-data">modified</td><td class=3D"modifications-=
data">colins</td><td class=3D"modifications-data">autobuilds/apps/ejbtest/s=
rc/webapp/WEB-INF/classes/servicelayer-applicationContext.xml</td><td class=
=3D"modifications-data">Add test of local ejb proxy as well</td></tr><tr cl=
ass=3D"modifications-oddrow"><td class=3D"modifications-data">modified</td>=
<td class=3D"modifications-data">colins</td><td class=3D"modifications-data=
">autobuilds/apps/ejbtest/src/webapp/WEB-INF/classes/servicelayer-applicati=
onContext.xml</td><td class=3D"modifications-data">rename packages to refle=
ct autobuild</td></tr><tr class=3D"modifications-evenrow"><td class=3D"modi=
fications-data">deleted</td><td class=3D"modifications-data">colins</td><td=
class=3D"modifications-data">autobuilds/apps/ejbtest/src/java/org/springfr=
amework/integrationtest/ejbtest/Constants.java</td><td class=3D"modificatio=
ns-data">rename packages to reflect autobuild</td></tr><tr class=3D"modific=
ations-oddrow"><td class=3D"modifications-data">deleted</td><td class=3D"mo=
difications-data">colins</td><td class=3D"modifications-data">autobuilds/ap=
ps/ejbtest/src/test-cactus/org/springframework/integrationtest/ejbtest/Cach=
edHomeTest.java</td><td class=3D"modifications-data">rename packages to ref=
lect autobuild</td></tr><tr class=3D"modifications-evenrow"><td class=3D"mo=
difications-data">deleted</td><td class=3D"modifications-data">colins</td><=
td class=3D"modifications-data">autobuilds/apps/ejbtest/src/java/org/spring=
framework/integrationtest/ejbtest/util/context/ContextLoader.java</td><td c=
lass=3D"modifications-data">rename packages to reflect autobuild</td></tr><=
tr class=3D"modifications-oddrow"><td class=3D"modifications-data">deleted<=
/td><td class=3D"modifications-data">colins</td><td class=3D"modifications-=
data">autobuilds/apps/ejbtest/src/java/org/springframework/integrationtest/=
ejbtest/util/context/ContextLoaderListener.java</td><td class=3D"modificati=
ons-data">rename packages to reflect autobuild</td></tr><tr class=3D"modifi=
cations-evenrow"><td class=3D"modifications-data">deleted</td><td class=3D"=
modifications-data">colins</td><td class=3D"modifications-data">autobuilds/=
apps/ejbtest/src/java/org/springframework/integrationtest/ejbtest/hibernate=
/tx/ejb/CmtJtaNoSpringTx.java</td><td class=3D"modifications-data">rename p=
ackages to reflect autobuild</td></tr><tr class=3D"modifications-oddrow"><t=
d class=3D"modifications-data">deleted</td><td class=3D"modifications-data"=
>colins</td><td class=3D"modifications-data">autobuilds/apps/ejbtest/src/ja=
va/org/springframework/integrationtest/ejbtest/hibernate/tx/ejb/CmtJtaNoSpr=
ingTxEJB.java</td><td class=3D"modifications-data">rename packages to refle=
ct autobuild</td></tr><tr class=3D"modifications-evenrow"><td class=3D"modi=
fications-data">deleted</td><td class=3D"modifications-data">colins</td><td=
class=3D"modifications-data">autobuilds/apps/ejbtest/src/java/org/springfr=
amework/integrationtest/ejbtest/hibernate/tx/ejb/CmtJtaNoSpringTxHome.java<=
/td><td class=3D"modifications-data">rename packages to reflect autobuild</=
td></tr><tr class=3D"modifications-oddrow"><td class=3D"modifications-data"=
>deleted</td><td class=3D"modifications-data">colins</td><td class=3D"modif=
ications-data">autobuilds/apps/ejbtest/src/java/org/springframework/integra=
tiontest/ejbtest/hibernate/tx/ejb/CmtJtaNoSpringTxHomeRemote.java</td><td c=
lass=3D"modifications-data">rename packages to reflect autobuild</td></tr><=
tr class=3D"modifications-evenrow"><td class=3D"modifications-data">deleted=
</td><td class=3D"modifications-data">colins</td><td class=3D"modifications=
-data">autobuilds/apps/ejbtest/src/java/org/springframework/integrationtest=
/ejbtest/hibernate/tx/ejb/CmtJtaNoSpringTxRemote.java</td><td class=3D"modi=
fications-data">rename packages to reflect autobuild</td></tr><tr class=3D"=
modifications-oddrow"><td class=3D"modifications-data">deleted</td><td clas=
s=3D"modifications-data">colins</td><td class=3D"modifications-data">autobu=
ilds/apps/ejbtest/src/java/org/springframework/integrationtest/ejbtest/hibe=
rnate/tx/ejb/TestFailureException.java</td><td class=3D"modifications-data"=
>rename packages to reflect autobuild</td></tr><tr class=3D"modifications-e=
venrow"><td class=3D"modifications-data">deleted</td><td class=3D"modificat=
ions-data">colins</td><td class=3D"modifications-data">autobuilds/apps/ejbt=
est/src/test-cactus/org/springframework/integrationtest/ejbtest/hibernate/t=
x/ejb/CmtJtaNoSpringTxTest.java</td><td class=3D"modifications-data">rename=
packages to reflect autobuild</td></tr><tr class=3D"modifications-oddrow">=
<td class=3D"modifications-data">deleted</td><td class=3D"modifications-dat=
a">colins</td><td class=3D"modifications-data">autobuilds/apps/ejbtest/src/=
java/org/springframework/integrationtest/ejbtest/simple/ejb/SimpleEJB.java<=
/td><td class=3D"modifications-data">rename packages to reflect autobuild</=
td></tr><tr class=3D"modifications-evenrow"><td class=3D"modifications-data=
">deleted</td><td class=3D"modifications-data">colins</td><td class=3D"modi=
fications-data">autobuilds/apps/ejbtest/src/java/org/springframework/integr=
ationtest/ejbtest/simple/ejb/SimpleHome.java</td><td class=3D"modifications=
-data">rename packages to reflect autobuild</td></tr><tr class=3D"modificat=
ions-oddrow"><td class=3D"modifications-data">deleted</td><td class=3D"modi=
fications-data">colins</td><td class=3D"modifications-data">autobuilds/apps=
/ejbtest/src/java/org/springframework/integrationtest/ejbtest/simple/ejb/Si=
mpleHomeRemote.java</td><td class=3D"modifications-data">rename packages to=
reflect autobuild</td></tr><tr class=3D"modifications-evenrow"><td class=
=3D"modifications-data">deleted</td><td class=3D"modifications-data">colins=
</td><td class=3D"modifications-data">autobuilds/apps/ejbtest/src/java/org/=
springframework/integrationtest/ejbtest/simple/ejb/SimpleRemote.java</td><t=
d class=3D"modifications-data">rename packages to reflect autobuild</td></t=
r><tr class=3D"modifications-oddrow"><td class=3D"modifications-data">delet=
ed</td><td class=3D"modifications-data">colins</td><td class=3D"modificatio=
ns-data">autobuilds/apps/ejbtest/src/java/org/springframework/integrationte=
st/ejbtest/simple/ejb/SimpleService.java</td><td class=3D"modifications-dat=
a">rename packages to reflect autobuild</td></tr><tr class=3D"modifications=
-evenrow"><td class=3D"modifications-data">modified</td><td class=3D"modifi=
cations-data">colins</td><td class=3D"modifications-data">autobuilds/apps/e=
jbtest/src/ejb/ejb-jar.xml</td><td class=3D"modifications-data">rename pack=
ages to reflect autobuild</td></tr><tr class=3D"modifications-oddrow"><td c=
lass=3D"modifications-data">modified</td><td class=3D"modifications-data">c=
olins</td><td class=3D"modifications-data">autobuilds/apps/ejbtest/src/weba=
pp/WEB-INF/web.xml</td><td class=3D"modifications-data">rename packages to =
reflect autobuild</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: Andy D. <an...@ma...> - 2004-07-15 23:18:58
|
I may have discovered a bug in Spring, but I want to make sure it is not
already known (and that it is really a bug).
Say you have these beans defined:
----
<bean id="a" class="mypackage.A">
<property name="b"><ref bean="b"/></property>
</bean>
<bean id="b" class="mypackage.B">
<constructor-arg index="0"><ref bean="a"/></constructor-arg>
</bean>
<bean id="c" class="mypackage.C">
<property name="b"><ref bean="b"/></property>
</bean>
----
If you write the code below, you get "different instances":
A a = (A)ac.getBean("a");
C c = (C)ac.getBean("c");
if(a.getB() != c.getB()) {
System.out.println("different instances");
}
---
Basically, bean "b" is instantiated twice, even though it is a singleton. At
the very least, I would want to have an exception thrown rather than Spring
silently creating two instances of "b". I should note that this is against a
version of spring that was obtained from cvs about 3 weeks ago. I currently
do not have time to test against a newer Spring, but thought I'd put this out
there anyway so that if it is known, then I won't spend any more time on the
problem.
Thanks,
Andy
|
|
From: Lee M. <lm...@ta...> - 2004-07-15 16:47:41
|
I haven't. -Lee -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of Matthew E. Porter Sent: Thursday, July 15, 2004 9:47 AM To: spr...@li... Subject: Re: [Springframework-developer] e-book version of J2EE w/o EJB Speaking of the book... For those who attended TSS and requested this =20 book, have you received it yet? Cheers, matthew On Jul 15, 2004, at 10:16 AM, Dmitriy Kopylenko wrote: > Whoever is interested, there is an electronic version of the book =20 > available on Amazon: =20 > = http://www.amazon.com/exec/obidos/tg/detail/-/B0002JC3WM/ref=3Dlpr_g_1/=20 > 103-1080599-3131826?v=3Dglance&s=3Dbooks > > Regards, > Dmitriy. > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=3D4721&alloc_id=3D10040&op=3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=3D4721&alloc_id=3D10040&op=3Dclick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: jack h. <hij...@ho...> - 2004-07-15 16:36:42
|
yeah, I like aspectWerkz. I think it's on right direct. I don't like Spring AOP, I think it's not transparent enough to client code and it seems always interface/impl combo. I think Spring should support aspectwerkz, especially the online weave model >From: Barry Kaplan <gr...@me...> >Reply-To: spr...@li... >To: spr...@li... >Subject: [Springframework-developer] aspectwerkz? >Date: Thu, 15 Jul 2004 10:05:45 -0500 > >I was just browsing thru the docs for the new aspectj support. Looks >interesting. > >Has anybody considered aspectwerkz? Since aspectwerkz already has a >spring-container integration, works with simple pojos, does not >require a compiler, is configured with attributes and xml, it seems >a much cleaner (or at least easier) fit with spring. > >(ref: http://docs.codehaus.org/display/AWARE/SpringAspectContainer) > >-bk > > > >------------------------------------------------------- >This SF.Net email is sponsored by BEA Weblogic Workshop >FREE Java Enterprise J2EE developer tools! >Get your free copy of BEA WebLogic Workshop 8.1 today. >http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer _________________________________________________________________ 与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn |
|
From: Patrick B. <pbu...@gm...> - 2004-07-15 16:05:08
|
On Thu, 15 Jul 2004 10:46:32 -0500, Matthew E. Porter <mat...@me...> wrote: > Speaking of the book... For those who attended TSS and requested this > book, have you received it yet? > > Cheers, > matthew > Not yet, and I am in the middle of a cross-country move...wonder if I can update my shipping address with them? Patrick |
|
From: Barry K. <gr...@me...> - 2004-07-15 16:00:33
|
I was just browsing thru the docs for the new aspectj support. Looks interesting. Has anybody considered aspectwerkz? Since aspectwerkz already has a spring-container integration, works with simple pojos, does not require a compiler, is configured with attributes and xml, it seems a much cleaner (or at least easier) fit with spring. (ref: http://docs.codehaus.org/display/AWARE/SpringAspectContainer) -bk |
|
From: Matthew E. P. <mat...@me...> - 2004-07-15 15:46:35
|
Speaking of the book... For those who attended TSS and requested this book, have you received it yet? Cheers, matthew On Jul 15, 2004, at 10:16 AM, Dmitriy Kopylenko wrote: > Whoever is interested, there is an electronic version of the book > available on Amazon: > http://www.amazon.com/exec/obidos/tg/detail/-/B0002JC3WM/ref=lpr_g_1/ > 103-1080599-3131826?v=glance&s=books > > Regards, > Dmitriy. > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Dmitriy K. <dko...@ru...> - 2004-07-15 15:15:38
|
Whoever is interested, there is an electronic version of the book available on Amazon: http://www.amazon.com/exec/obidos/tg/detail/-/B0002JC3WM/ref=lpr_g_1/103-1080599-3131826?v=glance&s=books Regards, Dmitriy. |
|
From: Guillaume P. <gpo...@gl...> - 2004-07-15 14:05:27
|
As Juergen pointed out, if you find a static member hasn't been garbage
collected, it just means its ClassLoader cannot be garbage collected
yet, the static member is not necessarly at fault there. For an
explanation of the current behavior, see below.
For the solution, you can use a ServletContextListener to call
java.beans.Introspector.flushCaches() when the ServletContext is detroy
(which causes the ClassLoader to be thrown away).
> if (results == null) {
> // can throw BeansException
> results = new CachedIntrospectionResults(clazz);
> boolean cacheSafe = isCacheSafe(clazz);
> if (logger.isDebugEnabled()) {
> logger.debug("Class [" +
> clazz.getName() + "] is " + (!cacheSafe ? "not " : "") + "cache-safe");
> }
> * classCache.put(clazz, new
> WeakReference(results));
> * }
Since Spring 1.0.2, the current code of this method is the following :
if (results == null) {
// can throw BeansException
results = new CachedIntrospectionResults(clazz);
boolean cacheSafe = isCacheSafe(clazz);
if (logger.isDebugEnabled()) {
logger.debug("Class [" + clazz.getName() + "] is " +
(!cacheSafe ? "not " : "") + "cache-safe");
}
if (cacheSafe) {
classCache.put(clazz, results);
}
else {
classCache.put(clazz, new WeakReference(results));
}
}
What the isCacheSafe(Class) method does is check if the clazz's
ClassLoader is the
same as CachedIntrospectionResults, or a parent of it. Because what
prevent garbage
collection of a ClassLoader A is if a class of a ClassLoader B that is
not for garbage
collection has a reference on a class (or instance) of the ClassLoader
A. However, if
A is a parent of B (or B == A), then A cannot be collected anyway.
Which is why if clazz
is considered "cacheSafe", no WeakReference is necessary, and in such
case it improve
performance. For example, if the class introspected is a JDK class, or
a Spring class, its
ClassLoader can never be collected before the CachedIntrospectionResults
class.
> I don't understand about memory leak, weark or soft referance but I've
> see that CachedIntrospectionResults is referenced by
> CachedIntrospectionResults.classCache and there are 2 instances
> (org.springframework.context.support.ResourceBundleMessageSource and
> org.springframework.web.servlet.DispatcherServlet)
I don't know what causes the ClassLoader to be retained, but you cannot
easily know what is the cause, just knowning that singletons instances
are still in the JVM only proves that the ClassLoader has not been
garbage collected. The problem is that something in a parent (or
sibling) ClassLoader still has a reference on a Class of your webapp's
ClassLoader. The trick is to find what is.
Guillaume
Claudio D'Angelo wrote:
> I've deployed the minimal application (see the spring's sample). There
> isn't Quarts, ibatis or hibernate. There is a controller with a
> test.jsp only.
>
> I don't understand about memory leak, weark or soft referance but I've
> see that CachedIntrospectionResults is referenced by
> CachedIntrospectionResults.classCache and there are 2 instances
> (org.springframework.context.support.ResourceBundleMessageSource and
> org.springframework.web.servlet.DispatcherServlet)
>
>
> Where I can call the java.beans.Introspector.flushCaches()?
>
> Please help. After 20 redeploy Tomcat goes in OutOfMemory and ELS craches
>
> At 15.17 15/07/2004 +0200, you wrote:
>
>> If this happens with Spring 1.0.2, it is typically caused by *other*
>> code that causes a leak. The ClassLoader is then still around, also
>> showing Spring classes like CachedIntrospectionResults. This is not
>> Spring's fault: Spring classes just keep hanging around as a side effect.
>>
>> Try calling "java.beans.Introspector.flushCaches()" on application
>> shutdown. This is a typical source of such leaks: The JavaBeans
>> Introspector might still refer to application classes. This is not
>> caused by Spring: It's rather other libraries that use the
>> Introspector, for example Quartz.
>>
>> Juergen
>>
>>
>> ________________________________
>>
>> Von: spr...@li... im Auftrag
>> von Rod Johnson
>> Gesendet: Do 15.07.2004 14:38
>> An: spr...@li...
>> Betreff: Re: [Springframework-developer] CachedIntrospectionResults
>> classCache leak
>>
>>
>>
>> Claudio
>>
>> What version of Spring is your analysis against?
>>
>> R
>>
>> ----- Original Message -----
>> From: "Claudio D'Angelo" <cla...@ob...>
>> To: <spr...@li...>
>> Sent: Thursday, July 15, 2004 10:26 AM
>> Subject: [Springframework-developer] CachedIntrospectionResults
>> classCache
>> leak
>>
>>
>> > Hi,
>> > I'm analyzing with OptimizeIt my web application:
>> > when I redeploy the application I note that instances of
>> > CachedIntrospectionResults still in memory and for any redeploy the
>> > instances raise.
>>
>>
>>
>>
>> -------------------------------------------------------
>> This SF.Net email is sponsored by BEA Weblogic Workshop
>> FREE Java Enterprise J2EE developer tools!
>> Get your free copy of BEA WebLogic Workshop 8.1 today.
>> http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
>> <http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click>
>> _______________________________________________
>> Springframework-developer mailing list
>> Spr...@li...
>> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>>
>>
>>
>>
>> -------------------------------------------------------
>> This SF.Net email is sponsored by BEA Weblogic Workshop
>> FREE Java Enterprise J2EE developer tools!
>> Get your free copy of BEA WebLogic Workshop 8.1 today.
>> _______________________________________________
>> Springframework-developer mailing list
>> Spr...@li...
>> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
> Grazie e buon lavoro
> ------------------------------------------------------------------------
> *Claudio D'Angelo
> *Software Consultant
> *ObjectWay S.p.A.
> *Via G.A. Boltraffio 7
> 20159 Milano (MI)
> *http://www.objectway.it <http://www.objectway.it/>
>
> *
> --
> La presente comunicazione potrebbe contenere informazioni riservate
> e/o protette
> da segreto professionale ed e' indirizzata esclusivamente ai
> destinatari della
> medesima qui indicati. Se avete ricevuto per errore la presente
> comunicazione,
> siete invitati a segnalarcelo, rispondendo a questo stesso indirizzo
> di e-mail,
> e a cancellare il presente messaggio dal Vostro sistema. E'
> strettamente proibito
> e potrebbe essere fonte di violazione di legge qualsiasi uso,
> comunicazione, copia
> o diffusione dei contenuti di questa comunicazione da parte di chi la
> abbia
> ricevuta per errore o in violazione degli scopi della presente.
> Il messaggio e' stato analizzato alla ricerca di virus o contenuti
> pericolosi ed
> e' risultato NON infetto.
>
|
|
From: Colin S. <col...@ex...> - 2004-07-15 13:57:35
|
I don't like that solution, because it will then also affect any HibernateTemplate that is passed in. The current code does not touch any template that is passed in. These changes do not want to modify that behaviour, but rather allow the default value for allowCreate on _new_ templates created to be specified. And I think there are two ways that people would want to play with the flag: either make their own subclass which sets the flag to false, and that becomes the superclass of all their DAOs, or alternately, do not use a subclass at all, but in some (or all) DAOs, specifically set the default value. Colin jürgen höller [werk3AT] wrote: >Colin, > >What about simply invoking > > getHibernateTemplate().setAllowCreate(false); > >in the initDao implementation of your subclass? > >Juergen > > >________________________________ > >Von: spr...@li... im Auftrag von Colin Sampaleanu >Gesendet: Do 15.07.2004 05:34 >An: spr...@li... >Betreff: [Springframework-developer] HibernateDaoSupport > > > >Juergen, > >The existing code in HibernateDaoSupport created a HibernateTemplate >with the allowCreate flag as true by default, and as the >setSessionFactory method where the template was created was final, there >was no way to override this. I have created a protected field called >defaultTemplateAllowCreateValue (true by default to maintain existing >behaviour), which a user HibernateDaoSupport subclass may override. >Additionally, I have added a setter for this default value, so a DAO >instance can be set to true or false specifically (without having to >subclass). This value does not affect any HibernateTemplate passed in >explicitly. > >Colin > > |