Looking for an example (or suggestions) on how to use ByteBuddy to intercept and append a value on a JDBC connection property. The goal is to be able to use a JavaAgent to append a unique value for transaction correlation WITHOUT client code changes. Example:
Properties props = new Properties();
props.put("user", user);
props.put("password", password);
props.put("ClientCorrelationToken", "MyToken1");
Want ClientCorrelaionToken to result as "MyToken1appendedValue"
Looked any many examples but cannot find a suitable method.
Ultimately need to be able to pull in a unique token from a web header and place that into the JDBC property, but want to get the intercept working first.