Package com.sun.enterprise.util.i18n

Examples of com.sun.enterprise.util.i18n.StringManager


     * buildInternalCommand - This Method build san internal server command from domain.xml, so this
     * method is specifically used for server instances
     */
    public Command buildInternalCommand(String action) throws ConfigException {
       
        StringManager _strMgr=StringManager.getManager(ProcessLauncher.class);
       
        // derive domain.xml location and create config to be used by config api
        String domainXMLLocation=System.getProperty(SystemPropertyConstants.INSTANCE_ROOT_PROPERTY)
        + RELATIVE_LOCATION_DOMAIN_XML;
        ConfigContext configCtxt=ConfigFactory.createConfigContext(domainXMLLocation);
View Full Code Here


    }

   
    public RuntimeStatusList getNodeAgentRuntimeStatus(String targetName) throws AgentException
    {
        final StringManager stringMgr = StringManager.getManager(AgentManager.class);
        try {
            final TargetType[] validTargets = {TargetType.NODE_AGENT, TargetType.CLUSTER,
                TargetType.DOMAIN, TargetType.SERVER};
            final ConfigContext configContext = getConfigContext();
            Target target = TargetBuilder.INSTANCE.createTarget(
View Full Code Here

    /**
     * lists node agents and their status
     */
    public String[] listNodeAgentsAsString(String targetName, boolean andStatus) throws AgentException
    {
        final StringManager stringMgr = StringManager.getManager(AgentManager.class);
        try {
            final TargetType[] validTargets = {TargetType.NODE_AGENT, TargetType.CLUSTER,
                TargetType.DOMAIN, TargetType.SERVER};
            final ConfigContext configContext = getConfigContext();
            Target target = TargetBuilder.INSTANCE.createTarget(
                DOMAIN_TARGET, validTargets, targetName,
                configContext);
            final NodeAgent[] agents = target.getNodeAgents();
            final int numAgents = agents.length;
            String[] result = new String[numAgents];
            String nodeAgentName = null;
            RuntimeStatusList statusList = null;
            if (andStatus) {
                //Fetch the status of all the node agents in parallel
                statusList = getRuntimeStatus(agents);
            }
            for (int i = 0; i < numAgents; i++) {
                nodeAgentName = agents[i].getName();
                if (andStatus) {
                    result[i] = stringMgr.getString("listAgentElement", nodeAgentName,
                        (statusList.getStatus(i)).toShortString());
                } else {
                    result[i] = nodeAgentName;
                }
            }
View Full Code Here

    public String[] listClustersAsString(
        String targetName, boolean withStatus) throws InstanceException
    {
        try {           
            final StringManager stringMgr = StringManager.getManager(EEInstancesManager.class);
            final String[] result = toStringArray(getClusters(targetName));           
            int numClusters = result.length;
            for (int i = 0; i < numClusters; i++)
            {
                final String name = result[i];
                if (withStatus) {
                    final RuntimeStatusList statusList = getRuntimeStatus(name);
                    result[i] = stringMgr.getString("listInstanceElement", name,
                        statusList.toString());                               
                } else {
                    result[i] = name;
                }
            }
View Full Code Here

   
    public RuntimeStatusList getServerInstanceRuntimeStatus(String targetName)
        throws InstanceException
    {
        final ConfigContext configContext = getConfigContext();
        final StringManager stringMgr = StringManager.getManager(EEInstancesManager.class);       
        try {                              
            final Target target = TargetBuilder.INSTANCE.createTarget(
                DOMAIN_TARGET, VALID_LIST_TYPES, targetName, configContext);                   
            final Server[] servers = target.getServers();                         
            return getRuntimeStatus(servers);                           
View Full Code Here

     */
    public String[] listServerInstancesAsString(
        String targetName, boolean andStatus) throws InstanceException
   {
        final ConfigContext configContext = getConfigContext();
        final StringManager stringMgr = StringManager.getManager(EEInstancesManager.class);       
        try {                              
            final Target target = TargetBuilder.INSTANCE.createTarget(
                DOMAIN_TARGET, VALID_LIST_TYPES, targetName, configContext);                   
            final Server[] servers = target.getServers();         
            final int numServers = servers.length;           
            ArrayList result = new ArrayList();
            String serverName = null;
            int status;           
            RuntimeStatusList statusList = null;
            if (andStatus) {               
                //Fetch the status of all the server instances in parallel
                statusList = getRuntimeStatus(servers);               
            }
            for (int i = 0; i < numServers; i++) {               
                serverName = servers[i].getName();
                if (andStatus) {
                    //Do not display the DAS as a server instance
                    if (!ServerHelper.isDAS(configContext, serverName)) {                                              
                        result.add(stringMgr.getString("listInstanceElement", serverName,
                            statusList.getStatus(i).toShortString()));                       
                    }
                } else {
                    result.add(serverName);
                }
View Full Code Here

    public String[] listUnclusteredServerInstancesAsString(
        boolean andStatus, boolean excludeDASInstance)
        throws InstanceException
    {
        final ConfigContext configContext = getConfigContext();
        final StringManager stringMgr = StringManager.getManager(EEInstancesManager.class);
        try {           
            final Server[] servers = ServerHelper.getUnclusteredServers(
                configContext, excludeDASInstance);           
            ArrayList result = new ArrayList();
            String serverName;
            RuntimeStatusList statusList = null;
            if (andStatus) {               
                //Fetch the status of all the server instances in parallel
                statusList = getRuntimeStatus(servers);               
            }
            for (int i = 0; i < servers.length; i++) {               
                serverName = servers[i].getName();
                if (andStatus) {                    
                    result.add(stringMgr.getString("listInstanceElement", serverName,
                        statusList.getStatus(i).toShortString()));                   
                } else {
                    result.add(serverName);
                }               
            }
View Full Code Here

                        new String(pc.getPassword()));
            }
        } catch (java.sql.SQLException sqle) {
            //_logger.log(Level.WARNING, "jdbc.exc_create_conn", sqle.getMessage());
            _logger.log(Level.FINE, "jdbc.exc_create_conn", sqle.getMessage());
            StringManager localStrings =
                    StringManager.getManager(DataSourceObjectBuilder.class);
            String msg = localStrings.getString("jdbc.cannot_allocate_connection"
                    , sqle.getMessage());
            ResourceAllocationException rae = new ResourceAllocationException(msg);
            rae.initCause(sqle);
            throw rae;
        }
View Full Code Here


        } catch (java.sql.SQLException sqle) {
            //_logger.log(Level.WARNING, "jdbc.exc_create_xa_conn",sqle);
            _logger.log(Level.FINE, "jdbc.exc_create_xa_conn", sqle);
            StringManager sm = StringManager.getManager(
                    DataSourceObjectBuilder.class);
            String msg = sm.getString("jdbc.cannot_allocate_connection", sqle.getMessage());
            throw new ResourceAllocationException(msg, sqle);
        }

        com.sun.gjc.spi.ManagedConnection mc = constructManagedConnection(
                xaConn, null, pc, this);
View Full Code Here

            }

        } catch (java.sql.SQLException sqle) {
            //_logger.log(Level.SEVERE, "jdbc.exc_create_ds_conn",sqle);
            _logger.log(Level.FINE, "jdbc.exc_create_ds_conn", sqle);
            StringManager sm =
                    StringManager.getManager(DataSourceObjectBuilder.class);
            String msg = sm.getString("jdbc.cannot_allocate_connection", sqle.getMessage());
            ResourceAllocationException rae = new ResourceAllocationException(
                    msg, sqle);
            throw rae;
        }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.util.i18n.StringManager

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.