Skip to content

A general Java agent to do all the tricks for you (see java.lang.instrument package description). You can concentrate on the real work instead of thinking of classloading and configuration problems. For more information about Java agents see java.lang.instrument package documentation.

Notifications You must be signed in to change notification settings

jeyzer-community/jeyzer-agent

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 

Repository files navigation

README - Agent
--------------


DESCRIPTION
-----------
Agent is a generic solution to greatly simplify the agent programming
(see java.lang.instrument package description for more information about agents in general).

The main idea is to have a totally separated environment for running agents. This means that
the agent uses its own namespace (i.e. class loader) for its classes. With Agent a programmer
can avoid .jar file version conflicts. That's why the Agent configuration file has its own
classpath element. Another advantage is that the XML configuration file is always similar
for different agents. And yet one more advantage is that the programmer does not need to care
about the manifest attributes mentioned java.lang.instrument package description. They are
already handled for the programmer.

The agent parameter support and the variable default value support permit to instantiate directly the agent, 
while staying compatible with any environment variable or system property declaration. 

Jeyzer Community is using this agent library in the [Jeyzer Recorder](https://jeyzer.org/jeyzer-recorder/).

Jeyzer extensions include :

- Agent bootstrap logging
  Boot traces will appear in the console. Disabled by default.
  Add the -Djeyzer.agent.boot.debug=true on the command line to activate it.
- Agent parameters support 
  These parameters can be referenced by the agent variables.
  Parameters are specified at the end of the Java agent argument, separated by a semicolumn.
   Example : -javaagent:"<agent jar path>"<jeyzer-agent.xml path>;param_key1=param_value1;param_key2=param_value2[...]
- System property and environment variable resolution in agent variables 
  Variable syntax is : ${system_property_or_environment_variable_name}
  Resolution order is performed in this order : internal agent variable, agent parameter, system property, environment variable
   Example : <variable name="jeyzer-agent-home">${JEYZER_AGENT_HOME}</variable>
- Variable default value support. Optional
  If the system property or environment variable contained in the variable value cannot be resolved, the agent variable will be set with the default value and the unresolved variable will be set as a system property.
   Example : <variable name="jeyzer-agent-home" default="C:\jeyzer-recordings">${JEYZER_RECORD_APP_RECORDING_HOME}</variable> 
  System property and environment variable can be specified and will be resolved. Inner variable resolution is however not supported.
  The end result variable
- Java 11 support
- Bug fix : load Sun Apache Xerces schema validator first


REQUIREMENTS
------------
- Java 1.7 or later


LICENSE
-------
Hapi code is under MIT License

Copyright (c) 2010 Hapi, http://www.hapiware.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Jeyzer code extensions are under  MPL 2.0 License

Copyright (c) 2021-2023 Jeyzer, https://jeyzer.org

Licensed under the [Mozilla Public License, Version 2.0](https://www.mozilla.org/media/MPL/2.0/index.815ca599c9df.txt)

About

A general Java agent to do all the tricks for you (see java.lang.instrument package description). You can concentrate on the real work instead of thinking of classloading and configuration problems. For more information about Java agents see java.lang.instrument package documentation.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%