admin@glassfish.java.net

Re: CODE REVIEW: minor bug fixes for 9.1.1 AMX unit test failures

From: Kedar Mhaswade <Kedar.Mhaswade_at_Sun.COM>
Date: Fri, 30 Nov 2007 17:27:57 -0800

Nandini Ektare wrote:
> Lloyd L Chambers wrote:
>> This is for 9.1.1.
>>
>> These two fixes address AMX unit test failures:
>>
>> 1. A bug in which "jvm.log" is returned with the list of server log
>> files.
> Looks fine.

I don't think so. Please don't make AMX mask the backend bugs.
In this case, the LogMBean must not return the "jvm.log" as that file
is NOT the rotated server log file.

I don't approve this change, unless I am proved wrong :)

- Kedar

>> 2. A bug in which the J2EEServer MBeanInfo has duplicate items in it.
> Is that the output of cvs diff -u ? It's not easy to read those diffs.
> Seems like you have done fixes to mergeOperationInfos and
> mergeAttributeInfos.
>
> Nandini
>>
>> ----------------
>>
>> Index:
>> admin/mbeanapi-impl/src/java/com/sun/enterprise/management/ext/logging/LoggingImpl.java
>> ===================================================================
>> RCS file:
>> /cvs/glassfish/admin/mbeanapi-impl/src/java/com/sun/enterprise/management/ext/logging/LoggingImpl.java,v
>> retrieving revision 1.19
>> diff -u -w -r1.19 LoggingImpl.java
>> ---
>> admin/mbeanapi-impl/src/java/com/sun/enterprise/management/ext/logging/LoggingImpl.java
>> 5 May 2007 05:23:28 -0000 1.19
>> +++
>> admin/mbeanapi-impl/src/java/com/sun/enterprise/management/ext/logging/LoggingImpl.java
>> 30 Nov 2007 23:17:01 -0000
>> @@ -294,7 +294,18 @@
>>
>> if ( SERVER_KEY.equals( key ) )
>> {
>> - result = getLogMBean().getArchivedLogfiles();
>> + final String[] names =
>> getLogMBean().getArchivedLogfiles();
>> + final List<String> validNames = new ArrayList<String>();
>> + for( final String name : names )
>> + {
>> + // a "jvm.log" file gets returned (bug) by
>> getLogMBean().getArchivedLogfiles()
>> + if ( ! name.equalsIgnoreCase( "jvm.log" ) )
>> + {
>> + validNames.add( name );
>> + }
>> + }
>> + result = new String[ validNames.size() ];
>> + validNames.toArray( result );
>> }
>> else
>> {
>> cvs diff: Diffing
>> admin/mbeanapi-impl/src/java/com/sun/enterprise/management/ext/update
>> cvs diff: Diffing
>> admin/mbeanapi-impl/src/java/com/sun/enterprise/management/ext/wsmgmt
>> cvs diff: Diffing
>> admin/mbeanapi-impl/src/java/com/sun/enterprise/management/j2ee
>> Index:
>> admin/mbeanapi-impl/src/java/com/sun/enterprise/management/j2ee/DASJ2EEServerImpl.java
>> ===================================================================
>> RCS file:
>> /cvs/glassfish/admin/mbeanapi-impl/src/java/com/sun/enterprise/management/j2ee/DASJ2EEServerImpl.java,v
>> retrieving revision 1.11
>> diff -u -w -r1.11 DASJ2EEServerImpl.java
>> ---
>> admin/mbeanapi-impl/src/java/com/sun/enterprise/management/j2ee/DASJ2EEServerImpl.java
>> 5 May 2007 05:23:29 -0000 1.11
>> +++
>> admin/mbeanapi-impl/src/java/com/sun/enterprise/management/j2ee/DASJ2EEServerImpl.java
>> 30 Nov 2007 23:17:01 -0000
>> @@ -287,6 +287,7 @@
>> }
>> }
>>
>> +/*
>> private MBeanInfo mMBeanInfo = null;
>>
>> public synchronized MBeanInfo
>> @@ -307,9 +308,6 @@
>> return mMBeanInfo;
>> }
>>
>> -
>> - // attribute info
>> -
>> private MBeanAttributeInfo[]
>> mergeAttributeInfos(
>> MBeanAttributeInfo[] infos1,
>> @@ -337,11 +335,10 @@
>> false);
>> return dAttributes;
>> }
>> +*/
>>
>>
>> - // operation info
>> -
>> - private MBeanOperationInfo[]
>> +/* private MBeanOperationInfo[]
>> mergeOperationInfos(
>> MBeanOperationInfo[] infos1,
>> MBeanOperationInfo[] infos2 )
>> @@ -354,8 +351,9 @@
>>
>> return( infos );
>> }
>> +*/
>>
>> -
>> +/*
>> private MBeanOperationInfo[]
>> getMBeanOperationInfo()
>> {
>> @@ -377,6 +375,7 @@
>>
>> MBeanOperationInfo.ACTION);
>> return dOperations;
>> }
>> +*/
>>
>>
>>
>>
>> ---
>> Lloyd L Chambers
>> lloyd.chambers_at_sun.com <mailto:lloyd.chambers_at_sun.com>
>> Sun Microsystems, Inc
>>
>>
>>
>