[jboss-dev-forums] [JBoss AS7 Development] - Re: Embedded AS
Brian Stansberry
do-not-reply at jboss.com
Thu Nov 18 19:24:57 EST 2010
Brian Stansberry [http://community.jboss.org/people/bstansberry%40jboss.com] created the discussion
"Re: Embedded AS"
To view the discussion, visit: http://community.jboss.org/message/571835#571835
--------------------------------------------------------------
> Kabir Khan wrote:
>
> I don't think you can change the classpath of an already running java program
No you can't. What that class was doing was an attempt to get the jboss-modules SystemLocalLoader to not load undesired classes. It reads the java.class.path property when determining what jars/directories to load from. That part actually seems to work.
The problem is the static intializer block in java.util.logging.LogManager tries to use ClassLoader.getSystemClassLoader() to load the class. And that classloader's unaffected by my change of the system property.
And that problem would affect your #2 solution as well. :( The true system classloader is not controlled by jboss-modules, so any time some code uses it, it will see the original classpath.
Do you know how the Arquillian guys are dealing with this problem?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/571835#571835]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20101118/34b2483f/attachment.html
More information about the jboss-dev-forums
mailing list