Package com.sun.enterprise.admin.common.exception

Examples of com.sun.enterprise.admin.common.exception.DeploymentException


            AdminEventListenerException ale = null;
            ale = result.getFirstAdminEventListenerException();
            if (ale != null) {
                sLogger.log(Level.WARNING, "mbean.event_failed",
                    ale.getMessage());
                DeploymentException de =
                    new DeploymentException(ale.getMessage());
                de.initCause(ale);
                throw de;
            }
        }
    }
View Full Code Here


            if (componentON != null) {
                String configMBModuleType = componentON.getKeyProperty("type");
                if (configMBModuleType != null) {
                    if (configMBModuleType.equals(ServerTags.APPCLIENT_MODULE)) {
                        throw new DeploymentException(
                            localStrings.getString("admin.mbeans.J2EEModule.not_applicable_op",
                            "enable", appName));
                    }
                }
            }
View Full Code Here

            if (componentON != null) {
                String configMBModuleType = componentON.getKeyProperty("type");
                if (configMBModuleType != null) {
                    if (configMBModuleType.equals(ServerTags.APPCLIENT_MODULE)) {
                        throw new DeploymentException(
                            localStrings.getString("admin.mbeans.J2EEModule.not_applicable_op",
                            "disable", appName));
                    }
                }
            }
View Full Code Here

                ObjectName serversON = new ObjectName(getDomainName()+":type=servers,category=config");
                ObjectName[] serverONArr = (ObjectName[])mbs.invoke(serversON, "getServer", new Object[]{}, new String[]{});
                mInstanceName = (String)mbs.getAttribute(serverONArr[0], "name");               
            }catch(Exception e){
                sLogger.log(Level.WARNING,"Could not obtain instanceName");
                throw new DeploymentException("Could not obtain instanceName");
            }
        }
        return mInstanceName;
    }
View Full Code Here

            {
                if(isRegistered(name, deployableObjectTypeArray[i]))
                    return deployableObjectTypeArray[i];
            }       
        }catch(Exception e){
            throw new DeploymentException(e.getMessage());
        }      
        throw new DeploymentException("Component not registered");
    }
View Full Code Here

                           XModuleType.getModuleType(moduleType))) {
            return DeployableObjectType.getDeployableObjectType(
                                 XModuleType.getModuleType(moduleType));
        }
        else {
            throw new DeploymentException("Unknown deployable object type");
        }
    }
View Full Code Here

       {
           ret = getRegisteredComponentObjectName(name,deployableObjectTypeArray[i]);
           if(ret != null)
               return ret;
       }
       throw new DeploymentException("Component not registered");
    }
View Full Code Here

                String ref = (String)mbs.getAttribute(apprefONArr[i], "ref");
                if(name.equals(ref))
                    return apprefONArr[i];
            }
       }catch(Exception e){
          throw new DeploymentException(e.getMessage());
       }
       throw new DeploymentException("Component not registered");
    }
View Full Code Here

                    localStrings.getString( "admin.server.core.mbean.config.no_such_event",
                                            new Integer(eventType) );
                throw new RuntimeException( msg );
            }
        } catch (ConfigException ex) {
            DeploymentException de = new DeploymentException(ex.getMessage());
            de.initCause(ex);
            throw de;
        }

        //set target destination for the event
        if (targetName != null) {
            event.setTargetDestination(targetName);
        }

        /* New for 8.0 - temporary */
        this.transform(new InstanceEnvironment(name));
        /* New for 8.0 - temporary */

        if (event instanceof ApplicationDeployEvent
                || event instanceof ModuleDeployEvent) {
            AdminEventCache.populateConfigChange(getConfigContext(), event);
        }
        int statusCode = getInstanceStatusCode();
        if (statusCode == Status.kInstanceStoppingCode || statusCode == Status.kInstanceNotRunningCode) {
            sLogger.log(Level.INFO, "mbean.inst_down_skip_event", mInstanceName);
            return true;
        }
        if (sLogger.isLoggable(Level.FINEST)) {
            sLogger.log(Level.FINEST, "mbean.event_sent", event.getEventInfo());
        } else {
            sLogger.log(Level.INFO, "mbean.send_event", event.toString());
        }

        AdminEventResult multicastResult =
                AdminEventMulticaster.multicastEvent(event);
        sLogger.log(Level.FINE, "mbean.event_res",
                multicastResult.getResultCode());
        sLogger.log(Level.INFO, "mbean.event_reply",
                multicastResult.getAllMessagesAsString());
        boolean eventSuccess = true;
        if (!AdminEventResult.SUCCESS.equals(multicastResult.getResultCode())) {
            AdminEventCache cache =
                    AdminEventCache.getInstance(mInstanceName);
            cache.setRestartNeeded(true);

            // if there is an exception thrown when loading modules
            // rethrow the exception
            AdminEventListenerException ale = null;
            ale = multicastResult.getFirstAdminEventListenerException();
            if (ale != null) {
                sLogger.log(Level.WARNING, "mbean.event_failed",
                    ale.getMessage());
                DeploymentException de =
                    new DeploymentException(ale.getMessage());
                de.initCause(ale);
                throw de;
            }
        }
        return eventSuccess;
    }
View Full Code Here

    private void testDeployedFile(String archiveName, boolean bDirectory) throws DeploymentException
    {
        if(archiveName==null)
        {
            String msg =  localStrings.getString( "admin.server.core.mbean.config.deploy_null_name");
            throw new DeploymentException(msg);
        }
        File f = new File(archiveName);
        if(bDirectory && !f.isDirectory())
        {
            String msg =  localStrings.getString( "admin.server.core.mbean.config.deploy_not_directory", archiveName);
            throw new DeploymentException(msg);
        }
        else
            if(!bDirectory && !f.isFile())
            {
                String msg =  localStrings.getString( "admin.server.core.mbean.config.deploy_not_file", archiveName);
                throw new DeploymentException(msg);
            }
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.admin.common.exception.DeploymentException

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.