[jboss-jira] [JBoss JIRA] Closed: (JBAS-5799) HAJNDI lookup clarification
Samson Kittoli (JIRA)
jira-events at lists.jboss.org
Wed Dec 3 20:57:37 EST 2008
[ https://jira.jboss.org/jira/browse/JBAS-5799?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Samson Kittoli closed JBAS-5799.
--------------------------------
Resolution: Done
fixed
> HAJNDI lookup clarification
> ---------------------------
>
> Key: JBAS-5799
> URL: https://jira.jboss.org/jira/browse/JBAS-5799
> Project: JBoss Application Server
> Issue Type: Task
> Security Level: Public(Everyone can see)
> Components: Docs/Administration and Configuration Guide
> Affects Versions: JBossAS-5.0.0.CR1, JBossAS-4.2.3.GA
> Reporter: Galder Zamarreno
> Assignee: Samson Kittoli
>
> In AS documentation, in the clustering section, it says:
> "For clients running inside the application server.
> If you want to access HA-JNDI from inside the application server, you must explicitly get an InitialContext
> by passing in JNDI properties. The following code shows how to create a naming Context bound to HA-JNDI:
> Properties p = new Properties();
> p.put(Context.INITIAL_CONTEXT_FACTORY,
> "org.jnp.interfaces.NamingContextFactory");
> p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
> p.put(Context.PROVIDER_URL, "localhost:1100"); // HA-JNDI port.
> return new InitialContext(p); "
> As explained in http://wiki.jboss.org/auth/wiki/JBossHAJNDIUseCluster I think this section below should
> appended to the comment above.
> "However, this does not work in all cases, especially when running a multi-homed cluster (several JBoss
> instances on one machine bound to different IPs). A safer method is not to specify the Context.PROVIDER_URL
> (which does not work in all scenarios) but the partition name property:
> Properties p = new Properties();
> p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
> p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
> p.put("jnp.partitionName", "DefaultPartition"); // partition name.
> return new InitialContext(p); "
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list