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:
- well, least, works. correct way deploy agents , dependencies tomcat applications?
- 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:
- add dependencies classpath when starting vm such when deploying normal application. application container tomcat, appropriate directory such dependencies.
- bundle dependencies agent using tool fatjar. doing so, can use maven shade plugin transfer dependencies different namespace avoid version conflicts.
- use
instrumentation
api manually append dependencies before running actual agent application.
Comments
Post a Comment