-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to apply to a Java Application without changing any code #7
Comments
@arnzel Have you tried running your program with Something like:
|
Hi @arvindsv : yes that would be a possibility. For manual tetsing something this would be enough. But we have also automated tests where start services as docker container and want to change the timestamp depending on the use case we test at runtime.REstarting the container with other parameter valuewould be a little bit heavy. |
I see. Yes, I can understand. Unfortunately, there is no other way. Of course, it's technically possible to change the code to make it read from a socket or even a file, but writing jvmti code is quite tricky and making the current code read from something else takes some effort (to get it correct and to not crash or leak memory), which I'm not able to find time for. :( |
Okay thanks for answer. I was just interested how you use this agent or others do. I can fully understand that you dont want to change it. Maybe i can try to add an additonal agent which does this in future. But i fear this will also takes time. |
Pull request #9 introduces support for reading an offset from a file that could've been mounted in as a volume. The file contents can be changed at runtime by an external process. |
@Qvazar thanks for the notification. I looks exactly like the thing i need. I hope i can try it soon |
I haven't had a chance to take a look yet. @arnzel Feel free to try it out (build the PR) and see if it works. It'll help with the verification. |
Hi, first i want to thank you for creating this agent. I tried it out to one of our webservices and it works perfectly.
The only problem is that we have to add an additional endpoint to our webservice to run "System.setProperty(..)". It would be nicer if we could apply this change without any Code changes at all. Because we also have about 15 other services and it will take a lot of time to apply this by code changes. Other problem is that our poject managers are not happy to change services for testing purpose.
Can you say how you use this agent in your application ? do you apply System.setProperties by adding some Endpoint, JMX Bean, SocketConnection,.. ? Would be interesting to know that.
The text was updated successfully, but these errors were encountered: