MoinMoin Logo
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Navigation

  • Start
  • Sitemap

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

Revision 1 as of 2014-06-10 21:24:29
  • Java
  • JNDI

JNDI

JNDI is a standard Java API that is bundled with JDK1.3 and higher. JNDI provides a common interface to a variety of existing naming services: DNS, LDAP, Active Directory, RMI registry, COS registry, NIS, and file systems.

http://docs.jboss.org/jbossas/jboss4guide/r1/html/ch3.chapter.html

http://stackoverflow.com/questions/13643127/how-does-the-ejb-client-locate-the-ejb-server-without-url

Sample

Properties:

  • java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory

  • java.naming.provider.url=jnp://localhost:1099
  • java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

package test;

import java.security.Security;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
                    
public class Client
{
    public static void main(String args[]) throws Exception
    {
        Properties env = new Properties();
        env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
        env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
        env.put(Context.PROVIDER_URL, "jnp://myserver.example.com:1099");
        InitialContext context = new InitialContext(env);
        WSTest test = (WSTest) context.lookup("WSTest/remote");
    }
}
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01