This content has been marked as final.
Show 1 reply
-
1. Re: How to Alias the JNDI name
hillelzvi Apr 17, 2005 8:45 AM (in response to hillel)Hi,
To clarify I've added to /usr/local/jboss-4.0.1sp1/server/default/conf/jboss-service.xml
the following:<mbean code="org.jboss.naming.NamingAlias" name="jboss:service=NamingAlias,fromName=34402"> <attribute name="ToName">34402_EN</attribute> <attribute name="FromName">34402</attribute> </mbean> <mbean code="org.jboss.naming.NamingAlias" name="jboss:service=NamingAlias,fromName=34402_EN"> <attribute name="ToName">34402_ID</attribute> <attribute name="FromName">34402_EN</attribute> </mbean>
There aliases are viewable via the Jboss JMX Management console under the
Jboss heading:
* fromName=34402,service=NamingAlias
* fromName=34402_EN,service=NamingAlias
But I can't connect to the aliases via :
ctx = new InitialContext();
obj = ctx.lookup(34402_EN); or obj = ctx.lookupLink(34402_EN);
or obj = ctx.lookup(34402_ID); or obj = ctx.lookupLink(34402_ID);
How does one set-up JNDI aliases and then connect to the aliases?