• Forums
    • Public Forums
      • Community Connect
      • Dynatrace
        • Dynatrace Open Q&A
      • Application Monitoring & UEM
        • AppMon & UEM Open Q&A
      • Network Application Monitoring
        • NAM Open Q&A
  • Home /
  • Public Forums /
  • Application Monitoring & UEM /
  • AppMon & UEM Open Q&A /
avatar image
Question by Jordi R. · Nov 25, 2014 at 02:39 AM ·

Configuration to access two different environtments from a JAVA applet

We have a JAVA applet in two different environtments (preproduction and production environtment), and we want connect the dynaTrace agent from one client machine depending the environtment selected by user.

Now we have the JAVA_OPTS system environtment variable configured to one specific environtment, and we are planning to use scripts to modify the JAVA_OPTS value and start browser, for each environtment, but some one can provide us any other solution more elegant ?

Thanks in advance.

Comment

People who like this

0 Show 0
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

1 Reply

  • Sort: 
  • Most voted
  • Newest
  • Oldest
avatar image

Answer by James D. · Nov 25, 2014 at 10:33 AM

If I understand this correctly, you have an in-browser java applet that you're going to instrument with the Java agent. However, you need to be able to pass the proper collector name depending on the environment. And, right now, you're just changing the JAVA_OPTS environment variable to go between PRD and Pre-PRD

I am going to assume Windows as the OS; I'm also going to assume an embedded applet and not a WebStart application. 

Unfortunately, there is no elegant way other than using a batch file to set these options. This would be true for Windows, OSX, *NIX, etc., also true of WebStart. Using a batch file is not terribly clever but definitely works. Also, setting the environment inside of the batch file does not alter or add the environment variable to the system, just to that specific session of the batch file.

The good news is you don't have to get fancy and write a large or complicated solution to make it all work. For example, the following three liner will do the job.

@ECHO OFF
set JAVA_OPTS="-agentpath:dtagent.dll,server=proddtcollector:9998,name=PRD_WebClient"
"C:\Program Files\Internet Explorer\iexplore.exe" http://prodserver/myapplet

You've no doubt stumbled across this page: Java Agent Configuration; and Google turned up this Oracle doc: https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/plugin.html which explains how to do instrument an applet.

 Hopefully this helps, or gets you going in the right direction.

 

 
Comment

People who like this

0 Show 1 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image Jordi R. · Nov 25, 2014 at 11:05 PM 0
Share

That's exactly our current situation.

Thank you for your complete explanation.

How to get started

First steps in the forum
Read Community User Guide
Best practices of using forum

NAM 2019 SP5 is available


Check the RHEL support added in the latest NAM service pack.

Learn more

LIVE WEBINAR

"Performance Clinic - Monitoring as a Self Service with Dynatrace"


JANUARY 15, 3:00 PM GMT / 10:00 AM ET

Register here

Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

Forum Tags

dotnet mobile monitoring load iis 6.5 kubernetes mainframe rest api dashboard framework 7.0 appmon 7 health monitoring adk log monitoring services auto-detection uem webserver test automation license web performance monitoring ios nam probe collector migration mq web services knowledge sharing reports window java hybris javascript appmon sensors good to know extensions search 6.3+ server documentation easytravel web dashboard kibana system profile purelytics docker splunk 6.1 process groups account 7.2 rest dynatrace saas spa guardian appmon administration production user actions postgresql upgrade oneagent measures security Dynatrace Managed transactionflow technologies diagnostics user session monitoring unique users continuous delivery sharing configuration alerting NGINX splitting business transaction client 6.3 installation database scheduler apache mobileapp RUM php dashlet azure purepath agent 7.1 appmonsaas messagebroker nodejs 6.2 android sensor performance warehouse
  • Forums
  • Public Forums
    • Community Connect
    • Dynatrace
      • Dynatrace Open Q&A
    • Application Monitoring & UEM
      • AppMon & UEM Open Q&A
    • Network Application Monitoring
      • NAM Open Q&A