Package com.sun.appserv.management.config

Examples of com.sun.appserv.management.config.TransactionServiceConfig


        public static void getTransactionServiceSettings(HandlerContext handlerCtx) {
       


        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        TransactionServiceConfig tConfig = config.getTransactionServiceConfig();
        boolean onrestart = tConfig.getAutomaticRecovery();
        String timeout = tConfig.getTimeoutInSeconds();
        String retry = tConfig.getRetryTimeoutInSeconds();
        String loglocation = tConfig.getTxLogDir();
        String heuristic = tConfig.getHeuristicDecision();
        String keypoint = tConfig.getKeypointInterval();
        Map<String, String> props = tConfig.getProperties();
        handlerCtx.setOutputValue("OnRestart", onrestart);
        handlerCtx.setOutputValue("Timeout", timeout);
        handlerCtx.setOutputValue("Retry", retry);
        handlerCtx.setOutputValue("LogLocation", loglocation);
        handlerCtx.setOutputValue("Heuristic", heuristic);
View Full Code Here


        @HandlerInput(name="RemoveProps", type=ArrayList.class)})
       
        public static void saveTransactionServiceSettings(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        TransactionServiceConfig tConfig = config.getTransactionServiceConfig();
        ArrayList removeProps = (ArrayList)handlerCtx.getInputValue("RemoveProps");
        Map addProps = (Map)handlerCtx.getInputValue("AddProps");
        String[] remove = (String[])removeProps.toArray(new String[ removeProps.size()]);
        for(int i=0; i<remove.length; i++){
            tConfig.removeProperty(remove[i]);
        }
        if(addProps != null ){
            Iterator additer = addProps.keySet().iterator();
            while(additer.hasNext()){
                Object key = additer.next();
                String addvalue = (String)addProps.get(key);
                tConfig.setPropertyValue((String)key, addvalue);
               
            }
        }             
        tConfig.setAutomaticRecovery(((Boolean)handlerCtx.getInputValue("OnRestart")).booleanValue());
        tConfig.setTimeoutInSeconds(((String)handlerCtx.getInputValue("Timeout")));
        tConfig.setRetryTimeoutInSeconds(((String)handlerCtx.getInputValue("Retry")));
        tConfig.setTxLogDir(((String)handlerCtx.getInputValue("LogLocation")));
        tConfig.setHeuristicDecision(((String)handlerCtx.getInputValue("Heuristic")));
        tConfig.setKeypointInterval(((String)handlerCtx.getInputValue("KeyPoint")));
       
    }          
View Full Code Here

        @HandlerOutput(name="KeyPoint", type=String.class)})
       
        public static void getTransactionServiceDefaultSettings(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        TransactionServiceConfig tConfig = config.getTransactionServiceConfig();
        String onrestart = tConfig.getDefaultValue("AutomaticRecovery");
        String timeout = tConfig.getDefaultValue("TimeoutInSeconds");
        String retry = tConfig.getDefaultValue("RetryTimeoutInSeconds");
        String loglocation = tConfig.getDefaultValue("TxLogDir");
        String heuristic = tConfig.getDefaultValue("HeuristicDecision");
        String keypoint = tConfig.getDefaultValue("KeypointInterval");
        handlerCtx.setOutputValue("OnRestart", onrestart);
        handlerCtx.setOutputValue("Timeout", timeout);
        handlerCtx.setOutputValue("Retry", retry);
        handlerCtx.setOutputValue("LogLocation", loglocation);
        handlerCtx.setOutputValue("Heuristic", heuristic);
View Full Code Here

TOP

Related Classes of com.sun.appserv.management.config.TransactionServiceConfig

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.