dev@glassfish.java.net

Re: CVS update: /glassfish/admin-core/admin/src/java/com/sun/enterprise/admin/meta/, /glassfish/appserv-core/src/java/com/sun/enterprise/admin/server/core/

From: Dinesh Patil <Dinesh.Patil_at_Sun.COM>
Date: Wed, 17 Jan 2007 17:24:22 -0800

Build is broken after this checkin.. please lookinto this quickly.

compile:
    [java] [echo] compiling admin classes
    [java] [javac] Compiling 45 source files to /space/tinderbox/smoke/Linux_2.4_depend/workspace/glassfish/admin-core/admin/build
    [java] [javac] /space/tinderbox/smoke/Linux_2.4_depend/workspace/glassfish/admin-core/admin/src/java/com/sun/enterprise/admin/meta/MBeanRegistryFactory.java:131: package com.sun.enterprise.server does not exist
    [java] [javac] import com.sun.enterprise.server.ApplicationServer;
    [java] [javac] ^
    [java] [javac] /space/tinderbox/smoke/Linux_2.4_depend/workspace/glassfish/admin-core/admin/src/java/com/sun/enterprise/admin/meta/MBeanRegistryFactory.java:132: package com.sun.enterprise.server does not exist
    [java] [javac] import com.sun.enterprise.server.ServerContext;
    [java] [javac] ^
    [java] [javac] /space/tinderbox/smoke/Linux_2.4_depend/workspace/glassfish/admin-core/admin/src/java/com/sun/enterprise/admin/meta/MBeanRegistryFactory.java:165: cannot find symbol
    [java] [javac] symbol : class ServerContext
    [java]
    [java] BUILD FAILED
    [java] [javac] location: class com.sun.enterprise.admin.meta.MBeanRegistryFactory
    [java] [javac] ServerContext srvCtx = ApplicationServer.getServerContext();
    [java] /space/tinderbox/smoke/Linux_2.4_depend/workspace/glassfish/admin-core/build.xml:39: The following error occurred while executing this line:
    [java] [javac] ^
    [java] /space/tinderbox/smoke/Linux_2.4_depend/workspace/glassfish/admin-core/admin/build.xml:64: Compile failed; see the compiler error output for details.
    [java]
    [java] Total time: 32 seconds
    [java] [javac] /space/tinderbox/smoke/Linux_2.4_depend/workspace/glassfish/admin-core/admin/src/java/com/sun/enterprise/admin/meta/MBeanRegistryFactory.java:165: cannot find symbol
    [java] [javac] symbol : variable ApplicationServer
    [java] [javac] location: class com.sun.enterprise.admin.meta.MBeanRegistryFactory
    [java] [javac] ServerContext srvCtx = ApplicationServer.getServerContext();
    [java] [javac] ^
    [java] [javac] Note: Some input files use or override a deprecated API.
    [java] [javac] Note: Recompile with -Xlint:deprecation for details.
    [java] [javac] Note: Some input files use unchecked or unsafe operations.
    [java] [javac] Note: Recompile with -Xlint:unchecked for details.
    [java] [javac] 4 errors
    [java] [ERROR] Java Result: 1


pa100654_at_dev.java.net wrote:

>User: pa100654
>Date: 2007/01/17 16:14:23
>
>Modified:
> glassfish/admin-core/admin/src/java/com/sun/enterprise/admin/meta/MBeanRegistryFactory.java
> glassfish/appserv-core/src/java/com/sun/enterprise/admin/server/core/AdminContextImpl.java
>
>Log:
> Issue number: 6506926,6506932
> Reviewed by: Kedar Mhaswade
> Description: The validator and the config beans are loaded for all the instances which is not necessary. Modified the code to not load them.
>
>File Changes:
>
>Directory: /glassfish/admin-core/admin/src/java/com/sun/enterprise/admin/meta/
>==============================================================================
>
>File [changed]: MBeanRegistryFactory.java
>Url: https://glassfish.dev.java.net/source/browse/glassfish/admin-core/admin/src/java/com/sun/enterprise/admin/meta/MBeanRegistryFactory.java?r1=1.4&r2=1.5
>Delta lines: +19 -1
>--------------------
>--- MBeanRegistryFactory.java 8 May 2006 17:18:53 -0000 1.4
>+++ MBeanRegistryFactory.java 18 Jan 2007 00:14:20 -0000 1.5
>@@ -22,10 +22,15 @@
> */
>
> /*
>- * $Id: MBeanRegistryFactory.java,v 1.4 2006/05/08 17:18:53 kravtch Exp $
>+ * $Id: MBeanRegistryFactory.java,v 1.5 2007/01/18 00:14:20 pa100654 Exp $
> * @author: alexkrav
> *
> * $Log: MBeanRegistryFactory.java,v $
>+ * Revision 1.5 2007/01/18 00:14:20 pa100654
>+ * Issue number: 6506926,6506932
>+ * Reviewed by: Kedar Mhaswade
>+ * Description: The validator and the config beans are loaded for all the instances which is not necessary. Modified the code to not load them.
>+ *
> * Revision 1.4 2006/05/08 17:18:53 kravtch
> * Bug #6423082 (request for admin infrastructure to support the config changes without DAS running (offline))
> * Added infrastructure for offline execution under Config Validator for:
>@@ -122,6 +127,10 @@
>
> import com.sun.enterprise.admin.meta.naming.MBeansNaming;
> import com.sun.enterprise.admin.AdminContext;
>+import com.sun.enterprise.config.serverbeans.ServerHelper;
>+import com.sun.enterprise.server.ApplicationServer;
>+import com.sun.enterprise.server.ServerContext;
>+
> /**
> * Provides naming support for Mbeans
> */
>@@ -153,6 +162,11 @@
> if(adminRegistry != null)
> return adminRegistry;
> try {
>+ ServerContext srvCtx = ApplicationServer.getServerContext();
>+ if (!ServerHelper.isDAS(srvCtx.getConfigContext(), srvCtx.getInstanceName())){
>+ adminRegistry = new MBeanRegistry();
>+ return adminRegistry;
>+ }
> URL url = null;
> if(adminContext!=null)
> url = adminContext.getAdminMBeanRegistryURL();
>
>Directory: /glassfish/appserv-core/src/java/com/sun/enterprise/admin/server/core/
>=================================================================================
>
>File [changed]: AdminContextImpl.java
>Url: https://glassfish.dev.java.net/source/browse/glassfish/appserv-core/src/java/com/sun/enterprise/admin/server/core/AdminContextImpl.java?r1=1.3&r2=1.4
>Delta lines: +9 -4
>-------------------
>--- AdminContextImpl.java 25 Dec 2005 04:14:20 -0000 1.3
>+++ AdminContextImpl.java 18 Jan 2007 00:14:21 -0000 1.4
>@@ -42,6 +42,7 @@
> import com.sun.enterprise.server.ServerContextImpl;
> import com.sun.enterprise.config.pluggable.ConfigEnvironment;
> import com.sun.enterprise.config.pluggable.EnvironmentFactory;
>+import com.sun.enterprise.config.serverbeans.ServerHelper;
>
> /**
> *
>@@ -92,9 +93,13 @@
> adminConfigContext = ConfigContextFactory.createConfigContext(
> getAdminConfigEnvironment(configFileName));
> // Registering the config validator
>+ if (ServerHelper.isDAS(srvCtx.getConfigContext(), srvCtx.getInstanceName())) {
> registerValidator();
> registerConfigAdjustmentListener();
>-
>+ }
>+ } catch (ConfigException ce) {
>+ adminLogger.log(Level.SEVERE, "core.determining_server_instance_failed",
>+ ce);
> } catch (RuntimeException ce) {
> adminLogger.log(Level.SEVERE, "core.admin_config_read_error",
> ce.getMessage());
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cvs-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: cvs-help_at_glassfish.dev.java.net
>
>
>