Pedro Rocha [
http://community.jboss.org/people/pd.rocha] created the discussion
"JBoss As 7 problem with jndi port"
To view the discussion, visit:
http://community.jboss.org/message/618580#618580
--------------------------------------------------------------
I got a problem with jndi port on Windows Vista 64-Bit using JBoss 7.
Using the command "netstat -na" the port 1099 doesn't appear and can not
connect to it using the telnet.
Is there any special configuration for this port run on JBoss AS 7?
Because when I run the code below have the following error:
javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root
exception is javax.naming.ServiceUnavailableException: Failed to connect to server
localhost:1099 [Root exception is java.net.ConnectException: Connection refused:
connect]]
private static final String JNDI_NAME_CALC =
"java:global/primeiroejb-0.0.1-SNAPSHOT/SimpleCalculatorBean";
@BeforeClass
public static void obtainProxyReferences() throws Throwable
{
//configure appender eclipse
BasicConfigurator.configure();
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
props.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
props.put(Context.PROVIDER_URL, "jnp://localhost:1099"); // HA-JNDI port.
namingContext = new InitialContext(props);
// Obtain EJB 3.1 Business Reference
calc = (SimpleCalculatorBean) namingContext.lookup(JNDI_NAME_CALC);
}
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/618580#618580]
Start a new discussion in JNDI and Naming at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]