JNDI

To browse the JNDI contexts in JBoss

Goto http://localhost:8080/jmx-console
Under the 'jboss' section: click the link 'service=JNDIView'
Under List of MBean Operations, java.lang.String list(): click the Invoke button

Describes JNDI and how to connect to remote JNDI

use the -b option with the run.bat or run.sh file

When JBoss AS starts up, it binds to localhost by default. Older versions of JBoss would bind to the address 0.0.0.0. Because of this change, you can’t access JBoss AS locally by using your machine name or 0.0.0.0. For example, to verify the server is running, you can’t go to http://myhostname:8080; you have to go to http://localhost:8080 or http://127.0.0.1:8080.


Properties props = new Properties();
props.setProperty("java.naming.provider.url", "jnp://server:1099");
props.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");
props.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
InitialContext ctx = new InitialContext(props);
result = ctx.lookup(path);


run.bat/run.sh -b option for tells JBoss the host it is running on.
By using the -b option you avoid:
javax.naming.CommunicationException
[Root exception is java.rmi.ConnectException:
Connection refused to host: 127.0.0.1

i.e., run.bat -b192.168.15.68 -Djboss.bind.address=0.0.0.0

The bind.address=0.0.0.0 makes server accessible from remote clients

Comments

Popular posts from this blog

Sites, Newsletters, and Blogs

Oracle JDBC ReadTimeout QueryTimeout