From portal-commits at lists.jboss.org Wed Jan 17 19:40:26 2007 Content-Type: multipart/mixed; boundary="===============3839004332642237738==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r6025 - trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config. Date: Wed, 17 Jan 2007 19:40:25 -0500 Message-ID: --===============3839004332642237738== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: chris.laprun(a)jboss.com Date: 2007-01-17 19:40:25 -0500 (Wed, 17 Jan 2007) New Revision: 6025 Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfig= urationService.java Log: - JBPORTAL-1204: Use getResources and keep the last one returned to make su= re we get the deepest/more specific one on the path. Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/Produce= rConfigurationService.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfi= gurationService.java 2007-01-17 22:17:59 UTC (rev 6024) +++ trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfi= gurationService.java 2007-01-18 00:40:25 UTC (rev 6025) @@ -31,6 +31,7 @@ import org.jboss.xb.binding.UnmarshallerFactory; = import java.net.URL; +import java.util.Enumeration; = /** * @author Chris Laprun @@ -69,7 +70,15 @@ { throw new Exception("The config location is null"); } - URL configURL =3D Thread.currentThread().getContextClassLoader().get= Resource(configLocation); + + // make sure we pick the furthest down the path in case there's seve= ral similarly named resources in the path = + Enumeration enum =3D Thread.currentThread().getContextClassLoader().= getResources(configLocation); + URL configURL =3D null; + while (enum.hasMoreElements()) + { + configURL =3D (URL)enum.nextElement(); + } + if (configURL =3D=3D null) { throw new Exception("The config " + configLocation + " does not e= xist"); --===============3839004332642237738==--