<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments for javajiggle.com</title>
	<link>http://javajiggle.com</link>
	<description>Java Jiggle. See what's shaking.</description>
	<pubDate>Thu, 28 Aug 2008 18:08:57 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
		<item>
		<title>Comment on Firefox buttons in your JTabbedPane. (Example) by David</title>
		<link>http://javajiggle.com/2007/12/18/firefox-buttons-in-your-jtabbedpane-example/#comment-57</link>
		<dc:creator>David</dc:creator>
		<pubDate>Thu, 03 Jul 2008 10:42:16 +0000</pubDate>
		<guid>http://javajiggle.com/2007/12/18/firefox-buttons-in-your-jtabbedpane-example/#comment-57</guid>
		<description>This is very useful for me! Thank you!
However I had some small suggestions for better look:
- super(new FlowLayout(FlowLayout.LEFT, 1,1)); // For smaller tab height
- button.setMargin(new Insets(1,1,1,1)); // For smaller button

Preview:
http://picasaweb.google.com/PaksyDavid/Screenshots/photo#5218735607356936946</description>
		<content:encoded><![CDATA[<p>This is very useful for me! Thank you!<br />
However I had some small suggestions for better look:<br />
- super(new FlowLayout(FlowLayout.LEFT, 1,1)); // For smaller tab height<br />
- button.setMargin(new Insets(1,1,1,1)); // For smaller button</p>
<p>Preview:<br />
<a href="http://picasaweb.google.com/PaksyDavid/Screenshots/photo#5218735607356936946" rel="nofollow">http://picasaweb.google.com/PaksyDavid/Screenshots/photo#5218735607356936946</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Know your Logic.  About: &#038;&#038;, &#038;, &#124;&#124; and &#124; operators. by The Happy Rock</title>
		<link>http://javajiggle.com/2008/04/08/know-your-logic-about-and-operators/#comment-55</link>
		<dc:creator>The Happy Rock</dc:creator>
		<pubDate>Tue, 08 Apr 2008 15:17:52 +0000</pubDate>
		<guid>http://javajiggle.com/2008/04/08/know-your-logic-about-and-operators/#comment-55</guid>
		<description>I didn't even realize that there was an unoptimized version.  Thanks for the info.

It might be interesting to write a quick performance program to see if there is any impact for something simple like mathematical evaluations.</description>
		<content:encoded><![CDATA[<p>I didn&#8217;t even realize that there was an unoptimized version.  Thanks for the info.</p>
<p>It might be interesting to write a quick performance program to see if there is any impact for something simple like mathematical evaluations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to launch your Java™ RMI server and keep it running on Unix. by Javajiggler</title>
		<link>http://javajiggle.com/2007/11/06/how-to-launch-your-java-server-and-keep-it-running-on-unix/#comment-43</link>
		<dc:creator>Javajiggler</dc:creator>
		<pubDate>Mon, 25 Feb 2008 00:36:08 +0000</pubDate>
		<guid>http://javajiggle.com/2007/11/06/how-to-launch-your-java-server-and-keep-it-running-on-unix/#comment-43</guid>
		<description>Josh,
You are right.  The above script demonstrates how to restart the java server in case rmiregistry has crashed.   It will not do anything in case the java server crashed.
We will need a separate script “startJavaServer” to respawn the java server.  Something like this should do the trick:

#!/bin/sh
done=0
while [ "$done" -eq 0 ]
do
        java &#38;
        jvmPID=$!
        trap "kill -TERM $jvmPID;done=1" TERM
        wait $jvmPID
        echo "respawning JVM"
done
kill -TERM $jvmPID
echo "Out of the loop!!"

Note, we will need to change "kill -9 $javaServerPID" to "kill -TERM $javaServerPID" in the previous script.
I hope that helps.
Java Jiggler</description>
		<content:encoded><![CDATA[<p>Josh,<br />
You are right.  The above script demonstrates how to restart the java server in case rmiregistry has crashed.   It will not do anything in case the java server crashed.<br />
We will need a separate script “startJavaServer” to respawn the java server.  Something like this should do the trick:</p>
<p>#!/bin/sh<br />
done=0<br />
while [ &#8220;$done&#8221; -eq 0 ]<br />
do<br />
        java &amp;<br />
        jvmPID=$!<br />
        trap &#8220;kill -TERM $jvmPID;done=1&#8243; TERM<br />
        wait $jvmPID<br />
        echo &#8220;respawning JVM&#8221;<br />
done<br />
kill -TERM $jvmPID<br />
echo &#8220;Out of the loop!!&#8221;</p>
<p>Note, we will need to change &#8220;kill -9 $javaServerPID&#8221; to &#8220;kill -TERM $javaServerPID&#8221; in the previous script.<br />
I hope that helps.<br />
Java Jiggler</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to launch your Java™ RMI server and keep it running on Unix. by Josh</title>
		<link>http://javajiggle.com/2007/11/06/how-to-launch-your-java-server-and-keep-it-running-on-unix/#comment-21</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Thu, 14 Feb 2008 02:46:31 +0000</pubDate>
		<guid>http://javajiggle.com/2007/11/06/how-to-launch-your-java-server-and-keep-it-running-on-unix/#comment-21</guid>
		<description>Maybe I am dense but what happens if the java server dies... glancing at this code looks like it would just stay dead.</description>
		<content:encoded><![CDATA[<p>Maybe I am dense but what happens if the java server dies&#8230; glancing at this code looks like it would just stay dead.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to launch your Java™ RMI server and keep it running on Unix. by JavaJiggler</title>
		<link>http://javajiggle.com/2007/11/06/how-to-launch-your-java-server-and-keep-it-running-on-unix/#comment-11</link>
		<dc:creator>JavaJiggler</dc:creator>
		<pubDate>Mon, 14 Jan 2008 16:31:04 +0000</pubDate>
		<guid>http://javajiggle.com/2007/11/06/how-to-launch-your-java-server-and-keep-it-running-on-unix/#comment-11</guid>
		<description>Armin that’s a good point.  You are right, that if the RMI registry crashes, the java servers need to be reset.

This can be acomplished by launching the rmi registry and the java server(s) in one script.

1. The idea is that the rmi sever will be launched first.
2. The java rmi server will be launched next.
3. The launch script will than block using a wait command to check if rmi registry terminates.
4. If wait unblocks, that means that rmi registry terminated.  When this happens, kill the java server(s) and repeat steps 1-3.

Below is a sample script.  You can tested it by killing the rmi registry and see it respawn both rmi registry and a java server.

Here is a sample: (Note: this should work but has not been tested for syntax)

#!/bin/sh

#kick off the rmi registry
./rmiRegistry &#38;

#store the PID of the RMI registry
rmiRegistryPID=$! 
echo Started RMI registry with PID= $rmiRegistryPID"

#kick off the java server in a script
./startJavaServer &#38;

#store PID for java server
javaServerPID=$!
echo Started Java server with PID= $javaServerPID"

While [ 1 ]
do
	wait $rmiRegistryPID
	echo "RMI Registry (PID=$rmiRegistryPID ) terminated..."

	kill -9 $javaServerPID
	echo "Terminated Java Server"

	./rmiRegistry &#38;
	rmiRegistryPID=$!	
	echo "Respawned RMI registry with PID= $rmiRegistryPID"

	./startJavaServer &#38;
	javaServerPID=$!
	echo "Respawned Java server with PID= $javaServerPID"
done</description>
		<content:encoded><![CDATA[<p>Armin that’s a good point.  You are right, that if the RMI registry crashes, the java servers need to be reset.</p>
<p>This can be acomplished by launching the rmi registry and the java server(s) in one script.</p>
<p>1. The idea is that the rmi sever will be launched first.<br />
2. The java rmi server will be launched next.<br />
3. The launch script will than block using a wait command to check if rmi registry terminates.<br />
4. If wait unblocks, that means that rmi registry terminated.  When this happens, kill the java server(s) and repeat steps 1-3.</p>
<p>Below is a sample script.  You can tested it by killing the rmi registry and see it respawn both rmi registry and a java server.</p>
<p>Here is a sample: (Note: this should work but has not been tested for syntax)</p>
<p>#!/bin/sh</p>
<p>#kick off the rmi registry<br />
./rmiRegistry &amp;</p>
<p>#store the PID of the RMI registry<br />
rmiRegistryPID=$!<br />
echo Started RMI registry with PID= $rmiRegistryPID&#8221;</p>
<p>#kick off the java server in a script<br />
./startJavaServer &amp;</p>
<p>#store PID for java server<br />
javaServerPID=$!<br />
echo Started Java server with PID= $javaServerPID&#8221;</p>
<p>While [ 1 ]<br />
do<br />
	wait $rmiRegistryPID<br />
	echo &#8220;RMI Registry (PID=$rmiRegistryPID ) terminated&#8230;&#8221;</p>
<p>	kill -9 $javaServerPID<br />
	echo &#8220;Terminated Java Server&#8221;</p>
<p>	./rmiRegistry &amp;<br />
	rmiRegistryPID=$!<br />
	echo &#8220;Respawned RMI registry with PID= $rmiRegistryPID&#8221;</p>
<p>	./startJavaServer &amp;<br />
	javaServerPID=$!<br />
	echo &#8220;Respawned Java server with PID= $javaServerPID&#8221;<br />
done</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to launch your Java™ RMI server and keep it running on Unix. by celpjefscycle</title>
		<link>http://javajiggle.com/2007/11/06/how-to-launch-your-java-server-and-keep-it-running-on-unix/#comment-10</link>
		<dc:creator>celpjefscycle</dc:creator>
		<pubDate>Sat, 12 Jan 2008 09:16:36 +0000</pubDate>
		<guid>http://javajiggle.com/2007/11/06/how-to-launch-your-java-server-and-keep-it-running-on-unix/#comment-10</guid>
		<description>Thanks for information. 
many interesting things 
Celpjefscylc</description>
		<content:encoded><![CDATA[<p>Thanks for information.<br />
many interesting things<br />
Celpjefscylc</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Firefox buttons in your JTabbedPane. (Example) by Dan</title>
		<link>http://javajiggle.com/2007/12/18/firefox-buttons-in-your-jtabbedpane-example/#comment-9</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Tue, 18 Dec 2007 21:49:43 +0000</pubDate>
		<guid>http://javajiggle.com/2007/12/18/firefox-buttons-in-your-jtabbedpane-example/#comment-9</guid>
		<description>You are a genius.  This is more than I could have ever hoped for.  Now I can die in peace.</description>
		<content:encoded><![CDATA[<p>You are a genius.  This is more than I could have ever hoped for.  Now I can die in peace.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to launch your Java™ RMI server and keep it running on Unix. by armin Kupczok</title>
		<link>http://javajiggle.com/2007/11/06/how-to-launch-your-java-server-and-keep-it-running-on-unix/#comment-8</link>
		<dc:creator>armin Kupczok</dc:creator>
		<pubDate>Wed, 12 Dec 2007 14:04:54 +0000</pubDate>
		<guid>http://javajiggle.com/2007/11/06/how-to-launch-your-java-server-and-keep-it-running-on-unix/#comment-8</guid>
		<description>The scenario above must be inverted. The problem occurs if RMIRegistry crashes. Then RMIServer must restart in order to rebind its stubs after RMIRegistry restart.</description>
		<content:encoded><![CDATA[<p>The scenario above must be inverted. The problem occurs if RMIRegistry crashes. Then RMIServer must restart in order to rebind its stubs after RMIRegistry restart.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to launch your Java™ RMI server and keep it running on Unix. by armin Kupczok</title>
		<link>http://javajiggle.com/2007/11/06/how-to-launch-your-java-server-and-keep-it-running-on-unix/#comment-7</link>
		<dc:creator>armin Kupczok</dc:creator>
		<pubDate>Tue, 11 Dec 2007 18:41:28 +0000</pubDate>
		<guid>http://javajiggle.com/2007/11/06/how-to-launch-your-java-server-and-keep-it-running-on-unix/#comment-7</guid>
		<description>We also need to keep rmiregistry and rmiserver running. I think option 4 works well. But there is one point which I dont know how to solve it. If either RMIServer or RMIRegistry crashes both of them must be restarted. So if only RMIServer crashes, RMIRegistry must be restarted and then RMIServer must be started (rebinding). Is there a solution for that problem</description>
		<content:encoded><![CDATA[<p>We also need to keep rmiregistry and rmiserver running. I think option 4 works well. But there is one point which I dont know how to solve it. If either RMIServer or RMIRegistry crashes both of them must be restarted. So if only RMIServer crashes, RMIRegistry must be restarted and then RMIServer must be started (rebinding). Is there a solution for that problem</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on JDK 6 Rules!  Adding components to the tabs on JTabbedPane is now a breeze. Check it out! by Dan</title>
		<link>http://javajiggle.com/2007/11/16/jdk-6-rules-adding-components-to-the-tabs-is-a-breeze-check-it-out/#comment-4</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Tue, 27 Nov 2007 18:58:54 +0000</pubDate>
		<guid>http://javajiggle.com/2007/11/16/jdk-6-rules-adding-components-to-the-tabs-is-a-breeze-check-it-out/#comment-4</guid>
		<description>Those buttons are awfully ugly.  What if I wanted pretty ones like firefox has?</description>
		<content:encoded><![CDATA[<p>Those buttons are awfully ugly.  What if I wanted pretty ones like firefox has?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
