JBoss-3.2 doesn't have
+ String urlStr = target.toString();
+ target = new URL(urlStr);
But just adding this doesn't help me.
BTW, is java.protocol.handler.pkgs setup after the SCL is created?
As I see it is, but how is it supposed to be? I would expect vice
versa.
alex
Wednesday, January 15, 2003, 2:17:48 AM, you wrote:
SMS Here is the context in which I looked into the JBoss file protocol handler not
being used.
SMS As far as I remember, the issue was that very early on there are file URLs being
SMS created and these were picking up the default file protocol handler. Recreating
the
SMS URL after the URLStreamHandlerFactory was installed resulted in the JBoss file
SMS protocol handler being used.
SMS
SMS Scott Stark
SMS Chief Technology Officer
SMS JBoss Group, LLC
SMS
SMS - Original Message -
SMS From: Scott M Stark [EMAIL PROTECTED]
SMS To: [EMAIL PROTECTED]
SMS Sent: Sunday, September 29, 2002 12:05 PM
SMS Subject: [jboss-cvs] jboss-common/src/main/org/jboss/net/protocol/resource
ResourceURLConnection.java
User: starksm
Date: 02/09/29 13:05:18
Modified:src/main/org/jboss/net/protocol/resource Tag: Branch_3_0
ResourceURLConnection.java
Log:
Recreate the URL obtained from the class loader as the file URLs are not
using the org.jboss.net.protocol.file handler for some reason. Creating a
new URL from the CL URL string does use our URLStreamHandlerFactory. This
fixes a problem with the log4j.xml file changes not being seen due to
the invalid lastModified of the default sun file protocol handler.
Revision ChangesPath
No revision
No revision
1.2.2.2 +17 -5
jboss-common/src/main/org/jboss/net/protocol/resource/ResourceURLConnection.java
Index: ResourceURLConnection.java
===
RCS file:
/cvsroot/jboss/jboss-common/src/main/org/jboss/net/protocol/resource/ResourceURLConnection.java,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -u -r1.2.2.1 -r1.2.2.2
--- ResourceURLConnection.java 17 May 2002 22:25:41 - 1.2.2.1
+++ ResourceURLConnection.java 29 Sep 2002 20:05:18 - 1.2.2.2
@@ -22,7 +22,7 @@
/**
* Provides access to system resources as a URLConnection.
*
- * @version tt$Revision: 1.2.2.1 $/tt
+ * @version tt$Revision: 1.2.2.2 $/tt
* @author a href=mailto:[EMAIL PROTECTED];Jason Dillon/a
*/
public class ResourceURLConnection
@@ -50,7 +50,8 @@
ClassLoader cl = Thread.currentThread().getContextClassLoader();
URL target = cl.getResource(name);
- if (target == null) {
+ if (target == null)
+ {
cl = ClassLoader.getSystemClassLoader();
target = cl.getResource(name);
}
@@ -58,12 +59,23 @@
if (target == null)
throw new FileNotFoundException(Could not locate resource: + name);
- if (log.isTraceEnabled()) {
+ /* The file URLs being returned by the class loaders are not using the
+ org.jboss.net.protocol.file handler for some reason so here we
+ recreate the url to make sure it goes through our
+ URLStreamHandlerFactory. The cause should be tracked down but this
+ works for now.
+ */
+ String urlStr = target.toString();
+ target = new URL(urlStr);
+ if (log.isTraceEnabled())
+ {
log.trace(Target resource URL: + target);
- try {
+ try
+ {
log.trace(Target resource URL connection: +
target.openConnection());
}
- catch (Exception ignore) {}
+ catch (Exception ignore)
+ {}
}
return target;
---
This SF.NET email is sponsored by: Take your first step towards giving
your online business a competitive advantage. Test-drive a Thawte SSL
certificate - our easy online guide will show you how. Click here to get
started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development