Java agent is an interceptor in front of the application’s main method. Generally, it is a .jar package statically loaded in the PreMain-Class method, which implements a mechanism of re-defining the running classes’ content. CirrusGrid PaaS allows you to automatically launch such an applet at startup (just after the JVM is initialized).
Tip: All of the certified Java stacks by CirrusGrid runs the jelastic-gc-agent.jar Java agent as a part of the standard optimization. It performs periodical Full GC calls to reduce the memory usage and release unused RAM back to OS. Due to CirrusGrid contribution to the Java development, similar functionality is natively implemented since the 12th version of JDK.
Refer to the Memory Agent add-on to learn more about CirrusGrid automatic optimization of the managed Java stacks or use it to optimize any custom Java container.
Follow the next steps to add a custom Java agent into a container:
1. Log in to the CirrusGrid dashboard with your credentials and click the Config button for the application server in your Java environment:
2. In the opened configuration file manager, you can Upload your Java agent .jar file to any preferable location. Use the Actions list at the top panel (for the current folder) or the context menu when hovering over the particular directory.
Provide a link to the required file or locate it on the local machine to Upload.
3. Next, switch to the variables.conf file (the exact location vary based on the particular software stack) to provide custom variables and JVM options. Here, you can specify the javaagent parameter with a path to the required jar file. For example: javaagent:/opt/tomcat/temp/my-java-agent.jar
Don’t forget to Save the changes with the appropriate button above the editor.
4. To apply the newly added settings, you need to Restart Nodes of your application server layer using the same-named option.
That’s all! Now, your custom Java agent is up and running.
Powered by BetterDocs
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.