Java Virtal

[ News ] rss

February 01, 2011

Mark Wielaard: New GPG key. Finally created a new GPG key using gnupg. The old one was a DSA/1024 bits one and 8 years old. The new one is a RSA/2048 bits one. I will use the new one in the future to sign any release tarballs I might create. pub 2048R/57816A6A 2011-01-29 Key f...

More »

February 01, 2011

Andrew Hughes: [SECURITY] IcedTea6 1.7.8, 1.8.5, 1.9.5 Released!. We are pleased to announce a new set of security releases, IcedTea6 1.7.8, IcedTea6 1.8.5 and IcedTea6 1.9.5. This update contains the following security updates: The IcedTea project provides a harness to build the source code from OpenJDK6 u...

More »


[ Archives News
for 'Java Technology' ]

home > news > java technology > using btrace with glassfish v3

Using btrace with Glassfish v3

Btrace is a wonderful tool for debugging complex application problems. I have used it recently to debug a strange finalizer problem in an application running on Glassfish V3. Since getting it to work with v3 wasn't very straightforward, I will share my findings here in case someone else is trying to do the same... BTrace works as a JVM Agent, which means it gets the chance to modify classes before they are loaded by the platform. My initial attempts to attach it to a running Glassfish v3 domain failed with the error "connection refused". The way the btrace command-line tool works is this: First it attaches the agent to the running JVM process The agent listens on tcp port 2020 for tracing scripts to run The command line tool then connects to the agent and submits the tracing script The connection refused message indicates the tool is not being able to connect to the agent. Why is that? If you look at the command-line of a running Glassfish V3 server you will notice that it is started with a jvm option similar to the following one:: -javaagent:/Applications/NetBeans/glassfish-3.0.1/glassfish/lib/monitor/btrace-agent.jar=unsafe=true,noServer=true   It seems like Glassfish comes with its own version of Btrace for internal use only.The noServer=true option disables the agent server feature, making the it unreacheable by external tools.  The btrace command line tool tries to attach its own agent...

Date: July, 14 2010

Others News

© fr | website maker | best website maker | bootstrap buttons | css slider