<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-813677654870058871</atom:id><lastBuildDate>Sun, 20 May 2012 06:09:11 +0000</lastBuildDate><category>install</category><category>ruby</category><category>stacktrace</category><category>lessons</category><category>documentation</category><category>funny</category><category>mule</category><category>books</category><category>bug</category><category>javadoc</category><category>CORBA</category><category>maven</category><category>cxf</category><category>problem and solution</category><category>query</category><category>validation</category><category>data modeling</category><category>prime</category><category>jsr</category><category>configuration</category><category>jetty</category><category>spring</category><category>ORM</category><category>windows</category><category>eclipse</category><category>code</category><category>database</category><category>curses</category><category>xml</category><category>hibernate</category><category>basic</category><category>java</category><category>xsd</category><category>schema</category><category>java basics</category><category>NetBeans</category><category>old school</category><category>pet peeve</category><category>visual studio</category><category>appserver</category><category>many-to-many</category><category>output</category><category>IntelliJ</category><category>sql</category><category>errors</category><category>almost famous</category><category>remote desktop</category><category>version control</category><category>data</category><title>Brad's Brain Matters</title><description>Software Development, Programming - call it whatever you want, just do it.</description><link>http://think.bradsbrain.com/</link><managingEditor>noreply@blogger.com (Brad Parks)</managingEditor><generator>Blogger</generator><openSearch:totalResults>47</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-3182146932175608830</guid><pubDate>Thu, 12 Apr 2012 17:01:00 +0000</pubDate><atom:updated>2012-04-12T12:01:00.297-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>curses</category><category domain='http://www.blogger.com/atom/ns#'>lessons</category><category domain='http://www.blogger.com/atom/ns#'>output</category><category domain='http://www.blogger.com/atom/ns#'>old school</category><title>This Old Code Still Compiles</title><description>&lt;blockquote class="tr_bq"&gt;&lt;i&gt;Message to my younger self, in case you time travel and find this blog: &amp;nbsp;You won't realize it while you're working on that project, but you're learning life lessons about software development that are going to apply to dozens of future projects, so pay attention.&lt;/i&gt;&amp;nbsp;&lt;/blockquote&gt;Recently I found my almost-two-decade-old C code from the first "big" software project that I created (about 2000 lines of code in 20 files). It was the first "real" product I made that actually got used. Last night, after I installed the termcap and ncurses libraries on my Linux box, the code compiled with no source or Makefile changes (although there were a lot more compiler warnings than I remember!).&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Looking back there are at least two things I learned on that project back then that are timeless. &amp;nbsp;Of course I didn't know it then, but it was early training for real-world projects.&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;You'll often need to learn something &lt;b&gt;&lt;i&gt;totally &lt;/i&gt;&lt;/b&gt;new just to get the job done.&lt;/li&gt;&lt;li&gt;Users really like output. And they like it a certain way.&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt; &lt;/h3&gt;&lt;h3&gt; Background: the Timeclock Project&lt;/h3&gt;&lt;div&gt;&lt;a href="http://1.bp.blogspot.com/-WFuh6CWgXho/T4ZW8SzWE8I/AAAAAAAAFqY/h6BDBsJvJvQ/s1600/old_login_screen.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="246" src="http://1.bp.blogspot.com/-WFuh6CWgXho/T4ZW8SzWE8I/AAAAAAAAFqY/h6BDBsJvJvQ/s400/old_login_screen.png" width="400" /&gt;&lt;/a&gt;The project was a terminal-based timeclock program for the students who worked in the college computer labs. The 25 student T.A.'s who worked the lab would work varying length shifts and this program handled clocking in/out, saving the data, and it generated timesheets for the computer lab manager. It didn't have a ton of features, but I was pretty proud of it. &amp;nbsp;&lt;/div&gt;&lt;h3&gt; &lt;/h3&gt;&lt;h3&gt; Frequent Compilation&lt;/h3&gt;&lt;div&gt;I used a basic terminal editor (vi) to create it; thus there was no syntax highlighting and no red squiggly lines to point out syntax errors. My approach was to execute a '&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;make&lt;/span&gt;' from within vi after writing only&amp;nbsp;a few lines of code. Next time your fancy IDE lets you know about syntax or API mistakes, stop for a second and try to remember what it was like before these features.&lt;/div&gt;&lt;div&gt;&lt;h3&gt; &lt;/h3&gt;&lt;h3&gt; A Library For the UI&lt;/h3&gt;&lt;div&gt;Does anyone here remember &lt;a href="http://en.wikipedia.org/wiki/Curses_(programming_library)" target="_blank"&gt;curses&lt;/a&gt;? That C library made it possible to create a terminal program that performed basic text UI functions. Until this project I had only done basic print-to-screen and read interaction. So&amp;nbsp;just to make a decent interface I had to learn this library. Have I used this library since then? Not until tonight when I installed it on my Linux box to make this compile.&lt;/div&gt;&lt;/div&gt;&lt;h3&gt; &lt;/h3&gt;&lt;h3&gt; Specific Output&lt;/h3&gt;&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/-Srfwi5PZaJc/T4Ze3rFb_4I/AAAAAAAAFqg/WjhdB63qWs8/s1600/timesheet.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="226" src="http://3.bp.blogspot.com/-Srfwi5PZaJc/T4Ze3rFb_4I/AAAAAAAAFqg/WjhdB63qWs8/s320/timesheet.png" width="320" /&gt;&lt;/a&gt;Next, the college's business office had a specific process for handling student timesheets. &lt;i&gt;Paper&lt;/i&gt;&amp;nbsp;timesheets of course. The timesheet form they used had been copied and re-copied until it was a blurry but still mostly readable form. How was I going to make output look like that? Well, you may or may not believe this, but sometimes people produced output before PDF existed. We had laser printers - this wasn't the dark ages after all. So I went to Barnes &amp;amp; Noble and bought a book on how to create a&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/PostScript" target="_blank"&gt;PostScript&lt;/a&gt;&amp;nbsp;file and over the next two days I learned PostScript and make a form that looked just like the college business office's timesheet form. It was such a good-looking form that the business office started using that as the master copy. A couple years later when I was back on campus I noticed they were still using it, except by then it was a photocopy of a copy of a copy...&lt;/div&gt;&lt;div&gt;&lt;h3&gt; &lt;/h3&gt;&lt;h3&gt; A Couple Short Semesters of Use&lt;/h3&gt;&lt;div&gt;The timeclock software didn't last longer than a few short semesters and it never expanded to other departments beyond the computer lab TA's. There were a few requested changes to it along the way (user management, supervisor editing for tardy employees, etc). &amp;nbsp;I had high hopes for its continued use, but alas... I had graduated and they eventually stopped using it. &amp;nbsp;&lt;/div&gt;&lt;h3&gt; &lt;/h3&gt;&lt;h3&gt; Those Lessons I Mentioned Earlier&amp;nbsp;&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;1. Learn Something Totally New to Get the Job Done&lt;/b&gt;&lt;br /&gt;Every new project could necessitate a new technology or library that you've never tried before. (For example, I've been using Java for a long time and I've never used it to communicate to hardware through a USB port.) I'm &lt;b&gt;not&lt;/b&gt; saying you should go out of your way to try to use something new on every project; it will just happen more often than you might expect. Approach this carefully, analyze your options, and get some recommendations from others if it's a totally new technology for you.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. Users Like Output&lt;/b&gt;&lt;br /&gt;Like it or not your users often probably don't want to use your program. Your users want their output and your program is (hopefully) the most effective means for them to accomplish that goal. Depending on the software and the user-base, (specifically I'm talking about PDF or report-generating software), there are going to be times when the output looks perfect to you. Then a user will email you and want to know why a word is in the wrong spot or something doesn't line up just right. Listen to your users (and especially listen to your testing group). Take pride in making your output perfect. If you're lucky it will be&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-3182146932175608830?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2012/04/this-old-code-still-compiles.html</link><author>noreply@blogger.com (Brad Parks)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-WFuh6CWgXho/T4ZW8SzWE8I/AAAAAAAAFqY/h6BDBsJvJvQ/s72-c/old_login_screen.png' height='72' width='72'/><thr:total>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-6636946100767538811</guid><pubDate>Sun, 25 Mar 2012 18:51:00 +0000</pubDate><atom:updated>2012-03-25T13:53:17.128-05:00</atom:updated><title>Rooting an old Samsung Intercept</title><description>A friend gave me her old &lt;a href="http://en.wikipedia.org/wiki/Samsung_Intercept" target="_blank"&gt;Samsung Intercept&lt;/a&gt; though she didn't know why I'd want her "crappy old phone." &amp;nbsp;And I must say, with all the bloatware that Sprint has loaded up on this seriously underpowered phone, it was indeed a pretty crappy experience.&lt;br /&gt;&lt;br /&gt;From what I've read online, there were a lot of complaints about the Intercept, but I'd place most of the blame for its poor performance squarely on Sprint. &amp;nbsp;Before I started messing with it I should have taken an inventory of all the services that Sprint had running in the background. There were a &lt;i&gt;lot&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;Anyway, this was my first attempt rooting a phone and putting on a custom ROM. &amp;nbsp;I'm still new at this and I figured I should take a few notes before I forget everything I've done to it.&lt;br /&gt;&lt;br /&gt;Disclaimer: Blah, blah, blah, you might destroy your phone; don't blame me if you do.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-yA5mV9Dbrjo/T29paPurRSI/AAAAAAAAEvI/WysK-JgZMdA/s1600/IMG_20120322_222409.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-yA5mV9Dbrjo/T29paPurRSI/AAAAAAAAEvI/WysK-JgZMdA/s320/IMG_20120322_222409.jpg" width="240" /&gt;&lt;/a&gt;Overview:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Install custom "Recovery" tool &amp;nbsp;&lt;span style="color: #202020; font-family: Tahoma, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-size: 12px; line-height: 16px;"&gt;(&lt;span style="background-color: #efefef;"&gt;CM01 Custom Recovery&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Install custom ROM (essentially the OS the phone runs)&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;I think of the "Recovery" mode on a phone as akin to the BIOS on a PC. Depending on the phone, you hold down a few different buttons and press the power button to enter Recovery mode. &amp;nbsp;For the Intercept, hold the Volume-Down and Talk buttons when you power on (this usually takes me a few tries to get the timing right. If the progress bar goes past the Sprint logo at the bottom it didn't work). &amp;nbsp;The reason we need to replace the Recovery mode is that the one preinstalled on the phone does some kind of check before installing a ROM update to make sure it's "approved", i.e. that it comes from Sprint. &amp;nbsp;So we replace it with a better one, in this case CM01 Custom Recovery, which originated with the &lt;a href="http://cyanogenmod.com/" target="_blank"&gt;CyanogenMod&lt;/a&gt; folks.&lt;br /&gt;&lt;br /&gt;There is a wealth of information on the SDX-Developers forums. &amp;nbsp;The guide I used was one titled "&lt;a href="http://forum.sdx-developers.com/?topic=14066.0" target="_blank"&gt;[GUIDE] - Install CM01 Custom Recovery using SWUpgrade Tool&lt;/a&gt;." &amp;nbsp;The steps involved installing a program "SWUpgrade" onto a Windows PC and downloading a few other things. I'm not going to repeat it all here but be careful that you don't try to install the Samsung Moment's software on top of your Samsung Intercept. That won't be good for anyone. &amp;nbsp;There are other methods of getting root and then installing the CM01 Recovery, but that's what I used. &amp;nbsp;(&lt;a href="http://forum.sdx-developers.com/index.php?topic=18138.0" target="_blank"&gt;Another thread&lt;/a&gt; says you can just download an apk from somewhere and gain root that way. &amp;nbsp;I didn't try it.)&lt;br /&gt;&lt;br /&gt;So anyway, that gets the CM01 Custom Recovery installed, and from there I was able to install and try a few different ROM's, with varying degrees of success. &amp;nbsp;(Note: if you see references to DL05 or EC07, that's apparently two different kinds of Intercept: DL05=Sprint, while EC07=VirginMobile). &amp;nbsp;I just copied the appropriate zip file to the SD Card in the phone, selected it from the Recovery menu, and installed. (Sometimes doing a wipe beforehand to make sure the phone is fresh).&lt;br /&gt;&lt;br /&gt;ROMs I've tried so far&lt;br /&gt;(mostly found from another SDK Developers thread on &lt;a href="http://forum.sdx-developers.com/?topic=11181.60" target="_blank"&gt;ROMs for the Intercept&lt;/a&gt;):&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;inxane0381intercept - this didn't work for me at all; &amp;nbsp;the screen was dark and the phone just sat there and buzzed/vibrated in a dot, dit-dit-dit pattern. Kinda scary and thought I'd bricked the phone, but fortunately got back to the beginning.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;a href="http://dl.dropbox.com/u/26610619/StockCrackDL051.2.zip" target="_blank"&gt;Stock ROM on Crack for DL05&lt;/a&gt;&amp;nbsp;- works great. phone is way more responsive now&lt;/li&gt;&lt;li&gt;&lt;a href="http://forum.sdx-developers.com/index.php?topic=18454.0" target="_blank"&gt;Ice Cream Froyo&lt;/a&gt; - looks like ICS but still Froyo, partially didn't work for me.&lt;/li&gt;&lt;li&gt;Back to the original &lt;a href="http://forum.sdx-developers.com/?topic=19599.0" target="_blank"&gt;FB01 Stock ROM&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.rdhgaming.com/index.php?action=downloads;cat=4" target="_blank"&gt;Ubuntdroid 6.0 DL05&lt;/a&gt; - which worked okay and had neat graphics but didn't seem&amp;nbsp;particularly&amp;nbsp;fast and apparently has nothing to do with Ubuntu, they just like the name and logo.&lt;/li&gt;&lt;li&gt;Another thread says there's a working &lt;a href="http://forum.sdx-developers.com/?topic=17021.555" target="_blank"&gt;ROM of CM6 for Intercept&lt;/a&gt;&amp;nbsp;available on &lt;a href="http://search.4shared.com/postDownload/06qULGc6/cm6_interceptb12.html" target="_blank"&gt;4shared&lt;/a&gt;&amp;nbsp;- I'm trying this one now, my fallback will be to use the Stock ROM on Crack since that seems to be the best thus far.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Summary: &amp;nbsp;While this was fun and all, I really don't feel like I did anything special or creative -- I just followed some existing guides, following work done by those who came before me. &amp;nbsp; I think a better challenge would be to build Android from source and see how that goes.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-6636946100767538811?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2012/03/my-adventure-in-rooting-old-samsung.html</link><author>noreply@blogger.com (Brad Parks)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-yA5mV9Dbrjo/T29paPurRSI/AAAAAAAAEvI/WysK-JgZMdA/s72-c/IMG_20120322_222409.jpg' height='72' width='72'/><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-6773047922706064659</guid><pubDate>Mon, 06 Feb 2012 03:08:00 +0000</pubDate><atom:updated>2012-02-05T23:16:05.457-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>java</category><category domain='http://www.blogger.com/atom/ns#'>CORBA</category><category domain='http://www.blogger.com/atom/ns#'>code</category><category domain='http://www.blogger.com/atom/ns#'>stacktrace</category><title>You're Not the First to Have This Problem</title><description>This is going to sound like the &lt;a href="http://c2.com/cgi/wiki?CompilerBug" target="_blank"&gt;"compiler bug" problem&lt;/a&gt;, but this time it was something very similar. Yes, there are probably some bugs in the JDK. The likelihood of there being a bug in any software increases along with the size of the codebase. (Unsubstantiated claim, but I provide no footnotes with this blog.)&lt;br /&gt;&lt;br /&gt;Anyway, when you hit a problem keep in mind that you're never the only person to have encountered this problem. Somebody else has seen it and probably been in a more desperate situation to need a solution.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Every once in a while I'd see some odd stuff going on where a bunch of threads seemed to get stuck. Those threads interacted via a &lt;a href="http://en.wikipedia.org/wiki/Corba" target="_blank"&gt;CORBA &lt;/a&gt;interface, so I just chalked it up to some CORBA-wackiness and thought I'd try to code a way to kill off those threads when they got stuck waiting for CORBA to finish.&lt;br /&gt;&lt;br /&gt;Sidenote: &amp;nbsp;CORBA came from the &lt;a href="http://en.wikipedia.org/wiki/Object_Management_Group" target="_blank"&gt;OMG&lt;/a&gt;, which has the most ironically appropriate acronym ever invented, because "it's like, OMG, could there be anything better than a consortium named OMG!?" &amp;nbsp; By the way, do &lt;i&gt;not&lt;/i&gt;&amp;nbsp;click&amp;nbsp;over to the talk page on Wikipedia entry for OMG if you're in a quiet professional environment -- I started laughing so much my wife thought there was something wrong with me.&lt;br /&gt;&lt;br /&gt;So anyway, I got a recent thread dump (not a stacktrace, since those threads didn't throw any exceptions, they were just waiting) and decided to look around a bit for the answer. Here's a sample of one of the stuck CORBA threads:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="background-color: rgba(255, 255, 255, 0.917969); color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 8pt;"&gt;"pool-538-thread-1" - Thread t@67441&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background-color: rgba(255, 255, 255, 0.917969); color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; java.lang.Thread.State: WAITING&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background-color: rgba(255, 255, 255, 0.917969); color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.lang.Object.wait(Native Method)&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background-color: rgba(255, 255, 255, 0.917969); color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - waiting on &amp;lt;5dfd006a&amp;gt; (a java.lang.Object)&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background-color: rgba(255, 255, 255, 0.917969); color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.lang.Object.wait(Object.&lt;wbr&gt;&lt;/wbr&gt;java:485)&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background-color: rgba(255, 255, 255, 0.917969); color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.sun.corba.se.impl.&lt;wbr&gt;&lt;/wbr&gt;transport.&lt;wbr&gt;&lt;/wbr&gt;CorbaResponseWaitingRoomImpl.&lt;wbr&gt;&lt;/wbr&gt;waitForResponse(&lt;wbr&gt;&lt;/wbr&gt;CorbaResponseWaitingRoomImpl.&lt;wbr&gt;&lt;/wbr&gt;java:140)&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background-color: rgba(255, 255, 255, 0.917969); color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.sun.corba.se.impl.&lt;wbr&gt;&lt;/wbr&gt;transport.&lt;wbr&gt;&lt;/wbr&gt;SocketOrChannelConnectionImpl.&lt;wbr&gt;&lt;/wbr&gt;waitForResponse(&lt;wbr&gt;&lt;/wbr&gt;SocketOrChannelConnectionImpl.&lt;wbr&gt;&lt;/wbr&gt;java:1084)&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background-color: rgba(255, 255, 255, 0.917969); color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.sun.corba.se.impl.&lt;wbr&gt;&lt;/wbr&gt;protocol.&lt;wbr&gt;&lt;/wbr&gt;CorbaMessageMediatorImpl.&lt;wbr&gt;&lt;/wbr&gt;waitForResponse(&lt;wbr&gt;&lt;/wbr&gt;CorbaMessageMediatorImpl.java:&lt;wbr&gt;&lt;/wbr&gt;253)&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background-color: rgba(255, 255, 255, 0.917969); color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.sun.corba.se.impl.&lt;wbr&gt;&lt;/wbr&gt;protocol.&lt;wbr&gt;&lt;/wbr&gt;CorbaClientRequestDispatcherIm&lt;wbr&gt;&lt;/wbr&gt;pl.marshalingComplete1(&lt;wbr&gt;&lt;/wbr&gt;CorbaClientRequestDispatcherIm&lt;wbr&gt;&lt;/wbr&gt;pl.java:362)&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background-color: rgba(255, 255, 255, 0.917969); color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.sun.corba.se.impl.&lt;wbr&gt;&lt;/wbr&gt;protocol.&lt;wbr&gt;&lt;/wbr&gt;CorbaClientRequestDispatcherIm&lt;wbr&gt;&lt;/wbr&gt;pl.marshalingComplete(&lt;wbr&gt;&lt;/wbr&gt;CorbaClientRequestDispatcherIm&lt;wbr&gt;&lt;/wbr&gt;pl.java:336)&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background-color: rgba(255, 255, 255, 0.917969); color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.sun.corba.se.impl.&lt;wbr&gt;&lt;/wbr&gt;protocol.&lt;wbr&gt;&lt;/wbr&gt;CorbaClientDelegateImpl.&lt;wbr&gt;&lt;/wbr&gt;invoke(&lt;wbr&gt;&lt;/wbr&gt;CorbaClientDelegateImpl.java:&lt;wbr&gt;&lt;/wbr&gt;129)&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background-color: rgba(255, 255, 255, 0.917969); color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.sun.corba.se.impl.corba.&lt;wbr&gt;&lt;/wbr&gt;RequestImpl.doInvocation(&lt;wbr&gt;&lt;/wbr&gt;RequestImpl.java:309)&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background-color: rgba(255, 255, 255, 0.917969); color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.sun.corba.se.impl.corba.&lt;wbr&gt;&lt;/wbr&gt;RequestImpl.invoke(&lt;wbr&gt;&lt;/wbr&gt;RequestImpl.java:230)&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background-color: rgba(255, 255, 255, 0.917969); color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - locked &amp;lt;6dae8354&amp;gt; (a com.sun.corba.se.impl.corba.&lt;wbr&gt;&lt;/wbr&gt;RequestImpl)&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="background-color: rgba(255, 255, 255, 0.917969); color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;span style="font-family: 'Courier New'; font-size: 8pt;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [etc., etc...]&lt;/span&gt;&lt;/div&gt;&lt;br class="Apple-interchange-newline" /&gt;&lt;br /&gt;I stumbled around the Interwebs for a bit and happened upon the inevitable similar stack traces and mentions in a &lt;a href="https://forums.oracle.com/forums/thread.jspa?threadID=2166153" target="_blank"&gt;forum &lt;/a&gt;or &lt;a href="https://forums.oracle.com/forums/thread.jspa?threadID=756105" target="_blank"&gt;two&lt;/a&gt;&amp;nbsp;or &lt;a href="https://forums.oracle.com/forums/thread.jspa?threadID=1176314" target="_blank"&gt;three&lt;/a&gt;, but none of them had the answer. Then I expanded my search a bit and &amp;nbsp;found an existing item (&lt;a href="http://bugs.sun.com/view_bug.do?bug_id=7016182" target="_blank"&gt;7016182&lt;/a&gt;) in the Java bug database... submitted about a year ago and a status of "Cause Known" but now what? &amp;nbsp;So I searched on the related bug ID numbers and found yet more info in number &lt;a href="http://bugs.sun.com/view_bug.do?bug_id=7046238" target="_blank"&gt;7046238&lt;/a&gt;&lt;span id="goog_325354892"&gt;&lt;/span&gt;&lt;span id="goog_325354893"&gt;&lt;/span&gt;&lt;a href="http://www.blogger.com/"&gt;&lt;/a&gt;. Yay! &amp;nbsp;Finally an answer! &amp;nbsp;It says it's been fixed in JDK release 6u27 which I'm pretty sure is 1 update newer than what we were running.&lt;br /&gt;&lt;br /&gt;That's good news, but it still needs to get tested. In the meantime, I compared the source of the affected JDK class &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;CorbaClientRequestDispatcherImpl&lt;/span&gt;&amp;nbsp;with the the fixed version. Yep, just as the bugfix note said, the fix is a change to how the synchronization is handled and it makes me glad I didn't have to try to figure out how to fix it. In a way it's comforting to know that even the experts sometimes make mistakes.&lt;br /&gt;&lt;br /&gt;Anyway, that was my adventure this weekend. What did you do?&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-6773047922706064659?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2012/02/youre-not-first-to-have-this-problem.html</link><author>noreply@blogger.com (Brad Parks)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-6419115051716651201</guid><pubDate>Thu, 02 Feb 2012 09:17:00 +0000</pubDate><atom:updated>2012-02-02T03:17:00.213-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>data modeling</category><category domain='http://www.blogger.com/atom/ns#'>database</category><category domain='http://www.blogger.com/atom/ns#'>ORM</category><category domain='http://www.blogger.com/atom/ns#'>many-to-many</category><title>Modeling Intangible Many-to-Many Relationships</title><description>Modeling intangible things in a data model takes practice. &amp;nbsp;Here's an example I've used and choices made along the way.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Visible and Real&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Set aside the database "join table" for a moment and consider how you represent your primary entities in code. &amp;nbsp;Sometimes it's easy to see how the concepts should map to database tables and Java classes -- especially when the concepts are relatively visible in the real world. &lt;br /&gt;&lt;br /&gt;Let's take, for example, my favorite model: &amp;nbsp;Creature - Skill - Achievement.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-Lr2QLEehEtM/TyoQjSAXm4I/AAAAAAAAEaI/7IlF5ulahTs/s1600/CreatureSkillAchievement.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-Lr2QLEehEtM/TyoQjSAXm4I/AAAAAAAAEaI/7IlF5ulahTs/s1600/CreatureSkillAchievement.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;Creature is obviously a visible "thing" that exists in the real world. &amp;nbsp;Skill and Achievement aren't quite as visible except in a temporal sense, but at least while you're watching a Creature swim (or whatever other activity), you can see that it's happening with some level of skill. &amp;nbsp;An achievement like "first place" or "swam 10 laps" may be represented by an award of some kind but there the visible thing is just a reminder of an achievement, it's not &lt;i&gt;actually&lt;/i&gt;&amp;nbsp;the achievement itself, but somebody saw it happen so at least for a moment it was real. &amp;nbsp;So really this one isn't so hard to wrap our minds around. &amp;nbsp;We can have Java classes with a 1-to-1 correlation with the database tables and it all pretty much makes sense.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Invisible Things&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But when entities represent something intangible the mapping isn't as clear. &amp;nbsp;A few years back this situation cropped up in a development effort where I was a (pseudo) dev lead. &amp;nbsp;Our application was going to deal with People and Decisions. &amp;nbsp;In this instance a "Decision" could be something like a "Decision to&amp;nbsp;Exercise&amp;nbsp;Regularly." &amp;nbsp;Each Person could have many Decisions. &amp;nbsp;Each Decision could be made by several People. &amp;nbsp;Thus, a many-to-many relationship. &amp;nbsp;So how do we model this? &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-EMUGaefJ-nw/TyocNguk3DI/AAAAAAAAEaY/mGjtZr11QJE/s1600/ManyToMany.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="104" src="http://1.bp.blogspot.com/-EMUGaefJ-nw/TyocNguk3DI/AAAAAAAAEaY/mGjtZr11QJE/s320/ManyToMany.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;or translated into something nearly equivalent...&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-6j9uylNyNoI/TyoYFi4ZwZI/AAAAAAAAEaQ/wQGNMly_QOU/s1600/PersonDecision.jpg" imageanchor="1"&gt;&lt;img border="0" height="166" src="http://1.bp.blogspot.com/-6j9uylNyNoI/TyoYFi4ZwZI/AAAAAAAAEaQ/wQGNMly_QOU/s640/PersonDecision.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;The database folks already had the tables set up as &amp;nbsp;Person, Decision, and PersonDecision which followed their standard naming conventions. &amp;nbsp;And, at least with a traditional database, this is how a many-to-many relationship is created.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Option 1.&lt;/i&gt;&lt;br /&gt;Should we stick with a 1-to-1 mapping from database table to Java class? &amp;nbsp;In that case a &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;Person&lt;/b&gt;&lt;/span&gt; object would have a collection of &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;PersonDecision&lt;/b&gt;&lt;/span&gt; objects and some field there in the PersonDecision class would show what kind of &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;Decision&lt;/b&gt;&lt;/span&gt; was made by the Person. &amp;nbsp;This option has the benefits of being a simpler implementation for mapping.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Option 2.&lt;/i&gt;&lt;br /&gt;However, it could be argued that each&amp;nbsp;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;Person&lt;/b&gt;&lt;/span&gt; object should directly have a collection of &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;Decision&lt;/b&gt;&lt;/span&gt; objects, with any necessary metadata from the database's PersonDecision table as fields in the Decision class. &amp;nbsp;This option has more object-oriented beauty about it and avoids the awkward PersonDecision name.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Consider the Usages (and the kittens)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We could have talked about it for days but there was a lot of work ahead of us so I went with my gut and chose for us to go with the first option (though there was some further discussion expressing respectful disagreement). &amp;nbsp;The major factor for me is that there was additional data attached to both Decision and PersonDecision (such as EventDate). &amp;nbsp;Also, there were some usages within the application that involved only Decision and not Person or PersonDecision. &amp;nbsp;So even if we had merged the data from the two tables into one class, it would still&amp;nbsp;have required a &lt;i&gt;Template&lt;/i&gt; Decision &amp;nbsp;class representing an archetype of a Decision separate from a Person. &amp;nbsp;Thus we would have still needed an additional class, just perhaps with a different name, putting us back into situation we started with plus some additional complexity.&lt;br /&gt;&lt;br /&gt;Who really knows whether or not my choice was the correct one. &amp;nbsp;It's the one we went with on that project and it didn't feel like we had to jump through a lot of hoops to make things work. &amp;nbsp;Revisiting it, maybe it would be nice to implement it both ways to compare the merits of each option more closely. &amp;nbsp;But that's a topic for a different post.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-6419115051716651201?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2012/02/modeling-intangible-many-to-many.html</link><author>noreply@blogger.com (Brad Parks)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-Lr2QLEehEtM/TyoQjSAXm4I/AAAAAAAAEaI/7IlF5ulahTs/s72-c/CreatureSkillAchievement.jpg' height='72' width='72'/><thr:total>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-4523040888774492651</guid><pubDate>Sat, 24 Sep 2011 02:05:00 +0000</pubDate><atom:updated>2011-09-23T21:05:08.678-05:00</atom:updated><title>Build Your Own Facebook - Part 1</title><description>Here's a billion mythical dollars -&amp;nbsp;let's design the next popular mobile/social application. &amp;nbsp;I don't know how long this series (!) of posts will last but I'll at least start with this one. &amp;nbsp;We're not actually going to build a Facebook, but maybe we'll design some of a similar application, and see how big a problem can get just starting from a &lt;a href="http://www.youtube.com/watch?v=bDfToqHpWnM&amp;amp;feature=player_detailpage#t=52s"&gt;small acorn&lt;/a&gt; of an idea.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;The huge question&lt;/span&gt;&lt;br /&gt;A while ago I saw a question on &lt;a href="http://stackoverflow.com/"&gt;Stack Overflow&lt;/a&gt; about building a "basic social application." &amp;nbsp;I'm summarizing a lot, but essentially the original poster had spent some months (or more) learning programming and has an idea for a mobile+social application and wants to know "what next?" &amp;nbsp; Original question here if you want to read it: &lt;a href="http://stackoverflow.com/questions/7339507"&gt;How to Create a Basic Android Social Service&lt;/a&gt;. &amp;nbsp;The question got closed, probably for a variety of reasons, but mainly because it's a &lt;b&gt;huge&lt;/b&gt; spectrum of a topic and the answer would not be well-suited for the Stack Overflow format. &amp;nbsp;I don't know the original poster, but I'm going to assume based on some of his or her statements that the poster is somewhere in the novice category. So a bunch of this article is going to remain high level.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;So let's start&lt;/span&gt;&lt;br /&gt;What is the application going to do? &amp;nbsp;(I'll reread&amp;nbsp;&lt;a href="http://stackoverflow.com/questions/7339507"&gt;the question&lt;/a&gt;&amp;nbsp;again...)&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;user signup and login (personalization!)&lt;/li&gt;&lt;li&gt;user profile (so we can get to know them just like FB)&lt;/li&gt;&lt;li&gt;make posts (what did &lt;i&gt;you&lt;/i&gt;&amp;nbsp;have for breakfast?)&lt;/li&gt;&lt;li&gt;view posts (everything is public for now)&lt;/li&gt;&lt;li&gt;&lt;strike&gt;special sauce&lt;/strike&gt; (we'll come up with this later)&lt;/li&gt;&lt;li&gt;use "standard practices"&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;This list by itself is the basics. This list is also potentially huge. Where do we even begin? &amp;nbsp;Just based on this list we know a few things. &amp;nbsp;It's going to be some kind of &lt;b&gt;client-server&lt;/b&gt; application. &amp;nbsp;Although it might be fun to come up with a peer-to-peer social-network application... that might get kind of weird and non-traditional. &amp;nbsp;So before we get too far, we need to pick a client and a server. &amp;nbsp;I know you might not care about that and just want to start building the application, but we're building this mythical company from the ground up and somebody needs to decide.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Client platform&lt;/span&gt;&lt;br /&gt;Android. That's what the question was tagged as so that's what we'll use. &amp;nbsp;We could just make this a web application that renders superbly on mobile, but true client applications still (as of this writing) seem to have a quicker, more natural response.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Server platform&lt;/span&gt;&lt;br /&gt;This could be anything really but we have to narrow it down somehow. &amp;nbsp;Since I'm most familiar with Java, we'll stick with that (yes, .Net is a great platform, but we have to narrow the field somehow). &amp;nbsp;Even after we've selected Java there are still several choice we have to make as we'll soon see. &amp;nbsp;First,&amp;nbsp;are we going the "traditional" Java EE route using the Java language or when I said "Java" above did you read that as "anything-that-runs-on-the-Java-JVM"? &amp;nbsp;If the latter, then there are even more choices of language: Groovy/Grails, JRuby, Scala, etc. &amp;nbsp;For now let's stick with standard JavaEE.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Hosting&lt;/span&gt;&lt;br /&gt;Are we going to host this on our own servers (either in-house or remote)? &amp;nbsp;If not, we can host this in the cloud on&amp;nbsp;&amp;nbsp;&lt;a href="http://code.google.com/appengine/"&gt;Google App Engine&lt;/a&gt;,&amp;nbsp;&lt;a href="http://aws.amazon.com/ec2/"&gt;Amazon EC2&lt;/a&gt;, &lt;a href="http://www.vmware.com/products/vcloud/overview.html"&gt;VMware vCloud&lt;/a&gt;, &lt;a href="http://www.rackspace.com/cloud/"&gt;Rackspace Cloud&lt;/a&gt;, &lt;a href="http://www.redhat.com/solutions/cloud/"&gt;Red Hat Cloud&lt;/a&gt;, or probably a dozen others. Most of the choices here will be compatible enough with how we're going to build this application that it &lt;i&gt;almost&lt;/i&gt;&amp;nbsp;doesn't matter. Note: Google App Engine is going to be the most different from the rest listed above, but for argument's sake we'll design our application such that it will work &lt;i&gt;almost&lt;/i&gt; the same there. &amp;nbsp;There will no doubt be some economic impact, but we have a lot of mythical dollars so we'll ignore cost. &amp;nbsp;For now let's just say we'll use some generic cloud provider simply because I don't want to buy the hardware myself.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Application Server&lt;/span&gt;&lt;br /&gt;What Java EE application server are we going to use? &amp;nbsp;I know you probably have your favorite, and for very good reasons. I have a favorite also. Just pick one out of the following list (they're listed in alphabetical order to avoid personal bias): &lt;a href="http://geronimo.apache.org/"&gt;Geronimo&lt;/a&gt;, &lt;a href="http://glassfish.java.net/"&gt;GlassFish&lt;/a&gt;, &lt;a href="http://www.jboss.org/jbossas"&gt;JBoss&lt;/a&gt;, &lt;a href="http://jetty.codehaus.org/jetty/"&gt;Jetty&lt;/a&gt;, &lt;a href="http://tomcat.apache.org/"&gt;Tomcat&lt;/a&gt;, &lt;a href="http://www.ibm.com/software/websphere/"&gt;WebSphere&lt;/a&gt;, probably a bunch of others, too. &amp;nbsp;There are a lot of choices here but just like the hosting, it &lt;i&gt;almost&lt;/i&gt;&amp;nbsp;doesn't matter. &amp;nbsp;Sure, one of them is going to perform better than another one, but if we write our application correctly we won't be tied to any particular app server (maybe just one or two config files different.) &amp;nbsp;Another note: if you picked &lt;a href="http://code.google.com/appengine/"&gt;Google App Engine&lt;/a&gt; from the previous paragraph, you don't need to select which Java EE app server.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Database&lt;/span&gt;&lt;br /&gt;What database are we going to use? &amp;nbsp;The original poster tagged the question with "mysqlite" but may have conflated SQLite (for Android) and mysql into one. &amp;nbsp;For on-device storage for the Android client portion of our app, we'll of course use SQLite, but on the server we could use anything. &amp;nbsp;MySQL, Oracle, SQLServer, Postgress, DB2, HSQLDB, CouchDB, MongoDB, Amazon SimpleDB, etc. &amp;nbsp;Seriously the list is too huge and there are a lot I'm leaving out unintentionally, except for Sybase which I'm leaving out &lt;i&gt;intentionally&lt;/i&gt;, but don't ask me why, it's personal. &amp;nbsp;A big choice here is whether to use a "traditional" relational database, or a non-relational one.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;What's next?&lt;/span&gt;&lt;br /&gt;&lt;div&gt;We've barely scratched the surface and haven't actually designed the application yet! &amp;nbsp;Where do you want to go in the next installment? &amp;nbsp;Probably the server side. &amp;nbsp;Stay tuned. &amp;nbsp;Also, please leave comments if you have suggestions on things I left out or other topics I should cover.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;See Also&lt;/span&gt;&lt;br /&gt;For additional reading: &lt;a href="http://norvig.com/21-days.html"&gt;Teach Yourself Programming in Ten Years&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-4523040888774492651?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2011/09/build-your-own-facebook-part-1.html</link><author>noreply@blogger.com (Brad Parks)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-1320007260585886338</guid><pubDate>Thu, 04 Aug 2011 03:39:00 +0000</pubDate><atom:updated>2011-08-03T22:46:52.078-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>java</category><category domain='http://www.blogger.com/atom/ns#'>almost famous</category><title>Immortalized in the Commit Logs</title><description>My name is now logged forever in the commit comments of &lt;a href="http://www.jruby.org/" target="blank"&gt;a pretty Awesome Project&lt;/a&gt;!  &lt;br /&gt;&lt;br /&gt;Have a look at the &lt;a href="https://github.com/jruby/jruby/commit/a4dcfabe38998daa648d17c1f4a41f98826b6185" target="blank"&gt;commit log&lt;/a&gt; for yourself (look for my name next to "NPE").&lt;br /&gt;&lt;br /&gt;Here's how it happened: One quiet evening in June I was looking at some code diffs of that Awesome Project (don't ask why) and saw something that didn't look quite right. Keep in mind all I was viewing was the diff so I didn't see the full context of the code.  Here's the snippet I noticed:&lt;br /&gt;&lt;pre class="brush: java;"&gt;if (varTable == null) {&lt;br /&gt;    if (DEBUG) System.out.println("resizing from " + varTable.length + " to " +  getMetaClass(). getRealClass(). getVariableTableSizeWithObjectId());&lt;br /&gt;    // lots more code...&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;Do you see the &lt;tt&gt;NullPointerException&lt;/tt&gt;? The code just checked if &lt;tt&gt;varTable&lt;/tt&gt; was null, then proceeds to dereference it. That just can't be right. I double-checked it and then finally looked at the &lt;a href="https://github.com/jruby/jruby/blob/d0e0a88b2d4c5976c7921d8d67d6c7d6f90fb462/src/org/jruby/RubyBasicObject.java" target="blank"&gt;whole file&lt;/a&gt;.  Then I saw it, the &lt;b&gt;&lt;tt&gt;DEBUG&lt;/tt&gt;&lt;/b&gt; flag is set to false way up at the top of the file. That's why the lurking NPE never causes a problem.  So what's your opinion? Is it a real bug?  The code will never get executed so it's not really a problem.  Is a &lt;tt&gt;NullPointerException&lt;/tt&gt; still a bug if it's located in a block of unreachable code?&lt;br /&gt;&lt;br /&gt;In any case, I thought I should at least alert &lt;a href="http://twitter.com/headius" target="blank"&gt;@Headius&lt;/a&gt;, the guy who wrote it.  The fix went in the next commit and he put my name in the comments!  If I ever see @Headius speak at a conference I'll see if he'll autograph the commit log.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-1320007260585886338?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2011/08/immortalized-in-commit-logs.html</link><author>noreply@blogger.com (Brad Parks)</author><thr:total>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-6149269712841851458</guid><pubDate>Tue, 29 Mar 2011 02:06:00 +0000</pubDate><atom:updated>2011-03-28T21:09:53.198-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>java</category><category domain='http://www.blogger.com/atom/ns#'>prime</category><title>a reasonable implementation of prime number checking</title><description>Once again prime numbers on my mind, but this time I won't &lt;a href="http://think.bradsbrain.com/2011/01/time-to-reminisce-computing-prime.html"&gt;write the program in BASIC&lt;/a&gt; like I did 20+ years ago...&lt;br /&gt;&lt;br /&gt;So here we go, a quick implementation in Java, and yes, I'm assuming non-negative input:&lt;br /&gt;&lt;pre class="brush: java;"&gt;public static boolean isPrime(int n) {&lt;br /&gt;    if (n==0 || n==1) return false;  // careful!&lt;br /&gt;    for (int i=2; i&lt;(n/2)+1; i++) {&lt;br /&gt;        if (n % i == 0)&lt;br /&gt;            return false;&lt;br /&gt;    }&lt;br /&gt;    return true;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;Originally I ran the for loop all the way up to n, but half-n will suffice.  There's another efficiency improvement that can be made to the algorithm, I didn't have it in my head until reading it on &lt;a href="http://stackoverflow.com/questions/1538644/c-determine-if-a-number-is-prime"&gt;StackOverflow&lt;/a&gt;.  Also there's some interesting reading material on &lt;a href="http://mathworld.wolfram.com/PrimeNumber.html"&gt;Wolfram MathWorld&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-6149269712841851458?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2011/03/reasonable-implementation-of-prime.html</link><author>noreply@blogger.com (Brad Parks)</author><thr:total>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-2687169199541288951</guid><pubDate>Sat, 12 Mar 2011 22:01:00 +0000</pubDate><atom:updated>2011-03-12T16:02:02.589-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>books</category><title>Reading for Inspiration and Motivation</title><description>I just finished the book &lt;i&gt;&lt;a href="http://www.amazon.com/gp/product/0307463745/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=brasbra-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0307463745"&gt;Rework&lt;/a&gt;&lt;/i&gt; by Jason Fried and David Heinemeier Hansson (see also 37signals).  It's really inspirational. One of my favorite parts of the book is from page 38.&lt;br /&gt;&lt;blockquote&gt;"What you &lt;i&gt;do&lt;/i&gt; is what matters, not what you think or say or plan."&lt;/blockquote&gt;This is the year to release whatever you're working on in your spare time. Even if it's small.  Even if you're not sure anyone will use it. Release it. Get it out there now.&lt;br /&gt;&lt;br /&gt;Also on the same page&lt;br /&gt;&lt;blockquote&gt;"The original pitch idea is such a small part of a business that it's almost negligible."&lt;/blockquote&gt;That sentence seems even more relevant if you've seen &lt;i&gt;&lt;a href="http://www.imdb.com/title/tt1285016/"&gt;The Social Network&lt;/a&gt;&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;The book isn't very long. I'm sure there will be some parts of &lt;i&gt;Rework&lt;/i&gt; that will hit home for you. When I read this book again next year there will probably be some different parts that speak to me.&lt;br /&gt;&lt;br /&gt;What book(s) have you read recently that inspired or motivated you?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-2687169199541288951?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2011/03/reading-for-inspiration.html</link><author>noreply@blogger.com (Brad Parks)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-7390629986190733322</guid><pubDate>Thu, 24 Feb 2011 02:00:00 +0000</pubDate><atom:updated>2011-02-23T20:01:46.817-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>java</category><category domain='http://www.blogger.com/atom/ns#'>javadoc</category><category domain='http://www.blogger.com/atom/ns#'>code</category><title>Using Javadoc to stay healthy</title><description>Do you Javadoc ™ ?  IDEs make it easy enough to create skeletal Javadoc comments in your code, so you probably (hopefully) have at least some Javadoc documentation.  But when was the last time you actually ran the javadoc tool on your code to look at what it creates? It's been a while since I've run it on the codebase at work so I thought I'd give it a try. In doing so I found a couple nice gems.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Javadoc Gem #1 - Finding Stale Code&lt;/b&gt;&lt;br /&gt;I found some stale code thanks to the &lt;tt&gt;{@inheritDoc}&lt;/tt&gt; tag.  The output from running javadoc alerted me to the fact that a few implementation classes had the &lt;tt&gt;{@inheritDoc}&lt;/tt&gt; tag but didn't have a corresponding method in their parent (either interface or abstract class.)  Since we (almost) never go straight to the implementation class, a quick search through the code found that those methods weren't being used anywhere except in a JUnit test. (So even though we aren't actually using the code at least it's well tested!) &lt;br /&gt;&lt;pre&gt;BlahBlahBlahImpl.java:41: warning - @inheritDoc used but &lt;br /&gt;staleMethod() does not override or implement any method.&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Javadoc Gem #2 - Nonstandard Copyright&lt;/b&gt;&lt;br /&gt;I learned that the &lt;tt&gt;@copyright&lt;/tt&gt; really isn't a valid javadoc tag. Yes, I actually looked it up in the &lt;a href="http://download.oracle.com/javase/1.5.0/docs/guide/javadoc/index.html"&gt;javadoc reference&lt;/a&gt; and it's just not there. I don't remember who the first person on the team was that started the trend of using that, but apparently it's not right.  Another quick search of the code showed that we used it 343 times. Hmm, should I just do a global search and replace? Better yet, maybe we can just redefine reality. There's a way to &lt;a href="http://download.oracle.com/javase/1.5.0/docs/tooldocs/solaris/javadoc.html#tag"&gt;declare a custom javadoc tag&lt;/a&gt; and was easy enough to &lt;a href="http://maven.apache.org/plugins/maven-javadoc-plugin/examples/tag-configuration.html"&gt;declare the custom javadoc tag in the maven config&lt;/a&gt; too.&lt;br /&gt;&lt;pre&gt;BlahBlahBlah.java:11: warning - @copyright is an unknown tag.&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Lessons Learned&lt;/b&gt;&lt;br /&gt;I'm not one to shy away from stating the obvious, so I'll list out some lessons learned from this experience:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Tools are more useful when they're used more than once every 3 years. Yeah, it's probably been that long since I generated and looked at javadoc.&lt;/li&gt;&lt;li&gt;Comment the code as I go. It would be kinda painful to go back now and figure out what all these uncommented methods are doing. Sure, I can probably guess what a method does from the name, but it would be nicer to have some context to go along with it. Apparently at one point we found this to be useful: &lt;tt&gt;Set&amp;lt;Long&amp;gt;&amp;nbsp;toLongSet(Collection&amp;lt;? extends Number&amp;gt; numbers)&lt;/tt&gt;&lt;/li&gt;&lt;li&gt;Find a better way to detect unused code. I'm sure there's some tool out there for this. Got any ideas?&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-7390629986190733322?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2011/02/using-javadoc-to-stay-healthy.html</link><author>noreply@blogger.com (Brad Parks)</author><thr:total>4</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-8442300312070800537</guid><pubDate>Wed, 26 Jan 2011 04:25:00 +0000</pubDate><atom:updated>2011-01-25T22:25:06.805-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>java</category><category domain='http://www.blogger.com/atom/ns#'>jsr</category><title>Java 7 Features, the Future can't come soon enough.</title><description>If you're like me, perhaps you wish the future was here already. A flying car would be nice and all, but I'll settle for the next version of Java.&lt;br /&gt;&lt;br /&gt;For anyone who hasn't seen it yet, here's the planned &lt;a href="http://openjdk.java.net/projects/jdk7/features/"&gt;list of Java 7 features&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;The official &lt;a href="http://jcp.org/en/jsr/detail?id=336#2"&gt;JSR #336&lt;/a&gt; for Java 7 is worth a read, though it's easy to get distracted by the Fork/Join Framework and veer off to read more about that.  And since we're on the topic, if you've never heard about &lt;a href="http://www.ibm.com/developerworks/java/library/j-jtp03048.html"&gt;Parallel Arrays&lt;/a&gt;, you should learn something about that. (Okay, now I'm just talking to myself).&lt;br /&gt;&lt;br /&gt;So even though the future isn't here yet, we can make it arrive sooner by downloading &lt;a href="http://www.java.net/download/jdk7/archive/b126/binaries/index.html"&gt;a current binary snapshot release of JDK 7&lt;/a&gt; to kick the tires and try it out.  &lt;br /&gt;&lt;br /&gt;Let's get started.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-8442300312070800537?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2011/01/java-7-features-future-cant-come-soon.html</link><author>noreply@blogger.com (Brad Parks)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-5156360900089724319</guid><pubDate>Mon, 17 Jan 2011 20:28:00 +0000</pubDate><atom:updated>2011-01-17T14:28:28.472-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>basic</category><category domain='http://www.blogger.com/atom/ns#'>old school</category><title>Time to Reminisce - Computing Prime Numbers</title><description>Set the &lt;a href="http://en.wikipedia.org/wiki/WABAC_machine"&gt;WABAC Machine&lt;/a&gt; for the late 1980s...&lt;br /&gt;&lt;br /&gt;What's the first long running program you remember writing?  One summer at the high school computing lab I saw the room full of PCs were sitting idle and thought it would be fun to write a program that would run for a long time. &lt;br /&gt;&lt;br /&gt;Two math problems came to mind: 1. find prime numbers less than a bazillion, 2. compute pi to a bazillion digits.  I chose the first one mainly because it would be relatively easy to verify. After all, if I found the 904th digit of pi was a 2, how was I going to verify it?  &lt;br /&gt;&lt;br /&gt;The only language I had available to me at the time was BASIC. Don't judge - that's what the school had and that's all I knew at the time.  I didn't have much of an algorithm for finding primes, but I had a trusty For Loop and a lot of time. I don't think I have the code any longer, kinda wish I still did so I could try it now. My method was pretty simple: Increment a counter to the next number, start a loop up to 1/2 of that number and see if it divided evenly (quick, tell me what the big O notation of that would be).  I'm sure there are better ways than just a loop inside a loop but this was a long time ago... You kids these days with your Google could probably find me a better algorithm. &lt;br /&gt;&lt;br /&gt;I knew this program was going to run for days and could be subject to interruption (such as being unplugged by a janitor) but wanted to keep a good record of my results. My immediate choices were to periodically save to a file or send a line to the printer.  Saving to the 5.25" floppy would have been fine I suppose, but I chose to use the printer because the progress would be more visible and permanent.  After finding 10 prime numbers, my program would send one line to the printer listing them.&lt;br /&gt;&lt;br /&gt;It ran for days (maybe a couple weeks) before it finally was interrupted.  Every so often the printer sprang to life and added one line of prime numbers. Obviously it was quicker with the smaller numbers because it had smaller numbers.  Eventually my program filled about 6 or 7 pages.  I don't really remember how far it got, but I do remember being rather proud of the result. I taped the output up on the wall in my bedroom - I should call my mom and see if it's still there.&lt;br /&gt;&lt;br /&gt;On the next episode of "Time to Reminisce" maybe I'll talk about the first program I wrote for somebody else.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-5156360900089724319?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2011/01/time-to-reminisce-computing-prime.html</link><author>noreply@blogger.com (Brad Parks)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-2025000872679798629</guid><pubDate>Mon, 10 Jan 2011 05:20:00 +0000</pubDate><atom:updated>2011-01-09T23:20:19.385-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>sql</category><category domain='http://www.blogger.com/atom/ns#'>java</category><category domain='http://www.blogger.com/atom/ns#'>query</category><category domain='http://www.blogger.com/atom/ns#'>problem and solution</category><title>Why is my PreparedStatement query slow? (can I blame Sybase?)</title><description>This week I was asked to take a look at a batch application project that was having problems. The project uses &lt;a href="http://static.springsource.org/spring-batch/"&gt;Spring Batch&lt;/a&gt; to run a sequence of SQL statements and a variety of other things.  At one step a pretty simple SQL query would just sit there, no response coming back, until something would just time out and we'd get this exception:&lt;br /&gt;&lt;pre&gt;java.sql.SQLException: JZ006: Caught IOException: java.net.SocketTimeoutException: Read timed out&lt;br /&gt;&lt;/pre&gt;A socket timeout could be caused by at least four different things, so let's narrow it down. One of the first questions I always have with database related problems like this: "Is there anything wrong with the query?"&lt;br /&gt;&lt;br /&gt;The query wasn't very complicated, it was a simple, one-table query and no joins. The log showed this as the query right at the &lt;tt&gt;SocketTimeoutException&lt;/tt&gt; exception.&lt;br /&gt;&lt;pre&gt;SELECT&lt;br /&gt;        STUFF_ID, &lt;br /&gt;        STUFF_DESC, &lt;br /&gt;        MORE_STUFF, &lt;br /&gt;        ? AS BATCHID&lt;br /&gt;    FROM&lt;br /&gt;        MY_STUFF_TABLE&lt;br /&gt;    WHERE&lt;br /&gt;        STUFF_UPDATE_DT &gt; ?&lt;br /&gt;&lt;/pre&gt;Notice the question marks are bind parameters for a prepared statement that gets filled in at runtime.&lt;br /&gt;&lt;br /&gt;After trying this out in &lt;a href="http://www.dbvis.com/"&gt;my favorite database tool&lt;/a&gt;, I saw that the query was fast, even with 20 million rows. So no problem there.&lt;br /&gt;&lt;br /&gt;I double-checked the driver version and that all seemed fine. (There was a database upgrade recently from Sybase 12.5 to Sybase 15). Checking the driver version is what we like to call "low-hanging fruit" - easy to check and easy to fix - so maybe should have checked that first.&lt;br /&gt;&lt;br /&gt;When there are a lot of different components involved I like to reduce the problem down to its most basic elements. So I got back to basics and whipped up a tiny amount of Java using old-school JDBC.  (Remember how we used to &lt;tt&gt;connect()&lt;/tt&gt; and &lt;tt&gt;prepareStatement()&lt;/tt&gt; a decade ago?)  So repeating that exercise with the appropriate SQL and making sure to use a prepared statement, the end result was a slow query!  &lt;b&gt;Zoinks!&lt;/b&gt;  I replaced the prepared statement with the full query (i.e., no bind parameters) and found it fast again, just like when running it with &lt;a href="http://www.dbvis.com/"&gt;DB Visualizer&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Okay, now we know it's got nothing to do with the framework. &lt;br /&gt;&lt;br /&gt;From past experience I know that sometimes there can be screwy side-effects to optimizations that a database server performs with bind params. I'm not a Sybase expert so I can't tell you what's going on internally, but often a database driver has some way of flipping a toggle to alter the optimizing behavior.  So I went off to check some &lt;a href="http://www.sybase.com/detail?id=1009812"&gt;documentation for jConnect&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The two most interesting settings were &lt;b&gt;&lt;tt&gt;LITERAL_PARAMS&lt;/tt&gt;&lt;/b&gt; and &lt;b&gt;&lt;tt&gt;DYNAMIC_PREPARE&lt;/tt&gt;&lt;/b&gt; since they were somewhat related to substituting values in a prepared statement, etc. A quick check of the documentation said we could set this in the connect string like so:&lt;br /&gt;&lt;pre&gt;jdbc:sybase:Tds:127.0.0.1:9999/exampledb?LITERAL_PARAMS=true&lt;/pre&gt;&lt;br /&gt;I dropped that into my simple sample code and it was fast like it was supposed to be. Yay! Problem solved, let's throw this fix into the larger application and see if we get the same result.  Sure enough, things worked better than they did before.  We'll celebrate for 15 minutes and move on to the next problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-2025000872679798629?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2011/01/why-is-my-preparedstatement-query-slow.html</link><author>noreply@blogger.com (Brad Parks)</author><thr:total>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-1538890551627953791</guid><pubDate>Fri, 10 Dec 2010 01:59:00 +0000</pubDate><atom:updated>2010-12-10T10:54:51.587-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>jetty</category><category domain='http://www.blogger.com/atom/ns#'>errors</category><category domain='http://www.blogger.com/atom/ns#'>maven</category><title>Jetty and Maven error: Cannot find setter nor field</title><description>Just this week I was trying to use &lt;a href="http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin"&gt;jetty-maven-plugin&lt;/a&gt; to run my web application and getting the following error:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;[ERROR] BUILD ERROR&lt;br /&gt;[INFO] ------------------------------------------------------------------------&lt;br /&gt;[INFO] Failed to configure plugin parameters for: org.mortbay.jetty:jetty-maven-plugin:7.0.0.pre5&lt;br /&gt;Cause: Cannot find setter nor field in org.mortbay.jetty.plugin.Jetty6PluginWebAppContext for 'jettyEnvXml'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The command line I was using was just&lt;br /&gt;&lt;pre&gt;mvn jetty:run&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And I was following the &lt;a href="http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin#Configuring_Your_WebApp"&gt;&lt;tt&gt;&amp;lt;webAppConfig&amp;gt;&lt;/tt&gt; documentation&lt;/a&gt; for configuring the Jetty external XML file (&amp;lt;jettyEnvXml&amp;gt;) in my pom.xml&lt;br /&gt;&lt;br /&gt;Turns out that the version I'm using calls that setting &lt;tt&gt;&amp;lt;jettyEnvXmlFile&amp;gt;&lt;/tt&gt;.  So try that and let me know how that works for you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-1538890551627953791?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2010/12/jetty-and-maven-error-cannot-find.html</link><author>noreply@blogger.com (Brad Parks)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-5900238808654811846</guid><pubDate>Wed, 08 Dec 2010 01:16:00 +0000</pubDate><atom:updated>2010-12-07T19:16:00.261-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>data</category><category domain='http://www.blogger.com/atom/ns#'>documentation</category><category domain='http://www.blogger.com/atom/ns#'>books</category><title>Document Your Data, it's the Most Reusable Component</title><description>&lt;blockquote&gt;"Metadata is the key to reusability of data and analysis." - &lt;a href="http://www.amazon.com/gp/product/0123743192?ie=UTF8&amp;amp;tag=brasbra-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0123743192"&gt;DW 2.0 book&lt;/a&gt;, page 110.&lt;/blockquote&gt;&lt;br /&gt;Recently I've been reading &lt;a href="http://www.amazon.com/gp/product/0123743192?ie=UTF8&amp;amp;tag=brasbra-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0123743192"&gt;DW 2.0: The Architecture for the Next Generation of Data Warehousing (Inmon, Strauss, Neushloss)&lt;/a&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=brasbra-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0123743192" style="border: none !important; margin: 0px !important;" width="1" /&gt; and while reading chapter 4 about Metadata it got me thinking -- &lt;b&gt;&lt;em&gt;"Where do we maintain the metadata about our data model?"&lt;/em&gt;&lt;/b&gt;  (possible metadata could include: Definition, Usage Locations, Owner, Synonyms, etc.) &amp;nbsp;Often, the most documentation I see is stored as comments in the code.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Overheard: "I have a &lt;tt&gt;CONTACT&lt;/tt&gt; table in my database, but I don't remember what it's for."&lt;/blockquote&gt;&lt;br /&gt;As an application developer I see things through code-colored glasses. Don't get me wrong, &lt;a href="http://phx.corporate-ir.net/phoenix.zhtml?c=83192&amp;amp;p=IROL-reports"&gt;I love data&lt;/a&gt;, but I love the application first and foremost. The functionality, the usability, the algorithms, the behavior, the bells, the whistles, etc. Thus, my approach when looking at the entire application, I see the code first. For example, if I have an application that deals with People I probably have an entity in the domain model named "&lt;code&gt;Person&lt;/code&gt;" or "&lt;code&gt;Contact&lt;/code&gt;" that's usually stored in a database, often in a table by the same or similar name.  It's only natural for me to include Javadoc comments in the class that contains a richer description of what we mean when we talk about that concept. (See also "ubiquitous language" as mentioned in &lt;a href="http://www.amazon.com/gp/product/0321125215?ie=UTF8&amp;amp;tag=brasbra-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0321125215"&gt;Domain-Driven Design&lt;/a&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=brasbra-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0321125215" style="border: none !important; margin: 0px !important;" width="1" /&gt;) &lt;b&gt;So is that the best place for the definition?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Reflection Point:&lt;/b&gt; does the data exist to support the application? or does the application exist to support the data?  Is your organization application-centric or data-centric?&lt;br /&gt;&lt;br /&gt;If your company is application-centric and has only a single application, placing the metadata/documentation of the full meaning of an entity inside the code is probably fine.  But more than once I've seen an entire application rewritten. Sometimes it happens a component at a time, but still not a line remains of the original code.  So if the only metadata information for an entity is in the code, that information that will need to get carried along with each potential rewrite. This then isn't always the best place for the data definitions.&lt;br /&gt;&lt;br /&gt;Also, think carefully about your application and data - Do you really have only one application using that data? Often there are several applications using or reporting on the data. (Perhaps your company really is data-centric and you're looking at it only from the perspective of the code.) Wouldn't it be nice if all the applications shared the same definitions? &amp;nbsp;Oracle, MySQL, and probably other databases provide for the ability to attach comments to tables (or even at the column level). &amp;nbsp;Modeling tools like ERwin also work well for storing table definitions (including maintaining Logical as well as Physical representations of the model). &amp;nbsp;Depending on how much detail you need there are other tools as well which can be used for documenting (note to self: check out CASEwise and Rochade).&lt;br /&gt;&lt;br /&gt;So how well does this level of documentation fit with Agile methodology? &amp;nbsp;I'd suggest adding it to your team's definition of "done." &amp;nbsp;A new feature isn't done until and unless the corresponding data model's definition has been updated.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-5900238808654811846?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2010/12/document-your-data-its-most-reusable.html</link><author>noreply@blogger.com (Brad Parks)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-7634165072891644660</guid><pubDate>Thu, 14 Oct 2010 03:02:00 +0000</pubDate><atom:updated>2010-10-13T22:02:00.718-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>pet peeve</category><title>Open Letter to Radio Personalities, Audio Ad Writers, and Voice Talent</title><description>Dear Radio Personality, Ad Writer, and/or Voice Talent,&lt;br /&gt;&lt;br /&gt;When reading or writing a radio advertisement for a company with a web address keep in mind the following rule:&lt;br /&gt;&lt;blockquote&gt;There is no such thing as a backslash in a website address.&lt;/blockquote&gt;It is always a slash. ALWAYS. I'm serious. No exceptions. It's always a slash. That's the symbol down there on the keyboard with the question mark. Seriously. Look it up if you don't believe me. It's called a slash. Example: "double-you double-you double-you dot wkrp dot com &lt;em&gt;&lt;b&gt;slash&lt;/b&gt;&lt;/em&gt; news"&lt;br /&gt;&lt;br /&gt;Let me go over this one more time:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; This is a slash &lt;tt&gt;&lt;b&gt;/&lt;/b&gt;&lt;/tt&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; This is a backslash &lt;tt&gt;&lt;b&gt;\&lt;/b&gt;&lt;/tt&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; The slash &lt;tt&gt;&lt;b&gt;/&lt;/b&gt;&lt;/tt&gt; is used in web addresses&lt;br /&gt;&lt;/li&gt;&lt;li&gt; The backslash &lt;tt&gt;&lt;b&gt;\&lt;/b&gt;&lt;/tt&gt; does not work on the Internet&lt;br /&gt;&lt;/li&gt;&lt;li&gt; The slash &lt;tt&gt;&lt;b&gt;/&lt;/b&gt;&lt;/tt&gt; makes you sound smart&lt;br /&gt;&lt;/li&gt;&lt;li&gt; The backslash &lt;tt&gt;&lt;b&gt;\&lt;/b&gt;&lt;/tt&gt; makes you sound not-so-smart&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Honest. I wouldn't make this up. Go ask &lt;a href="http://en.wikipedia.org/wiki/Tim_Berners_Lee"&gt;Tim Berners-Lee&lt;/a&gt; and see what he calls it.  I don't care what your boss or station manager or scriptwriter says - it's a slash.&lt;br /&gt;&lt;br /&gt;Don't make me call in on the request line and complain. Again.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Sincerely,&lt;br /&gt;&lt;br /&gt;-Brad Parks&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-7634165072891644660?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2010/10/open-letter-to-radio-personalities.html</link><author>noreply@blogger.com (Brad Parks)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-3232354299788901078</guid><pubDate>Tue, 12 Oct 2010 00:53:00 +0000</pubDate><atom:updated>2010-10-11T15:14:06.659-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>remote desktop</category><category domain='http://www.blogger.com/atom/ns#'>windows</category><title>Remote Desktop: Increase Maximum Number Connections, but That's Not What I Really Needed</title><description>&lt;blockquote&gt;"The terminal server has exceeded the maximum number of allowed connections."  -Remote Desktop, Windows Server&lt;/blockquote&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_acIFgX43XJc/TLNquRt9v1I/AAAAAAAACSc/fb5b0_QE5I8/s1600/terminal_service_exceeded.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_acIFgX43XJc/TLNquRt9v1I/AAAAAAAACSc/fb5b0_QE5I8/s1600/terminal_service_exceeded.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;That's the error message I got today trying to use Remote Desktop to get into one of our servers.  All I wanted was to deploy some changes to our DEV server. How can there be too many connections? We're a small team and there are only 3 of us that regularly log into the DEV box. The other 2 guys are +6 timezones away from me and have surely left the office by now. So that means they must have left themselves logged in.  I really didn't want to wait till the next day for the other guys to get into the office.&lt;br /&gt;&lt;br /&gt;So how can I increase the maximum number of allowed connections?  That's what I &lt;b&gt;&lt;i&gt;thought&lt;/i&gt;&lt;/b&gt; I wanted. (I don't want to spoil the ending of this post but I actually solved it a different way). A quick search of the Interwebs informed me that &lt;a href="http://technet.microsoft.com/en-us/library/cc753380.aspx"&gt;&lt;b&gt;two&lt;/b&gt; connections is the maximum&lt;/a&gt; unless extra $tuff is installed on the server.&lt;br /&gt;&lt;br /&gt;Then I happened upon this question on &lt;a href="http://serverfault.com/"&gt;ServerFault.com&lt;/a&gt; about somebody else who wanted to "&lt;a href="http://serverfault.com/questions/172183/increase-number-of-allowed-remote-desktop-connections"&gt;Increase number of allowed remote desktop connections&lt;/a&gt;" so at least I'm not alone in wanting this. One of the answers to that question is to use the &lt;a href="http://technet.microsoft.com/en-us/library/cc785434(WS.10).aspx"&gt;qwinsta&lt;/a&gt; command to Query for remote sessions and then &lt;a href="http://technet.microsoft.com/en-us/library/cc754785(WS.10).aspx"&gt;rwinsta&lt;/a&gt; to Reset a remote session.&lt;br /&gt;&lt;br /&gt;Here is my example usage of each of these commands on server DEVSRV99:&lt;br /&gt;&lt;br /&gt;Query:&lt;br /&gt;&lt;pre&gt;C:\&amp;gt; qwinsta /server:DEVSRV99.bradsbrain.com&lt;br /&gt; SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE&lt;br /&gt; console                                     0  Conn    wdcon&lt;br /&gt; rdp-tcp                                 65536  Listen  rdpwd&lt;br /&gt;                   larry                     2  Disc    rdpwd&lt;br /&gt; rdp-tcp#72        curly                     3  Active  rdpwd&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Reset connection ID 3:&lt;br /&gt;&lt;pre&gt;C:\&amp;gt; rwinsta 3 /server:DEVSRV99.bradsbrain.com&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;After performing the reset (rwinsta) command the number of allowed connections was decreased (as expected).  I was then able to connect via Remote Desktop.&lt;br /&gt;&lt;br /&gt;So, what can you do if you see this "Access Denied" message when you try the &lt;tt&gt;qwinsta&lt;/tt&gt; or  &lt;tt&gt;rwinsta&lt;/tt&gt; command?&lt;br /&gt;&lt;pre&gt;&lt;b&gt;Error opening Terminal server DEVSRV99.bradsbrain.com&lt;br /&gt;Error [5]:Access is denied.&lt;/b&gt;&lt;br /&gt;&lt;/pre&gt;The reason for this error is because the user you're trying to run the command as hasn't authenticated to the machine we want to query/reset.  And these two little programs don't bother to prompt for the credentials.  You can quickly authenticate to the necessary server or domain by putting the server name into Windows Explorer and attempt to browse files on that machine - (&lt;tt&gt;\\DEVSRV99.bradsbrain.com\C$&lt;/tt&gt;) - that should present you with the appropriate username/password dialog.&lt;br /&gt;&lt;br /&gt;&lt;/tt&gt;&lt;/tt&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-3232354299788901078?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2010/10/remote-desktop-increase-maximum-number.html</link><author>noreply@blogger.com (Brad Parks)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_acIFgX43XJc/TLNquRt9v1I/AAAAAAAACSc/fb5b0_QE5I8/s72-c/terminal_service_exceeded.png' height='72' width='72'/><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-441629786191779966</guid><pubDate>Sat, 04 Sep 2010 04:42:00 +0000</pubDate><atom:updated>2010-10-07T14:55:30.971-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>visual studio</category><title>Visual Studio wdproj project type not supported</title><description>&lt;b&gt;The problem:&lt;/b&gt; Today's error message is brought to you by a fresh install of Visual Studio 2008. &amp;nbsp;I installed it and tried opening and building an existing project.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;'C:\work\MyLovelyProject.wdproj' cannot be opened because its project type (.wdproj) is not supported by this version of the application.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_acIFgX43XJc/TIFncijkqxI/AAAAAAAACQU/IKnxzN36DDs/s1600/wdproj_not_supported.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="121" src="http://2.bp.blogspot.com/_acIFgX43XJc/TIFncijkqxI/AAAAAAAACQU/IKnxzN36DDs/s640/wdproj_not_supported.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;What's wrong:&lt;/b&gt; I forgot to install the "Web Deployments Projects" add-in. (similar to Eclipse plugin I guess).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to fix:&lt;/b&gt;&amp;nbsp;Search for "&lt;a href="http://lmgtfy.com/?q=web+deployment+project+plugin+visual+studio+2008&amp;amp;l=1"&gt;web deployment project plugin visual studio 2008&lt;/a&gt;", download, install, and try again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-441629786191779966?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2010/09/visual-studio-wdproj-project-type-not.html</link><author>noreply@blogger.com (Brad Parks)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_acIFgX43XJc/TIFncijkqxI/AAAAAAAACQU/IKnxzN36DDs/s72-c/wdproj_not_supported.png' height='72' width='72'/><thr:total>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-7842757140089507201</guid><pubDate>Wed, 11 Aug 2010 00:38:00 +0000</pubDate><atom:updated>2010-08-10T17:04:35.138-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>xsd</category><category domain='http://www.blogger.com/atom/ns#'>spring</category><category domain='http://www.blogger.com/atom/ns#'>xml</category><category domain='http://www.blogger.com/atom/ns#'>errors</category><category domain='http://www.blogger.com/atom/ns#'>validation</category><title>Referenced file contains errors OR how XSD is killing me</title><description>Quick fix for the impatient: you and I have something in the schemaLocation definition in the applicationContext file that doesn't mesh. Check to make sure the versions all match.&lt;br /&gt;&lt;br /&gt;Now for the details...&lt;br /&gt;&lt;br /&gt;Recently I switched to the &lt;a href="http://springsource.com/products/sts"&gt;SpringSource Tool Suite&lt;/a&gt; as my IDE, so far so good. I checked out an old project which I'm sure had no errors before. Now the Problems view tells me:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;Referenced file contains errors (jar:file:/C:/springsource/sts-2.3.2.RELEASE/plugins/org.springframework.beans_3.0.1.RELEASE-A.jar!/org/springframework/beans/factory/xml/spring-beans-2.5.xsd).  For more information, right click on the message in the Problems View and select "Show Details..."&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This error looked kinda suspicious to me -- it just doesn't make sense that an XSD file from Spring contains errors. I must be reading that wrong. Well, I'll click through to Show Details...&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_acIFgX43XJc/TGG0gAGmp0I/AAAAAAAACPo/z8BhvBrYEzo/s1600/ReferencedFileErrorDetails.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="236" src="http://2.bp.blogspot.com/_acIFgX43XJc/TGG0gAGmp0I/AAAAAAAACPo/z8BhvBrYEzo/s640/ReferencedFileErrorDetails.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;Repeated for the PNG impaired:&lt;br /&gt;&lt;code&gt;The errors below were detected when validating the file spring-beans-2.5.xsd via the file applicationContext.xml. In most cases these errors can be detected by validating spring-beans-2.5.xsd directly. However it is possible that errors will only occur when spring-beans-2.5.xsd is validated in the context of applicationContext.xml.&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I think the better clue in the Error Details is the part that says &lt;code&gt;Duplicate attribute uses with the same name and target namespace&lt;/code&gt; which to me indicates that my &lt;tt&gt;applicationContext.xml&lt;/tt&gt; is using some attribute incorrectly. So once again we look at the headers:&lt;br /&gt;&lt;pre class="brush: xml; wrap-lines: false; gutter: 0;"&gt;&amp;lt;beans xmlns="http://www.springframework.org/schema/beans"&lt;br /&gt;        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;        xmlns:tx="http://www.springframework.org/schema/tx"&lt;br /&gt;        xmlns:jee="http://www.springframework.org/schema/jee "&lt;br /&gt;        xsi:schemaLocation="&lt;br /&gt;            http://www.springframework.org/schema/beans &lt;br /&gt;            http://www.springframework.org/schema/beans/spring-beans-2.0.xsd&lt;br /&gt;            http://www.springframework.org/schema/tx&lt;br /&gt;            http://www.springframework.org/schema/tx/spring-tx-2.5.xsd&lt;br /&gt;            http://www.springframework.org/schema/jee &lt;br /&gt;            http://www.springframework.org/schema/jee/spring-jee-2.0.xsd"&lt;br /&gt; default-lazy-init="true"&amp;gt;&lt;br /&gt;&lt;/pre&gt;Yeah, this file was started a couple years ago. Not sure how we haven't noticed this before (maybe once again we had validation turned off by default), but if you look carefully you see a mix of versions 2.0 and 2.5. Pick one, make them the same, and the Validation error should go away.  Why couldn't the error message have said that in the first place?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-7842757140089507201?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2010/08/referenced-file-contains-errors-or-how.html</link><author>noreply@blogger.com (Brad Parks)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_acIFgX43XJc/TGG0gAGmp0I/AAAAAAAACPo/z8BhvBrYEzo/s72-c/ReferencedFileErrorDetails.png' height='72' width='72'/><thr:total>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-6973894354456987706</guid><pubDate>Tue, 27 Jul 2010 00:12:00 +0000</pubDate><atom:updated>2010-07-26T21:42:21.773-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>configuration</category><category domain='http://www.blogger.com/atom/ns#'>stacktrace</category><category domain='http://www.blogger.com/atom/ns#'>cxf</category><category domain='http://www.blogger.com/atom/ns#'>mule</category><title>LifecycleException Failed to invoke lifecycle phase "start" on object: SedaService</title><description>Today's stacktrace:&lt;br /&gt;&lt;pre class="brush: plain; wrap-lines: false; gutter: 0;"&gt;org.mule.api.lifecycle.LifecycleException: Failed to invoke lifecycle phase "start" on object: SedaService{BookService}&lt;br /&gt; at org.mule.lifecycle.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:276)&lt;br /&gt; at org.mule.lifecycle.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:128)&lt;br /&gt; at org.mule.lifecycle.GenericLifecycleManager.firePhase(GenericLifecycleManager.java:84)&lt;br /&gt; at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:179)&lt;br /&gt; at org.mule.config.builders.MuleXmlBuilderContextListener.initialize(MuleXmlBuilderContextListener.java:83)&lt;br /&gt; at org.mule.config.builders.MuleXmlBuilderContextListener.contextInitialized(MuleXmlBuilderContextListener.java:58)&lt;br /&gt;  [...]&lt;br /&gt;&lt;/pre&gt;The solution turns out to be a config problem on my part, just like 90% of 'em.  Lately I've been leaning towards contract-first development, so we have a WSDL that I specify in my Mule config:&lt;br /&gt;&lt;pre class="brush: xml; wrap-lines: false; gutter: 0;"&gt;[...]&lt;br /&gt;  &amp;lt;cxf:inbound-endpoint serviceName="BookService"&lt;br /&gt;      address="http://localhost:44080/services/v1/BookService"&lt;br /&gt;      serviceClass="com.bradsbrain.atlas.generated.BookService"&lt;br /&gt;      wsdlLocation="BookService.wsdl"&lt;br /&gt;      synchronous="true" applyFiltersToProtocol="true" applySecurityToProtocol="true" applyTransformersToProtocol="true" &amp;gt;&lt;br /&gt;      &amp;lt;property key="namespace" value="http://atlas.bradsbrain.com/services" /&amp;gt;&lt;br /&gt;  &amp;lt;/cxf:inbound-endpoint&amp;gt;&lt;br /&gt;  [...]&lt;br /&gt;&lt;/pre&gt;And here is the part near the bottom of my WSDL that I had to fix. This part is correct, i.e., &lt;i&gt;after&lt;/i&gt; the fix, because I didn't want to include a big section of incorrect XML.&lt;br /&gt;&lt;pre class="brush: xml; wrap-lines: false; gutter: 0;"&gt;[...]&lt;br /&gt;  &amp;lt;wsdl:service name="BookService"&amp;gt;&lt;br /&gt;    &amp;lt;wsdl:port binding="tns:BookServiceBinding" name="BookServicePort"&amp;gt;&lt;br /&gt;      &amp;lt;soap:address location="http://localhost:44080/services/v1/BookService"/&amp;gt;&lt;br /&gt;    &amp;lt;/wsdl:port&amp;gt;&lt;br /&gt;  &amp;lt;/wsdl:service&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The part that I had incorrect is the value of the &lt;tt&gt;name=&lt;/tt&gt; attribute of the &lt;tt&gt;wsdl:port&lt;/tt&gt; tag.  I used to have it as &lt;tt&gt;name="BookService"&lt;/tt&gt; and when I switched to CXF 2.1.5 that's when I got the LifecycleException you see above. Changing it to &lt;tt&gt;name="BookService&lt;b&gt;Port&lt;/b&gt;"&lt;/tt&gt; fixed it.&lt;br /&gt;&lt;br /&gt;But it worked with the older version of CXF! (I wanna say 2.1.2)&lt;br /&gt;&lt;br /&gt;This happened right after we upgraded our version of &lt;a href="http://www.mulesoft.com/mule-esb-open-source-esb"&gt;Mule&lt;/a&gt; which as a side effect also shifted us to a newer version of &lt;a href="http://cxf.apache.org/"&gt;CXF&lt;/a&gt;. I upgraded to the Enterprise version of Mule (2.2.4) and a not-even-new version of CXF (2.1.5).&lt;br /&gt;&lt;br /&gt;Does anyone want to sift through the CXF version history documents with me and see when, where, and why this changed?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-6973894354456987706?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2010/07/lifecycleexception-failed-to-invoke.html</link><author>noreply@blogger.com (Brad Parks)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-7048365106686544898</guid><pubDate>Tue, 18 May 2010 15:30:00 +0000</pubDate><atom:updated>2010-05-20T17:10:09.760-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>schema</category><category domain='http://www.blogger.com/atom/ns#'>xml</category><category domain='http://www.blogger.com/atom/ns#'>validation</category><title>The matching wildcard is strict, and doesn't like you.</title><description>Recently I saw the following error in Eclipse on a recently imported project:&lt;br /&gt;&lt;pre class="brush: plain; gutter: 0;"&gt;cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'tx:advice'.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Solution? Check namespace and schema location declarations at the top of the file.  Here are mine:&lt;br /&gt;&lt;pre class="brush: xml; wrap-lines: false; gutter: 0;"&gt;&amp;lt;beans xmlns="http://www.springframework.org/schema/beans"&lt;br /&gt;       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;       xmlns:aop="http://www.springframework.org/schema/aop"&lt;br /&gt;       xmlns:context="http://www.springframework.org/schema/context"&lt;br /&gt;       xmlns:tx="http://www.springframework.org/schema/tx"&lt;br /&gt;     xsi:schemaLocation="http://www.springframework.org/schema/beans&lt;br /&gt;                         http://www.springframework.org/schema/beans/spring-beans.xsd&lt;br /&gt;                         http://www.springframework.org/schema/aop&lt;br /&gt;                         http://www.springframework.org/schema/aop/spring-aop-2.5.xsd&lt;br /&gt;                         http://www.springframework.org/schema/context&lt;br /&gt;                         http://www.springframework.org/schema/context/spring-context-2.5.xsd"&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Notice anything missing? It turns out I was missing the schemaLocation for the "tx" namespace (it was listed as a namespace but had no schemaLocation).&lt;/div&gt;&lt;br /&gt;&lt;pre class="brush: xml; wrap-lines: false; gutter: 0;"&gt;        http://www.springframework.org/schema/tx&lt;br /&gt;        http://www.springframework.org/schema/tx/spring-tx-2.5.xsd&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div&gt;Putting that in solved the problem.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Someday I'd like to join onto a new project team where the code compiles cleanly after checkout and is error and warning-free in my IDE.  "Just turn off validation for that project" is NOT a valid solution.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-7048365106686544898?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2010/05/matching-wildcard-is-strict-and-doesnt.html</link><author>noreply@blogger.com (Brad Parks)</author><thr:total>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-999517846980505223</guid><pubDate>Thu, 22 Apr 2010 00:52:00 +0000</pubDate><atom:updated>2010-04-21T19:52:00.537-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>java basics</category><title>Java default values for objects and primitives</title><description>or &lt;span style="font-size: x-large;"&gt;Stuff I Usually Don't Think About #1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This post might be (should be) basic for you Java readers, but it's the kind of thing I rarely think about, with the reason why explained below. &amp;nbsp;So just bear with me a minute or feel free to skip this one, Mr. Know-it-all.&lt;br /&gt;&lt;br /&gt;Consider the following Java code and guess what the output will be:&lt;br /&gt;&lt;pre class="brush: java;"&gt;    public void usefulMethod() {&lt;br /&gt;        int total;&lt;br /&gt;        String description;&lt;br /&gt;        System.out.println("The total is: " + total);&lt;br /&gt;        System.out.println("Description length: " + description.length());&lt;br /&gt;    }&lt;/pre&gt;According to &lt;a href="http://java.sun.com/docs/books/tutorial/java/nutsandbolts/datatypes.html"&gt;the Java tutorial&lt;/a&gt; "Fields that are declared but not initialized will be set to a reasonable default by the compiler." And that's the way it is for &lt;i&gt;&lt;b&gt;fields&lt;/b&gt;&lt;/i&gt;, but what about for &lt;i&gt;&lt;b&gt;local variables&lt;/b&gt;&lt;/i&gt; as in the code above?&lt;br /&gt;&lt;br /&gt;Go ahead and paste it into your IDE now and you'll know why I rarely think about it. &amp;nbsp;It's because it won't compile! The IDE points out the error; the programmer adjusts the code and doesn't even think about it (or at least I never do anyway). &amp;nbsp;Of course it's bad practice to not assign a value, and of course we all assign some sensible default without thinking, but that doesn't mean it shouldn't be considered at least once. There, now that you've thought about it you can go back to your &lt;a href="http://www.starbucks.com/menu/drinks/frappuccino-blended-beverages/mocha-frappuccino-blended-coffee"&gt;Grande Affogato No Whip Mocha Frapuccino&lt;/a&gt; and get on with your day. &amp;nbsp;Read just a little further if you want the nitty gritty details of &lt;i&gt;why&lt;/i&gt;&amp;nbsp;it's like this.&lt;br /&gt;&lt;br /&gt;Well, as always, look to the Java Language Specification (JLS) for the official reason. &amp;nbsp;According to the "&lt;a href="http://java.sun.com/docs/books/jls/second_edition/html/defAssign.doc.html"&gt;Rule of Definite Assignment&lt;/a&gt;" in the Java Language Specification, there must be a compile-time error when encountering an uninitialized local variable.  So keep this in mind when you're writing your next Java compiler.&lt;br /&gt;&lt;br /&gt;Also note, whoever wrote the Java Compiler error message for this must have been from Minnesota...  note the overly-polite, non-confrontational phrasing:&lt;br /&gt;&lt;pre&gt;variable description &lt;b&gt;might not&lt;/b&gt; have been initialized&lt;/pre&gt;In Minnesota, that's how we tell somebody they're wrong.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-999517846980505223?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2010/04/java-default-values-for-objects-and.html</link><author>noreply@blogger.com (Brad Parks)</author><thr:total>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-5636495911733555072</guid><pubDate>Mon, 19 Apr 2010 23:32:00 +0000</pubDate><atom:updated>2010-05-20T17:11:16.837-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>schema</category><category domain='http://www.blogger.com/atom/ns#'>eclipse</category><category domain='http://www.blogger.com/atom/ns#'>validation</category><category domain='http://www.blogger.com/atom/ns#'>mule</category><title>invalid content was found starting with...</title><description>&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman';"&gt;Eclipse schema validation fails on a mule config file. &amp;nbsp;It's really kindof annoying to have ugly schema validation errors. Here's what the error looks like in the problem view:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;cvc-complex-type.2.4.a: Invalid content was found starting with element 'component'. One of '{"http://www.mulesource.org/schema/mule/core/2.2":abstract-component, "http://www.mulesource.org/schema/mule/core/2.2":outbound, "http://www.mulesource.org/schema/mule/core/2.2":async-reply, "http://www.mulesource.org/schema/mule/core/2.2":abstract-exception-strategy, "http://www.mulesource.org/schema/mule/core/2.2":abstract-service-threading-profile, "http://www.mulesource.org/schema/mule/core/2.2":abstract-queue-profile}' is expected.&lt;/blockquote&gt;&lt;div&gt;After just a bit of searching, I found this helpful and quite detailed information:&lt;/div&gt;&lt;div&gt;&lt;a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284272"&gt;https://bugs.eclipse.org/bugs/show_bug.cgi?id=284272&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The quick fix is to go into Eclipse Preferences -&amp;gt; XML -&amp;gt; XML Files -&amp;gt; Validation and &lt;b&gt;turn off&lt;/b&gt;&amp;nbsp;the checkbox for "Honour all XML schema locations" &amp;nbsp;(see the link above for more details)&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_acIFgX43XJc/S8yCRxL38cI/AAAAAAAACJ8/tPVpBtJ9IRM/s1600/Honour_all_XML_schema_locations.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="329" src="http://1.bp.blogspot.com/_acIFgX43XJc/S8yCRxL38cI/AAAAAAAACJ8/tPVpBtJ9IRM/s640/Honour_all_XML_schema_locations.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;With that cleared up I'll hopefully be able to get some work done now.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-5636495911733555072?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2010/04/invalid-content-was-found-starting-with.html</link><author>noreply@blogger.com (Brad Parks)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_acIFgX43XJc/S8yCRxL38cI/AAAAAAAACJ8/tPVpBtJ9IRM/s72-c/Honour_all_XML_schema_locations.png' height='72' width='72'/><thr:total>3</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-3704235784423336009</guid><pubDate>Sun, 10 Jan 2010 23:25:00 +0000</pubDate><atom:updated>2010-01-10T17:43:05.314-06:00</atom:updated><title>Convert MySQL table from MyISAM to InnoDB</title><description>&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;b&gt;AS A&lt;/b&gt; developer using MySQL &lt;b&gt;I WANT&lt;/b&gt; to convert a table's database engine from MyISAM to InnoDB &lt;b&gt;SO THAT&lt;/b&gt; the table will have better performance with locking&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Note: I'm not a DBA, but I play one on TV. What I'm about to explain I have not tried in a production environment.&amp;nbsp; So I don't really know how much performance will be gained by this.  Your actual mileage may vary.&lt;br /&gt;&lt;br /&gt;One of the engines that MySQL uses is MyISAM.&amp;nbsp; As I understand it, that engine uses table-level locking for all updates.&amp;nbsp; This means that if an &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;INSERT&lt;/span&gt; or &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;UPDATE&lt;/span&gt; is happening to a table then any &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;SELECT&lt;/span&gt; on that table will have to just get in line and wait for the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;INSERT&lt;/span&gt; or &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;UPDATE&lt;/span&gt; to complete.&amp;nbsp; Usually things happen so quickly that this is fine for most applications.&amp;nbsp; If you run the command &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;SHOW FULL PROCESSLIST&lt;/span&gt; and see a lot of processes in a &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;LOCKED&lt;/span&gt; state (those are the ones standing in line) you might benefit from switching to the engine to InnoDB for a few of those tables.&lt;br /&gt;&lt;br /&gt;So my plan is to create a new InnoDB-engine table which looks exactly like my existing MyISAM-engine table.&amp;nbsp; The example I'm going to use is the "users" table:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 1.&lt;/b&gt;&amp;nbsp; Generate the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;CREATE&lt;/span&gt; script for the existing table. &lt;br /&gt;&lt;pre class="brush: sql;"&gt;SHOW CREATE TABLE USERS;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Step 2.&lt;/b&gt; Copy that table creation command, change the table name (I just append '_innodb') and change the engine from MyISAM to InnoDB, and execute the command. &lt;br /&gt;&lt;pre class="brush: sql;"&gt;CREATE TABLE `users_innodb` (&lt;br /&gt; `uid` int(10) unsigned NOT NULL auto_increment,&lt;br /&gt; `name` varchar(60) NOT NULL default '',&lt;br /&gt; `pass` varchar(32) NOT NULL default '',&lt;br /&gt; /* and other columns */ &lt;br /&gt;) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Step 3.&lt;/b&gt; Copy all the rows from old MyISAM table into the new InnoDB table. (Note: make sure nobody else is modifying the database while you're doing this).&lt;br /&gt;&lt;pre class="brush: sql;"&gt;INSERT INTO users_innodb (SELECT * FROM users);&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Step 4.&lt;/b&gt; Swap table names around. Rename the tables so your application will start using the new InnoDB table you just created and filled.&lt;br /&gt;&lt;pre class="brush: sql;"&gt;ALTER TABLE users RENAME TO users_myisam;&lt;br /&gt;ALTER TABLE users_innodb RENAME TO users;&lt;/pre&gt;&lt;br /&gt;That's it!&amp;nbsp; Goal accomplished. You're now using InnoDB as the engine on that table.&amp;nbsp; Repeat the process for any other tables you feel could benefit from InnoDB's improved locking performance.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-3704235784423336009?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2010/01/convert-mysql-table-from-myisam-to.html</link><author>noreply@blogger.com (Brad Parks)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-4995629865143187866</guid><pubDate>Fri, 01 Jan 2010 05:26:00 +0000</pubDate><atom:updated>2009-12-31T23:26:00.166-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>java</category><category domain='http://www.blogger.com/atom/ns#'>IntelliJ</category><category domain='http://www.blogger.com/atom/ns#'>NetBeans</category><title>Slow File Chooser in IntelliJ and NetBeans (actually it was a Java JFileChooser bug)</title><description>I use Eclipse for just about all my Java development and Flex Builder is also Eclipse-based, so I've never really had to venture beyond Eclipse for my development needs.  But I decided to expand my world to &lt;a href="http://www.jetbrains.com/idea/free_java_ide.html"&gt;IntelliJ IDEA&lt;/a&gt; just to see how it stacks up.&lt;br /&gt;&lt;br /&gt;Perhaps more on that later.&lt;br /&gt;&lt;br /&gt;After installing it on my Windows XP laptop one of the first things I noticed was that it took a painfully long time for it to show a file browser dialog.  Painful.  All I wanted to do is save or open a file.  That's not too much to ask.  My first thought was that there's no way I could use this for my daily development.  (Don't stop reading yet; the important part is forthcoming.)  Saving an open file was fine, it was just the file browser that was problematic (for the Open... or Save As... operations).&lt;br /&gt;&lt;br /&gt;So I downloaded &lt;a href="http://netbeans.org/"&gt;NetBeans&lt;/a&gt; to see what that was like. I experienced the same problem.  I tried them out on my Windows XP desktop machine and they worked just fine.  Y'know, come to think of it, when I use the Java S3 file browser &lt;a href="https://jets3t.dev.java.net/"&gt;jetS3t&lt;/a&gt; the file chooser is also slow.  Similarity identified -- it's the Java file chooser on this laptop.&lt;br /&gt;&lt;br /&gt;Quick check of the Java bugs database found quite a few related to &lt;a href="http://bugs.sun.com/bugdatabase/search.do?process=1&amp;amp;keyword=JFileChooser+slow+XP"&gt;JFileChooser being slow on XP&lt;/a&gt; that had been fixed.&lt;br /&gt;Quick check of the Java version installed on the laptop:  JDK 1.6.0_06.  Yep, I'm a few update revisions behind.&lt;br /&gt;&lt;br /&gt;So now I've updated to JDK 1.6.0_17 and &lt;span style="font-weight: bold;"&gt;all is well&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;IntelliJ IDEA is fast and cool.  NetBeans is fast and cool.  Both of them will take me a while to get used to since I'm fluent in Eclipse and of course shortcuts and features are just different.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-4995629865143187866?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2009/12/slow-file-chooser-in-intellij-and.html</link><author>noreply@blogger.com (Brad Parks)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-813677654870058871.post-4768660067889811248</guid><pubDate>Thu, 31 Dec 2009 15:28:00 +0000</pubDate><atom:updated>2009-12-31T11:30:42.548-06:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>hibernate</category><category domain='http://www.blogger.com/atom/ns#'>configuration</category><title>hibernate.connection.url for Various databases</title><description>hibernate.cfg.xml -- Here are some example &lt;b&gt;&lt;tt&gt;hibernate.connection.url&lt;/tt&gt;&lt;/b&gt; settings for various databases:&lt;br /&gt;&lt;h2&gt;Oracle&lt;/h2&gt;&lt;pre class="brush: xml;"&gt;&lt;br /&gt;      &lt;property name="hibernate.connection.url"&gt;&lt;br /&gt;          jdbc:oracle:thin:@hostname:1521:nameofsid&lt;br /&gt;      &lt;/property&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h2&gt;SQL Server&lt;/h2&gt;&lt;pre class="brush: xml;"&gt;&lt;br /&gt;      &lt;property name="hibernate.connection.url"&gt;&lt;br /&gt;          jdbc:sqlserver://hostname:1433;databaseName=WHATEVER&lt;br /&gt;      &lt;/property&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h2&gt;Hypersonic&lt;/h2&gt;&lt;pre class="brush: xml;"&gt;&lt;br /&gt;      &lt;property name="hibernate.connection.url"&gt;&lt;br /&gt;          jdbc:hsqldb:hsql://hostname&lt;br /&gt;      &lt;/property&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/813677654870058871-4768660067889811248?l=think.bradsbrain.com' alt='' /&gt;&lt;/div&gt;</description><link>http://think.bradsbrain.com/2009/12/hibernateconnectionurl-for-various.html</link><author>noreply@blogger.com (Brad Parks)</author><thr:total>0</thr:total></item></channel></rss>
