[jboss-user] [JNDI and Naming] - JBoss As 7 problem with jndi port

Pedro Rocha do-not-reply at jboss.com
Mon Aug 1 07:49:30 EDT 2011


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&containerType=14&container=2083]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110801/fcd93bba/attachment.html 


More information about the jboss-user mailing list