-
1. Re: setting system properties for JMX components
adrian.brock Dec 5, 2001 1:55 PM (in response to joegalgx)Joe,
On RH V3.0.0 you can define the environment variable JAVA_OPTS to pass options to the VM.
On 2.4.3 you'll have to edit bin/run.sh or bin/run.bat to directly.
I don't know anything about custom URL handlers. I cannot predict what effect setting this will have on JBoss.
Regards,
Adrian -
2. Re: setting system properties for JMX components
joegalgx Dec 5, 2001 2:52 PM (in response to joegalgx)Well, I tried editing that property in the run.sh script but the property seems to be ignored. Although if I print out the System.property it shows up as what I set it to in the script. go figure...
I did however find a workaround for this and that is to implement my own URLStreamHandlerFactory class and use the static URL.setURLStreamHandlerFactory.
Not quite as slick as using a package path to search for protocols but just as effective. -
3. Re: setting system properties for JMX components
marc.fleury Dec 5, 2001 3:24 PM (in response to joegalgx)guys,
JMX components are supposed to use their own variables that you can change at run-time, they are there so we can defeat the use of properties.
that being said there is a System.properties class that mirrors the System.property stuff and you look that up in the code base. -
4. Re: setting system properties for JMX components
adrian.brock Dec 6, 2001 4:57 AM (in response to joegalgx)Marc,
In general you are correct at MBean properties.
I should told Joe what he NEEDED to know, not what he WANTED to know.
But, after 30 secs of research, this property must be set at VM start up.
For this reason, the URLStreamHandlerFactory is probably a better approach.
Regards,
Adrian -
5. Re: setting system properties for JMX components
joegalgx Jul 10, 2002 9:22 AM (in response to joegalgx)Here we are 7 months later and this problem has now crept up on me again!!!
I've been using my own URLStreamHandlerFactory for all of the previous 2.x versions of JBoss with no problems. Now, because of the jboss.net stuff, JBoss_3RC1 calls the URL.setURLStreamHandlerFactory method. Since this is only allowed to be called once per VM I can no longer use it for my MBean.
Is there a good way to tell the jboss.net.protocol.URLStreamHandlerFactory about my URLStreamHandlers?
The only documentation that I've found on this is in the JBoss_3.0 Quick Start Guide (Draft).
Thanks -
6. Re: setting system properties for JMX components
adrian.brock Jul 10, 2002 10:01 AM (in response to joegalgx)LOL
The jboss server adds
org.jboss.net.protocol
to the
java.protocol.handler.pkgs
system property.
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/jboss-system/src/main/org/jboss/system/server/ServerImpl.java
Regards,
Adrian