Examples of FaultInjection


Examples of com.sun.messaging.bridge.service.FaultInjection

       }
     Properties props = (Properties)msg.getObject();

       String faultName = target;
       String faultSelector = (String)props.getProperty("selector");
       FaultInjection fi = FaultInjection.getInjection();
       boolean faultOn = true;

       String enabledStr = props.getProperty("enabled");
       if (enabledStr != null && enabledStr.equalsIgnoreCase("false")) {
           if (faultName == null) {
               fi.setFaultInjection(false);
           } else {
              fi.unsetFault(faultName);
           }
       } else {
           fi.setFaultInjection(true);
           if (faultName != null) {
               try {
                   fi.setFault(faultName, faultSelector, props);
               } catch (Exception e) {
                   _bc.logError(_bmr.getKString(_bmr.E_ADMIN_SET_FAULT_FAILED, faultName), e);
                   throw e;
               }
           }
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.FaultInjection

                // handle fault injection
                String faultName = (String)p.get("name");
                if (faultName == null)
                    faultName = target;
                String faultSelector = (String)p.get("selector");
                FaultInjection fi = FaultInjection.getInjection();
                boolean faultOn = true;

                // ok only turn off fault injection if no name pair
                if (debugStr != null && debugStr.equalsIgnoreCase("false")) {
                    if (faultName == null) {
                        fi.setFaultInjection(false);
                    } else {
                        fi.unsetFault(faultName);
                    }
                } else {
                    fi.setFaultInjection(true);
                    if (faultName != null) {
                        try {
                            fi.setFault(faultName, faultSelector, p);
                        } catch (Exception ex) {
                          status = Status.ERROR;
                          msg = "Bad Selector " + faultSelector;
                        }
                    }
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.FaultInjection

            logger.log(Logger.INFO, "["+Thread.currentThread()+"]"+toString()+".getConnection["+
                                     idleConnections.size()+", "+activeConnections.size()+"]");
        }

        if (DEBUG) {
            FaultInjection fi = FaultInjection.getInjection();
            if (fi.FAULT_INJECTION) {
                fi.checkFaultAndSleep(FaultInjection.FAULT_JDBC_GETCONN_1, null);
            }
        }
       
        Connection conn = null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.