Package org.apache.bsf

Examples of org.apache.bsf.BSFManager.terminate()


    public void process(){
        try {
            BSFManager mgr = getManager();
            if (mgr == null) { return; }
            processFileOrScript(mgr);
            mgr.terminate();
        } catch (BSFException e) {
            log.warn("Problem in BSF script "+e);
        }
  }
}
View Full Code Here


    public void process(){
        try {
            BSFManager mgr = getManager();
            if (mgr == null) { return; }
            processFileOrScript(mgr);
            mgr.terminate();
        } catch (BSFException e) {
            log.warn("Problem in BSF script "+e);
        }
  }
}
View Full Code Here

            IOUtils.closeQuietly(is);
// Will be done by mgr.terminate() anyway
//          if (bsfEngine != null) {
//              bsfEngine.terminate();
//          }
            mgr.terminate();
        }

        return res;
    }   
View Full Code Here

            log.warn("Problem in BSF script "+e);
        } catch (BSFException e) {
            log.warn("Problem in BSF script "+e);
        } finally {
            if(mgr != null) {
                mgr.terminate();
            }
        }
        return delay;
    }
}
View Full Code Here

            IOUtils.closeQuietly(is);
// Will be done by mgr.terminate() anyway
//          if (bsfEngine != null) {
//              bsfEngine.terminate();
//          }
            mgr.terminate();
        }

        return res;
    }
}
View Full Code Here

    public void process(){
        try {
            BSFManager mgr = getManager();
            processFileOrScript(mgr);
            mgr.terminate();
        } catch (BSFException e) {
            log.warn("Problem in BSF script "+e);
        }
    }
}
View Full Code Here

        try {
            BSFManager mgr = getManager();
            mgr.declareBean("SampleResult", response, SampleResult.class);
            mgr.declareBean("AssertionResult", result, AssertionResult.class);
            processFileOrScript(mgr);
            mgr.terminate();
            result.setError(false);
        } catch (BSFException e) {
            log.warn("Problem in BSF script "+e);
            result.setFailure(true);
            result.setError(true);
View Full Code Here

        bsf.eval("jruby", "(java)", 1, 1, "at_exit { @result =  \"#{x} and #{$x} in an at_exit block\" }");
        Object ret = bsf.eval("jruby", "(java)", 1, 1, "@lvar = \"x = #{x}\";return @gvar, @lvar");
        List<String> expResult = Arrays.asList("$x = GVar", "x = LVar");
        assertEquals(expResult, ret);
        logger1.info(ret.toString());
        bsf.terminate();
    }

}
View Full Code Here

            }
            mgr.declareBean("sampleEvent", event, SampleEvent.class);
            SampleResult result = event.getResult();
            mgr.declareBean("sampleResult", result, SampleResult.class);
            processFileOrScript(mgr);
            mgr.terminate();
        } catch (BSFException e) {
            log.warn("Problem in BSF script "+e);
        }
    }
View Full Code Here

   
    public void discardFromPool(Object object)
    {
        BSFManager manager = (BSFManager)object;
       
        manager.terminate();
    }

}
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.