admin@glassfish.java.net

Re: CODE REVIEW: bug #1653

From: Lloyd L Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Mon, 11 Dec 2006 15:11:28 -0800

Kedar,

I committed the code--judgment call. No one had responded for hours
saying they would review the code. The process cannot work unless
code reviews are prompt.

PE/EE QuickLook passes.

Lloyd

On Dec 11, 2006, at 2:35 PM, kedar wrote:

> Yes, I will. Will send you comments.
>
> I think commit procedure for a particular module
> allows for slight changes to the overall commit
> procedure. Let's not rat-hole on that one. The
> module leads are supposed to let the alias, new
> developers etc. working on a particular module
> know about those slight modifications to the overall
> policy.
>
> The procedure people working on admin are
> by-and-large following the code-review procedure
> detailed at:
> http://wiki.java.net/bin/view/Projects/AdminDeveloperResources
>
>
> Lloyd L Chambers wrote:
>> Kedar,
>>
>> Sure, I'll use the email. The commit procedure is not exactly
>> clear on this. See:
>> https://glassfish.dev.java.net/public/
>> GuidelinesandConventions.html#Commit_Procedures
>>
>> Will you be reviewing the change?
>>
>> The diffs below include bug #1653 and bug #1717:
>>
>> Index: src/java/com/sun/enterprise/admin/common/ObjectNames.java
>> ===================================================================
>> RCS file: /cvs/glassfish/appserv-core/src/java/com/sun/enterprise/
>> admin/common/ObjectNames.java,v
>> retrieving revision 1.3
>> diff -u -r1.3 ObjectNames.java
>> --- src/java/com/sun/enterprise/admin/common/ObjectNames.java 25
>> Dec 2005 04:13:51 -0000 1.3
>> +++ src/java/com/sun/enterprise/admin/common/ObjectNames.java 11
>> Dec 2006 19:46:27 -0000
>> @@ -45,7 +45,7 @@
>> */
>> public class ObjectNames
>> {
>> - public static final String kDefaultIASDomainName = "ias";
>> + public static final String kDefaultIASDomainName =
>> "com.sun.appserv";
>> public static final char kWildcardChar = '*';
>> public static final char kDomainNameSeparatorChar =
>> ':';
>>
>>
>>
>> Index: src/java/com/sun/enterprise/admin/server/core/jmx/
>> SunoneInterceptor.java
>> ===================================================================
>> RCS file: /cvs/glassfish/appserv-core/src/java/com/sun/enterprise/
>> admin/server/core/jmx/SunoneInterceptor.java,v
>> retrieving revision 1.7
>> diff -u -r1.7 SunoneInterceptor.java
>> --- src/java/com/sun/enterprise/admin/server/core/jmx/
>> SunoneInterceptor.java 18 Nov 2006 01:11:59 -0000 1.7
>> +++ src/java/com/sun/enterprise/admin/server/core/jmx/
>> SunoneInterceptor.java 11 Dec 2006 19:46:28 -0000
>> @@ -690,7 +690,10 @@
>> */
>> private void registerWithPersistenceCheck(ObjectName oName)
>> throws InstanceNotFoundException
>> {
>> -
>> + if ( "ias".equals( oName.getDomain() ) ) {
>> + throw new RuntimeException( "JMX domain 'ias' not
>> suppported" );
>> + }
>> +
>> if (! realMBeanServer.isRegistered(oName) ) {
>> try {
>> //Manufacture the MBean now.
>>
>>
>>
>> cvs server: Diffing src/java/com/sun/enterprise/admin/server/core
>> Index: src/java/com/sun/enterprise/admin/server/core/
>> AdminService.java
>> ===================================================================
>> RCS file: /cvs/glassfish/appserv-core/src/java/com/sun/enterprise/
>> admin/server/core/AdminService.java,v
>> retrieving revision 1.14
>> diff -u -r1.14 AdminService.java
>> --- src/java/com/sun/enterprise/admin/server/core/
>> AdminService.java 21 Sep 2006 19:15:50 -0000 1.14
>> +++ src/java/com/sun/enterprise/admin/server/core/
>> AdminService.java 11 Dec 2006 19:46:28 -0000
>> @@ -384,7 +384,6 @@
>> adminChannel.onReady(context);
>> }
>> initiateCustomMBeanLoading();
>> - registerJVMMonitoringMBeans();
>>
>> // would be cleaner to issue JMX Notifications for a variety
>> // of events, but that would mean adding an MBean for
>> AdminService.
>> @@ -883,12 +882,6 @@
>> final Object impl = Class.forName
>> (SS_MBEAN_CLASS).newInstance();
>> mbs.registerMBean(impl, on);
>> sLogger.finer("Admin Message: System Services MBean
>> Registered with on: " + on.toString());
>> - if (isDas()) {
>> - //register SystemService MBean under the old 8.0
>> name as well
>> - //to backward compatibility with 8.0 RI client -
>> hardcoded
>> - mbs.registerMBean(impl, new ObjectName
>> ("ias:type=system-services"));
>> - sLogger.finer("Admin Message: System Services
>> MBean Registered with sibling name: " + on.toString());
>> - }
>> }
>> catch (final Exception e) {
>> throw new ServerLifecycleException(e);
>> @@ -971,20 +964,6 @@
>> throw new ServerLifecycleException(e); // we must not
>> abort the startup, we must not affect other operations that may
>> follow
>> }
>> initializeMBeanEventListeners();
>> - }
>> - private void registerJVMMonitoringMBeans() {
>> - try {
>> - //register the thread-dump related MBeans
>> - final ObjectName dummy1 = new ObjectName
>> ("foo:bar=bar1"), dummy2 = new ObjectName("foo:bar=bar2");
>> - if (this.isDas()) {
>> - final Object jvmic = Class.forName
>> ("com.sun.enterprise.admin.mbeans.jvm.JVMInformationCollector").newIn
>> stance();
>> -
>> com.sun.enterprise.admin.common.MBeanServerFactory.getMBeanServer
>> ().registerMBean(jvmic, dummy1);
>> - }
>> - final Object jvmi = Class.forName
>> ("com.sun.enterprise.admin.mbeans.jvm.JVMInformation").newInstance();
>> -
>> com.sun.enterprise.admin.common.MBeanServerFactory.getMBeanServer
>> ().registerMBean(jvmi, dummy2);
>> - } catch (final Exception e) {
>> - e.printStackTrace();
>> - }
>> }
>> // createDASDiagnosticMBean
>> cvs server: Diffing src/java/com/sun/enterprise/admin/server/core/
>> channel
>>
>>
>>
>> Lloyd
>>
>> On Dec 11, 2006, at 11:39 AM, kedar wrote:
>>
>>> This is admin code.
>>> Can you kindly use admin_at_glassfish alias?
>>>
>>> Also, please send cvs diff -u to put stuff
>>> in context.
>>>
>>> Kedar
>>>
>>>
>>> Lloyd L Chambers wrote:
>>>> https://glassfish.dev.java.net/issues/show_bug.cgi?id=1653
>>>> "Eliminate code in AdminService that registers "foo" MBeans"
>>>>
>>>> Index: appserv-core/src/java/com/sun/enterprise/admin/server/
>>>> core/AdminService.java
>>>> ===================================================================
>>>> RCS file: /cvs/glassfish/appserv-core/src/java/com/sun/
>>>> enterprise/admin/server/core/AdminService.java,v
>>>> retrieving revision 1.14
>>>> diff -r1.14 AdminService.java
>>>> 387d386
>>>> < registerJVMMonitoringMBeans();
>>>> 886,891d884
>>>> < if (isDas()) {
>>>> < //register SystemService MBean under the old
>>>> 8.0 name as well
>>>> < //to backward compatibility with 8.0 RI client
>>>> - hardcoded
>>>> < mbs.registerMBean(impl, new ObjectName
>>>> ("ias:type=system-services"));
>>>> < sLogger.finer("Admin Message: System Services
>>>> MBean Registered with sibling name: " + on.toString());
>>>> < }
>>>> 974,987d966
>>>> < }
>>>> < private void registerJVMMonitoringMBeans() {
>>>> < try {
>>>> < //register the thread-dump related MBeans
>>>> < final ObjectName dummy1 = new ObjectName
>>>> ("foo:bar=bar1"), dummy2 = new ObjectName("foo:bar=bar2");
>>>> < if (this.isDas()) {
>>>> < final Object jvmic = Class.forName
>>>> ("com.sun.enterprise.admin.mbeans.jvm.JVMInformationCollector").new
>>>> Instance();
>>>> <
>>>> com.sun.enterprise.admin.common.MBeanServerFactory.getMBeanServer
>>>> ().registerMBean(jvmic, dummy1);
>>>> < }
>>>> < final Object jvmi = Class.forName
>>>> ("com.sun.enterprise.admin.mbeans.jvm.JVMInformation").newInstance(
>>>> );
>>>> <
>>>> com.sun.enterprise.admin.common.MBeanServerFactory.getMBeanServer
>>>> ().registerMBean(jvmi, dummy2);
>>>> < } catch (final Exception e) {
>>>> < e.printStackTrace();
>>>> < }
>>>>
>>>> -------------------------------------------------------------------
>>>> --
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>>
>>> --------------------------------------------------------------------
>>> -
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>