<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Marcus Hirt&#039;s Private Blog</title>
	<atom:link href="http://hirt.se/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://hirt.se/blog</link>
	<description>Life, Music and Everything</description>
	<lastBuildDate>Thu, 03 May 2012 06:54:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Why JCMD?</title>
		<link>http://hirt.se/blog/?p=217</link>
		<comments>http://hirt.se/blog/?p=217#comments</comments>
		<pubDate>Thu, 03 May 2012 05:57:10 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hirt.se/blog/?p=217</guid>
		<description><![CDATA[One of the reactions to my recent blog on JCMD has been “But, why?”. It is a reasonable question – after all, the simple examples I added to the blog can be solved using existing tools (jps, jstack etc) in the bin folder of any recent JDK. The answer is that JCMD provides:

A simple framework [...]]]></description>
			<content:encoded><![CDATA[<p>One of the reactions to my <a href="http://hirt.se/blog/?p=211">recent blog on JCMD</a> has been “But, why?”. It is a reasonable question – after all, the simple examples I added to the blog can be solved using existing tools (jps, jstack etc) in the bin folder of any recent JDK. The answer is that JCMD provides:</p>
<ul>
<li>A simple framework for easily adding more (self documenting) commands to the JVM.</li>
<li>One launcher to learn how to use.</li>
<li>The launcher is backwards and forward compatible. In other words, you can use an old version of the command to connect to a more recent version of the JVM, and vice versa.</li>
<li>There are already diagnostic commands available that are not covered by the old j* tools, such as the ability to control the JMX agent and the Flight Recorder. In the future more commands will be added.</li>
<li>In a future JDK update, a JMX interface will allow programmatic access to the diagnostic commands.</li>
</ul>
<p>For a hint at what will be available in the future, check the JRCMD chapter in the <a href="http://www.amazon.com/Oracle-JRockit-The-Definitive-Guide/dp/1847198066">JVM book</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://hirt.se/blog/?feed=rss2&amp;p=217</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cool New Features in JDK7 update 4!</title>
		<link>http://hirt.se/blog/?p=211</link>
		<comments>http://hirt.se/blog/?p=211#comments</comments>
		<pubDate>Fri, 27 Apr 2012 09:53:01 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hirt.se/blog/?p=211</guid>
		<description><![CDATA[JDK7 was quite recently released, and I thought I should mention a few new cool things in it. 
JCMD
First out is the port of the small JRockit command line utility JRCMD (JRockit Command). JRCMD was a command line tool to enumerate the Java processes running on the local machine, and to send commands (referred to [...]]]></description>
			<content:encoded><![CDATA[<p>JDK7 was quite recently released, and I thought I should mention a few new cool things in it. </p>
<h3>JCMD</h3>
<p>First out is the port of the small JRockit command line utility JRCMD (JRockit Command). JRCMD was a command line tool to enumerate the Java processes running on the local machine, and to send commands (referred to as “Diagnostic Commands”) to them. JRCMD has been renamed JCMD (Java Command). </p>
<p>To list the locally running JVMs, simply run JAVA_HOME\bin\jcmd:</p>
<blockquote><p><font size="3" face="Courier New">C:\Java\JDKs\JDK7_u4_official\bin&gt;.\jcmd       <br />4636 sun.tools.jconsole.JConsole        <br />2620 HotspotKeepAlive        <br />1076 sun.tools.jcmd.JCmd</font></p>
</blockquote>
<p>You will see the JVMs running on the local machine listed by PID followed by main class. To see the commands available, run the help command, like this:</p>
<blockquote><p><font size="3" face="Courier New">C:\Java\JDKs\JDK7_u4_official\bin&gt;.\jcmd 4636 help       <br />4636:        <br />The following commands are available:        <br />VM.commercial_features        <br />ManagementAgent.stop        <br />ManagementAgent.start_local        <br />ManagementAgent.start        <br />Thread.print        <br />GC.class_histogram        <br />GC.heap_dump        <br />GC.run_finalization        <br />GC.run        <br />VM.uptime        <br />VM.flags        <br />VM.system_properties        <br />VM.command_line        <br />VM.version        <br />help</font></p>
<p><font size="3" face="Courier New">For more information about a specific command use &#8216;help &lt;command&gt;&#8217;.</font></p>
</blockquote>
<p>To get information about a specific command, use the help command followed by the command name:</p>
<blockquote><p><font size="3" face="Courier New">C:\Java\JDKs\JDK7_u4_official\bin&gt;.\jcmd 4636 help Thread.print       <br />4636:        <br />Thread.print        <br />Print all threads with stacktraces.</font></p>
<p><font size="3" face="Courier New">Impact: Medium: Depends on the number of threads.</font></p>
<p><font size="3" face="Courier New">Syntax : Thread.print [options]</font></p>
<p><font size="3" face="Courier New">Options: (options must be specified using the &lt;key&gt; or &lt;key&gt;=&lt;value&gt; syntax)       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; -l : [optional] print java.util.concurrent locks (BOOLEAN, false)        <br /></font></p>
</blockquote>
<p>To get a thread stack dump with the concurrent locks:</p>
<blockquote><p><font size="3" face="Courier New">C:\Java\JDKs\JDK7_u4_official\bin&gt;.\jcmd 4636 Thread.print -l       <br />4636:        <br />2012-04-27 11:21:57        <br />Full thread dump Java HotSpot(TM) Client VM (23.0-b21 mixed mode, sharing):</font></p>
<p><font size="3" face="Courier New">&quot;DestroyJavaVM&quot; prio=6 tid=0&#215;003fb000 nid=0xc5c waiting on condition [0x00000000       <br />]        <br />&#160;&#160; java.lang.Thread.State: RUNNABLE</font></p>
<p><font size="3" face="Courier New">&#160;&#160; Locked ownable synchronizers:       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8211; None</font></p>
<p><font size="3" face="Courier New">&quot;AWT-EventQueue-0&quot; prio=6 tid=0&#215;03e65800 nid=0&#215;128c waiting on condition [0x041c       <br />f000]        <br />&#160;&#160; java.lang.Thread.State: WAITING (parking)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.misc.Unsafe.park(Native Method)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8211; parking to wait for&#160; &lt;0&#215;2926dce8&gt; (a java.util.concurrent.locks.Abstra        <br />ctQueuedSynchronizer$ConditionObject)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject        <br />.await(AbstractQueuedSynchronizer.java:2043)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.awt.EventQueue.getNextEvent(EventQueue.java:511)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre        <br />ad.java:213)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.        <br />java:163)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre        <br />ad.java:151)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)</font></p>
<p><font size="3" face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)</font></p>
<p><font size="3" face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)</font></p>
<p><font size="3" face="Courier New">&#160;&#160; Locked ownable synchronizers:       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8211; None</font></p>
<p><font size="3" face="Courier New">&quot;Thread-2&quot; prio=6 tid=0&#215;03e61c00 nid=0xd4c in Object.wait() [0x042bf000]       <br />&#160;&#160; java.lang.Thread.State: TIMED_WAITING (on object monitor)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.lang.Object.wait(Native Method)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8211; waiting on &lt;0&#215;292432b0&gt; (a java.io.PipedInputStream)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.io.PipedInputStream.read(PipedInputStream.java:327)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8211; locked &lt;0&#215;292432b0&gt; (a java.io.PipedInputStream)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.io.PipedInputStream.read(PipedInputStream.java:378)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8211; locked &lt;0&#215;292432b0&gt; (a java.io.PipedInputStream)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8211; locked &lt;0&#215;29249358&gt; (a java.io.InputStreamReader)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.io.InputStreamReader.read(InputStreamReader.java:184)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.io.BufferedReader.fill(BufferedReader.java:154)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.io.BufferedReader.readLine(BufferedReader.java:317)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8211; locked &lt;0&#215;29249358&gt; (a java.io.InputStreamReader)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; at java.io.BufferedReader.readLine(BufferedReader.java:382)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; at sun.tools.jconsole.OutputViewer$PipeListener.run(OutputViewer.java:10        <br />9)</font></p>
<p><font size="3" face="Courier New">&#160;&#160; Locked ownable synchronizers:       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8211; None</font></p>
<p><font size="3" face="Courier New">.</font></p>
<p><font size="3" face="Courier New">.</font></p>
<p><font size="3" face="Courier New">.       <br />JNI global references: 528</font></p>
</blockquote>
<h3>Java Flight Recorder</h3>
<p>The second big feature is the first port of the JRockit Flight Recorder – a high performance event recorder built into the JVM. Think of it as the data flight recorder (black box) of an aircraft. It records information about the JVM, its environment and the application running in the JVM, so that, if something happens, clues about what caused the problem can be found. Now, the first port of the flight recorder is quite limited in terms of the events actually being recorded. It is really released to be used with the event producer built into WebLogic Server through WLDF. Also, the Mission Control client is not yet released as part of the JDK (since it is not that useful without WLDF yet). If you’re an Oracle WebLogic customer, you can download the client on MOS. </p>
<p>That being said, to enable the functionality in 7u4, you need to add the following command line flags to your JVM startup command:</p>
<blockquote><p><font size="3" face="Courier New">JAVA_HOME\bin\java -XX:+UnlockCommercialFeatures -XX:+FlightRecorder &lt;your main class and params&gt;</font></p>
</blockquote>
<p>You can see that it has been enabled by using JCMD. A few flight recorder specific commands should now be available:</p>
<blockquote><p><font size="3" face="Courier New">C:\Java\JDKs\JDK7_u4_official\bin&gt;.\jcmd 2620 help       <br />2620:        <br />The following commands are available:        <br />JFR.stop        <br />JFR.start        <br />JFR.dump        <br />JFR.check        <br />VM.commercial_features        <br />ManagementAgent.stop        <br />ManagementAgent.start_local        <br />ManagementAgent.start        <br />Thread.print        <br />GC.class_histogram        <br />GC.heap_dump        <br />GC.run_finalization        <br />GC.run        <br />VM.uptime        <br />VM.flags        <br />VM.system_properties        <br />VM.command_line        <br />VM.version        <br />help</font></p>
<p><font size="3" face="Courier New">For more information about a specific command use &#8216;help &lt;command&gt;&#8217;.</font></p>
</blockquote>
<p>Unless you are a WLS user, I’d personally recommend waiting a release or two before starting using the Flight Recorder. There are not that many OS/JVM/JDK level events available yet, and there is a major performance improvement related to the time stamping of events just around the corner. </p>
]]></content:encoded>
			<wfw:commentRss>http://hirt.se/blog/?feed=rss2&amp;p=211</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Remote JRCMD for JRockit R28.x</title>
		<link>http://hirt.se/blog/?p=207</link>
		<comments>http://hirt.se/blog/?p=207#comments</comments>
		<pubDate>Tue, 24 Apr 2012 14:02:23 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hirt.se/blog/?p=207</guid>
		<description><![CDATA[On popular demand, here is how write a remote JRCMD for R28.x:
import java.lang.management.ManagementFactory;
import java.net.MalformedURLException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import javax.management.Attribute;
import javax.management.InstanceNotFoundException;
import javax.management.MBeanAttributeInfo;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;

/**
 * Simple code example on how to execute
 * ctrl-break handlers remotely.
 *
 * Usage:
 * RemoteJRCMD -host -port -user -pass -command []
 *
 * All arguments are optional. If [...]]]></description>
			<content:encoded><![CDATA[<p>On popular demand, here is how write a remote JRCMD for R28.x:</p>
<pre>import java.lang.management.ManagementFactory;
import java.net.MalformedURLException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import javax.management.Attribute;
import javax.management.InstanceNotFoundException;
import javax.management.MBeanAttributeInfo;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;

/**
 * Simple code example on how to execute
 * ctrl-break handlers remotely.
 *
 * Usage:
 * RemoteJRCMD -host -port -user -pass -command []
 *
 * All arguments are optional. If no command is
 * specified, all performance counters and their
 * current values are listed.
 *
 * @author Marcus Hirt
 */
public final class RemoteJRCMD {
	private final static String KEY_CREDENTIALS =
		&quot;jmx.remote.credentials&quot;;
	private final static String JROCKIT_PERFCOUNTER_MBEAN_NAME =
		&quot;oracle.jrockit.management:type=PerfCounters&quot;;
	private final static String JROCKIT_CONSOLE_MBEAN_NAME =
		&quot;oracle.jrockit.management:type=JRockitConsole&quot;;
	private final static String[] SIGNATURE =
		new String[] {&quot;java.lang.String&quot;};
	private final static String DIAGNOSTIC_COMMAND_MBEAN_NAME =
		&quot;oracle.jrockit.management:type=DiagnosticCommand&quot;;

	public static void main(String[] args)
			throws Exception {
		HashMap commandMap =
			parseArguments(args);
		executeCommand(
				commandMap.get(&quot;-host&quot;),
				Integer.parseInt(commandMap.get(&quot;-port&quot;)),
				commandMap.get(&quot;-user&quot;),
				commandMap.get(&quot;-password&quot;),
				commandMap.get(&quot;-command&quot;));
	}

	private static HashMap parseArguments(
			String[] args) {
		HashMap commandMap =
			new HashMap();
		commandMap.put(&quot;-host&quot;, &quot;localhost&quot;);
		commandMap.put(&quot;-port&quot;, &quot;7091&quot;);
		for (int i = 0; i &lt; args.length; i++) {
			if (args[i].startsWith(&quot;-&quot;)) {
				StringBuilder buf = new StringBuilder();
				int j = i + 1;
				while (j &lt; args.length
						&amp;&amp; !args[j].startsWith(&quot;-&quot;)) {
					buf.append(&quot; &quot;);
					buf.append(args[j++]);
				}
				commandMap.put(args[i],
						buf.toString().trim());
				i = j - 1;
			}
		}
		return commandMap;
	}

	@SuppressWarnings(&quot;unchecked&quot;)
	public static void executeCommand(
			String host, int port, String user,
			String password, String command)
			throws Exception {
		MBeanServerConnection server = null;
		JMXConnector jmxc = null;
		Map map = null;
		if (user != null || password != null) {
			map = new HashMap();
			final String[] credentials = new String[2];
			credentials[0] = user;
			credentials[1] = password;
			map.put(KEY_CREDENTIALS, credentials);
		}
		// Use same convention as Sun. localhost:0 means
		// &quot;VM, monitor thyself!&quot;
		if (host.equals(&quot;localhost&quot;) &amp;&amp; port == 0) {
			server = ManagementFactory.getPlatformMBeanServer();
		} else {
			jmxc = JMXConnectorFactory.newJMXConnector(
					createConnectionURL(host,
							port), map);
			jmxc.connect();
			server = jmxc.getMBeanServerConnection();
		}

		System.out.println(&quot;Connected to &quot; + host
				+ &quot;:&quot; + port);

		try {
			server.getMBeanInfo(new ObjectName(
					JROCKIT_CONSOLE_MBEAN_NAME));
		} catch (InstanceNotFoundException e1) {
			server.createMBean(
					&quot;oracle.jrockit.management.JRockitConsole&quot;,
					null);
		}

		if (command == null) {
			ObjectName perfCounterObjectName = new ObjectName(
					JROCKIT_PERFCOUNTER_MBEAN_NAME);
			System.out.println(&quot;Listing all counters...&quot;);
			MBeanAttributeInfo[] attributes = server.getMBeanInfo(
					perfCounterObjectName).getAttributes();
			System.out.println(&quot;Counter\tValue\n=======\t====&quot;);

			String[] attributeNames = new String[attributes.length];
			for (int i = 0; i &lt; attributes.length; i++) {
				attributeNames[i] = attributes[i].getName();
			}
			Iterator valueIter = server.getAttributes(
					perfCounterObjectName,
					attributeNames).iterator();
			while (valueIter.hasNext()) {
				Attribute attr = (Attribute) valueIter.next();
				System.out.println(attr.getName()
						+ &quot;\t=\t&quot;
						+ attr.getValue());
			}
		} else {
			System.out.println(&quot;Invoking the ctrl-break command '&quot;
					+ command + &quot;'...&quot;);
			ObjectName consoleObjectName = new ObjectName(
					DIAGNOSTIC_COMMAND_MBEAN_NAME);
			Object[] params = new Object[1];
			params[0] = command;
			System.out.println(&quot;The CtrlBreakCommand returned: \n&quot;
					+ server.invoke(
							consoleObjectName,
							&quot;execute&quot;, params,
							SIGNATURE));
		}

		if (jmxc != null) {
			jmxc.close();
		}
	}

	private static JMXServiceURL createConnectionURL(
			String host, int port)
			throws MalformedURLException {
		return new JMXServiceURL(&quot;rmi&quot;, &quot;&quot;, 0,
				&quot;/jndi/rmi://&quot; + host + &quot;:&quot;
						+ port + &quot;/jmxrmi&quot;);
	}
}</pre>
<p>(This example can also be found in the <a href="http://www.amazon.com/Oracle-JRockit-The-Definitive-Guide/dp/1847198066/ref=ntt_at_ep_dpt_1">JRockit book</a>, at the end of chapter 11.)</p>
<p>The following example would list all the performance counters and their values on the JVM running the RemoteJRCMD itself: </p>
<blockquote>
<p><code>java RemoteJRCMD –port 0</code></p>
</blockquote>
<p>The following example would list all the available commands in a JVM with a management agent open on the default port (7091) on localhost: </p>
<blockquote>
<p><code>java RemoteJRCMD –command help</code></p>
</blockquote>
<p>The following example would print the help on the command “print_threads”, which performs a thread stack dump: </p>
<blockquote>
<p><code>java RemoteJRCMD –command help print_threads</code></p>
</blockquote>
<p>The following example would print a heap histogram per class for the JVM running on port 4711 on the host adastra: </p>
<blockquote>
<p><code>java RemoteJRCMD –port 4711 –host adastra –command print_object_summary</code></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://hirt.se/blog/?feed=rss2&amp;p=207</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speaking at Java One and Oracle Develop India!</title>
		<link>http://hirt.se/blog/?p=206</link>
		<comments>http://hirt.se/blog/?p=206#comments</comments>
		<pubDate>Tue, 24 Apr 2012 09:47:27 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hirt.se/blog/?p=206</guid>
		<description><![CDATA[I will be presenting the following two sessions at Java One in Hyderabad next week:



Thursday, May 3






Time
Room
Title
Abstract
Type


17:30-18:20
Hall 5
HotRockit: What to Expect from Oracle’s Converged JVM

Oracle is converging the HotSpot and Oracle JRockit JVMs to produce a “best-of-breed JVM.” Internally, the project is sometimes referred to as the HotRockit project. This presentation discusses what to expect [...]]]></description>
			<content:encoded><![CDATA[<p>I will be presenting the following two sessions at Java One in Hyderabad next week:</p>
<table border="0" cellspacing="0" cellpadding="2" width="846">
<tbody>
<tr>
<td style="background-color: #b62011" valign="top" width="844"><strong>Thursday, May 3</strong></td>
</tr>
</tbody>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="847">
<tbody>
<tr>
<td valign="top" width="129"><strong><font size="2">Time</font></strong></td>
<td valign="top" width="146"><strong><font size="2">Room</font></strong></td>
<td valign="top" width="147"><strong><font size="2">Title</font></strong></td>
<td valign="top" width="316"><strong><font size="2">Abstract</font></strong></td>
<td valign="top" width="157"><strong><font size="2">Type</font></strong></td>
</tr>
<tr>
<td valign="top" width="129"><font size="2"><strong>17:30-18:20</strong></font></td>
<td valign="top" width="146"><font size="2">Hall 5</font></td>
<td valign="top" width="147"><font size="2">HotRockit: What to Expect from Oracle’s Converged JVM</font></td>
<td valign="top" width="316">
<p><font size="2">Oracle is converging the HotSpot and Oracle JRockit JVMs to produce a “best-of-breed JVM.” Internally, the project is sometimes referred to as the HotRockit project. This presentation discusses what to expect from the converged JVM over the next two years and how this will benefit the Java community.</font></p>
</td>
<td valign="top" width="157"><font size="2">Conference Session Core Java Platform</font></td>
</tr>
<tr>
<td valign="top" width="129">&#160;</td>
<td valign="top" width="146">&#160;</td>
<td valign="top" width="147">&#160;</td>
<td valign="top" width="316">&#160;</td>
<td valign="top" width="157">&#160;</td>
</tr>
</tbody>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="846">
<tbody>
<tr>
<td style="background-color: #b62011" valign="top" width="844"><strong>Friday, May 4</strong></td>
</tr>
</tbody>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="847">
<tbody>
<tr>
<td valign="top" width="129"><strong><font size="2">Time</font></strong></td>
<td valign="top" width="146"><strong><font size="2">Room</font></strong></td>
<td valign="top" width="147"><strong><font size="2">Title</font></strong></td>
<td valign="top" width="316"><strong><font size="2">Abstract</font></strong></td>
<td valign="top" width="157"><strong><font size="2">Type</font></strong></td>
</tr>
<tr>
<td valign="top" width="129"><font size="2"><strong>11:30-13:15</strong></font></td>
<td valign="top" width="146"><font size="2">Flexi 1</font></td>
<td valign="top" width="147"><font size="2">Production-Time Problem Solving</font></td>
<td valign="top" width="316">
<p><font size="2">This tutorial looks at some common problems and pitfalls in Java applications. It focuses on noninvasive profiling and diagnostics of running production systems. Problems tackled:</font></p>
<li><font size="2">Excessive GC </font></li>
<li><font size="2">Finding hotspots and optimizing them </font></li>
<li><font size="2">Optimizing the choice of data structures </font></li>
<li><font size="2">Synchronization problems </font></li>
<li><font size="2">Finding out where exceptions are thrown </font></li>
<li><font size="2">Finding memory leaks </font>
<p><font size="2">The presentation demonstrates all problems and solves them, running both the bad-behaving applications and the tools to analyze them from within the Eclipse Java IDE with Oracle JRockit Mission Control Release 4.1.</font></p>
</li>
</td>
<td valign="top" width="157"><font size="2">Hands-On Labs</font></td>
</tr>
</tbody>
</table>
<p>Looking forward to seeing you there! <img style="border-bottom-style: none;border-left-style: none;border-top-style: none;border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Ler" src="http://hirt.se/blog/wp-content/uploads/2012/04/wlEmoticon-smile2.png" /></p>
<p><a href="http://www.oracle.com/javaone/in-en/index.html"><img style="border-bottom: 0px;border-left: 0px;padding-left: 0px;padding-right: 0px;border-top: 0px;border-right: 0px;padding-top: 0px" border="0" alt="hyderabad" src="http://hirt.se/blog/wp-content/uploads/2012/04/hyderabad.jpg" width="851" height="90" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://hirt.se/blog/?feed=rss2&amp;p=206</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speaking at Java One Moscow!</title>
		<link>http://hirt.se/blog/?p=201</link>
		<comments>http://hirt.se/blog/?p=201#comments</comments>
		<pubDate>Sun, 15 Apr 2012 15:43:37 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hirt.se/blog/?p=201</guid>
		<description><![CDATA[I will be presenting the following two sessions at Java One in Moscow next week:



Tuesday, April 17






Time
Room
Title
Abstract
Type


17:30-18:15
Green Room
What’s New in Oracle JRockit Mission Control

The latest version of JRockit Mission Control is a very potent suite of Java tools for monitoring, managing, profiling, finding latency related problems and hunting for memory leaks in Java applications. This [...]]]></description>
			<content:encoded><![CDATA[<p>I will be presenting the following two sessions at Java One in Moscow next week:</p>
<table border="0" cellspacing="0" cellpadding="2" width="846">
<tbody>
<tr>
<td style="background-color: #b62011" valign="top" width="844"><strong>Tuesday, April 17</strong></td>
</tr>
</tbody>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="847">
<tbody>
<tr>
<td valign="top" width="129"><strong><font size="2">Time</font></strong></td>
<td valign="top" width="146"><strong><font size="2">Room</font></strong></td>
<td valign="top" width="147"><strong><font size="2">Title</font></strong></td>
<td valign="top" width="316"><strong><font size="2">Abstract</font></strong></td>
<td valign="top" width="157"><strong><font size="2">Type</font></strong></td>
</tr>
<tr>
<td valign="top" width="129"><font size="2"><strong>17:30-18:15</strong></font></td>
<td valign="top" width="146"><font size="2">Green Room</font></td>
<td valign="top" width="147"><font size="2">What’s New in Oracle JRockit Mission Control</font></td>
<td valign="top" width="316">
<p><font size="2">The latest version of JRockit Mission Control is a very potent suite of Java tools for monitoring, managing, profiling, finding latency related problems and hunting for memory leaks in Java applications. This talk will start with a quick re-cap of the major JRockit Mission Control tools, then quickly move on to discuss some exciting features available in the most recently available version of JRockit Mission Control.</font></p>
</td>
<td valign="top" width="157"><font size="2">Hands-on Lab            <br />Java Core Platform</font></td>
</tr>
<tr>
<td valign="top" width="129">&nbsp;</td>
<td valign="top" width="146">&nbsp;</td>
<td valign="top" width="147">&nbsp;</td>
<td valign="top" width="316">&nbsp;</td>
<td valign="top" width="157">&nbsp;</td>
</tr>
</tbody>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="846">
<tbody>
<tr>
<td style="background-color: #b62011" valign="top" width="844"><strong>Wednesday, April 18</strong></td>
</tr>
</tbody>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="847">
<tbody>
<tr>
<td valign="top" width="129"><strong><font size="2">Time</font></strong></td>
<td valign="top" width="146"><strong><font size="2">Room</font></strong></td>
<td valign="top" width="147"><strong><font size="2">Title</font></strong></td>
<td valign="top" width="316"><strong><font size="2">Abstract</font></strong></td>
<td valign="top" width="157"><strong><font size="2">Type</font></strong></td>
</tr>
<tr>
<td valign="top" width="129"><font size="2"><strong>11:30-13:15</strong></font></td>
<td valign="top" width="146"><font size="2">Java One HOL Room</font></td>
<td valign="top" width="147"><font size="2">Production-Time Problem Solving</font></td>
<td valign="top" width="316">
<p><font size="2">This tutorial looks at some common problems and pitfalls in Java applications. It focuses on noninvasive profiling and diagnostics of running production systems. Problems tackled:</font></p>
<li><font size="2">Excessive GC </font></li>
<li><font size="2">Finding hotspots and optimizing them </font></li>
<li><font size="2">Optimizing the choice of data structures </font></li>
<li><font size="2">Synchronization problems </font></li>
<li><font size="2">Finding out where exceptions are thrown </font></li>
<li><font size="2">Finding memory leaks </font>
<p><font size="2">The presentation demonstrates all problems and solves them, running both the bad-behaving applications and the tools to analyze them from within the Eclipse Java IDE with the upcoming Oracle JRockit Mission Control Release 4.1.</font></p>
</li>
</td>
<td valign="top" width="157"><font size="2">Hands-On Labs</font></td>
</tr>
</tbody>
</table>
<p>Looking forward to seeing you there! <img style="border-bottom-style: none;border-left-style: none;border-top-style: none;border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Ler" src="http://hirt.se/blog/wp-content/uploads/2012/04/wlEmoticon-smile1.png" /></p>
<p><a href="http://www.oracle.com/javaone/ru-en/index.html"><img style="border-right-width: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px;border-bottom-width: 0px;border-left-width: 0px;padding-top: 0px" border="0" alt="image" src="http://hirt.se/blog/wp-content/uploads/2012/04/image.png" width="847" height="90" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://hirt.se/blog/?feed=rss2&amp;p=201</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speaking at JavaOne Tokyo!</title>
		<link>http://hirt.se/blog/?p=197</link>
		<comments>http://hirt.se/blog/?p=197#comments</comments>
		<pubDate>Tue, 03 Apr 2012 07:26:41 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hirt.se/blog/?p=197</guid>
		<description><![CDATA[So, if you happen to be at JavaOne Tokyo, and fancy some information on the JRockit &#38; Hotspot convergence project, my session is tomorrow (4th of April) at 18:15!
Looking forward to seeing you there! 
]]></description>
			<content:encoded><![CDATA[<p>So, if you happen to be at JavaOne Tokyo, and fancy some information on the JRockit &amp; Hotspot convergence project, my session is tomorrow (4th of April) at 18:15!</p>
<p>Looking forward to seeing you there! <img style="border-bottom-style: none;border-left-style: none;border-top-style: none;border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Ler" src="http://hirt.se/blog/wp-content/uploads/2012/04/wlEmoticon-smile.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://hirt.se/blog/?feed=rss2&amp;p=197</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mission Control and Time Zones</title>
		<link>http://hirt.se/blog/?p=185</link>
		<comments>http://hirt.se/blog/?p=185#comments</comments>
		<pubDate>Wed, 14 Mar 2012 14:30:07 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hirt.se/blog/?p=185</guid>
		<description><![CDATA[Sometimes when you use Mission Control remotely, or when analyzing a Flight Recording from a computer in another time zone, you may want to use the same time zone in the Mission Control client as the remote computer. You may, for instance, have access to logs where the time stamps are in the remote computer&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes when you use Mission Control remotely, or when analyzing a Flight Recording from a computer in another time zone, you may want to use the same time zone in the Mission Control client as the remote computer. You may, for instance, have access to logs where the time stamps are in the remote computer&#8217;s time zone, and you would want all the time stamps in the Flight Recorder user interface to be in the same time zone. Of course, one way to do this is to change the time zone of the computer running the Mission Control client. However, an easier way is to add the user.timezone parameter to the Mission Control launcher, like this:</p>
<blockquote><p><font face="Courier New">jrmc -J-Duser.timezone=PST</font></p>
</blockquote>
<p>Substitute PST for the time zone needed, e.g. EST, GMT, CET.</p>
<p>On some machines you will not be able to use abbreviated time zone names. On such machines, simply use the full time zone name, such as America/Los_Angeles. You can hook up the Mission Control Console to itself to verify that the time zone was properly set:<br />
<a href="http://hirt.se/blog/wp-content/uploads/2012/03/timezone.png"><img src="http://hirt.se/blog/wp-content/uploads/2012/03/timezone-300x236.png" alt="JRMC Console" width="300" height="236" class="alignnone size-medium wp-image-189" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://hirt.se/blog/?feed=rss2&amp;p=185</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speaking at EclipseCon 2012!</title>
		<link>http://hirt.se/blog/?p=174</link>
		<comments>http://hirt.se/blog/?p=174#comments</comments>
		<pubDate>Thu, 09 Feb 2012 09:56:02 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hirt.se/blog/?p=174</guid>
		<description><![CDATA[I will be delivering a talk on the current state of the HotSpot and JRockit JVM convergence at EclipseCon 2012. For more information, see:
http://www.eclipsecon.org/2012/sessions/state-jrockit-hotspot-convergence-presented-oracle

My talk will be on Thursday the 29th of March, 11:00 &#8211; 11:45 in room Lake Anne.
Looking forward to seeing you there! 
]]></description>
			<content:encoded><![CDATA[<p>I will be delivering a talk on the current state of the HotSpot and JRockit JVM convergence at EclipseCon 2012. For more information, see:</p>
<blockquote><p><a title="http://www.eclipsecon.org/2012/sessions/state-jrockit-hotspot-convergence-presented-oracle" href="http://www.eclipsecon.org/2012/sessions/state-jrockit-hotspot-convergence-presented-oracle">http://www.eclipsecon.org/2012/sessions/state-jrockit-hotspot-convergence-presented-oracle</a></p>
</blockquote>
<p>My talk will be on Thursday the 29th of March, 11:00 &#8211; 11:45 in room Lake Anne.</p>
<p>Looking forward to seeing you there! <img style="border-bottom-style: none;border-left-style: none;border-top-style: none;border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://hirt.se/blog/wp-content/uploads/2012/02/wlEmoticon-smile.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://hirt.se/blog/?feed=rss2&amp;p=174</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speaking at Jfokus!</title>
		<link>http://hirt.se/blog/?p=172</link>
		<comments>http://hirt.se/blog/?p=172#comments</comments>
		<pubDate>Thu, 09 Feb 2012 09:23:31 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hirt.se/blog/?p=172</guid>
		<description><![CDATA[I’ve been invited to&#160; present the following session at Jfokus:
Presentation: What to Expect from HotRockit
Oracle is converging the HotSpot and Oracle JRockit JVMs to produce a &#34;best-of-breed JVM.&#34; Internally, the project is sometimes referred to as the HotRockit project. This presentation discusses what to expect from the converged JVM over the next two years and [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been invited to&#160; present the following session at Jfokus:</p>
<h5>Presentation: What to Expect from HotRockit</h5>
<p>Oracle is converging the HotSpot and Oracle JRockit JVMs to produce a &quot;best-of-breed JVM.&quot; Internally, the project is sometimes referred to as the HotRockit project. This presentation discusses what to expect from the converged JVM over the next two years and how this will benefit the Java community.</p>
<p>My session will take place in <strong>A2</strong>, at <strong>14:00 </strong>on <strong>Wednesday </strong>the <strong>15th </strong>of <strong>February</strong>. Looking forward to seeing you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://hirt.se/blog/?feed=rss2&amp;p=172</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Rid of Unwanted Preference Pages in Eclipse</title>
		<link>http://hirt.se/blog/?p=171</link>
		<comments>http://hirt.se/blog/?p=171#comments</comments>
		<pubDate>Wed, 01 Feb 2012 09:36:16 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://hirt.se/blog/?p=171</guid>
		<description><![CDATA[I recently wanted to get rid of a preference page I did not want to expose in Mission Control (an Eclipse RCP based application), and ended up with the following code in my ApplicationWorkbenchWindowAdvisor:

private void removeUnwantedPreferencesPages() {&#160;&#160;&#160; PreferenceManager pm = PlatformUI.getWorkbench().getPreferenceManager();&#160;&#160;&#160; IPreferenceNode root = getRoot(pm);&#160;&#160;&#160; removePrefsPage(root, &#34;org.eclipse.equinox.security.ui.category&#34;); //$NON-NLS-1$}
private IPreferenceNode getRoot(PreferenceManager pm) {&#160;&#160;&#160; try {&#160;&#160;&#160;&#160;&#160;&#160;&#160; Method [...]]]></description>
			<content:encoded><![CDATA[<p>I recently wanted to get rid of a preference page I did not want to expose in Mission Control (an Eclipse RCP based application), and ended up with the following code in my ApplicationWorkbenchWindowAdvisor:</p>
<blockquote>
<p><font face="Courier New">private void removeUnwantedPreferencesPages() {<br />&#160;&#160;&#160; PreferenceManager pm = PlatformUI.getWorkbench().getPreferenceManager();<br />&#160;&#160;&#160; IPreferenceNode root = getRoot(pm);<br />&#160;&#160;&#160; removePrefsPage(root, &quot;org.eclipse.equinox.security.ui.category&quot;); //$NON-NLS-1$<br />}</font></p>
<p><font face="Courier New"><br />private IPreferenceNode getRoot(PreferenceManager pm) {<br />&#160;&#160;&#160; try {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Method m = PreferenceManager.class.getDeclaredMethod(&quot;getRoot&quot;, (Class[]) null); //$NON-NLS-1$<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; m.setAccessible(true);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; return (IPreferenceNode) m.invoke(pm);<br />&#160;&#160;&#160; } catch (Exception e) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;LoggingToolkit.getLogger().log(Level.WARNING, &quot;Could not get the root node for the preferences, and will not be able to prune unwanted prefs pages.&quot;, e); //$NON-NLS-1$<br />&#160;&#160;&#160; }<br />&#160;&#160;&#160; return null;<br />}</font></p>
<p><font face="Courier New">private void removePrefsPage(IPreferenceNode root, String id) {<br />&#160;&#160;&#160; for (IPreferenceNode node : root.getSubNodes()) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; logPrefsNode(node);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (node.getId().equals(id)) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;root.remove(node);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;LoggingToolkit.getLogger().log(Level.INFO, String.format(&quot;Removed preference page %s (ID:%s)&quot;, node.getLabelText(), node.getId()));&#160;&#160; //$NON-NLS-1$<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; } else {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;removePrefsPage(node, id);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160; }<br />}</font></p>
</blockquote>
<p>If you need to know the ID of the preference page you wish to remove, simply walk the tree and print all the nodes instead of removing selected ones. </p>
<p>Hope this helps someone. <img style="border-bottom-style: none;border-left-style: none;border-top-style: none;border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Blinkar" src="http://hirt.se/blog/wp-content/uploads/2012/02/wlEmoticon-winkingsmile.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://hirt.se/blog/?feed=rss2&amp;p=171</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

