java - How to deploy javaagent with 3rd party libs dependencies -


we wrote javaagent developers debugging. but, before releasing tool, still have questions deployment of java-agent.

user may use agent tomcat applications. agent uses premain method transform classes. use javassist 3.18.2-ga insert codes. add javassist.jar boot-class-path in manifest.mf. , put both agent , javassist.jar tomcat's lib directory.

the questions are:

  1. well, least, works. correct way deploy agents , dependencies tomcat applications?
  2. because tomcat applications using hibernate using javassist 3.18.2-ga, it's ok right now. understanding, 3.20 not compatible 3.18.2. suggest had update javassist higher version, agent or application crash due conflict between 2 different javassist's.

a javaagent added , run on vm's class path. therefore, have following options:

  1. add dependencies classpath when starting vm such when deploying normal application. application container tomcat, appropriate directory such dependencies.
  2. bundle dependencies agent using tool fatjar. doing so, can use maven shade plugin transfer dependencies different namespace avoid version conflicts.
  3. use instrumentation api manually append dependencies before running actual agent application.

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -