Re: no more non-String attributes in Glassfish V3 AMX
Please blog about it.
Thanks.
Lloyd L Chambers wrote:
> String changes are now in. All AMX getters/setters/methods uses
> 'String'--no boolean, int, etc anymore.
>
> Note that AMX will enforce data types in the future based on
> @ResolveTo. Clients such as the GUI can use the annotations if desired
> to validate in advance or provide a hint. Examples of @ResolveTo in the
> AMX API:
>
> @ResolveTo(Integer.class) public String getPort();
> @ResolveTo(Boolean.class) public String getXpoweredBy();
>
> There are some conveniences available. For example, clients that need a
> resolved value can call resolveBoolean/resolveInteger:
>
> // note that a missing Attribute is returned as null, so Object forms
> should be used (not simple types)
> Boolean b = anyAMXConfig.resolveBoolean("SomeBoolean");
> Integer b = anyAMXConfig.resolveInteger("SomeInteger");
>
> Clients that want the actual value (eg "true", "false", "null",
> ${FOO_VAR}) should call String getSomeBoolean().
>
> Modifiers of configuration must remain aware that values could be the
> variable ${...} form, and should display the actual value for editing,
> not the "resolved" value.
>
> See also:
> com.sun.appserv.management.config.AttributeResolver
> com.sun.appserv.management.config.ResolveTo // annotation
>
> Lloyd
>
> On Jun 19, 2008, at 4:37 PM, Lloyd L Chambers wrote:
>
>> I will be making this change very soon so that AMX can move forward
>> for V3--
>>
>> Contrary to my April 18 email, not all AMX config attributes were
>> converted to 'String' (com.sun.appserv.management.config). See below
>> for a list of the remaining attributes that are non-String.
>>
>> In V2, AMX utilized various non-String attributes and arguments
>> (boolean, int); that approach was a problem for any value that could
>> take on a variable value eg ${...}.
>>
>> In V3, we face some conflicting issues
>> - configuration is all String-based and we don't define it (in general);
>> - configuration allows 'null' for attribute values. We must be able
>> to distinguish null vs true/false (null is a problem for a dynamic
>> proxy returning a 'boolean').
>> - module writers can choose to allow ${...} values for any/all
>> configuration values.
>>
>> For all these reasons, it seems we are forced to move to an all-String
>> API for AMX, both for attributes and creation methods.
>>
>>
>> Lloyd
>> -------------
>>
>>
>> MB2:config lloyd$ pwd
>> /v3/code/common/amx-api/src/main/java/com/sun/appserv/management/config
>>
>> MB2:config lloyd$ grep boolean *.java
>> AccessLogConfig.java: public boolean getRotationEnabled();
>> AccessLogConfig.java: public void setRotationEnabled( final
>> boolean value );
>> ApplicationConfig.java: public boolean getAvailabilityEnabled();
>> ApplicationConfig.java: public void setAvailabilityEnabled(
>> boolean enabled );
>> ApplicationsConfig.java: boolean
>> enabled,
>> ApplicationsConfig.java: boolean
>> isFailureFatal,
>> ApplicationsConfig.java: boolean enabled,
>> ConfigConfig.java: public boolean
>> getDynamicReconfigurationEnabled();
>> ConfigConfig.java: public void
>> setDynamicReconfigurationEnabled( boolean enabled );
>> ConnectorConnectionPoolConfig.java: public boolean
>> getConnectionValidationRequired();
>> ConnectorConnectionPoolConfig.java: public void
>> setConnectionValidationRequired( final boolean required );
>> ConnectorConnectionPoolConfig.java: public boolean
>> getFailAllConnections();
>> ConnectorConnectionPoolConfig.java: public void
>> setFailAllConnections( final boolean value );
>> DASConfig.java: public boolean getAutodeployEnabled();
>> DASConfig.java: public void setAutodeployEnabled( boolean value );
>> DASConfig.java: public boolean
>> getAutodeployJSPPrecompilationEnabled();
>> DASConfig.java: public void
>> setAutodeployJSPPrecompilationEnabled( boolean value );
>> DASConfig.java: public boolean getAutodeployVerifierEnabled();
>> DASConfig.java: public void setAutodeployVerifierEnabled(
>> boolean value );
>> DASConfig.java: public boolean getDynamicReloadEnabled();
>> DASConfig.java: public void setDynamicReloadEnabled( boolean
>> value );
>> DeployedItemRefConfig.java: public boolean getLBEnabled();
>> DeployedItemRefConfig.java: public void setLBEnabled(final boolean
>> lbEnabled);
>> EJBModuleConfig.java: This boolean flag controls whether
>> availability is enabled
>> ExtensionModuleConfig.java: public boolean
>> getAvailabilityEnabled();
>> ExtensionModuleConfig.java: public void setAvailabilityEnabled(
>> boolean isFatal );
>> HTTPFileCacheConfig.java: public boolean getFileCachingEnabled();
>> HTTPFileCacheConfig.java: public void setFileCachingEnabled(
>> final boolean value );
>> HTTPFileCacheConfig.java: public boolean
>> getFileTransmissionEnabled();
>> HTTPFileCacheConfig.java: public void
>> setFileTransmissionEnabled( final boolean value );
>> HTTPFileCacheConfig.java: public boolean getGloballyEnabled();
>> HTTPFileCacheConfig.java: public void setGloballyEnabled( final
>> boolean value );
>> HTTPListenerConfig.java: public boolean getSecurityEnabled();
>> HTTPListenerConfig.java: public void setSecurityEnabled(
>> boolean value );
>> HTTPListenerConfig.java: public boolean getXpoweredBy();
>> HTTPListenerConfig.java: public void setXpoweredBy( boolean
>> value );
>> HTTPListenerConfig.java: public boolean getBlockingEnabled();
>> HTTPListenerConfig.java: public void setBlockingEnabled( final
>> boolean value );
>> HTTPProtocolConfig.java: public boolean getDNSLookupEnabled();
>> HTTPProtocolConfig.java: public void setDNSLookupEnabled( final
>> boolean value );
>> HTTPProtocolConfig.java: public boolean getSSLEnabled();
>> HTTPProtocolConfig.java: public void setSSLEnabled( final
>> boolean value );
>> J2EEApplicationConfig.java: This boolean flag controls whether
>> availability is enabled
>> J2EEApplicationConfig.java: public boolean
>> getAvailabilityEnabled();
>> J2EEApplicationConfig.java: public void
>> setAvailabilityEnabled( boolean enabled );
>> JDBCConnectionPoolConfig.java: public boolean
>> getFailAllConnections();
>> JDBCConnectionPoolConfig.java: public void
>> setFailAllConnections( boolean value );
>> JDBCConnectionPoolConfig.java: public boolean
>> getIsConnectionValidationRequired();
>> JDBCConnectionPoolConfig.java: public void
>> setIsConnectionValidationRequired( boolean value );
>> JDBCConnectionPoolConfig.java: public boolean
>> getIsIsolationLevelGuaranteed();
>> JDBCConnectionPoolConfig.java: public void
>> setIsIsolationLevelGuaranteed( boolean value );
>> JDBCConnectionPoolConfig.java: public boolean
>> getNonTransactionalConnections();
>> JDBCConnectionPoolConfig.java: public void
>> setNonTransactionalConnections( boolean enabled );
>> JDBCConnectionPoolConfig.java: public boolean
>> getAllowNonComponentCallers();
>> JDBCConnectionPoolConfig.java: public void
>> setAllowNonComponentCallers( boolean enabled );
>> JavaWebStart.java: public boolean getJavaWebStartEnabled();
>> JavaWebStart.java: public void setJavaWebStartEnabled( boolean
>> enabled );
>> LifecycleModuleConfig.java: public boolean getIsFailureFatal();
>> LifecycleModuleConfig.java: public void setIsFailureFatal(
>> boolean isFatal );
>> LoadBalancerConfig.java: Return the boolean flag which indicates
>> whether the changes to lb config
>> LoadBalancerConfig.java: public boolean getAutoApplyEnabled();
>> LoadBalancerConfig.java: Set the boolean flag to indicate whether
>> the changes to lb config
>> LoadBalancerConfig.java: public void setAutoApplyEnabled(final
>> boolean value);
>> LoadBalancersConfig.java: boolean autoApplyEnabled,
>> Map<String,String> optional);
>> LogServiceConfig.java: public boolean getAlarms();
>> LogServiceConfig.java: public void setAlarms( boolean value );
>> LogServiceConfig.java: public boolean getLogToConsole();
>> LogServiceConfig.java: public void setLogToConsole( boolean
>> value );
>> LogServiceConfig.java: public boolean getUseSystemLogging();
>> LogServiceConfig.java: public void setUseSystemLogging( boolean
>> value );
>> ModuleConfig.java: public boolean getDirectoryDeployed();
>> NodeAgentConfig.java: public boolean getStartServersInStartup();
>> NodeAgentConfig.java: public void setStartServersInStartup(
>> boolean start );
>> ResourceRefConfigCR.java: public ResourceRefConfig
>> createResourceRefConfig(String referencedResourceName, boolean enabled);
>> ResourcesConfig.java: boolean
>> failAllConnections,
>> ResourcesConfig.java: boolean
>> connectionValidationRequired,
>> ResourcesConfig.java: boolean
>> isolationLevelGuaranteed,
>> ResourcesConfig.java: boolean enabled,
>> SSLConfig.java: public boolean getClientAuthEnabled();
>> SSLConfig.java: public void setClientAuthEnabled( boolean value );
>> SSLConfig.java: public boolean getSSL2Enabled();
>> SSLConfig.java: public void setSSL2Enabled( boolean value );
>> SSLConfig.java: public boolean getSSL3Enabled();
>> SSLConfig.java: public void setSSL3Enabled( boolean value );
>> SSLConfig.java: public boolean getTLSEnabled();
>> SSLConfig.java: public void setTLSEnabled( boolean value );
>> SSLConfig.java: public boolean getTLSRollbackEnabled();
>> SSLConfig.java: public void setTLSRollbackEnabled( boolean value );
>> SecurityServiceConfig.java:
>> boolean auditOn, Map<String,String> reservedForFutureUse );
>> ServerRefConfig.java: Return the boolean flag that causes any
>> and all load-balancers using
>> ServerRefConfig.java: public boolean getLBEnabled();
>> ServerRefConfig.java: Set the boolean flag that causes any and
>> all load-balancers using
>> ServerRefConfig.java: public void setLBEnabled(final boolean String);
>> ServerRefConfigCR.java: String disableTimeoutInMinutes,
>> boolean lbEnabled, boolean enabled);
>> VirtualServerConfig.java: final boolean ipOnly,
>> WebModuleConfig.java: public boolean getAvailabilityEnabled();
>> WebModuleConfig.java: public void setAvailabilityEnabled(
>> boolean enabled );
>> WebServiceEndpointConfig.java: String name, String
>> ruleFileLocation,boolean enabled, String applyTo,
>>
>>
>> MB2:config lloyd$ grep -r "int " *.java
>> AdminServiceConfig.java: int port, String authRealmName,
>> Map<String,String> optional );
>> ConnectorConnectionPoolConfig.java: more connector-resource
>> elements point to the same
>> DeployedItemRefConfigCR.java: String lbEnabled, int
>> disableTimeoutInMinutes);
>> RegistryLocationConfig.java: Specifies the registry where web
>> service end point artifacts are
>> ServerRefConfig.java: public int getDisableTimeoutInMinutes();
>> ServerRefConfig.java: public void setDisableTimeoutInMinutes(final
>> int timeoutInMins);
>> WebServiceEndpointConfig.java: * visibility of this endoint as a
>> service in JBI
>> WebServiceEndpointConfig.java: * visibility of this endoint as a
>> service in JBI
>>
>>
>>
>>
>> ---
>> Lloyd L Chambers
>> lloyd.chambers_at_sun.com
>> Sun Microsystems, Inc
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>>
>
> ---
> Lloyd L Chambers
> lloyd.chambers_at_sun.com
> Sun Microsystems, Inc
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>