To resolve a value using AMX, TemplateResolver must be used:
https://glassfish.dev.java.net/nonav/javaee5/amx/javadoc/com/sun/
appserv/management/config/TemplateResolver.html
This interface is implemented by ServerConfig, ClusteredServerConfig,
StandaloneServerConfig. The implementation code in ServerConfigBase
executes as follows, taking advantage of the fact the 'myName' is the
name of a server, cluster, or config. That is how the scope
("target") is resolved. I don't understand the internal operation of
the DomainMBean, or whether there's a "look first here, then next
there, etc", algorithm.
if ( isTemplateString( template ) ) {
final String myName = getName();
final OldDomainMBean oldDomain = getOldConfigProxies
().getOldDomainMBean();
try
{
result = oldDomain.resolveTokens( template, myName);
}
catch( Exception e )
{
getMBeanLogger().warning( "Can't resolve: " + template + ",
" + e);
e.printStackTrace();
throw new IllegalArgumentException( template );
}
}
On Feb 1, 2008, at 5:29 PM, Bill Shannon wrote:
> Back to the original problem...
>
> Browsing quickly through the AMX APIs, it appears that AMX only uses
> String for values, always returning the unresolved value, is that
> correct?
> How do you use AMX to get the resolved value currently (V2)?
---
Lloyd L Chambers
lloyd.chambers_at_sun.com
Sun Microsystems, Inc