<?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>All About Unidev &#187; Brian Bohl</title>
	<atom:link href="http://blog.unidev.com/index.php/author/bbohl/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.unidev.com</link>
	<description>Custom Software, Website and Mobile Development News</description>
	<lastBuildDate>Wed, 25 Jan 2012 20:54:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Change location of Wicket&#8217;s ajax debug link</title>
		<link>http://blog.unidev.com/index.php/2010/03/04/change-location-of-wickets-ajax-debug-link/</link>
		<comments>http://blog.unidev.com/index.php/2010/03/04/change-location-of-wickets-ajax-debug-link/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 22:39:21 +0000</pubDate>
		<dc:creator>Brian Bohl</dc:creator>
				<category><![CDATA[Custom Development]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.unidev.com/?p=224</guid>
		<description><![CDATA[I needed to move Wicket&#8217;s ajax debug link from the bottom right to the bottom left because it was covering some links.  The script below is how I accomplished it (uses jQuery).  The link uses absolute positioning so you can customize this to move it anywhere on the page. &#60;script type="text/javascript"&#62; $(document).ready(function() { // // [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to move Wicket&#8217;s ajax debug link from the bottom right to the bottom left because it was covering some links.  The script below is how I accomplished it (uses jQuery).  The link uses absolute positioning so you can customize this to move it anywhere on the page.</p>
<pre>    &lt;script type="text/javascript"&gt;
        $(document).ready(function() {
            //
            // Moves the debug window to the left instead of the right.
            //
            // Needs to use setTimeout so that the wicket-ajax-debug.js
            // script has a chance to create the link
            //
            if(wicketAjaxDebugEnable)
            {
                setTimeout(function() {
                    $("#wicketDebugLink").css('left', '10px');
                }, 1000);
            }
        });
    &lt;/script&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.unidev.com/index.php/2010/03/04/change-location-of-wickets-ajax-debug-link/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using PHP FastCGI mode on Windows Server 2003 x64 w/ IIS in 32-bit mode</title>
		<link>http://blog.unidev.com/index.php/2009/09/16/using-php-5-3-0-on-windows-server-2003-x64-w-iis-in-32-bit-mode/</link>
		<comments>http://blog.unidev.com/index.php/2009/09/16/using-php-5-3-0-on-windows-server-2003-x64-w-iis-in-32-bit-mode/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 03:27:31 +0000</pubDate>
		<dc:creator>Brian Bohl</dc:creator>
				<category><![CDATA[Custom Development]]></category>
		<category><![CDATA[General Technology]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[fcgiext]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[iis 32 bit mode]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[windows server 2003 x64]]></category>

		<guid isPermaLink="false">http://blog.unidev.com/?p=159</guid>
		<description><![CDATA[I recently needed to upgrade the PHP for a particular site from 5.2.6 to 5.3.0.&#160; Of course, this is when I found out that PHP no longer supports the ISAPI module and instead wants you to use FastCGI.&#160; Luckily I found a great article on how to configure IIS at http://learn.iis.net/page.aspx/247/using-fastcgi-to-host-php-applications-on-iis-60/.&#160; However, these instructions have [...]]]></description>
			<content:encoded><![CDATA[<p>I recently needed to upgrade the PHP for a particular site from 5.2.6 to 5.3.0.&#160; Of course, this is when I found out that PHP no longer supports the ISAPI module and instead wants you to use FastCGI.&#160; Luckily I found a great article on how to configure IIS at <a title="http://learn.iis.net/page.aspx/247/using-fastcgi-to-host-php-applications-on-iis-60/" href="http://learn.iis.net/page.aspx/247/using-fastcgi-to-host-php-applications-on-iis-60/">http://learn.iis.net/page.aspx/247/using-fastcgi-to-host-php-applications-on-iis-60/</a>.&#160; However, these instructions have some caveats in regards to running IIS in 32 bit mode on Windows Server 2003 x64.&#160; To make a long story short, just like with most things running in 32 bit mode on x64, everything that references %WINDIR%\system32 really needs to point to %WINDIR%\SysWOW64.&#160; If you use the fcgiconfig.js script, this will configure everything to point to %WINDIR%\system32.</p>
<ul>
<li>The Web Service Extension needs to point to %WINDIR%\SysWOW64\inetsrv\fcgiext.dll. </li>
<li>The .php extension on the website also needs to point to %WINDIR%\SysWOW64\inetsrv\fcgiext.dll. </li>
<li>The fcgiext.ini file must also be located in %WINDIR%\SysWOW64\inetsrv.&#160; Otherwise you will get a 500 error from FastCGI saying it cannot find the configuration file.      </li>
</ul>
<p>Note that the fcgiconfig.js script is only installed in %WINDIR%\system32\inetsrv.&#160; I was able to create a fcgiconfigwow64.js file that points to the correct files.&#160; The script needs to have at least an ini file with the “[Types]” section in the %WINDIR%\SysWOW64\inetsrv directory.&#160; It also needs to be located under %WINDIR%\system32 as it doesn’t support running under Wow64.&#160; You just need to change the following 2 lines near the top of the script.</p>
<p>From:</p>
<p><font size="1" face="Courier New">var g_iniPath&#160;&#160;&#160;&#160;&#160;&#160; = g_Shell.ExpandEnvironmentStrings( &quot;%WinDir%\\system32\\inetsrv\\fcgiext.ini&quot; );      <br />var g_extensionPath = g_Shell.ExpandEnvironmentStrings( &quot;%WinDir%\\system32\\inetsrv\\fcgiext.dll&quot; );</font></p>
<p>To:</p>
<p><font size="1" face="Courier New">var g_iniPath&#160;&#160;&#160;&#160;&#160;&#160; = g_Shell.ExpandEnvironmentStrings( &quot;%WinDir%\\SysWOW64\\inetsrv\\fcgiext.ini&quot; );      <br />var g_extensionPath = g_Shell.ExpandEnvironmentStrings( &quot;%WinDir%\\SysWOW64\\inetsrv\\fcgiext.dll&quot; );</font></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.unidev.com/index.php/2009/09/16/using-php-5-3-0-on-windows-server-2003-x64-w-iis-in-32-bit-mode/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Bidirectional Associations and JiBX</title>
		<link>http://blog.unidev.com/index.php/2009/05/08/bidirectional-associations-and-jibx/</link>
		<comments>http://blog.unidev.com/index.php/2009/05/08/bidirectional-associations-and-jibx/#comments</comments>
		<pubDate>Fri, 08 May 2009 16:00:59 +0000</pubDate>
		<dc:creator>Brian Bohl</dc:creator>
				<category><![CDATA[General Technology]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[bi-directional]]></category>
		<category><![CDATA[bidirectional]]></category>
		<category><![CDATA[JiBX]]></category>

		<guid isPermaLink="false">http://blog.unidev.com/index.php/2009/05/08/bidirectional-associations-and-jibx/</guid>
		<description><![CDATA[I recently needed to use JiBX to parse a XML document into domain objects that contained bidirectional associations with collections.&#160; The issue started out as a simple NullPointerException since each child object did not have a reference back to its parent.&#160; After some searching on Google, the only suggestions that I came across had to [...]]]></description>
			<content:encoded><![CDATA[<p>I recently needed to use JiBX to parse a XML document into domain objects that contained bidirectional associations with collections.&#160; The issue started out as a simple NullPointerException since each child object did not have a reference back to its parent.&#160; </p>
<p>After some searching on Google, the only suggestions that I came across had to do with using the post-set attribute, which gets called after the class has been unmarshalled.&#160; For various reasons, most of which I did not want the domain classes tied to JiBX, I sought out a different solution.</p>
<p>The solution I came up with was to use a set-method for the collection instead of field.&#160; So I replaced field=”fieldName” with set-method=”setFieldName”.&#160; This set method ensures that the bidirectional association is properly defined.&#160; </p>
<p>There is an argument to be made that I should be doing this anyway.&#160; After all, the domain class probably should not let it be up to the caller to ensure the bidirectional association is properly defined, regardless if it is being called from JiBX or some other caller.</p>
<p>However there was one unintentional side affect.&#160; The project is also using Hibernate.&#160; The same domain classes were mapped using lazy associations.&#160; This change to the set method in affect turned off the laziness.&#160; The solution for this was to change the Hibernate mappings to use field access to bypass the set method.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.unidev.com/index.php/2009/05/08/bidirectional-associations-and-jibx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XMarks Smarter Search feature on IE8 produces mixed content warning</title>
		<link>http://blog.unidev.com/index.php/2009/04/06/xmarks-smarter-search-feature-on-ie8-produces-mixed-content-warning/</link>
		<comments>http://blog.unidev.com/index.php/2009/04/06/xmarks-smarter-search-feature-on-ie8-produces-mixed-content-warning/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 19:41:49 +0000</pubDate>
		<dc:creator>Brian Bohl</dc:creator>
				<category><![CDATA[General Technology]]></category>
		<category><![CDATA[ie8]]></category>
		<category><![CDATA[internet explorer 8]]></category>
		<category><![CDATA[mixed content warning]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[xmarks]]></category>

		<guid isPermaLink="false">http://blog.unidev.com/index.php/2009/04/06/xmarks-smarter-search-feature-on-ie8-produces-mixed-content-warning/</guid>
		<description><![CDATA[I just installed XMarks to see if I can start synchronizing my bookmarks between all of my various locations and all the browsers installed.&#160; However soon after installing, I noticed that I would get the mixed content warning (the one telling you are downloading unsecure content from a secure page) every time I would go [...]]]></description>
			<content:encoded><![CDATA[<p>I just installed XMarks to see if I can start synchronizing my bookmarks between all of my various locations and all the browsers installed.&#160; However soon after installing, I noticed that I would get the mixed content warning (the one telling you are downloading unsecure content from a secure page) every time I would go to our company portal page, which is always secured via SSL.</p>
<p>I double checked the sites using Firefox, and even IE 7 from another machine, and the warning did not appear.&#160; I disabled the Smarter Search feature in XMarks and the warning went away.</p>
<p>I have only installed XMarks on IE 8 so I don’t know if it is specific to IE 8 or is a problem with other browsers in general.</p>
<p><em><strong>Update:</strong>&#160; As per Colin below this issue has been fixed with version 1.0.7.&#160; I installed this version and the warning no longer appears.&#160; It is refreshing to have such a quick response.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.unidev.com/index.php/2009/04/06/xmarks-smarter-search-feature-on-ie8-produces-mixed-content-warning/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Java and swap for HPUX systems</title>
		<link>http://blog.unidev.com/index.php/2007/09/04/java-and-swap-for-nix-systems/</link>
		<comments>http://blog.unidev.com/index.php/2007/09/04/java-and-swap-for-nix-systems/#comments</comments>
		<pubDate>Tue, 04 Sep 2007 15:21:34 +0000</pubDate>
		<dc:creator>Brian Bohl</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.unidev.com/index.php/2007/09/04/java-and-swap-for-nix-systems/</guid>
		<description><![CDATA[We recently pushed a couple of new Java programs to our client&#8217;s application server (HPUX) and soon thereafter they started to receive alerts about the swap running out of space. Of course, being the &#8220;new kid on the block&#8221; our programs were suspect. While these programs were not the only ones taking up a good [...]]]></description>
			<content:encoded><![CDATA[<p>We recently pushed a couple of new Java programs to our client&#8217;s application server (HPUX) and soon thereafter they started to receive alerts about the swap running out of space. Of course, being the &#8220;new kid on the block&#8221; our programs were suspect. While these programs were not the only ones taking up a good deal of swap space, we were a bit perplexed why they were taking much at all.</p>
<p>These programs were fairly small in terms of functionality, but the amount of swap space it was using was around 600-700MB. Here is a summary of our findings (note that some of these details might be different on a Windows system due to differences in memory management):</p>
<ul>
<li>A common theme is that most java processes have a big difference between the residual memory and the total virtual memory.</li>
<li>Java will allocate at a minimum about 200 MB of swap even for the simplest of programs. We tested using a simple program on both a HPUX and a linux server. The best and only documentation I could find about this was at the URL below. The bottom line is that this is probably the behavior of the JVM and out of our control so we just have to deal with it.
<p style="width: 200px">http://groups.google.com/group/comp.lang.java.programmer/browse_thread/thread/778089cbe0c9814c/5b0dfcea715d9055?lnk=st&amp;q=java+uses+virtual+memory&amp;rnum=20&amp;hl=en#5b0dfcea715d9055It</p>
<p>It is reserving space for example for threads that you may or may not create. It is awkward to rearrange memory on the fly, so the JVM parcels out the virtual ram for various tables when it first loads.</li>
<li>The -Xms and -Xmx parameters do affect the java heap but it does not control the total memory footprint. It is only a piece of the total size.</li>
<li>-Xmx alone can affect the total virtual memory size. Currently the processes have -Xms24m and -Xmx512m. Immediately after starting these programs, we saw the swap allocation jump to 600-700MB. When we changed -Xmx to 24m, it dropped to a little over 200MB.</li>
<li>In relation to the above, the normal behavior of the garbage collector is to garbage collect only when it needs to free up memory. Having a too high of a -Xmx value could mean that it will never garbage collect, which means it won&#8217;t reuse memory. We see this in the Weblogic environment too but in that environment all of the memory usually gets used at some point.</li>
<li>There is a new tool built into Java 5 and up called jmap that will give you heap information about a java process. This tool would make tuning the heap parms really simple. Unfortunately the process also has to be running using Java 5 so we cannot use it at this time. There is a version for 1.4 but it only works on Solaris.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.unidev.com/index.php/2007/09/04/java-and-swap-for-nix-systems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spring AbstractEnterpriseBean and a memory leak</title>
		<link>http://blog.unidev.com/index.php/2007/08/31/spring-abstractenterprisebean-and-a-memory-leak/</link>
		<comments>http://blog.unidev.com/index.php/2007/08/31/spring-abstractenterprisebean-and-a-memory-leak/#comments</comments>
		<pubDate>Fri, 31 Aug 2007 21:26:40 +0000</pubDate>
		<dc:creator>Brian Bohl</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.unidev.com/index.php/2007/08/31/spring-abstractenterprisebean-and-a-memory-leak/</guid>
		<description><![CDATA[One of our applications was determined to be leaking memory. The leak was traced back to some stateful EJB&#8217;s that were extending Spring&#8217;s AbstractStatefulSession bean class. While I could not trace to the exact source of the leak, it seems to be related to the unloading of the BeanFactory. As per the documentation, Spring&#8217;s default [...]]]></description>
			<content:encoded><![CDATA[<p>One of our applications was determined to be leaking memory.  The leak was traced back to some stateful EJB&#8217;s that were extending Spring&#8217;s <a href="http://static.springframework.org/spring/docs/1.2.x/api/org/springframework/ejb/support/AbstractStatefulSessionBean.html" target="_blank">AbstractStatefulSession </a>bean class.  While I could not trace to the exact source of the leak, it seems to be related to the unloading of the BeanFactory.</p>
<p>As per the <a href="http://static.springframework.org/spring/docs/1.2.x/api/org/springframework/ejb/support/AbstractEnterpriseBean.html" target="_blank">documentation</a>, Spring&#8217;s default behavior will initialize a new ApplicationContext when the EJB object is created.  It also states that the BeanFactory (which is the ApplicationContext) is unloaded when the EJB is removed.</p>
<p>One of the first things I checked was ensuring the EJB&#8217;s were in fact being removed.  They were.  At some point I remembered that in a more recent project, we changed the beanFactoryLocator to the <a href="http://static.springframework.org/spring/docs/1.2.x/api/org/springframework/context/access/ContextSingletonBeanFactoryLocator.html" target="_blank">ContextSingletonBeanFactoryLocator </a>so that all EJBs use the same context (it also happens we setup the web application to use the same context too).  The newer application did not have the memory leak so I decided to implement it here.  I also figured that even if it didn&#8217;t fix the leak, this method is more efficient since there is no reason to have the context loaded everytime.  To implement, I just overloaded the <a href="http://static.springframework.org/spring/docs/1.2.x/api/org/springframework/ejb/support/AbstractSessionBean.html#setSessionContext(javax.ejb.SessionContext)" target="_blank">setSessionContext </a>method:</p>
<p><img src="http://blog.unidev.com/wp-content/uploads/2007/08/code.jpg" alt="SessionContext code" /></p>
<p>Once implemented the leak went away.  I never took the time to dig in and see what the true offender was, but it was found that some of the hibernate SingleTableEntityPersister objects were still present after leak.  This could mean that it is Spring not properly cleaning things up or Hibernate itself has the leak.</p>
<p>As info this method was already implemented with our stateless EJB&#8217;s, so I could not confirm if the issue existed for <a href="http://static.springframework.org/spring/docs/1.2.x/api/org/springframework/ejb/support/AbstractStatelessSessionBean.html" target="_blank">AbstractStatelessSessionBean</a>.  However since both abstract classes use the unloadBeanFactory method from <a href="http://static.springframework.org/spring/docs/1.2.x/api/org/springframework/ejb/support/AbstractSessionBean.html" target="_blank">AbstractSessionBean</a>, I would figure the issue would present itself &#8212; although due to Weblogic pooling the stateless EJB&#8217;s, it is probably not as noticable.</p>
<p>Specifics:</p>
<ul>
<li>Weblogic 8.1 sp4</li>
<li>JRockit 1.4.2_13</li>
<li>Spring 1.2.9</li>
<li>Hibernate 3.2.5</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.unidev.com/index.php/2007/08/31/spring-abstractenterprisebean-and-a-memory-leak/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

