package com.eactive.eai.control;
//package com.eactive.eai.control;
//
//import java.util.Properties;
//
//import com.eactive.eai.adapter.mq.Keys;
//import com.eactive.eai.adapter.mq.MQChannelChecker;
//import com.eactive.eai.common.property.PropManager;
//import com.eactive.eai.common.util.StringUtil;
//
//public class IBMMQUtil {
//	
//	public static boolean checkChannel(String adapterName)
//    {
//        PropManager manager = PropManager.getInstance();
//        Properties prop = manager.getProperties(adapterName);
//
//        String senderChannel = StringUtil.getNullStr(prop.getProperty(Keys.MQ_SENDER_CHANNEL));
//        String receiverChannel = StringUtil.getNullStr(prop.getProperty(Keys.MQ_RECEIVER_CHANNEL));
//
//        MQChannelChecker checker = new MQChannelChecker();
//        
//        if (senderChannel.equals("") && receiverChannel.equals("")) {
//            return checker.checkChannel(prop, prop.getProperty(Keys.MQ_CHANNEL));
//        } else {
//            boolean isSenderAlive = true;
//            boolean isReceiverAlive = true;
//            
//            if (!senderChannel.equals("")) {
//                isSenderAlive = checker.checkChannel(prop, senderChannel);
//            }
//
//            if (!receiverChannel.equals("")) {
//                isReceiverAlive = checker.checkChannel(prop, receiverChannel);
//            }
//            
//            return (isSenderAlive && isReceiverAlive);
//        }
//    }
//}
