Installation & Config
- Download tcServer Developer’s Edition – current version is 2.5.1 (free registration required)
- Make a directory for tcServer (such as /opt/tcserver or c:\tcserver)
- Unzip the downloaded file into that directory
- Type at command line in your tcServer directory (.sh for unix/mac, .bat for Windows):
tcruntime-instance.sh create myInsight -t insight - Start STS (I am using 2.7.1)
- From menu: File > New > Other… > Server > Server
- Scroll to VMware, choose VMware vFabric tcServer 2.5
- Click Configure Runtime Environments link
- Add new tcServer, setting the location to your tcServer directory, press OK
- Choose the newly configured Server Runtime Environment from the drop down
- Press Next
- Choose Existing Instance radio button
- Choose myInsight from the dropdown
Configuring for Tomcat 6
By default, the tcruntime-instance script configures Tomcat 7.
To use Tomcat 6 instead:
Determine the version of Tomcat 6 that is available with tcServer – the version is in the directory name. For tcServer 2.5.1, the directory is <tcServer Dir>/tomcat-6.0.32.C.RELEASE, so we know that our version is “6.0.32.C.RELEASE“.
Now execute the command: tcruntime-instance.sh create myInsight -t insight --version 6.0.32.C.RELEASE
Deploying & Running with Insight
- R-click on a web app, Run on Server (or drag and drop to tcServer in Server view)
- If server not running press the Green play arrow in the Server view toolbar
- Popup: Spring Insight is Available… enable gathering of metrics? – Click YES
- Connect to your app – e.g. http://localhost:8080/myapp
- Connect to Insight – http://localhost:8080/insight
I want to share that with intellij on OSX and with tcServer plugin you can also easily configure tcServer in the IDE. The only caveat for Mac OS X is to have a JAVA_HOME variable in environment.plist in you home .MacOSX folder
Hatim,
Thanks. I found out that IntelliJ does not read the environment variables from MacOSX (as configured in ~/.profile).
I have not configured tcServer with IntelliJ yet. However, I have modified the /Users//.MacOSX/environment.plist file adding the following:
GRADLE_HOME
GRAILS_HOME
GROOVY_HOME
M2_HOME
ROO_HOME
The M2_HOME was essential with all the Maven projects I work with, I no longer had to manually enter it for every project.
Regards,
Gordon Dickens
twitter.com/gdickens
linkedin.com/in/gordondickens
Blog: technophile.gordondickens.com
Hey Gordon,
Your post gives a good insight on how to have insight with tc server. Have you tried to integrate Spring Insight with Tomcat directly(so no tc server)? I am looking at doing the same and any pointers or help will be appreciated.
Thanks,
Anuj