users@glassfish.java.net

Re: Problem running standalone Glassfish client as Eclipse plugi

From: <forums_at_java.net>
Date: Fri, 7 Dec 2012 02:39:11 -0600 (CST)

Hi a solution is describet here
http://www.ansis.com/know-how/software-development/eclipse-rcp/ [1] For me
the trick was to change the classloader before creating the InitialContext
final ClassLoader ejbUtilsClassLoader = getClass().getClassLoader();
Thread.currentThread().setContextClassLoader(ejbUtilsClassLoader); Properties
props = new Properties(); props.setProperty("java.naming.factory.initial",
"com.sun.enterprise.naming.SerialInitContextFactory"); ctx = new
InitialContext(props);

[1] http://www.ansis.com/know-how/software-development/eclipse-rcp/

--
[Message sent by forum member 'honi78']
View Post: http://forums.java.net/node/700509