Package com.sun.enterprise.server

Examples of com.sun.enterprise.server.ServerContext


    }
  }

  private static boolean shouldInsertOLPM() {          
            boolean newolpenabled = false;
            ServerContext sc =
                    com.sun.enterprise.server.ondemand.OnDemandServer.getServerContext();
            ConfigContext instanceConfigContext = sc.getConfigContext();
            Config instanceConfig = null;
            try {
                instanceConfig =
                        (Config) ServerBeansFactory.getConfigBean(instanceConfigContext);
                if (instanceConfig.getOverloadProtectionService() != null) {
View Full Code Here


    private AMXExtensionFeatureFactory() {
        //disallow instantiation
    }

    public static AMXSupportExtensionFeature getAMXPluggableFeature() {
        ServerContext sc = ApplicationServer.getServerContext();
        if (sc == null)
            return null;
        PluggableFeatureFactory pFactory = ApplicationServer.getServerContext().getPluggableFeatureFactory();
        AMXSupportExtensionFeature amxExt = pFactory.getAMXSupportExtension();
        return amxExt;
View Full Code Here

     *manager objects automatically.
     *@throws ConfigException in case of any problem locating the app server
     *objects that provide the AppsManager and AppclientModulesManager objects.
     */
    public NamingConventions() throws ConfigException {
        ServerContext appServerContext;
        InstanceEnvironment instEnv;
       
        if ((appServerContext = ApplicationServer.getServerContext()) == null) {
            throw new ConfigException("Error getting current app server context; ApplicationServer.getServerContext() returned null");
        }
        if ((instEnv = appServerContext.getInstanceEnvironment()) == null) {
            throw new ConfigException("Error getting current instance environment; appServercontext.getInstanceEnvironment() returned null");
        }
        appsManager = new AppsManager(instEnv, false);
        appclientModulesManager = new AppclientModulesManager(instEnv, false);
    }
View Full Code Here

        String passivationDirName = null;

        try {
       
            // runtime server context
            ServerContext ctx = ApplicationServer.getServerContext();
        
            // environment object for this server instance
            InstanceEnvironment env = ctx.getInstanceEnvironment();
        
            // application object associated with this ejb
            Application application = desc.getApplication();
            String dirName = null;
            String componentSeparator = "_";
View Full Code Here

        String passivationDirName = null;

        try {
       
            // runtime server context
            ServerContext ctx = ApplicationServer.getServerContext();
        
            // environment object for this server instance
            InstanceEnvironment env = ctx.getInstanceEnvironment();
        
            // application object associated with this ejb
            Application application = desc.getApplication();
            String dirName = null;
            String componentSeparator = "_";
View Full Code Here

            return;
        }

        AccessController.doPrivileged(new PrivilegedAction() {
            public Object run() {
                ServerContext ctxt = ApplicationServer.getServerContext();
                if (ctxt != null ) {
                    registry_ = ctxt.getMonitoringRegistry();
                }
                return null;
            }
       });
View Full Code Here

     *
     * @param restart    boolen value for restart required flag
     */
    public void setRestartRequired(boolean restart) {
        String inst =  null;
        ServerContext svrCtx = ApplicationServer.getServerContext();
        if (svrCtx !=null) {
            inst = svrCtx.getInstanceName();
        }
        setRestartRequired(inst, restart);
    }
View Full Code Here

     * Gets the jsr77 state corresponding to this module
     */

    public Integer getState() throws J2EEApplicationException {
        try {
            ServerContext serverContext = ApplicationServer.getServerContext();
            String namePattern = (
                serverContext.getDefaultDomainName() + ":" +
                "j2eeType=J2EEApplication," +
    "name=" + ((String)this.getAttribute(kName)) + "," +
    "J2EEServer=" + serverContext.getInstanceName() + "," +
    "*");
            Integer intObj = (Integer)
        Switch.getSwitch().getManagementObjectManager().getState(namePattern);
      return intObj;
        } catch (Exception e) {
View Full Code Here

     * Gets the jsr77 state corresponding to this module
     */
    public Integer getState() throws J2EEEjbJarModuleException {
        try {
            MBeanServer mbs = MBeanServerFactory.getMBeanServer();
            ServerContext serverContext = ApplicationServer.getServerContext();
            ObjectName objName = new ObjectName(
                serverContext.getDefaultDomainName() + ":" +
                "j2eeType=EJBModule," +
                "name=" + ((String)this.getAttribute(kName)) + "," +
    "J2EEApplication=" + "null" + "," +
    "J2EEServer=" + serverContext.getInstanceName());
            Integer intObj = (Integer) mbs.getAttribute(objName, "state");
      return intObj;
        } catch (Exception e) {
            sLogger.throwing(getClass().getName(), "stop", e);
            throw new J2EEEjbJarModuleException(e.getMessage());
View Full Code Here

     */
    public Integer getState() throws J2EEConnectorModuleException {
        try {
            String moduleName = (String)this.getAttribute(kName);
            MBeanServer mbs = MBeanServerFactory.getMBeanServer();
            ServerContext serverContext = ApplicationServer.getServerContext();
            ObjectName objName = new ObjectName(
                serverContext.getDefaultDomainName() + ":" +
                "j2eeType=ResourceAdapterModule," +
                "name=" + ((String)this.getAttribute(kName)) + "," +
    "J2EEApplication=" + "null" + "," +
    "J2EEServer=" + serverContext.getInstanceName());
            Integer intObj = (Integer) mbs.getAttribute(objName, "state");
      return intObj;
        } catch (Exception e) {
            sLogger.throwing(getClass().getName(), "getState", e);
            throw new J2EEConnectorModuleException(e.getMessage());
View Full Code Here

TOP

Related Classes of com.sun.enterprise.server.ServerContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.