TravaOpenJDK / trava-jdk-11-dcevm

dcevm-11 built on Travis
Apache License 2.0
403 stars 57 forks source link

Document how to set options for integrated agent #28

Closed cdalexndr closed 3 years ago

cdalexndr commented 3 years ago

From original hotswap agent documentation: -javaagent:[yourpath/]hotswap-agent.jar=[option1]=[value1],[option2]=[value2]

How to use these options when the agent is automatically loaded?

skybber commented 3 years ago

Intention is to have hotswapagent-core in JDK and use selected plugin using maven on application side. No need to have fatjar.

https://mvnrepository.com/artifact/org.hotswapagent

cdalexndr commented 3 years ago

I'm using binaries (latest release), according to Install documentation and it already contains plugins: Discovered plugins: [JdkPlugin, Hotswapper, WatchResources, ClassInitPlugin, AnonymousClassPatch, Hibernate3JPA, Hibernate3, Spring, Jersey1, Jersey2, Jetty, Tomcat, ZK, Logback, Log4j2, MyFaces, Mojarra, Omnifaces, ELResolver, WildFlyELResolver, OsgiEquinox, Owb, Proxy, WebObjects, Weld, JBossModules, ResteasyRegistry, Deltaspike, GlassFish, Vaadin, Wicket, CxfJAXRS, FreeMarker, Undertow, MyBatis]

I haven't added any plugin from maven.

skybber commented 3 years ago

Sorry for delay, it is not possible to pass the options to built-in hotswapagent in commandline, but you can use hotswap-agent.properties and put it into your application resources. We didn't consider the passing options as command line argument yet...

cdalexndr commented 3 years ago

Note that this info is missing from github repo main page, but is present on: http://hotswapagent.org/mydoc_quickstart-jdk11.html Should also be added to github

skybber commented 3 years ago

There already is something: (optional) create a file named "hotswap-agent.properties" inside your resources directory, see available properties and default values: https://github.com/HotswapProjects/HotswapAgent/blob/master/hotswap-agent-core/src/main/resources/hotswap-agent.properties

cdalexndr commented 3 years ago

Not on this page: https://github.com/TravaOpenJDK/trava-jdk-11-dcevm/blob/master/README.md

skybber commented 3 years ago

Ok, there should be some link to extended HA configuration.

skybber commented 3 years ago

There is a new JVM option -XX:HotswapAgent=[disabled,fatjar,core,external] in dcevm11.0.9