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);
}