FileDocCategorySizeDatePackage
JVMImpl.javaAPI DocGlassfish v2 API4868Fri May 04 22:23:30 BST 2007com.sun.enterprise.management.j2ee

JVMImpl

public final class JVMImpl extends J2EEManagedObjectImplBase
Identifies a Java VM being utilized by a server.

Fields Summary
private static final Set
DONT_MAP_SET
Constructors Summary
public JVMImpl(com.sun.enterprise.management.support.Delegate delegate)

		super( delegate );
	
Methods Summary
protected java.lang.StringgetConfigPeerJ2EEType()

		return( XTypes.JAVA_CONFIG );
	
protected java.lang.StringgetConfigPeerName()

		return( AMX.NO_NAME );
	
protected java.util.MapgetConfigPeerProps()

		final J2EEServer	server			= (J2EEServer)getContainer();
		final ServerConfig 	serverConfig	= (ServerConfig)server.getConfigPeer();
		final String		configName		= serverConfig.getReferencedConfigName();
		
		final Map<String,String>	props	= new HashMap<String,String>();
		
		props.put( XTypes.CONFIG_CONFIG, configName );
		props.put( AMX.J2EE_TYPE_KEY, XTypes.JAVA_CONFIG );
		
		return props;
	
protected java.util.SetgetDontMapAttributeNames()

	
		 
	
	
	    final Set<String>   all = GSetUtil.newSet( DONT_MAP_SET );
	    all.addAll( super.getDontMapAttributeNames() );
	    return( all );
	
public java.lang.StringgetjavaVendor()

		return( (String)delegateGetAttributeNoThrow( "javaVendor" ) );
	
public java.lang.StringgetjavaVersion()

		return( (String)delegateGetAttributeNoThrow( "javaVersion" ) );
	
public java.lang.Stringgetnode()

		String	fullyQualifiedHostName	= (String)delegateGetAttributeNoThrow( "node" );
		
		/*
			Underlying MBean does not comply with JSR77.3.4.1.3, which states:
			"Identifies the node (machine) this JVM is running on. The value of the node
			attribute must be the fully quailified hostname of the node the JVM is running on."
			
			value seems to be of the form: BLACK/129.150.29.138
			
			Roll our own instead.
		 */
		 try
		 {
		 	fullyQualifiedHostName	= java.net.InetAddress.getLocalHost().getCanonicalHostName();
		 }
		 catch( java.net.UnknownHostException e)
		 {
		 }
		
		return( fullyQualifiedHostName );