Package org.rhq.plugins.byteman

Examples of org.rhq.plugins.byteman.BytemanAgentComponent


        String scriptName = pc.getSimpleValue(JdbcTracerUtil.PLUGINCONFIG_SCRIPTNAME,
            JdbcTracerUtil.DEFAULT_JDBC_TRACER_SCRIPT_NAME);
        String helperJarFileName = JdbcTracerUtil.DEFAULT_JDBC_TRACER_HELPER_JAR;

        JdbcTracerUtil jdbcTracerUtil = new JdbcTracerUtil();
        BytemanAgentComponent bytemanAgentResource = this.resourceContext.getParentResourceComponent();
        File script = jdbcTracerUtil.getJdbcTraceRulesScriptFile(bytemanAgentResource, scriptName);
        String scriptAbsolutePath = script.getAbsolutePath();
        File helper = jdbcTracerUtil.getHelperJarFile(bytemanAgentResource, helperJarFileName);
        String helperAbsolutePath = helper.getAbsolutePath();

        // see if there are already jdbc trace rules installed in the byteman agent
        // note that we talk directly to the remote byteman agent to get the info; our parent resource might not have our script yet in its cache
        Submit client = bytemanAgentResource.getBytemanClient();
        Map<String, String> allKnownScripts = client.getAllRules();
        String existingRules = null;
        if (allKnownScripts != null) {
            existingRules = allKnownScripts.get(scriptAbsolutePath);
        }
View Full Code Here


        String scriptContent;

        try {
            scriptName = pluginConfiguration.getSimpleValue(JdbcTracerUtil.PLUGINCONFIG_SCRIPTNAME,
                JdbcTracerUtil.DEFAULT_JDBC_TRACER_SCRIPT_NAME);
            BytemanAgentComponent bytemanAgentResource = context.getParentResourceComponent();
            File scriptFile = new JdbcTracerUtil().extractJdbcTraceRulesScriptFile(bytemanAgentResource, scriptName);
            scriptContent = new String(StreamUtil.slurp(new FileInputStream(scriptFile)));
        } catch (Exception e) {
            throw new RuntimeException("Failed to extract jdbc trace script file", e);
        }
View Full Code Here

TOP

Related Classes of org.rhq.plugins.byteman.BytemanAgentComponent

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.