A simple utility mbean that allows one to create an alias in
the form of a LinkRef from one JNDI name to another.
| Method from org.jboss.naming.NamingAlias Detail: |
public String getFromName() {
return fromName;
}
Get the from name of the alias. This is the location where the
LinkRef is bound under JNDI. |
public String getToName() {
return toName;
}
Get the to name of the alias. This is the target name to
which the LinkRef refers. The name is a URL, or a name to be resolved
relative to the initial context, or if the first character of the name
is ".", the name is relative to the context in which the link is bound. |
public void setFromName(String name) throws NamingException {
removeLinkRef(fromName);
this.fromName = name;
createLinkRef();
}
Set the from name of the alias. This is the location where the
LinkRef is bound under JNDI. |
public void setToName(String name) throws NamingException {
this.toName = name;
createLinkRef();
}
Set the to name of the alias. This is the target name to
which the LinkRef refers. The name is a URL, or a name to be resolved
relative to the initial context, or if the first character of the name
is ".", the name is relative to the context in which the link is bound. |
protected void startService() throws Exception {
if( fromName == null )
throw new IllegalStateException("fromName is null");
if( toName == null )
throw new IllegalStateException("toName is null");
createLinkRef();
}
|
protected void stopService() throws Exception {
removeLinkRef(fromName);
}
|