Re[4]: [JBoss-dev] URLConnection and opened files

2003-01-14 Thread Alex Loubyansky
I'm a bit confused. I wrote a simple standalone test.

- main
public static void main(String[] args) throws Exception
{
   // set handler pkgs
   System.out.println(java.protocol.handler.pkgs:  + 
System.getProperty(java.protocol.handler.pkgs));

   URL url = new URL(file, null, args[0]);
   System.out.println(url:  + url);
   URLConnection urlCon = url.openConnection();
   System.out.println(connection class:  + urlCon.getClass().getName());

   url = new URL(other, null, args[0]);
   System.out.println(url:  + url);
   urlCon = url.openConnection();
   System.out.println(connection class:  + urlCon.getClass().getName());
}

- run
java -Djava.protocol.handler.pkgs=org.avoka.test.files.protocol -classpath %cp% 
org.avoka.test.files.FilesTest build.xml

- output
java.protocol.handler.pkgs: org.avoka.test.files.protocol
url: file:build.xml
connection class: sun.net.www.protocol.file.FileURLConnection
url: other:build.xml
connection class: org.avoka.test.files.protocol.other.OtherURLConnection

I do have org.avoka.test.files.protocol.file.Handler and
org.avoka.test.files.protocol.file.FileURLConnection on the classpath.
My file.Handler isn't called. Am I missing something?

This same thing happens with JBoss-3.2 and HEAD but not JBoss-3.0 (my
3.0 is not up to date).

JDK1.3.1_05, J2SDK1.4.0
Win2K

Thanks,
alex




---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: Re[4]: [JBoss-dev] URLConnection and opened files

2003-01-14 Thread Scott M Stark
Oh, I now remeber looking at this but I can't remember the context. There
is a cache of handlers as the URL level. If the file protocol is referenced
before the custom JBoss handler is available then the default Sun one will
be used. Is there a difference between 3.0 and 3.2 with regard to when the
custom protocol handlers are installed? I'll check later today.



Scott Stark
Chief Technology Officer
JBoss Group, LLC


- Original Message - 
From: Alex Loubyansky [EMAIL PROTECTED]
To: Scott M Stark [EMAIL PROTECTED]
Sent: Tuesday, January 14, 2003 7:07 AM
Subject: Re[4]: [JBoss-dev] URLConnection and opened files


 I'm a bit confused. I wrote a simple standalone test.
 
 - main
 public static void main(String[] args) throws Exception
 {
// set handler pkgs
System.out.println(java.protocol.handler.pkgs:  + 
System.getProperty(java.protocol.handler.pkgs));
 
URL url = new URL(file, null, args[0]);
System.out.println(url:  + url);
URLConnection urlCon = url.openConnection();
System.out.println(connection class:  + urlCon.getClass().getName());
 
url = new URL(other, null, args[0]);
System.out.println(url:  + url);
urlCon = url.openConnection();
System.out.println(connection class:  + urlCon.getClass().getName());
 }
 
 - run
 java -Djava.protocol.handler.pkgs=org.avoka.test.files.protocol -classpath %cp% 
org.avoka.test.files.FilesTest build.xml
 
 - output
 java.protocol.handler.pkgs: org.avoka.test.files.protocol
 url: file:build.xml
 connection class: sun.net.www.protocol.file.FileURLConnection
 url: other:build.xml
 connection class: org.avoka.test.files.protocol.other.OtherURLConnection
 
 I do have org.avoka.test.files.protocol.file.Handler and
 org.avoka.test.files.protocol.file.FileURLConnection on the classpath.
 My file.Handler isn't called. Am I missing something?
 
 This same thing happens with JBoss-3.2 and HEAD but not JBoss-3.0 (my
 3.0 is not up to date).
 
 JDK1.3.1_05, J2SDK1.4.0
 Win2K
 
 Thanks,
 alex
 
 
 
 
 ---
 This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
 are you planning your Web Server Security? Click here to get a FREE
 Thawte SSL guide and find the answers to all your  SSL security issues.
 http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
 ___
 Jboss-development mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-development
 


---
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



Re[4]: [JBoss-dev] URLConnection and opened files

2003-01-13 Thread Alex Loubyansky
I meet it in JBoss-3.2 and HEAD. I am afraid if I update JBoss-3.0
it'll get infected too. I'll try to figure it out.

alex

Tuesday, January 14, 2003, 12:18:41 AM, you wrote:

SMS They are definitely in the classpath in the lib/jboss-common.jar, but may not
SMS be available to the class loader being used. What version of JBoss are we
SMS talking about here?

SMS 
SMS Scott Stark
SMS Chief Technology Officer
SMS JBoss Group, LLC
SMS 

SMS - Original Message - 
SMS From: Alex Loubyansky [EMAIL PROTECTED]
SMS To: Scott M Stark [EMAIL PROTECTED]
SMS Sent: Monday, January 13, 2003 11:30 AM
SMS Subject: Re[2]: [JBoss-dev] URLConnection and opened files


 Thanks for pointing to this, but I think the problem is not there.
 I suspect the classes are somehow not getting to the classpath.
 
 I'm running jdk1.3.1_05. Note, earlier I ran JBoss w/o these problems
 on this same VM.
 
 Please, let me know whether it's only me watching it.
 
 Thanks,
 alex
 
 Monday, January 13, 2003, 7:31:06 PM, you wrote:
 
 SMS Our FileURLConnection  should be picked due to the org.jboss.net.protocol
 SMS package being placed into the java.protocol.handler.pkgs by thiscode in
 SMS org.jboss.system.server.ServerImpl.doInit:
 
 SMS   // Include the default JBoss protocol handler package
 SMS   String handlerPkgs = System.getProperty(java.protocol.handler.pkgs);
 SMS   if (handlerPkgs != null)
 SMS   {
 SMS  handlerPkgs += |org.jboss.net.protocol;
 SMS   }
 SMS   else
 SMS   {
 SMS  handlerPkgs = org.jboss.net.protocol;
 SMS   }
 SMS   System.setProperty(java.protocol.handler.pkgs, handlerPkgs);




---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development