<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='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'><id>tag:blogger.com,1999:blog-34883908</id><updated>2012-02-16T04:29:12.827-06:00</updated><category term='MVC'/><category term='JSP'/><category term='dotNET'/><category term='JSF2'/><category term='Mojarra2'/><category term='Glassfish v2'/><category term='servlet'/><category term='non-rant'/><category term='java ee'/><category term='code'/><category term='3-tier'/><category term='misc'/><category term='JavaEE intro'/><category term='family guy'/><title type='text'>Blog of a programmer</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>72</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-34883908.post-8565385720028550628</id><published>2011-12-21T06:55:00.000-06:00</published><updated>2011-12-21T06:55:57.064-06:00</updated><title type='text'></title><content type='html'>Wow I haven't updated this blog i quite some time!Well.Not much has changed at work.  However we have added Tomcat 6 to our mix but we are currently looking at options to move to Tomcat 7, however, it may be a while be fore we take the plunge.Anyway.I'll post some more snippets of code here.Maybe eventually I'll actually get a series going!Cheers everyone!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-8565385720028550628?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/8565385720028550628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=8565385720028550628' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8565385720028550628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8565385720028550628'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2011/12/wow-i-havent-updated-this-blog-i-quite.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-1725374861506528454</id><published>2011-03-06T13:12:00.000-06:00</published><updated>2011-03-06T13:12:43.677-06:00</updated><title type='text'></title><content type='html'>&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-1725374861506528454?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/1725374861506528454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=1725374861506528454' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/1725374861506528454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/1725374861506528454'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2011/03/blog-post.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-8715279674736954785</id><published>2011-02-23T23:14:00.001-06:00</published><updated>2011-02-23T23:14:56.762-06:00</updated><title type='text'>Grab the software you need.</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;p&gt;Here's a short list of some of the things that you will need to have to follow along with me.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;An actual JDK:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Okay in order to develop with Java you need a Java Development Kit.&lt;/p&gt;&lt;p&gt;I usually run with &lt;a title='OpenJDK' href='http://openjdk.java.net/'&gt;OpenJDK&lt;/a&gt; but you can always choose the &lt;a title='Sun JDK' href='http://www.oracle.com/technetwork/java/javase/downloads/index.html'&gt;Sun JDK&lt;/a&gt;. If you go with OpenJDK get version 6. Simply because that's all I'm going to cover for now. At some time in the near future ditch 6 for 7 but for now stick with 6, it is more tested and has fewer bugs in the JVM.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;A Java EE server:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;You'll need one of these in order to run your crap, er, programs. I like &lt;a title='JBoss' href='http://www.jboss.org/jbossas/downloads'&gt;JBoss&lt;/a&gt; and I usually prefer it for EE 5 development (RedHat just released a EE 6 server but I haven't had time to test drive it). However, here I'm going to be using &lt;a title='Glassfish v 3.0.1' href='http://glassfish.java.net/'&gt;Glassfish v 3.0.1&lt;/a&gt;. It is a EE 6 server, and version 2.1.1 is a very good EE 5 server, it's what we used at work for some time. I'm going to be using the Web Profile version as opposed to the full version. You can grab that if you want but very rarely do I venture into a need for RMI-IIOP (using the server to distribute logic to clients). Later down the road I may cover RMI but for now I'm just going to cover WebEE.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;A database!!:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt; I like &lt;a title='MySQL' href='www.mysql.com'&gt;MySQL&lt;/a&gt;. &lt;a title='PostgreSQL' href='www.postgresql.org'&gt;PostgreSQL&lt;/a&gt; is nice too. I won't get into too many details, in my clique there are some very sided opinions about which is better than the other. Do not forget to pick up the JDBC driver from whoever you choose.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;A JPA library:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt; Glassfish comes with EclipseLink which is an awesome JPA provider. It's also the one that I will be using here. Other than it is provided with Glassfish, I know a good deal of the JPA hints for this stack, so I'm really in my zone with this. If you went out and got JBoss, you'll need to go grab EclipseLink &lt;a title='here' href='http://www.eclipse.org/eclipselink/'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;An IDE:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt; Okay notepad is great and all but at some point you're going to need to ditch it because it sucks as a development tool. Basically at some point everything just blends together and you spend more time trying to parse your source code with your eyes or you spend more and more time with comments to keep everything in some sort of order.&lt;/p&gt;&lt;p&gt; At a bare minimum you need an editor that can do syntax highlighting, this prevents all that black and white running together. One that can do auto-indentation (saves you at least five or ten minutes every day per project), auto-brackets (saves at least two or three minutes per day), and has the terminal very close by is even better (like Kate or gedit.) A full blown-out IDE like Eclipse or NetBeans can shave off thirty minutes to an hour per day per project if you get down in there and learn to really use it.&lt;/p&gt;&lt;p&gt; I'm going to be using NetBeans here for most of the examples. One, because it was one of the first Java IDEs I ever used and two, it was the one my college professor told us to use. See this is why Microsoft is making a killing in our college's in the Untied States, most...(never mind getting off topic).&lt;/p&gt;&lt;p&gt; Go get Netbeans &lt;a title='here' href='www.netbeans.org'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;	That looks like a lot to go get.  Just remember that you are setting up for whatever may come your way.  Aside from having some sort of code repo software (like git or so) you're basically using the same tools that a professional would be using for this task.&lt;/p&gt;&lt;p&gt;&lt;em&gt;Well I better get myself off to bed.  Cheers!&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-8715279674736954785?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/8715279674736954785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=8715279674736954785' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8715279674736954785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8715279674736954785'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2011/02/grab-software-you-need.html' title='Grab the software you need.'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-3581347181619577590</id><published>2011-02-23T22:13:00.001-06:00</published><updated>2011-02-23T22:13:09.673-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaEE intro'/><title type='text'>POJO extends vs implements</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;p&gt;In Java we have two way that we implement inheritance either one &lt;strong&gt;extends&lt;/strong&gt; a super class or &lt;strong&gt;implements&lt;/strong&gt; an interface.&lt;/p&gt;&lt;p&gt;In JavaEE frameworks you will see a lot of this and understanding the difference between the two is pretty important.&lt;/p&gt;&lt;p&gt;Interfaces in Java have no actual code to back up the Interface. In other words implementing an interface requires you to add in all the code for the specified members in the interface. So what's the big deal then with interfaces?! They don't save you time do they? Usually an interface provides a hook into a library or a function of the EE server, so usually an interface will hook one object into another or the server proper.&lt;/p&gt;&lt;p&gt;Extending an object, however, provides the base class' implementation if you're feeling a bit lazy. Usually you will extend base classes to make something more specific to your use case. Going from something like a data table to an Employee data table. In Java you only get to extend one super class, as opposed to interfaces (which you can implement as many as those you want). I remember coming from all my C++ to Java and being frustrated at this.&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;It is also important to know about generics, generics allow your class to apply to more than one data type. For example instead of extending data table into employee data table, one could make data table generic data table&amp;lt;?&amp;gt;. Then you could say data table&amp;lt;Employee&amp;gt; or data table&amp;lt;Student&amp;gt;. Generics are extremely helpful for making common web concepts, like pagination, thumb viewers, and so on. The reason being is that the functionality doesn't change based on data type (A picture swoosher does the same thing to PNG as it would to JPG).&lt;/p&gt;&lt;p&gt;Finally annotations play a huge role in EE development in Java. Annotations allow a developer to add meta-data to their objects. A server can then read in this meta-data and change how it will behave with the object. Annotations only change the user's behavior not the objects. Remember that!&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;So why the lesson in general Object Oriented Programming?  I think some people loose sight of the basics of computer science and that usually tends to lead to bad implementations of concepts.&lt;/p&gt;&lt;p&gt;I remember one time a person creating an interface with the action method to create a step-by-step process.  I went back an implemented as a linked list style reader.  People could use annotations to guide the reader like @PreCondition, @CleanUp,and of course @Action.&lt;/p&gt;&lt;p&gt;Of course no one is perfect, so I wouldn't say that anything on this blog is the end all, be all for implementations.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-3581347181619577590?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/3581347181619577590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=3581347181619577590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/3581347181619577590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/3581347181619577590'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2011/02/pojo-extends-vs-implements.html' title='POJO extends vs implements'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-3986462134716751579</id><published>2011-02-22T01:22:00.001-06:00</published><updated>2011-02-22T01:22:36.534-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaEE intro'/><title type='text'>New Year, New Look, New Goal!</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;p&gt;&lt;strong&gt;So it's a new year and I've changed the look of my Blogger account!&lt;/strong&gt;&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;So I've also decided to realign my goal for info on this blog. The old stuff&lt;/p&gt;&lt;p&gt;will stay but I'm going to be better as keeping to one clear point, following it&lt;/p&gt;&lt;p&gt;through and not get side track too much.&lt;/p&gt;&lt;p/&gt;&lt;p&gt;I think it will be better overall this way.&lt;/p&gt;&lt;p/&gt;&lt;p&gt;SO!  With that let's begin with the first topic.&lt;/p&gt;&lt;p/&gt;&lt;p&gt;JavaEE a broad view of what it is...&lt;/p&gt;&lt;p/&gt;&lt;p&gt;JavaEE is a collection of many different Java components to create a platform for server programming using Java (VM not language).&lt;/p&gt;&lt;p&gt;Basically it allows you to write software that will run and/or be distributed by servers running a JVM with the needed libraries.  It is these libraries that separate JavaSE and JavaEE.&lt;/p&gt;&lt;p/&gt;&lt;p&gt;The platform is currently at version six but remember that the EE platform is a collection of components, each with their own version number.&lt;/p&gt;&lt;p/&gt;&lt;p&gt;Here is a quick table of some of the components in JavaEE 6.  Now this is not a complete list, but this will cover the basics.&lt;/p&gt;&lt;p/&gt;&lt;table cellpadding='0' cellspacing='0' border='1'&gt;&lt;tr&gt;&lt;td&gt;&lt;p align='center'&gt;&lt;span style=' font-size:x-large;'&gt;&lt;strong&gt;Component&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p align='center'&gt;&lt;span style=' font-size:x-large;'&gt;&lt;strong&gt;Version&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p align='center'&gt;&lt;span style=' font-size:x-large;'&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align='left'/&gt;&lt;p/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p align='left'&gt;Servlet&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p align='left'&gt;3.0&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p align='left'&gt;Provides a means for a Java Object to provide a web page&lt;/p&gt;&lt;p align='left'/&gt;&lt;p/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p align='left'&gt;Java Server Pages (JSP)&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p align='left'&gt;2.2&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p align='left'&gt;Allows the creation of Servlets using HTML files and java code embedded in the HTML code (very much like PHP)&lt;/p&gt;&lt;p align='left'/&gt;&lt;p/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p align='left'&gt;Java Server Faces (JSF)&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p align='left'&gt;2.0&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p align='left'&gt;Provides a standard MVC library to HTML pages&lt;/p&gt;&lt;p align='left'/&gt;&lt;p/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p align='left'&gt;Enterprise JavaBeans (EJB)&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p align='left'&gt;3.1&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p align='left'&gt;Provides a means to encapsulate business logic and deploy that logic to clients&lt;/p&gt;&lt;p align='left'/&gt;&lt;p/&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p align='left'&gt;Java Persistence API (JPA)&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p align='left'&gt;2.0&lt;/p&gt;&lt;/td&gt;&lt;td&gt;&lt;p align='left'&gt;Provides a standard persistence layer to databases and Object Relationship Mapping (ORM).&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p/&gt;&lt;p/&gt;&lt;p&gt;  Again this is just a brief overview of all that is in JavaEE 6.&lt;/p&gt;&lt;p/&gt;&lt;p&gt;  Next post will cover POJOs and Interfaces.&lt;/p&gt;&lt;p/&gt;&lt;p&gt;Cheers!&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-3986462134716751579?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/3986462134716751579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=3986462134716751579' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/3986462134716751579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/3986462134716751579'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2011/02/new-year-new-look-new-goal.html' title='New Year, New Look, New Goal!'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-6835049667804513287</id><published>2010-11-29T20:59:00.001-06:00</published><updated>2010-11-29T20:59:27.428-06:00</updated><title type='text'>Screen Scraping and scripting AS400 with Java!!</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;If you are like me you've been pulling your hair out trying to mess with the TN5250 stream so that you can automate things from you Java applications.&lt;br /&gt;&lt;br /&gt;Well stop messing with the protocol itself and let TN5250j do that for you.&lt;br /&gt;&lt;br /&gt;Here's how to do it with Netbeans 6.9:&lt;br /&gt;&lt;br /&gt;First get TN5250j from &lt;a href='http://sourceforge.net/projects/tn5250j/files/tn5250j/0.6.0/tn5250j-0.6.0-bin-nosubdir.zip/download'&gt;here.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Next you will need Netbeans, duh. &lt;a href='http://www.netbeans.org'&gt;Netbeans!&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now start a new Java application.  On the next screen name the program TestApp.&lt;br /&gt;&lt;br /&gt;Now make Main.java say the following:&lt;br /&gt;&lt;br /&gt;&lt;pre class='prettyprint'&gt;&lt;br /&gt;/*&lt;br /&gt; * To change this template, choose Tools | Templates&lt;br /&gt; * and open the template in the editor.&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;package testapp;&lt;br /&gt;&lt;br /&gt;import java.net.UnknownHostException;&lt;br /&gt;import org.tn5250j.Session5250;&lt;br /&gt;import org.tn5250j.beans.ProtocolBean;&lt;br /&gt;import org.tn5250j.framework.tn5250.Screen5250;&lt;br /&gt;import org.tn5250j.framework.tn5250.ScreenPlanes;&lt;br /&gt;&lt;br /&gt;public class Main {&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * @param args the command line arguments&lt;br /&gt;     */&lt;br /&gt;    public static void main(String[] args) throws UnknownHostException, InterruptedException {&lt;br /&gt;        ProtocolBean pb = new ProtocolBean("test", "123");&lt;br /&gt;        pb.setHostName("192.168.1.2");&lt;br /&gt;        Session5250 session = pb.getSession();&lt;br /&gt;        pb.connect();&lt;br /&gt;        Screen5250 screen = session.getScreen();&lt;br /&gt;        char [] buffer = new char[1920];&lt;br /&gt;        StringBuilder sb = new StringBuilder();&lt;br /&gt;        Thread.sleep(3000L);&lt;br /&gt;        screen.GetScreen(buffer, 1920, ScreenPlanes.PLANE_TEXT);&lt;br /&gt;        String showme = new String(buffer);&lt;br /&gt;        for(int i=0;i&amp;lt;showme.length();i+=80) {&lt;br /&gt;            sb.append(showme.substring(i, i+80));&lt;br /&gt;            sb.append("\n");&lt;br /&gt;        }&lt;br /&gt;        System.out.println(sb.toString());&lt;br /&gt;        session.disconnect();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Run your program and you should see the results in your output window.&lt;br /&gt;&lt;br /&gt;Let me run through these lines.  I'll have to break up a detail description of each line over the next few post.&lt;br /&gt;&lt;br /&gt;ProtocolBean is a bean that the TN5250j exposes that allows programmers to use the bulk of TN5250j's api to control the TN5250 data stream.  It wraps all the nasty stuff into one nice little bean.  There is one catch to this.  You cannot use the ProtocolBean inside of the AWT-Event Loop.  So if you are doing a GUI then you'll need to start the session outside of the AWT-Event Loop.&lt;br /&gt;&lt;br /&gt;The ProtocolBean has two constructors.  I'm using the more basic one here.  Using the basic ctor means that you have to call a couple of methods from ProtocolBean before starting up.  I'll cover the other ctor later.  Here we call the setHostName method which should not surprise you that it sets the IP address of the host.&lt;br /&gt;&lt;br /&gt;Oh and by-the-by if you are wondering what the ctor for the protocol bean is doing...  The first argument creates a config file that TN5250j will use and the second names the session.  So if you've ever used the PCOMM ECL then you know all about this, if not, Sessions have two names an ID and a name.  The ID runs from 1 to 65536 or so, in the order that you start them.  The name is whatever you like to call stuff.  Libraries, can access a client by either the ID...  Look I'm getting off topic, we'll save all that for another day.&lt;br /&gt;&lt;br /&gt;Okay next thing is the Session5250.  We grab the session first and then connect.  Long story short, you should always grab the session first and then call the connect method from the protocol bean.&lt;br /&gt;&lt;br /&gt;Next is to grab the screen.  Now I'm on a really slow connection so I added a Thread.sleep() to slow things down.  I'll cover later how you can actually check if the connection is ready to be used.&lt;br /&gt;&lt;br /&gt;First grab the screen into a Screnn5250 object.&lt;br /&gt;Next we need to make a char[] it will act as a buffer for all the data that we will get form the TN5250 stream.  Yes, this is how you must do it.  No, there is no way around it.  I've checked the source code for TN5250j.&lt;br /&gt;&lt;br /&gt;Next I'm just going to print to stdout the actual screen.  My screen defaults to 24x80.  Most of the time this is what the stream will always be.  However, at my company we have a system that does 27x132.  You need to check to make sure that the system isn't requesting 27x132 because most of the time this will make the session end abnormally if you don't report that you can handle 27x132.&lt;br /&gt;&lt;br /&gt;As you can see I use a for loop to add a new line at every 80 chars.  This makes it look exactly like the terminal.&lt;br /&gt;&lt;br /&gt;Oh yeah if you are wondering about that GetScreen method.  The parameters are char[] that will act as the buffer.  How large is the buffer? And from which plane should I get data from?  I'll explain ScreenPlanes.PLANE_TEXT later.  For now that's the one that you want.&lt;br /&gt;&lt;br /&gt;Anyway...&lt;br /&gt;&lt;br /&gt;So then I System.out.println() my StringBuilder.&lt;br /&gt;&lt;br /&gt;Then I call the disconnect method from the session object.&lt;br /&gt;&lt;br /&gt;You can download the source code for TN5250j and read all about the Session5250 and Screen5250 classes.&lt;br /&gt;&lt;br /&gt;I've got to go for now!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-6835049667804513287?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/6835049667804513287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=6835049667804513287' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/6835049667804513287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/6835049667804513287'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/11/screen-scraping-and-scripting-as400.html' title='Screen Scraping and scripting AS400 with Java!!'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-2659131069286414306</id><published>2010-11-01T23:36:00.001-05:00</published><updated>2010-11-01T23:36:21.476-05:00</updated><title type='text'>Oh and...</title><content type='html'>Just wanted to let you all know that the company Glassfish server was moved to version 3.0.1.  We had no problems with 2.1 per se.  We moved to 3.0.1 because we got clustering working, JNLP working, and we really needed some of the features of 3.0.1.  Don't know which ones but the 3.0.1 was the one that we all finally settled on.&lt;br /&gt;&lt;br /&gt;I was pushing JBoss but they would like to see 6.0 out of RC before going down that road.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-2659131069286414306?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/2659131069286414306/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=2659131069286414306' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/2659131069286414306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/2659131069286414306'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/11/oh-and.html' title='Oh and...'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-7467649708842190870</id><published>2010-11-01T23:27:00.001-05:00</published><updated>2010-11-01T23:27:41.854-05:00</updated><title type='text'>Been gone for a while.</title><content type='html'>Well it's sad but I've been a way for a bit, at least blogging.&lt;br /&gt;&lt;br /&gt;As you may know, Oracle bought out Sun and pretty much every Java community that was started by Sun and was still under Sun's wings during the last days have all abandoned Oracle.  I don't blame them.&lt;br /&gt;&lt;br /&gt;So I heard from friends, "So are you going to continue to develop using Java?"&lt;br /&gt;&lt;br /&gt;The answer is of course.  The JVM and the Java platform is not entirely Oracle's, they do have leadership over the core but the community of Java projects still exist, just no longer listening to Oracle.  Oracle is slowly loosing the Java community and with it the fresh ideas that the community has produced, such as JSF 2.0 and EJB 3!&lt;br /&gt;&lt;br /&gt;In the end Oracle will be playing catch up and Java's core will suffer but the community which has driven Java development for the last ten years will still stay strong.  It's a shame because ideas from the community were actually being placed into the core Java spec towards the end of Sun's days.&lt;br /&gt;&lt;br /&gt;Java as a platform isn't dead, the Java community isn't dead, just our relationship with Oracle.  It's a shame that the bottom dollar is the only thing that they seem to think about but it's their bloody company and they can run how they please.&lt;br /&gt;&lt;br /&gt;So what about Oracle's contributions to the open source world?&lt;br /&gt;&lt;br /&gt;If you head over to Oracle's website you'll see the contributions that Oracle has made to the OSS community...&lt;br /&gt;&lt;br /&gt;If you review all of their contributions you will see that they all lead back to Oracle products.  I see their contributions on the same level as the Visual Studio Express versions that Microsoft offers.  The independents will all die a slow death, which is sad because bringing them back via an OSS fork is always a slow to start process.  Just look at OpenOffice.org and now Libre Office.&lt;br /&gt;&lt;br /&gt;This shouldn't come as a surprise to anyone.  But I think that this will make the Java community tighter and closer knit.  Yes it does toss Java back about five to seven years, community / corporate wise, but I think the OpenOffice people are showing us all what the Netbeans, MySQL, Glassfish people will all eventually come to do, break ties with a company that refuses to work with the community and instead does the equal of food dumping into the open source community.&lt;br /&gt;&lt;br /&gt;I will start posting more, I swear this time!  We'll start slow, maybe twice a week?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-7467649708842190870?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/7467649708842190870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=7467649708842190870' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/7467649708842190870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/7467649708842190870'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/11/been-gone-for-while.html' title='Been gone for a while.'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-4075524647214097546</id><published>2010-09-10T21:06:00.001-05:00</published><updated>2010-09-10T21:06:37.528-05:00</updated><title type='text'>Throbber for Java</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Have you ever wanted to do a please wait for a Java application?  Did you want a little spinny logo to animate while they waited?&lt;br /&gt;&lt;br /&gt;As Professor Fransworth would say, "Good news everybody!"&lt;br /&gt;&lt;br /&gt;Let's start out with a preview of the graphic that I'll be using.&lt;br /&gt;&lt;img alt='Spinner Image' src='http://lh4.ggpht.com/_XKZEdtd4GhQ/TIrMsdQk4KI/AAAAAAAAAMQ/yrLv4vLeNqY/s144/g4606.png'/&gt;&lt;br /&gt;&lt;br /&gt;Now this is actually nine different images, I've just haphazardly put them into one image here so you can see what I'm doing.  I made these images in about five minutes using Inkscape but you can use whatever.  You do need to export the images into a format that Java understands, I usually default to png.&lt;br /&gt;&lt;br /&gt;I've named the rotor images rotor1.png through  rotor8.png and the final image (the check mark) as rotord.png.  The check mark is optional and the code below is clear cut enough to be able to remove the check mark.  At any rate I'm placing the images into a package called sample.img&lt;br /&gt;&lt;br /&gt;Now here's what we need to do.  We need to create a custom JFrame (of Swing fame) that will be our spinning logo.  IF you are using Netbeans, &lt;b&gt;DO NOT USE NEW JFrame CLASS&lt;/b&gt;.  If you are using Netbeans select Create New Java class.  This gives you a no frills attached blank document with a shell of a Java class to begin with.  If you do use the JFrame class in Netbeans it adds an XML document behind the scenes that allows you to use the GUI-fied editor, which will only serve to get in your way, in this case at least.&lt;br /&gt;&lt;br /&gt;So let's build our customer JFrame.&lt;br /&gt;&lt;br /&gt;&lt;pre class='prettyprint'&gt;&lt;br /&gt;&lt;br /&gt;package sample.ui;&lt;br /&gt;&lt;br /&gt;import java.awt.Graphics;&lt;br /&gt;import java.awt.Graphics2D;&lt;br /&gt;import java.awt.Image;&lt;br /&gt;import java.awt.Toolkit;&lt;br /&gt;import javax.swing.JPanel;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; *&lt;br /&gt; * @author John Doe&lt;br /&gt; */&lt;br /&gt;public class RotorPanel extends JPanel {&lt;br /&gt;&lt;br /&gt;    private Image[] rotorImg;&lt;br /&gt;    private Image rotorComplete;&lt;br /&gt;    private boolean done;&lt;br /&gt;    private int current = 0;&lt;br /&gt;    private final int max_image = 7;&lt;br /&gt;&lt;br /&gt;    public RotorPanel() {&lt;br /&gt;        this.rotorImg = new Image[max_image+1];&lt;br /&gt;        for(int i=0; i&amp;lt;max_image+1; i++)&lt;br /&gt;            this.rotorImg[i] = Toolkit.getDefaultToolkit().createImage(getClass().getResource("/sample/img/rotor" + (i+1) + ".png"));&lt;br /&gt;        this.rotorComplete = Toolkit.getDefaultToolkit().createImage(getClass().getResource("/sample/img/rotord.png"));&lt;br /&gt;        this.done = false;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @Override&lt;br /&gt;    public void paint(Graphics g) {&lt;br /&gt;        super.paint(g);&lt;br /&gt;        Graphics2D g2 = (Graphics2D) g;&lt;br /&gt;        if(!done)&lt;br /&gt;            g2.drawImage(this.rotorImg[this.current], 0, 0, this);&lt;br /&gt;        else&lt;br /&gt;            g2.drawImage(this.rotorComplete, 0, 0, this);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void increment() {&lt;br /&gt;        this.current++;&lt;br /&gt;        if(this.current&amp;gt;this.max_image)&lt;br /&gt;            this.current = 0;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setDone(boolean done) {&lt;br /&gt;        this.done = done;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public boolean isDone() {&lt;br /&gt;        return done;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As you can see it is pretty straight forward in approach.  The constructor loads the images into an array and sets the done flag to false.  The increment method moves us through the images.  We've overridden the paint method to draw the image.&lt;br /&gt;&lt;br /&gt;Now let's use our JPanel.  If you are using Netbeans, go ahead an use the JDialog template, that's what I'll be covering here.  In Netbeans add a standard JPanel from the palette and then in the properties window click on the code tab.  In the custom creation code add "new RotorPanel()".  This replaces the new javax.swing.JPanel that is found in the protected area (which is controlled by the XML file behind the scenes) with this code, which is what we want.&lt;br /&gt;&lt;br /&gt;Next in the constructor code right after the initComponents call add the following code.&lt;br /&gt;&lt;br /&gt;&lt;pre class='prettyprint'&gt;&lt;br /&gt;        this.t = new Thread() {&lt;br /&gt;            @Override&lt;br /&gt;            public void run() {&lt;br /&gt;                RotorPanel p = (RotorPanel) PleaseWaitDialog.this.jPanel1;&lt;br /&gt;                while(!p.isDone()) {&lt;br /&gt;                    p.increment();&lt;br /&gt;                    p.repaint();&lt;br /&gt;                    try { Thread.sleep(65); }&lt;br /&gt;                    catch (InterruptedException ex) {}&lt;br /&gt;                }&lt;br /&gt;                p.repaint();&lt;br /&gt;            }&lt;br /&gt;        };&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This creates a thread that will call the increment method to rotate the image and then the repaint method which will update our image.  The Thread.sleep(65) call is to sleep 65 ms and then repaint the image, this roughly controls the speed of the animation.  Notice that the loop checks the done flag.  When you are done and want this thread to die, simply call ((RotorPanel) this.jPanel1).setDone(true);&lt;br /&gt;&lt;br /&gt;In 65 ms or less the thread will die because we exit the while loop and the run method of the thread returns.  Of course this doesn't mean that you need to stop displaying something, just that you will no longer be rotating the image, hence the check mark image.  The actual image doesn't go away until you kill the JDialog.&lt;br /&gt;&lt;br /&gt;Pretty simple animation.  If you want better control over animation and what-not, I would suggest looking into the timing framework that is located at &lt;a href='https://timingframework.dev.java.net/'&gt;https://timingframework.dev.java.net/&lt;/a&gt;.  This framework will allow you have a better control over animating something.  However, this is a simple little snippit of code that you can use for simple animations.&lt;br /&gt;&lt;br /&gt;Cheers!&lt;br /&gt;&lt;br /&gt;&lt;p class='scribefire-powered'&gt;Powered by &lt;a href='http://www.scribefire.com/'&gt;ScribeFire&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-4075524647214097546?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/4075524647214097546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=4075524647214097546' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/4075524647214097546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/4075524647214097546'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/09/throbber-for-java.html' title='Throbber for Java'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_XKZEdtd4GhQ/TIrMsdQk4KI/AAAAAAAAAMQ/yrLv4vLeNqY/s72-c/g4606.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-4256910121243389626</id><published>2010-09-02T04:10:00.001-05:00</published><updated>2010-09-02T04:10:19.768-05:00</updated><title type='text'>Websockets are cool!</title><content type='html'>I won't go into a lot of detail today, but I tried out serving up some PHP with websockets enabled.  Websockets are way cool...  I won't go to the end of saying, "OMG!!  This will revolutionize the Internetz!!11!!"  But I must say that this is will be a big game changer in terms of Internet applications.  Combinded with HTML5, web sockets will be the new preferred method for messaging between server and client as opposed to AJAX and similar push technologies.&lt;br /&gt;&lt;br&gt;&lt;br /&gt;The best part of Web Sockets is the simple approach they take to passing messages between client and server combined with just how powerful they truly are.  If you have ever used callback handlers then web sockets will be a very easy topic for you.  You simply register what the web page should be listening for.  You web page emits messages to the server and the server emits messages back.  On each message received the web page checks what has been registered and the action associated with it.&lt;br /&gt;&lt;br&gt;&lt;br /&gt;This has the upshoot of being a write the handler and forget it approach which usually is a disservice to an API, but found that it serves JavaScript quite well.&lt;br /&gt;&lt;br&gt;&lt;br /&gt;The only problem will be getting frameworks to start jumping ship from AJAX to Websockets.  XML can still be passed using Websockets and most likely that's the way most people will go, but any kind of data can be sent and that includes binary data which tends to be faster and more compact than XML.  Most AJAX platforms already present their API as a series of callbacks for people to use in their web pages so Webdevs are already in the right thinking for Websockets.&lt;br /&gt;&lt;br&gt;&lt;br /&gt;Another barrier to websockets is the lack of servers that have support for it.  The PHP version is still in beta and Apache feels that third parties will fill in the void for them.  Jetty (Java server) and a few third party SilverLight stacks provide production grade Websockets at the current moment.  The final barrier is the fact that the Websocket standard hasn't been approved as final by IETF, in fact it's still draft.  So everything in the standard could change in a moments notice.  That alone could keep vendors from adding it to their server.  Browser support is Chrome, Opera, and Firefox 4.  Basically all the next gen browsers, except our favorite browser to hate IE (including the latest IE 9 build).&lt;br /&gt;&lt;br&gt;&lt;br /&gt;All that said Websockets provide a new method of communicating with clients that out matches all currently existing technology and at some point full duplex communications is going to come to all browser and servers, be it websockets or something else down the road.  Most likely Websockets will be the winner the biggest question will be in what shape as the standard could change as we all wait for it to become a final standard.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-4256910121243389626?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/4256910121243389626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=4256910121243389626' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/4256910121243389626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/4256910121243389626'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/09/websockets-are-cool.html' title='Websockets are cool!'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-1134320911774952750</id><published>2010-08-31T22:27:00.001-05:00</published><updated>2010-08-31T22:27:28.077-05:00</updated><title type='text'>Using Cairo with Gtkmm</title><content type='html'>Okay we should be all familiar with the Cairo API.  If this is the first time you've ever heard of Cairo outside of a reference to Egypt then let me give you a quick peek at Cairo.&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;Cairo is pretty much the main library used for drawing anything with vectors.  It is used everywhere, sort of like SQLite.  The website is &lt;a href="http://cairographics.org/"&gt;http://cairographics.org/&lt;/a&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;In the GNOME trifecta of things, Cairo provides the 2D drawing API, whereas Pango provides the Text Rendering API, and Gtk-Glib provide the toolkit/glue for all the above.&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;The neat thing about Cairo is that output is not limited to the screen.  Backends for Cairo can be written for anything, so things drawn in Cairo can be outputted to an SVG file, OpenGL commands, a printer, or to a Pixbuf for use in a very popular web browser (Firefox anyone).&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;So today I'm going to use Cairomm (C++ bindings for Cairo) to do some basic drawing.  Here is our header file justin_draw.h that defines our DrawingArea.&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;#ifndef SAMPLE04_JUSTIN&lt;br /&gt;#define SAMPLE04_JUSTIN&lt;br /&gt;&lt;br /&gt;#include &amp;lt;gtkmm/drawingarea.h&amp;gt;&lt;br /&gt;&lt;br /&gt;class JustinDraw : public Gtk::DrawingArea&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;public:&lt;br /&gt;	JustinDraw();&lt;br /&gt;	virtual ~JustinDraw();&lt;br /&gt;	&lt;br /&gt;protected:&lt;br /&gt;	virtual bool on_expose_event(GdkEventExpose* event);&lt;br /&gt;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;#endif&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;The only thing of note here is that we are going to define an on_expose_event.  This is important because this is the method that is called when the window needs to draw itself.  Either because the Window is new, or we've uncovered the window an exposed a part of it that was under another window.&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;Now let's implement our Gtk::DrawingArea with our justin_draw.cc file:&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;#include "justin_draw.h"&lt;br /&gt;#include &amp;lt;cairomm/context.h&amp;gt;&lt;br /&gt;&lt;br /&gt;JustinDraw::JustinDraw() {}&lt;br /&gt;&lt;br /&gt;JustinDraw::~JustinDraw() {}&lt;br /&gt;&lt;br /&gt;bool JustinDraw::on_expose_event(GdkEventExpose* event) &lt;br /&gt;{&lt;br /&gt;	Glib::RefPtr&amp;lt;Gdk::Window&amp;gt; window = get_window();&lt;br /&gt;	&lt;br /&gt;	if (window)&lt;br /&gt;	{&lt;br /&gt;		Gtk::Allocation a = get_allocation();&lt;br /&gt;		const int w = a.get_width();&lt;br /&gt;		const int h = a.get_height();&lt;br /&gt;		&lt;br /&gt;		int xc, yc;&lt;br /&gt;		xc = w/2;&lt;br /&gt;		yc = h/2;&lt;br /&gt;		&lt;br /&gt;		Cairo::RefPtr&amp;lt;Cairo::Context&amp;gt; cr = window-&amp;gt;create_cairo_context();&lt;br /&gt;		cr-&amp;gt;set_line_width(10.0);&lt;br /&gt;		&lt;br /&gt;		cr-&amp;gt;rectangle(event-&amp;gt;area.x, event-&amp;gt;area.y, event-&amp;gt;area.width, event-&amp;gt;area.height);&lt;br /&gt;		cr-&amp;gt;clip();&lt;br /&gt;		&lt;br /&gt;		cr-&amp;gt;set_source_rgb(0.8, 0.0, 0.0);&lt;br /&gt;		cr-&amp;gt;move_to(0,0);&lt;br /&gt;		cr-&amp;gt;line_to(xc,yc);&lt;br /&gt;		cr-&amp;gt;line_to(0,h);&lt;br /&gt;		cr-&amp;gt;move_to(xc,yc);&lt;br /&gt;		cr-&amp;gt;line_to(w,yc);&lt;br /&gt;		cr-&amp;gt;stroke();&lt;br /&gt;	}&lt;br /&gt;	&lt;br /&gt;	return true;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;Notice a couple of things here before we move on.  Drawing an entire screen with Cairo should be done very rarely.  Not to say Cairo is slow but there is no need to waste time on drawing.  The cr-&amp;gt;rectangle(...); cr-&amp;gt;clip(); parts allow us to focus on only the part of the window that has changed.  Pretty much all code that uses Cairo has something similar to this so it's a good idea to include something like this in you code before you actually do any drawing.&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;Also notice that we are using a Cairo::RefPtr.  Yes Cairo has it's own type of RefPtr's that you must use to hold Cairo related things.  You have no idea how much time you can waste using the wrong type of RefPtr.&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;Finally, our program that uses our new Gtk::DrawingArea.  main.cc&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;#include "justin_draw.h"&lt;br /&gt;#include &amp;lt;gtkmm/main.h&amp;gt;&lt;br /&gt;#include &amp;lt;gtkmm/window.h&amp;gt;&lt;br /&gt;&lt;br /&gt;int main(int argc, char** argv)&lt;br /&gt;{&lt;br /&gt;   Gtk::Main kit(argc, argv);&lt;br /&gt;&lt;br /&gt;   Gtk::Window win;&lt;br /&gt;   win.set_title("DrawingArea");&lt;br /&gt;&lt;br /&gt;   JustinDraw area;&lt;br /&gt;   win.add(area);&lt;br /&gt;   area.show();&lt;br /&gt;&lt;br /&gt;   Gtk::Main::run(win);&lt;br /&gt;&lt;br /&gt;   return 0;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;And that's all there is to it!  You can hit up basically any manual on Cairo to find all the 2D API commands.  It's basically a 1:1 translation between the C and C++ bindings so you shouldn't have any problems there.&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;Tomorrow I'm going to cover Making a throbbing image in Java, because I'm gotten two emails over the last four days asking how to do that.  Till then, Cheers!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-1134320911774952750?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/1134320911774952750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=1134320911774952750' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/1134320911774952750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/1134320911774952750'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/08/using-cairo-with-gtkmm.html' title='Using Cairo with Gtkmm'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-8587536217368813356</id><published>2010-08-29T20:48:00.001-05:00</published><updated>2010-08-29T20:48:55.122-05:00</updated><title type='text'>Trying out L2TPv3 in Linux 2.6.35.4</title><content type='html'>So I built me a 2.6.35.4 kernel to try out the new L2TPv3 support offered in this kernel.&lt;br /&gt;&lt;br /&gt;L2TPv3 is pretty good and the newest kernel provides awesome RFC 3931 support, but I would advise some people to stick with L2TPv2.  Not a lot of 3rd party vendors are there yet and the newest version has a lot of overhead over the wire.&lt;br /&gt;&lt;br /&gt;I'm still on the fence about btrfs.  I'll give it another six months before I actually change my LVM over.&lt;br /&gt;&lt;br /&gt;Oh and by the by.  The new kernel improves LVM response by about 5% - 10% depending on setup.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-8587536217368813356?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/8587536217368813356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=8587536217368813356' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8587536217368813356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8587536217368813356'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/08/trying-out-l2tpv3-in-linux-26354.html' title='Trying out L2TPv3 in Linux 2.6.35.4'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-4832569979643888002</id><published>2010-08-13T02:02:00.000-05:00</published><updated>2010-08-13T02:03:13.696-05:00</updated><title type='text'></title><content type='html'>I hate Jennifer Aniston.&lt;br /&gt;&lt;br /&gt;This is f'ing funny.&lt;br /&gt;&lt;br /&gt;&lt;object width="480" height="430"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://o.onionstatic.com/flash/video/embedded_player.swf?videoid=17768" /&gt;&lt;param name="wmode" value="transparent" /&gt;&lt;embed src="http://o.onionstatic.com/flash/video/embedded_player.swf" type="application/x-shockwave-flash" allowScriptAccess="always" allowFullScreen="true" wmode="transparent" width="480" height="430" flashvars="videoid=17768"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;a href="http://www.theonion.com/video/jennifer-aniston-adopts-33yearold-boyfriend-from-a,17768/"&gt;Jennifer Aniston Adopts 33-Year-Old Boyfriend From Africa&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-4832569979643888002?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/4832569979643888002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=4832569979643888002' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/4832569979643888002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/4832569979643888002'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/08/i-hate-jennifer-aniston.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-2734751577699117074</id><published>2010-08-04T03:49:00.001-05:00</published><updated>2010-08-04T03:49:15.333-05:00</updated><title type='text'>A Quick try of Gtkmm</title><content type='html'>Okay I figure I would give my hand a try at some Gtkmm.  The API is pretty much like most curses and Java Windowing framework.  So let's do a quick sample.&lt;br /&gt;&lt;br /&gt;Let's start with our header file for the Window, we'll call it window1.h&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;#ifndef WINDOW_1_DEF_H&lt;br /&gt;#define WINDOW_1_DEF_H&lt;br /&gt;&lt;br /&gt;#include&amp;lt;gtkmm/window.h&amp;gt;&lt;br /&gt;#include&amp;lt;gtkmm/button.h&amp;gt;&lt;br /&gt;#include&amp;lt;gtkmm/entry.h&amp;gt;&lt;br /&gt;#include&amp;lt;gtkmm/box.h&amp;gt;&lt;br /&gt;&lt;br /&gt;class Window1 : public Gtk::Window {&lt;br /&gt;&lt;br /&gt;public:&lt;br /&gt;&lt;br /&gt;	Window1();&lt;br /&gt;	virtual ~Window1();&lt;br /&gt;	&lt;br /&gt;protected:&lt;br /&gt;&lt;br /&gt;	void on_button1_clicked();&lt;br /&gt;&lt;br /&gt;private:&lt;br /&gt;&lt;br /&gt;	Gtk::Button button1, button2;&lt;br /&gt;	Gtk::Entry entry1;&lt;br /&gt;	Gtk::VBox vbox1;&lt;br /&gt;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;#endif&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;All of that should explain itself.  Basically the object is a Gtk::Window, which is the top level container (widget, whatever you want to call it).  We are adding two Gtk::Button, a Gtk::Entry (text entry widget), and a Gtk::VBox which is the layout container.&lt;br /&gt;&lt;br /&gt;Now the fun thing about Gtkmm is that you don't have to "new" objects into existence.  Instead Gtkmm will handle the memory allocation for you &lt;b&gt;in most cases!!&lt;/b&gt;  However, if you need to dynamically allocate objects or you need them outside of the class scope then your own your own, unless you use the Gtkmm smart pointer Glib::RefPtr&lt;&gt;, which is basically the same as the std::auto_ptr&lt;&gt; for those of you who have studied standard C++.&lt;br /&gt;&lt;br /&gt;Okay let's implement the window, this will be in most logically window1.cc&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;#include "window1.h"&lt;br /&gt;#include &amp;lt;iostream&amp;gt;&lt;br /&gt;#include&amp;lt;gtkmm/main.h&amp;gt;&lt;br /&gt;&lt;br /&gt;Window1::Window1() : button1("Print"), button2("Ouit") {&lt;br /&gt;&lt;br /&gt;	set_size_request(200,100);&lt;br /&gt;	set_title("Text Entry Demo");&lt;br /&gt;	&lt;br /&gt;	add(vbox1);&lt;br /&gt;&lt;br /&gt;	entry1.set_max_length(25);&lt;br /&gt;	entry1.set_text("Enter something");&lt;br /&gt;	entry1.select_region(0,entry1.get_text_length());&lt;br /&gt;	&lt;br /&gt;	vbox1.add(entry1);&lt;br /&gt;&lt;br /&gt;	button1.signal_clicked().connect(sigc::mem_fun(*this,&amp;Window1::on_button1_clicked));&lt;br /&gt;	button2.signal_clicked().connect(sigc::ptr_fun(&amp;Gtk::Main::quit));&lt;br /&gt;&lt;br /&gt;	vbox1.add(button1);&lt;br /&gt;	vbox1.add(button2);&lt;br /&gt;	&lt;br /&gt;	show_all();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Window1::~Window1() {&lt;br /&gt;	using namespace std;&lt;br /&gt;	cout &amp;lt;&amp;lt; "Say goodbye" &amp;lt;&amp;lt; endl;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void Window1::on_button1_clicked() {&lt;br /&gt;	std::cout &amp;lt;&amp;lt; "You have entered: " &amp;lt;&amp;lt; entry1.get_text() &amp;lt;&amp;lt; std::endl;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Okay this one has a couple of things to cover.  Like what the heck is the sigc namespace?!&lt;br /&gt;&lt;br /&gt;sigc is the library that Gtkmm uses to implement callbacks.  A callback is a function or method that is called from another function.  Basically the on_click method of your buttons gets called when you click on them.  The method basically says, when I'm clicked run ________(insert blank line)________.  The callback fills in the blank line.&lt;br /&gt;&lt;br /&gt;Now historically there is basically one way to do this in C, but in C++ there must be at least a dozen libraries that do this.  I won't get into why this is because that's a much bigger topic.&lt;br /&gt;&lt;br /&gt;At anyrate, sigc is the tool that Gtkmm has chosen to implement callbacks.  sigc has two ways to add callbacks.  mem_fun and ptr_fun, both used here.  mem_fun, allows you to call a method and ptr_fun allows you to call a function.  Pretty clear cut there.  As you can see I've connected the button2's click to the Gtk::Main::quit, which of course does what it says.  Quits.&lt;br /&gt;&lt;br /&gt;The other button, button1, I've connected to the on_button1_clicked method.  This method simply uses standard C++ cout to write information to standard out.  You may notice that I use the entry1.get_text() method within the on_button1_clicked() method and that I don't cast it's result to std::string.  That's the neatest part of Gtkmm is that it was made to work with the C++ STL so well.  Gtkmm already implements the logic needed to cast Glib::ustring (which is what the get_text() wethod returns) to std::string.&lt;br /&gt;&lt;br /&gt;The rest of the code is pretty simple to follow.&lt;br /&gt;&lt;br /&gt;So now that we have implemented our window we need an application that actually uses it.&lt;br /&gt;&lt;br /&gt;I present main.cc&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;#include&amp;lt;gtkmm/main.h&amp;gt;&lt;br /&gt;#include"window1.h"&lt;br /&gt;&lt;br /&gt;int main(int argc, char *argv[]){&lt;br /&gt;&lt;br /&gt;	Gtk::Main kit(argc, argv);&lt;br /&gt;	Window1 w;&lt;br /&gt;	Gtk::Main::run(w);&lt;br /&gt;&lt;br /&gt;	return 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This is as basic as you can make an application that uses our window.&lt;br /&gt;&lt;br /&gt;The results are here.&lt;br /&gt;&lt;img src="http://lh4.ggpht.com/_XKZEdtd4GhQ/TFkhSVAlvFI/AAAAAAAAALs/664hxq7eAsg/s144/Screenshot-Text%20Entry%20Demo.png" /&gt;&lt;br /&gt;&lt;br /&gt;Clicking on the Print button outputs the text box on standard out and clicking quit, well quits.  As you can see Gtkmm is very much like most other Toolkits, semantics are a little different here and there and you'll use some of the core tools of Gtkmm a little differently but overall you'll easily see how Gtkmm compares to things like SWT, Swing, and QT.&lt;br /&gt;&lt;br /&gt;And since I said something about QT, it's worth saying something about it.  If you have ever used QT then you know about it's signal/slot system and moc.  Well Gtkmm takes the "high road" on this one and uses sigc to implement callbacks in a C++ standard-ish kind of way.  The downfall of this, however, is that every callback must be statically typed.  This amounts to a lot of double work.  If you implement a signal connection in Glade, you must also implement that connection in Gtkmm by importing the widget and then using sigc.&lt;br /&gt;&lt;br /&gt;I know this is one of the downfalls of C++'s strong type safety system and name mangling system.  QT gets around this with moc but then using moc makes your code non-C++ standard compliant, which I don't think anybody really has a problem with except the people behind Gtkmm.&lt;br /&gt;&lt;br /&gt;At anyrate, at risk for getting way off topic, Gtkmm is a neat little wrapper around Gtk+ and you should give it a whirl.  You'll be making Gtk+ applications in no time, and best of all is the Gtkmm library works on Windows, Mac, Linux, BSD, and other Unix systems.&lt;br /&gt;&lt;a href="http://www.gtkmm.org"&gt;Link to Gtkmm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-2734751577699117074?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/2734751577699117074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=2734751577699117074' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/2734751577699117074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/2734751577699117074'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/08/quick-try-of-gtkmm_2062.html' title='A Quick try of Gtkmm'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_XKZEdtd4GhQ/TFkhSVAlvFI/AAAAAAAAALs/664hxq7eAsg/s72-c/Screenshot-Text%20Entry%20Demo.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-4050417304226016727</id><published>2010-08-03T23:07:00.000-05:00</published><updated>2010-08-04T04:08:54.521-05:00</updated><title type='text'>Is it just me?</title><content type='html'>Does it seem that Colbie Caillat has incredibly "wide" eyes?  Is that even a thing?  Maybe, I'm just mental?&lt;br /&gt;&lt;br /&gt;&lt;img src="http://lh6.ggpht.com/_XKZEdtd4GhQ/TFks231RAaI/AAAAAAAAALw/WJn2dCF5-_4/s144/cc-eye-width.png" /&gt;&lt;br /&gt;&lt;br /&gt;Oh her song on the radio is a nifty little tune, and she was on the the Next Food Network Star show too.  Before that I would have sworn that you were talking about a type of cheese.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-4050417304226016727?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/4050417304226016727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=4050417304226016727' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/4050417304226016727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/4050417304226016727'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/08/is-it-just-me.html' title='Is it just me?'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_XKZEdtd4GhQ/TFks231RAaI/AAAAAAAAALw/WJn2dCF5-_4/s72-c/cc-eye-width.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-993638300996713834</id><published>2010-07-24T10:01:00.001-05:00</published><updated>2010-07-24T10:01:24.361-05:00</updated><title type='text'>Working on a neat project</title><content type='html'>Usually I have the most fun with design and coding.  Rarely do I go back and play with the UI in the sense of having fun with it.&lt;br /&gt;&lt;br /&gt;It's just mostly checking if the UI is okay and if there are any bugs/misspellings.&lt;br /&gt;&lt;br /&gt;Well I've just got a project that I'm having fun with the UI as well because the interface is a Text based User Interface (TUI, if you are so inclined to use that).&lt;br /&gt;&lt;br /&gt;It's cool using &lt;a href="http://sourceforge.net/projects/javacurses/"&gt;JCurses&lt;/a&gt;.  JCurses is a very loose JNI for the Curses environment, nCurses on Linux.  Since it does use JNI that means that you do loose the cross platform compatibility, but JCurses comes with sources and Win32 and Linux x86 binary libraries.&lt;br /&gt;&lt;br /&gt;I've been able to compile JCurses for Linux amd64, Mac OSX, and PPA systems.  So you should be covered for systems that you may want to run this on.(Note:  I don't have access to an ARM chip so I don't know if you can use JCurses there).&lt;br /&gt;&lt;br /&gt;The setup at work is to provide a SSH session via RF scanner to our warehouse users, noting new there we've been serving TN-5250 sessions via wireless for the past fifteen years (longer than I've been there).&lt;br /&gt;&lt;br /&gt;However, this is the first time that I've actually been calling EJBs from a text based interface.  The principal is basically the same, call the remote endpoint from the Java code, present results bark to user.&lt;br /&gt;&lt;br /&gt;The fun part is with a text based interface, you really have to concentrate on features and how you present them.  A screen full of text is impossible to use effectively, and the more options you present at once the more cluttered the screen appears.&lt;br /&gt;&lt;br /&gt;I've found that the best way to break up things is not present all the needed input at once, but instead to take an ask on need approach.  So when the next step is to get an EAN or UCC128 code that's what you ask and only that and the options that might effect that.&lt;br /&gt;&lt;br /&gt;Also, keyboard functions are limited to basically, TAB, ENTER, F1 through F4, the numbers 0 through 9, and BACKSPACE.  Obviously there are no mouse functions.&lt;br /&gt;&lt;br /&gt;All of this, limited input, limited screen size, and limited ways of getting the user's attention (Curses can only ring the system bell) really forces you to really think out the UI in a manner that end users usually can't help with.&lt;br /&gt;&lt;br /&gt;That's not to say that I never think of the UI for GUIs, but usually we have a company layout and guideline on how our GUIs are created.  You simply follow that, get end user feedback, and modify as needed without breaking something.&lt;br /&gt;&lt;br /&gt;I'll have to post some examples of JCurses and EJBs soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-993638300996713834?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/993638300996713834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=993638300996713834' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/993638300996713834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/993638300996713834'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/07/working-on-neat-project.html' title='Working on a neat project'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-2577311813257353456</id><published>2010-07-21T04:28:00.001-05:00</published><updated>2010-07-21T04:28:11.460-05:00</updated><title type='text'>Heading on the road, again.</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Well.  I'm heading on the road again.  Travel sucks and double much when it is business travel.  The hope is that this round is my last round for a good bit of time, &lt;i&gt;until next year.&lt;/i&gt;&lt;br/&gt;&lt;br/&gt;At any rate, I've really got to get back to blogging because I enjoyed it so much.&lt;br/&gt;&lt;br/&gt;I've had time in the air to think of some little projects that I'd like to do personally on my system.  I'll have to share them when I'm not in the air.  Also, trains suck.  It never fails that I am delayed twenty minutes going to anywhere by a train crossing.  Just yesterday while going from one building to another I wasted forty-five minutes, the break down is as follows:&lt;br/&gt;&lt;br/&gt;&lt;ol&gt;&lt;li&gt;Rail construction, the construction train was at the crossing on Highway 11.  &lt;b&gt;Wasted 23 minutes.&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Slow moving train coming back via different route.  &lt;b&gt;Wasted 17 minutes.&lt;/b&gt;&lt;/li&gt;&lt;li&gt;What the heck! A mostly unused train track is being used to move cargo into a rail-yard.&lt;b&gt; Wasted 9 minutes.&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;That last one was just to spite me.  I think CSX personally has a vendetta out on me.&lt;br/&gt;&lt;br/&gt;Well I'm off.  Cheers!&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/34883908-2577311813257353456?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/2577311813257353456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=2577311813257353456' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/2577311813257353456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/2577311813257353456'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/07/heading-on-road-again.html' title='Heading on the road, again.'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-8385916843642274739</id><published>2010-06-14T16:44:00.002-05:00</published><updated>2010-06-14T21:22:08.273-05:00</updated><title type='text'></title><content type='html'>&lt;p class="mobile-photo"&gt;&lt;a href="http://3.bp.blogspot.com/_XKZEdtd4GhQ/TBaiwf0F_TI/AAAAAAAAAKw/v2yr5BYowaE/s1600/0614001742-773616.jpg"&gt;&lt;img src="http://3.bp.blogspot.com/_XKZEdtd4GhQ/TBaiwf0F_TI/AAAAAAAAAKw/v2yr5BYowaE/s320/0614001742-773616.jpg"  border="0" alt="" id="BLOGGER_PHOTO_ID_5482748550427573554" /&gt;&lt;/a&gt;&lt;/p&gt;Where I work trains are a big problem. they can take up to fifteen minutes some times like this guy.&lt;br /&gt;From my phone.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-8385916843642274739?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/8385916843642274739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=8385916843642274739' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8385916843642274739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8385916843642274739'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/06/where-i-work-trains-are-big-problem.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_XKZEdtd4GhQ/TBaiwf0F_TI/AAAAAAAAAKw/v2yr5BYowaE/s72-c/0614001742-773616.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-4789218020184868877</id><published>2010-06-03T23:18:00.002-05:00</published><updated>2010-06-03T23:36:15.047-05:00</updated><title type='text'></title><content type='html'>Yeah I know.  I've been on the road for company related stuff.&lt;br /&gt;&lt;br /&gt;So I've shown how to add security annotations to a pretty vanilla EJB.  When you develop EJBs remember to keep them limited in scope.  For example, if you have an EJB that handles Inbound orders (placeOrder, reviewOrder, cancelOrder, addToOrder, removeFromOrder, etc...) do not feature creep by having that same EJB handle Outbound orders or worst yet schedule orders in a calendar app.&lt;br /&gt;&lt;br /&gt;I cannot tell you the number of times that I've run across an EJB where 30% of the code really belongs in its own EJB unit.  For example the calendar app should view Inbound orders as a &lt;span style="font-weight:bold;"&gt;Collection&lt;/span&gt; not as a derived member called SchdOrd (PS use freaking descriptive names!  The next guy will not understand that OrdTckChcExc is short for Order Ticket Cache Exchange; nor will that name mean anything to them.)  A calendar *HAS A* Collection of Inbound orders makes more sense than A Scheduled Order *IS AN* Inbound Order.&lt;br /&gt;&lt;br /&gt;The reason it makes more sense?  Just because something is a something else does not mean that the logic for the unit is clarified by the statement.  The statement only implies a date an doesn't do a very good job of telling anyone what that date means to anybody.  A calendar (thus we get the date concept) has a (okay that tells us something about storage) collection (alrighty this tells us that we are going to be looking at a lot of similar things at once) of Inbound orders.&lt;br /&gt;&lt;br /&gt;As you can see the HAS A statement tell more about the underlying logic than the IS A statement.  So, more than likely by Justin's 23rd rule of programming, the logic will be easier to implement.&lt;br /&gt;&lt;br /&gt;I'm getting off on a tangent here, sorry.&lt;br /&gt;&lt;br /&gt;Next post I'll cover using a JAAS callback to implement acustom login dialog and how to handle a failed login, yes you do have to handle those Glassfish will not do it for you.&lt;br /&gt;&lt;br /&gt;Cheers!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-4789218020184868877?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/4789218020184868877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=4789218020184868877' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/4789218020184868877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/4789218020184868877'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/06/yeah-i-know.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-5356854884430789047</id><published>2010-05-26T14:58:00.001-05:00</published><updated>2010-05-26T14:58:04.252-05:00</updated><title type='text'></title><content type='html'>&lt;p class="mobile-photo"&gt;&lt;a href="http://2.bp.blogspot.com/_XKZEdtd4GhQ/S_19THraXZI/AAAAAAAAAKY/PqMxtUt9jpI/s1600/0526001256-784253.jpg"&gt;&lt;img src="http://2.bp.blogspot.com/_XKZEdtd4GhQ/S_19THraXZI/AAAAAAAAAKY/PqMxtUt9jpI/s320/0526001256-784253.jpg"  border="0" alt="" id="BLOGGER_PHOTO_ID_5475670489384508818" /&gt;&lt;/a&gt;&lt;/p&gt;Had my first in and out burger. awesome.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-5356854884430789047?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/5356854884430789047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=5356854884430789047' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/5356854884430789047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/5356854884430789047'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/05/had-my-first-in-and-out-burger.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_XKZEdtd4GhQ/S_19THraXZI/AAAAAAAAAKY/PqMxtUt9jpI/s72-c/0526001256-784253.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-8542782132164677320</id><published>2010-05-24T13:26:00.001-05:00</published><updated>2010-05-24T13:26:53.901-05:00</updated><title type='text'>teenage girl won't stop fighting</title><content type='html'>teenage girl won&amp;#39;t stop fighting mom on aa flight1959. So we&amp;#39;re landing in Phoenix. She was hand cuffed! Flight delay!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-8542782132164677320?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/8542782132164677320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=8542782132164677320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8542782132164677320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8542782132164677320'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/05/teenage-girl-wont-stop-fighting.html' title='teenage girl won&apos;t stop fighting'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-4304768631428166235</id><published>2010-05-22T13:36:00.001-05:00</published><updated>2010-05-22T13:36:29.568-05:00</updated><title type='text'>Posting from my phone!</title><content type='html'>So I can post during those long drives (If I was to type at say four letters a minute, I&amp;#39;d fill more than one text message).  Just to give you some scope of how long my drive to work is.  Cheers!&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-4304768631428166235?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/4304768631428166235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=4304768631428166235' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/4304768631428166235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/4304768631428166235'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/05/posting-from-my-phone.html' title='Posting from my phone!'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-1664626052000432627</id><published>2010-05-22T10:54:00.002-05:00</published><updated>2010-07-21T04:17:27.049-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Glassfish v2'/><category scheme='http://www.blogger.com/atom/ns#' term='JSF2'/><category scheme='http://www.blogger.com/atom/ns#' term='Mojarra2'/><title type='text'>The switch to v2 over v3.</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;We had to downgrade to Glassfish v2.1.1 at work and I've been busy making sure everything is running smoothly.  Our biggest issue (since I don't want to go on a rant about glassfish I'll just leave it at this issue) was the Java Web Start snafu.  I know that the real problem lies with the JRE but we can keeping making workarounds on our Apache server and making custom JNPL's.&lt;br/&gt;&lt;br/&gt;At any rate our requirement of JSF 2.0 was easily assuaged and I'd like to share that with you.&lt;br/&gt;&lt;br/&gt;You can get all the information to install Mojarra v2.0.2 on Glassfish v2.1.1 form &lt;a href='https://javaserverfaces.dev.java.net/nonav/rlnotes/2.0.0/releasenotes.html'&gt;here.&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Just follow those and you'll be able to deploy JSF 2.0 pages in no time!&lt;br/&gt;&lt;br/&gt;&lt;b&gt;UPDATE ON 7/21/2010:&lt;br/&gt;&lt;/b&gt;Just so you know we're sticking with Glassfish v2.1.1 but the Glassfish 3.0.1 server has the issue pretty much fixed for most cases.&lt;br/&gt;&lt;br/&gt;The upshoot with v2 is that we can actual take our three glassfish servers and have them talk to each other to keep everyone up to date!  Our v3 system had a cron, shell script, and NFS mount to do that but the v2 way is much better.&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/34883908-1664626052000432627?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/1664626052000432627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=1664626052000432627' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/1664626052000432627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/1664626052000432627'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/05/we-had-to-downgrade-to-glassfish-v2.html' title='The switch to v2 over v3.'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-8902438648486084482</id><published>2010-05-01T11:09:00.001-05:00</published><updated>2010-05-01T11:12:53.831-05:00</updated><title type='text'>Apple will destroy you!  Try not to be happy about how shiny your death will be.</title><content type='html'>Apple is the anti-Christ of computers.  For years we all hated on Microsoft because they we're big bullies who try to take over everything.  Now, don't get me wrong MS is evil, they will want you to use whatever they sell, but that have come to the conclusion that they can't control everything.&lt;br /&gt;&lt;br /&gt;Enter Apple, they do believe that they can control everything, they will control how you get books on your iPad, they will control which book you have access to, they will control which apps you can buy, they will control how and when you can use said apps you just bought, they control what you can and can not do on the Internet, they control how you will use the Internet, they control how you have access to content, they control the content that you access...&lt;br /&gt;&lt;br /&gt;I could go on forever, in short, it will be Apple's way or no way.  It will be Apple's software or no software.  In no way is Apple equal to a free market of any sorts and in every single way possible is Apple total vendor lock-in.  Once you go Apple it is over, you no longer have *your* documents, you have access to *Apple's* documents.&lt;br /&gt;&lt;br /&gt;This all come in the wake of Apple's latest move to destroy Google's platform, increase the operating cost of YouTube, lock out any Microsoft tools, destroy any sharing between KHTML devs and WebKit devs, and now their move to remove Adobe and Ogg from the Internet.&lt;br /&gt;&lt;br /&gt;I know what most people would say, just don't buy Apple, good luck on getting that to work.  I'm currently on the campaign (since I'm tired of Apple treating open source like a little redheaded bitch) to ensure that people I know don't buy Apple ever again.  I ask anyone and everyone who believes in a open world of software to get the word out that Apple is the largest private company threat to everyone's freedom on the Internet.  Apple, don't buy into it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-8902438648486084482?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/8902438648486084482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=8902438648486084482' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8902438648486084482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8902438648486084482'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/05/apple-will-destroy-you-try-not-to-be.html' title='Apple will destroy you!  Try not to be happy about how shiny your death will be.'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-1001564082945751610</id><published>2010-04-12T22:12:00.001-05:00</published><updated>2010-04-12T22:12:10.793-05:00</updated><title type='text'>Where was I?</title><content type='html'>So sorry.  Lost track of what I was doing here.  I'll try to keep that to a minimum.&lt;br /&gt;&lt;br /&gt;At any rate.  If you are using Glassfish v3 to serve up application clients via Java Web Start, then check your client's (the people who will be running your crap) JVM.  JRE 1.6 u 18 has a nasty bug that prevents Glassfish v3 JWS from working correctly.&lt;br /&gt;&lt;br /&gt;I've got to get back on this horse.  I'll see you all soon!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-1001564082945751610?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/1001564082945751610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=1001564082945751610' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/1001564082945751610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/1001564082945751610'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/04/where-was-i.html' title='Where was I?'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-8959947049132197532</id><published>2010-04-01T04:07:00.000-05:00</published><updated>2010-04-01T04:16:09.303-05:00</updated><title type='text'></title><content type='html'>What's going on?  I know it has been awhile since my last post.  Been a bit busy, also workplace has banned blogger from the network.  So I'm posting this from my Wii.  Fun stuff!  Gnome 2.30 is released if you are into that kind of thing. happy April fools day!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-8959947049132197532?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/8959947049132197532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=8959947049132197532' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8959947049132197532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8959947049132197532'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/04/whats-going-on-i-know-it-has-been.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-4341758060427016830</id><published>2010-03-02T04:41:00.001-06:00</published><updated>2010-03-02T04:41:25.097-06:00</updated><title type='text'>Adding Security to EJB</title><content type='html'>Alright let's take a quick look at the HelloBean.java file with security annotations:&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;package com.blogger.ramen;&lt;br /&gt;&lt;br /&gt;import javax.ejb.Stateless;&lt;br /&gt;import javax.annotation.security.RolesAllowed;&lt;br /&gt;import javax.annotation.security.DeclareRoles;&lt;br /&gt;&lt;br /&gt;@Stateless(name="HelloBean")&lt;br /&gt;@DeclareRoles("SecureUser")&lt;br /&gt;public class HelloBean implements HelloRemote {&lt;br /&gt;&lt;br /&gt;        @RolesAllowed("SecureUser")&lt;br /&gt;        public String sayHello() {&lt;br /&gt;                return "Hello from EJB!";&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As you can see I've added the DeclareRoles and RolesAllowed annotations.  The EJB container will read the meta-data in the class see the annotations and enforce the security described in them.  This happens each time you call the method since it is Stateless.&lt;br /&gt;&lt;br /&gt;So the next question is how does the container know you belong to the SecureUser role?  Because the security mappings in your sun-ejb-jar.xml file.  Here's what you need to add:&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 EJB 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0.dtd"&amp;gt;&lt;br /&gt;&amp;lt;sun-ejb-jar&amp;gt;&lt;br /&gt;  &amp;lt;enterprise-beans&amp;gt;&lt;br /&gt;    &amp;lt;ejb&amp;gt;&lt;br /&gt;      &amp;lt;ejb-name&amp;gt;HelloBean&amp;lt;/ejb-name&amp;gt;&lt;br /&gt;      &amp;lt;jndi-name&amp;gt;ejb/Helloness/HelloThere&amp;lt;/jndi-name&amp;gt;&lt;br /&gt;      &amp;lt;ior-security-config&amp;gt;&lt;br /&gt;          &amp;lt;as-context&amp;gt;&lt;br /&gt;             &amp;lt;auth-method&amp;gt;USERNAME_PASSWORD&amp;lt;/auth-method&amp;gt;&lt;br /&gt;             &amp;lt;realm&amp;gt;OurDBRealm&amp;lt;/realm&amp;gt;&lt;br /&gt;             &amp;lt;required&amp;gt;true&amp;lt;/required&amp;gt;&lt;br /&gt;          &amp;lt;/as-context&amp;gt;&lt;br /&gt;        &amp;lt;/ior-security-config&amp;gt;&lt;br /&gt;    &amp;lt;/ejb&amp;gt;&lt;br /&gt;  &amp;lt;/enterprise-beans&amp;gt;&lt;br /&gt;&amp;lt;/sun-ejb-jar&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As you can see the &amp;lt;ior-security-config&amp;gt; and all of it's friends to add a realm to our EJB.  Our realm being OurDBRealm that we already setup using the JDBCRealm method that was given earlier.  We need to add one more thing to that file, our security mapping, this will map something that will match an entry in the JDBCRealm with the annotation we've giving here.  We add this snippit right after the &amp;lt;sun-ejb-jar&amp;gt; element.&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;&amp;lt;security-role-mapping&amp;gt;&lt;br /&gt;    &amp;lt;role-name&amp;gt;SecureUser&amp;lt;/role-name&amp;gt;&lt;br /&gt;    &amp;lt;group-name&amp;gt;SUSER&amp;lt;/group-name&amp;gt;&lt;br /&gt;&amp;lt;/security-role-mapping&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Deploy your EJB and rerun your client. You should get the default login prompt that's built into Glassfish.  Login with the information you've stored in the database and you should see results.  Viola!  Secure EJB.  Of course, if you give bad login information then you will get an exception.  At any rate this is a pretty cut and dry use of secure EJBs.  We'll look at how to provide your own login dialog and how to catch exceptions on login.&lt;br /&gt;&lt;br /&gt;Cheers!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-4341758060427016830?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/4341758060427016830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=4341758060427016830' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/4341758060427016830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/4341758060427016830'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/03/adding-security-to-ejb.html' title='Adding Security to EJB'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-2471941713536863640</id><published>2010-02-25T00:12:00.002-06:00</published><updated>2010-02-25T00:18:29.409-06:00</updated><title type='text'></title><content type='html'>Just so we can get on with it.  Go &lt;a href="http://codepimpsdotorg.blogspot.com/2007/12/glassfish-jdbc-realm-authentication.html"&gt;here&lt;/a&gt; to see how to add a realm to your Glassfish server.  Once you've added the realm you'll need to create some groups.  For the best method, give each group a specific task as it is easier to focus on a limit set of permissions than code for roles.&lt;br /&gt;&lt;br /&gt;You may have a task like add a product, review a shopping cart, delete an account, or add a bank transaction.  Roles are more like Super users, accountants, managers, etc.&lt;br /&gt;&lt;br /&gt;Focus on task in your groups and then add triggers or EJB beans that focus on roles, which in turn aggregate your tasks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-2471941713536863640?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/2471941713536863640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=2471941713536863640' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/2471941713536863640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/2471941713536863640'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/02/just-so-we-can-get-on-with-it.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-5801886111858421443</id><published>2010-02-23T23:32:00.001-06:00</published><updated>2010-02-23T23:34:19.722-06:00</updated><title type='text'></title><content type='html'>Where have I been?  Sorry I've just not had the time to post code samples here.  Car had some issues, got them fixed, house had issues, cot those fixed, work has issues, not a damn thing I can do about those.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-5801886111858421443?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/5801886111858421443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=5801886111858421443' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/5801886111858421443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/5801886111858421443'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/02/where-have-i-been-sorry-ive-just-not.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-6121247128108755581</id><published>2010-02-05T08:19:00.001-06:00</published><updated>2010-02-10T09:41:15.530-06:00</updated><title type='text'></title><content type='html'>Okay, so here is a quick example of using the FedEx WSDL to build a simple tracking application.  To get the FedEx WSDL you just go over to their developer website at &lt;a href="http://www.fedex.com/us/developer"&gt;http://www.fedex.com/us/developer&lt;/a&gt;.  You will need to sign up to get a key and password to use their service.  When you do sign up give it a couple of days for the key and password to be activated.  If it takes longer than two days for the key and password to come online, just give the FedEx number a call.&lt;br /&gt;&lt;br /&gt;So download the WSDL and add it to your web services on the services tab of NetBeans.  Start a new Java Project and drag the &lt;b&gt;track&lt;/b&gt; service from the services tab into the &lt;b&gt;main&lt;/b&gt; method in your project.&lt;br /&gt;&lt;br /&gt;You should now see some code that looks like this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;&lt;br /&gt;package javaapplication34;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; *&lt;br /&gt; * @author Me&lt;br /&gt; */&lt;br /&gt;public class Main {&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * @param args the command line arguments&lt;br /&gt;     */&lt;br /&gt;    public static void main(String[] args) {&lt;br /&gt;&lt;br /&gt;        try {&lt;br /&gt;            com.fedex.ws.track.v4.TrackRequest trackRequest = null;&lt;br /&gt;            com.fedex.ws.track.v4.TrackService service = new com.fedex.ws.track.v4.TrackService();&lt;br /&gt;            com.fedex.ws.track.v4.TrackPortType port = service.getTrackServicePort();&lt;br /&gt;            // TODO process result here&lt;br /&gt;            com.fedex.ws.track.v4.TrackReply result = port.track(trackRequest);&lt;br /&gt;            System.out.println("Result = " + result);&lt;br /&gt;        } catch (Exception ex) {&lt;br /&gt;            ex.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;We are going to change that code to look like this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;&lt;br /&gt;package javaapplication34;&lt;br /&gt;&lt;br /&gt;import com.fedex.ws.track.v4.ClientDetail;&lt;br /&gt;import com.fedex.ws.track.v4.Notification;&lt;br /&gt;import com.fedex.ws.track.v4.NotificationSeverityType;&lt;br /&gt;import com.fedex.ws.track.v4.TrackDetail;&lt;br /&gt;import com.fedex.ws.track.v4.TrackIdentifierType;&lt;br /&gt;import com.fedex.ws.track.v4.TrackPackageIdentifier;&lt;br /&gt;import com.fedex.ws.track.v4.TrackRequest;&lt;br /&gt;import com.fedex.ws.track.v4.TransactionDetail;&lt;br /&gt;import com.fedex.ws.track.v4.VersionId;&lt;br /&gt;import com.fedex.ws.track.v4.WebAuthenticationCredential;&lt;br /&gt;import com.fedex.ws.track.v4.WebAuthenticationDetail;&lt;br /&gt;import com.fedex.ws.track.v4.TrackService;&lt;br /&gt;import com.fedex.ws.track.v4.TrackPortType;&lt;br /&gt;import com.fedex.ws.track.v4.TrackReply;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; *&lt;br /&gt; * @author me&lt;br /&gt; */&lt;br /&gt;public class Main {&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * @param args the command line arguments&lt;br /&gt;     */&lt;br /&gt;    public static void main(String[] args) {&lt;br /&gt;&lt;br /&gt;        try {&lt;br /&gt;            TrackRequest trackRequest = new TrackRequest();&lt;br /&gt;            VersionId verId = new VersionId();&lt;br /&gt;            verId.setServiceId("trck");&lt;br /&gt;            verId.setMajor(4);&lt;br /&gt;            verId.setIntermediate(0);&lt;br /&gt;            verId.setMinor(0);&lt;br /&gt;            //The WSDL does not say that this is required but it is.&lt;br /&gt;            trackRequest.setVersion(verId);&lt;br /&gt;&lt;br /&gt;            WebAuthenticationDetail auth = new WebAuthenticationDetail();&lt;br /&gt;            WebAuthenticationCredential cred = new WebAuthenticationCredential();&lt;br /&gt;            //This is the key.&lt;br /&gt;            cred.setKey("XXXX");&lt;br /&gt;            //This is the password&lt;br /&gt;            cred.setPassword("XXXX");&lt;br /&gt;            auth.setUserCredential(cred);&lt;br /&gt;&lt;br /&gt;            ClientDetail detail = new ClientDetail();&lt;br /&gt;            //This is the test account number&lt;br /&gt;            detail.setAccountNumber("XXXX");&lt;br /&gt;            //This is the test meter number&lt;br /&gt;            detail.setMeterNumber("XXXX");&lt;br /&gt;&lt;br /&gt;            TransactionDetail trans_detail = new TransactionDetail();&lt;br /&gt;            trans_detail.setCustomerTransactionId("Tracking with Java");&lt;br /&gt;&lt;br /&gt;            TrackPackageIdentifier packId = new TrackPackageIdentifier();&lt;br /&gt;            packId.setType(TrackIdentifierType.TRACKING_NUMBER_OR_DOORTAG);&lt;br /&gt;            //This is some tracking number that you already have.&lt;br /&gt;            packId.setValue("XXXX");&lt;br /&gt;&lt;br /&gt;            trackRequest.setWebAuthenticationDetail(auth);&lt;br /&gt;            trackRequest.setClientDetail(detail);&lt;br /&gt;            trackRequest.setTransactionDetail(trans_detail);&lt;br /&gt;            trackRequest.setPackageIdentifier(packId);&lt;br /&gt;            trackRequest.setIncludeDetailedScans(Boolean.TRUE);&lt;br /&gt;&lt;br /&gt;            TrackService service = new TrackService();&lt;br /&gt;            TrackPortType port = service.getTrackServicePort();&lt;br /&gt;&lt;br /&gt;            TrackReply result = port.track(trackRequest);&lt;br /&gt;            if (result.getHighestSeverity() != NotificationSeverityType.FAILURE &amp;&amp; result.getHighestSeverity() != NotificationSeverityType.ERROR) {&lt;br /&gt;                System.out.println("----RESULTS----");&lt;br /&gt;                if (!result.getTrackDetails().isEmpty()) {&lt;br /&gt;                    for (TrackDetail d : result.getTrackDetails()) {&lt;br /&gt;                        System.out.println("Tracking Number " + d.getTrackingNumber());&lt;br /&gt;                        System.out.println("Tracking Description " + d.getStatusDescription());&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            } else {&lt;br /&gt;                for (Notification n : result.getNotifications()) {&lt;br /&gt;                    System.err.println(n.getMessage());&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        } catch (Exception ex) {&lt;br /&gt;            ex.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Ta-da!  Simple example of the FedEx tracking Web-Service in action.  If your account has not been enabled yet you will receive an "Authentication Failed" message.  Otherwise you should start seeing some detail about the package.  I suggest that you give the TrackDetail class a quick glance since that will be where most of the information you need to access will be.  Remember to read those pesky annotations in the WSDL for more information and the PDF on the FedEx developer's website.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-6121247128108755581?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/6121247128108755581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=6121247128108755581' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/6121247128108755581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/6121247128108755581'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/02/okay-so-here-is-quick-example-of-using.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-6330944048875657451</id><published>2010-02-02T12:44:00.001-06:00</published><updated>2010-02-02T12:44:14.155-06:00</updated><title type='text'>Best Description of today's computer reporting</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;With all the tech buzz that is going on these days, there is no end to the number of "reporters" that generate "news" stories about said tech buzz.  However, while looking over one of the news stories on a site I found a comment that justly defines what is really going on here.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;If next week Steve Jobs called a press conference and sliced his dick off with a silver scalpel in a room full of stunned reporters, I have no doubt that -- not to be outdone -- Sergey Brin would cut off his with a chainsaw on nation-wide TV seven days later.&lt;br /&gt;&lt;br /&gt;And no one in the tech punditry -- all happy just to have jobs and something to write about besides the latest PC graphics card -- would question *WHY* these idiots are emasculating themselves, they'd just write tedious "thought" pieces contrasting the metaphors of Job's elegant, shiny castration versus Brin's use of loud horsepower.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;--RobotRunAmok&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Absolutely classic.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-6330944048875657451?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/6330944048875657451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=6330944048875657451' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/6330944048875657451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/6330944048875657451'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/02/best-description-of-today-computer.html' title='Best Description of today&amp;#39;s computer reporting'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-2405503084120721204</id><published>2010-02-01T23:05:00.001-06:00</published><updated>2010-02-01T23:05:48.993-06:00</updated><title type='text'>The world of apps. There's an app for that.</title><content type='html'>&lt;b&gt;Warning, I am a Java fanboi (even if they sold out to Oracle)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;A few years ago a platform was made called Java.  It promised to allow people to write and compile their code once and run it everywhere.  Of course real life set in an everyone realized that a VM just made software run slow.  Basically you had two computers running in the space of one, the OS and the VM.  However the idea was that a program could run anywhere and the idea was incredibly huge.&lt;br /&gt;&lt;br /&gt;Microsoft tried their hand at Java and found out quickly that Sun meant business when it meant Java compliance.  Microsoft would go on to make their own version of Java called .NET eventually.  Most other players, IBM / Oracle / Apple / RedHat / Novell played fine with Sun and Java.  However, without support from the MS desktop world, Java slowly migrated to business applications and middle-ware.  Seeing who were the big players it's no surprise.&lt;br /&gt;&lt;br /&gt;Then came along a thing called XML.  Now the Internet was hot, but XML made it more flexible, more robust, and more friendlier.  With XML, JavaScript, and Asynchronous HTTP you had AJAX.  With XML, XSLT, and scripting you had blogs and walls.  With XML and SOAP you had web APIs.  For the first time the web was becoming a platform and not just a presentation layer.  Add in the Open Source movement and MySOL / Linux / PHP / Apache and the web was becoming more and more about sites that provided services and tools for others.&lt;br /&gt;&lt;br /&gt;Enter Google.  Google has been the driver of the Web Platform, MS tried with ASP, then ASP.NET, and so forth, but all has not been about giving to people but instead just a platform of putting stuff on the web (I'm sorry I dropped my GeoCities account back in '97).  MS has created an API to end making APIs.  Google embraced the idea of taking an API an making an API out of it.&lt;br /&gt;&lt;br /&gt;With the web becoming &lt;b&gt;the&lt;/b&gt; cross platform application and presentation layers, Java slowly started grinding towards that goal, of making Java and web work together.  Well, happily, no one was going to sit and wait for Sun Microsystems to get off their tush and start making stuff transpire.  Struts was born, Spring was born, Tomcat was born, and so on...  Sun was quickly loosing their driver's seat to Open Source projects that ran on Java.  And to an extent Sun was begrudgingly accepting of the change.&lt;br /&gt;&lt;br /&gt;Then the mobile generation started, and that brings me to my muse.&lt;br /&gt;&lt;br /&gt;Apple pushed a web central platform with a native SDK as a last option for their phone platform.&lt;br /&gt;Google is pushing a web central platform with a native SDK as a last option for their phone platform.&lt;br /&gt;Microsoft is pushing their .NET platform, yadda yadda yadda, it does some web stuff too for their phonelaptopcomputerservertoasterXbox360sink platform.&lt;br /&gt;Oh yeah and Palm is doing something web centric for their phone platform.&lt;br /&gt;&lt;br /&gt;However, sans Palm, all have made big markets in their native application space.  The HTML5 platform has been somewhat missing in all of their market software.&lt;br /&gt;&lt;br /&gt;Wasn't the idea of Java to build apps that would run on the iPhone, Droid, Pre, and whatever monster MS puts out?  Wasn't JavaFX to make apps so easy that people wouldn't think of native?&lt;br /&gt;&lt;br /&gt;What went wrong?  The what I call "70's mindset" has dominated the cell phone market.  That hardware dictates software is the 70's mindset.  Vendors do this because of two reason:&lt;br /&gt;&lt;br /&gt;1. Control&lt;br /&gt;2, Ease&lt;br /&gt;&lt;br /&gt;Apple has a very tight grip over their API, in fact they take in very little input as to what the next SDK will have.  Pretty much the same over at the Google camp.  They have it open sourced, but very little is changed by outsiders as far as the standard API goes.  Do I need to even mention the amount of control MS has over .NET?&lt;br /&gt;&lt;br /&gt;Control makes Ease.  Picture if you will how absolutely easy it would be to build a platform if you design the platform to run only your specs!  That in is the problem with Java on the phone.  There are (were, give it a couple of more years) many Java phones out in the world (unless you have Verizon).  But Java has gotten away from Sun, quite literally now thanks to Oracle, and control is now anyone (and everyones) game.&lt;br /&gt;&lt;br /&gt;HTML5 may prove to be the ultimate winner, but the road ahead is long.  The W3C may have the final say but a lot of players, like Apple and Google, are in a big tug of war with the standard that HTML5 for mobile may be out of reach to be a real goal anytime soon.&lt;br /&gt;&lt;br /&gt;Thus, we have hardware specific (er, platform) applications that could have used Java but chose not to.  We must muse, why is HTML5 better than Java on mobile phones?&lt;br /&gt;&lt;br /&gt;Cheers&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-2405503084120721204?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/2405503084120721204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=2405503084120721204' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/2405503084120721204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/2405503084120721204'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/02/world-of-apps-there-app-for-that.html' title='The world of apps. There&amp;#39;s an app for that.'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-1883555890553201659</id><published>2010-02-01T22:21:00.001-06:00</published><updated>2010-02-01T22:21:20.935-06:00</updated><title type='text'>Trying out Blokkal</title><content type='html'>Since I'm a big KDE user, yes that means KDE 4 as well.  I decided that I would try an actual KDE client to write to my blog.&lt;br /&gt;&lt;br /&gt;So this is a test of that.&lt;br /&gt;&lt;br /&gt;Also I want to try out pre:&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;public class Hello {&lt;br /&gt;&lt;br /&gt;	public static void main(String [] args) {&lt;br /&gt;		System.out.println("Hello, World");&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Cheers!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-1883555890553201659?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/1883555890553201659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=1883555890553201659' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/1883555890553201659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/1883555890553201659'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/02/trying-out-blokkal.html' title='Trying out Blokkal'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-3932175850092740992</id><published>2010-02-01T16:41:00.001-06:00</published><updated>2010-02-01T16:41:10.658-06:00</updated><title type='text'>Secure Simple EJB Bean making the DB tables.</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Alright, it has been awhile but I swear I've been away for very good reasons.&lt;br /&gt;&lt;br /&gt;So if you remember our basic EJB HelloBean, let's look at how to add security measures to provide a login for people to run our EJB code.&lt;br /&gt;&lt;br /&gt;First we need to setup our JDBC realm. To do that we need an actual database. I'll be using MySQL as it is a wonderfully simple database to use and maintain, at the same time MySQL scales nicely and can be used for very big projects. So let's say you have your MySQL server up and running. Let's create a database called helloDB. To do that from the MySQL prompt (hereafter known as the sql prompt (since I hate having to hit the shift key for SQL)) type in:&lt;br /&gt;&lt;br /&gt;&lt;pre class='prettyprint'&gt;&lt;br /&gt;CREATE DATABASE helloDB&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now let's create two tables, one to hold user names and passwords, the other to hold user names and groups.  We'll call these tables USERTBL and GRPTBL.&lt;br /&gt;&lt;br /&gt;&lt;pre class='prettyprint'&gt;&lt;br /&gt;CREATE TABLE USERTBL (&lt;br /&gt;	USERNAME VARCHAR(13) NOT NULL,&lt;br /&gt;	SHAPASSWD CHAR(64) NOT NULL,&lt;br /&gt;	PRIMARY KEY (USERNAME)&lt;br /&gt;) ENGINE=InnoDB DEFAULT CHARSET=utf8;&lt;br /&gt;&lt;br /&gt;CREATE TABLE GRPTBL (&lt;br /&gt;	ENTRYID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,&lt;br /&gt;	USERNAME VARCHAR(13) NOT NULL,&lt;br /&gt;	GROUPING VARCHAR(20) NOT NULL,&lt;br /&gt;	PRIMARY KEY (ENTRYID),&lt;br /&gt;	UNIQUE KEY (USERNAME, GROUPING),&lt;br /&gt;	CONSTRAINT FOREIGN KEY (USERNAME) REFERENCES USERTBL (USERNAME) ON DELETE CASCADE ON UPDATE CASCADE&lt;br /&gt;) ENGINE=InnoDB DEFAULT CHARSET=utf8;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Here we've created the two tables we need to start a security realm using the JDBCRealm module.  The SHAPASSWD field of the USERTBL is to store our passwords in SHA-256 encoded strings.  You can use any kind of hash function that is known to Java, like MD-5 or SHA-1, I'm going with SHA-256 because I like it among other things.&lt;br /&gt;&lt;br /&gt;Also note that I did not make a composite primary key for the GRPTBL but instead created a unique key for the user name / group name pair.  I don't like composite primary keys, I don't know many DB admins that do, they have a purpose but just using them anywhere is not really a good idea.&lt;br /&gt;&lt;br /&gt;Well there you have the DB side of it.  I'll look at the Glassfish end of it in the next post.  Cheers!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-3932175850092740992?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/3932175850092740992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=3932175850092740992' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/3932175850092740992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/3932175850092740992'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2010/02/secure-simple-ejb-bean-making-db-tables.html' title='Secure Simple EJB Bean making the DB tables.'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-5787881859718396246</id><published>2009-12-23T12:46:00.001-06:00</published><updated>2010-02-01T16:19:50.065-06:00</updated><title type='text'>Simple EJB Bean</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Okay so let's create a simple EJB bean that just says "hello", after that we want to secure the bean using a JDBC Realm.&lt;br /&gt;&lt;br /&gt;Let's start with your basic EJB.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class='prettyprint'&gt;&lt;br /&gt;//File:  HelloBean.java&lt;br /&gt;package com.blogger.ramen;&lt;br /&gt;&lt;br /&gt;import javax.ejb.Stateless;&lt;br /&gt;&lt;br /&gt;@Stateless(name="HelloBean")&lt;br /&gt;public class HelloBean implements HelloRemote {&lt;br /&gt;&lt;br /&gt;	public String sayHello() {&lt;br /&gt;		return "Hello from EJB!";&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and the interface,&lt;br /&gt;&lt;pre class='prettyprint'&gt;&lt;br /&gt;//File:  HelloRemote.java&lt;br /&gt;&lt;br /&gt;package com.blogger.ramen;&lt;br /&gt;&lt;br /&gt;import javax.ejb.Remote;&lt;br /&gt;&lt;br /&gt;@Remote&lt;br /&gt;public interface HelloRemote {&lt;br /&gt;&lt;br /&gt;	String sayHello();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;See that wasn't that hard.  Now let's write up the sun-ejb-jar.xml file so that we can let Glassfish know what to do with the EJB once we deploy it.  Think of the xml descriptors as instructions for Glassfish on how it should expose your EJB, use your EJB, what resources are needed, and so forth.  Some tags from the xml descriptors have been converted into annotations for your Java code, like @Stateless and @Remote.&lt;br /&gt;&lt;br /&gt;One of the things that I usually put into the xml descriptor is the JNDI name.  I'm just so use to doing it that way, but you are free to use the @Stateless annotation to give the JNDI.  So let's look at my sun-ejb-jar.xml file, also note the &lt;b&gt;sun&lt;/b&gt; that is in front of ejb-jar.xml.  The ejb-jar.xml file is the standard xml descriptor and would be a good place for the JNDI but we need the sun specific one because we will need to secure our EJB later.  We'll forgo the standard ejb-jar for the sun specific one.&lt;br /&gt;&lt;br /&gt;&lt;pre class='prettyprint'&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 EJB 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0.dtd"&amp;gt;&lt;br /&gt;&amp;lt;sun-ejb-jar&amp;gt;&lt;br /&gt;  &amp;lt;enterprise-beans&amp;gt;&lt;br /&gt;    &amp;lt;ejb&amp;gt;&lt;br /&gt;      &amp;lt;ejb-name&amp;gt;HelloBean&amp;lt;/ejb-name&amp;gt;&lt;br /&gt;      &amp;lt;jndi-name&amp;gt;ejb/Helloness/HelloThere&amp;lt;/jndi-name&amp;gt;&lt;br /&gt;    &amp;lt;/ejb&amp;gt;&lt;br /&gt;  &amp;lt;/enterprise-beans&amp;gt;&lt;br /&gt;&amp;lt;/sun-ejb-jar&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As you can see I've given my EJB a global JNDI name of ejb/Helloness/HelloThere.&lt;br /&gt;Now deploy to Glassfish.&lt;br /&gt;&lt;br /&gt;Congrats you've written your first EJB, or maybe your second or so.  However, the JAR is running all by itself on your Glassfish server.  The crappy part about that is that you won't be able to use injection now.  The reason is that for injection to work the JAR and the client must be running together.  You can bundle them together in a Java Enterprise Application.  Of course, if you deploy the JAR with a client in an EE Application, you now have two copies of your JAR on the server.&lt;br /&gt;&lt;br /&gt;To avoid all of that, you can just use a context lookup for the JNDI name.  However, the caveat of that is, your application client won't know anything about the JAR, ergo, it won't know the signature of the method, return type, etc...  If you're in Netbeans, you'll get a real eye opener if you try to include the JAR file in your project.  It seems like it knows nothing about the JAR you included.  Mainly you'll get something like an ejb ref error or something of the sort.&lt;br /&gt;&lt;br /&gt;The reason?  The client application is running on it's own just like the JAR is.  The two aren't talking to each other, except for the JNDI lookup.  So basically you lookup a POJO but then you basically cast it to an unknown type.  You need to let that type be known to your client, to do such a thing, simply copy and paste your interface file into your client project.&lt;br /&gt;&lt;br /&gt;So let's write our client program, as you know we have our HelloRemote.java file copy and pasted into our project, so I'll just cover the main file.&lt;br /&gt;&lt;br /&gt;&lt;pre class='prettyprint'&gt;&lt;br /&gt;//File:  Main.java&lt;br /&gt;&lt;br /&gt;package com.blogger.client;&lt;br /&gt;&lt;br /&gt;import javax.naming.InitialContext;&lt;br /&gt;import com.blogger.ramen.HelloRemote;&lt;br /&gt;&lt;br /&gt;public class Main {&lt;br /&gt;&lt;br /&gt;	public static void main(String [] args) {&lt;br /&gt;&lt;br /&gt;		InitialContext ctx;&lt;br /&gt;		try {&lt;br /&gt;			ctx = new InitialContext();&lt;br /&gt;			HelloRemote hr = (HelloRemote) ctx.lookup("ejb/Helloness/HelloThere");&lt;br /&gt;			javax.swing.JOptionPane.showMessageDialog(hr.seyHello());&lt;br /&gt;		} catch (Exception ex) {&lt;br /&gt;			javax.swing.JOptionPane.showMessageDialog("Massive failure!");&lt;br /&gt;		}&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt; &lt;br /&gt;And there you go.  A full client to use our EJB bean.  Deploy that to your Glassfish server and then use Java Web Start to start up your application.  Presto!  You have your client getting the implementation from your remote EJB.&lt;br /&gt;&lt;br /&gt;I'll be back later, maybe tomorrow, maybe after the holidays, to show how to secure the EJB using a JDBC realm.  Of course if you want to see how to implement the JDBC Realm in Glassfish take a &lt;a href='http://blogs.sun.com/swchan/entry/jdbcrealm_in_glassfish'&gt;look at this post.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Cheers!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-5787881859718396246?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/5787881859718396246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=5787881859718396246' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/5787881859718396246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/5787881859718396246'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/12/simple-ejb-bean.html' title='Simple EJB Bean'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-5021244511277212216</id><published>2009-12-22T22:30:00.001-06:00</published><updated>2009-12-22T22:31:24.654-06:00</updated><title type='text'></title><content type='html'>Holidays are fun, but they sure do sap the time from you.&lt;br /&gt;&lt;br /&gt;Promise to post some EJB code examples tomorrow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-5021244511277212216?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/5021244511277212216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=5021244511277212216' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/5021244511277212216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/5021244511277212216'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/12/holidays-are-fun-but-they-sure-do-sap.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-8455964579433146235</id><published>2009-12-07T13:05:00.001-06:00</published><updated>2009-12-07T13:05:11.622-06:00</updated><title type='text'>Sorry about the Holidays</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Well, I knew that the Holidays would keep me pretty busy.  I haven't gotten around to posting anything with all the running around that I've been doing.  I'll go ahead and post something here just so I can keep my mind fresh about having a blog.&lt;br/&gt;&lt;br/&gt;Hope everyone is having a wonderful holiday season!  Cheers!&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/34883908-8455964579433146235?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/8455964579433146235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=8455964579433146235' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8455964579433146235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8455964579433146235'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/12/sorry-about-holidays.html' title='Sorry about the Holidays'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-7166672306661909550</id><published>2009-11-25T12:40:00.000-06:00</published><updated>2009-11-25T12:42:43.493-06:00</updated><title type='text'>Inkscape 0.47 is HERE!!!</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;OMFGRTFBBQ!!!  Inkscape 0.47 is here!  This is hands down the best tool for SVG work, period!  You can read the release notes &lt;a href='http://wiki.inkscape.org/wiki/index.php/ReleaseNotes047'&gt;here.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Biggest item on my list is the Spiro tool.  This has to be the coolest tool ever.  Instead of storing the object as a set of bezier curves, it is stored as a set of points with curves where needed.  Trying to get perfect curves are no longer a pain in the BBQ.  Just change the arrangement of control points and the curves form automagically.  Perfect raindrops, vines, and more await you.&lt;br /&gt;&lt;br /&gt;The Knot tool looks to hold a lot of promise.  I hadn't seen the knot tool in the trunk code so it's appearance is new to me.  The hatches tool looks very cool but I'm not sure where I'll be able to use it.  The ruler effect is one that I have used often in the trunk code.  It does what it says, offers the ability to draw a ruler on a path.  It is very useful if you need to add scale to a project.&lt;br /&gt;&lt;br /&gt;I can't wait to get my hands on the new release.  I know what I'm doing this Thanksgiving weekend!&lt;br /&gt;&lt;br /&gt;Um...Being with my family and thankful for the wonderful life I have (uh, yeah that sounds like it...)  Just kidding I love you all family.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-7166672306661909550?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/7166672306661909550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=7166672306661909550' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/7166672306661909550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/7166672306661909550'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/11/inkscape-047-is-here.html' title='Inkscape 0.47 is HERE!!!'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-8820407057373972688</id><published>2009-11-20T09:34:00.001-06:00</published><updated>2009-11-20T09:34:10.106-06:00</updated><title type='text'>LoginContext of ACC or more?</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Many of the questions I see on Google are about how to setup a LoginContext and then use that context to login to the Glassfish server.  First off, the server already creates a LoginContext for you, you do not need to make another one unless you have some real serious demands.  Second, when you do make a new LoginContext you are making it outside of the Glassfish server.&lt;br /&gt;&lt;br /&gt;JAAS uses a set of local files to determine which Java Objects (modules) to execute in order to make a login.  Those configuration files also specify which of those modules are required to send back a "GO" to equal a full login.  This is called a stacked login.  You could have an application that requires not only a username and password, but also a smart card inserted.  If either or both of them return a "NO-GO" then you are denied access.&lt;br /&gt;&lt;br /&gt;The thing about JAAS is servers are not the only ones that can use it.  You could make your normal Java 2 SE program use JAAS to authenticate smart cards or even a flat file that holds encrypted passwords stored on the local machine.  Because anyone could have any given set of configuration files setup on their machine, when you use Glassfish to secure EJBs understand that Glassfish considers the server's configuration files to be the final say in the matter of logging on to access the EJB.&lt;br /&gt;&lt;br /&gt;When you create your own LoginContext in your client application, JAAS has to consult the local configuration files.  Since a JVM outside of the Glassfish JVM is running your client application, these JAAS configuration files have no say in authenticating your client to Glassfish.&lt;br /&gt;&lt;br /&gt;Enter the ClientPasswordLoginModule.  This module is a pretty neat little module.  It takes in a client username and password and stores it.  If you try to go somewhere that requires you to login, this module will take the information that it collected and pass it on to the module asking for login information.&lt;br /&gt;&lt;br /&gt;Here is where some people get confused.  They assume that the local JAAS needs to use the same module as the Glassfish module.  No.  Becuase there is no way the Glassfish server can be sure that your local result would be the same result with the Glassfish configuration.  If our Application Client used a jdbcModule in the local JAAS configuration, we could (in theory) use a local MySQL to say (Oh yeah, he's who he says he is.)  Instead, we &lt;b&gt;have&lt;/b&gt; to pass username/password information on to the Glassfish server and the Glassfish server runs it through its jdbcModule, not our local jdbcModule.  ClientPasswordLoginModule simply passes that information on to whoever asks for it.&lt;br /&gt;&lt;br /&gt;You may also have heard of a ClientCertificateLoginModule, this allows a client to send a X509 certificate to login to a system.  Usually your appclient is setup to use both ClientPasswordLoginModule and ClientCertificateLoginModule.  The ClientCertificateLoginModule doesn't really do much if you haven't signed the application.  If you have, this module makes sure that only the application that was signed is being used to access the resources.  This keeps rouge applications from accessing your data.  &lt;i&gt;If you want IIMOP over SSL that's a whole other thing.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Remember, when you create a LoginContext inside you Java Client Application it will read in the local JAAS configurations.  Those configurations should be setup to &lt;b&gt;pass&lt;/b&gt; information back to Glassfish.  However, my advice is to not even create your own LoginContext.  The ACC on Glassfish is good enough for most needs, you shouldn't have to create your own LoginContext.  I'll cover a method of how to get a bit more control over user logins with EJBs on Glassfish with your plain ol' Java Application Client.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-8820407057373972688?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/8820407057373972688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=8820407057373972688' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8820407057373972688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8820407057373972688'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/11/logincontext-of-acc-or-more.html' title='LoginContext of ACC or more?'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-3176072694731277093</id><published>2009-11-19T15:26:00.000-06:00</published><updated>2010-02-10T09:39:40.391-06:00</updated><title type='text'>What's wrong with me?</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Okay now a little bit of Java code to get into the mindset of using Glassfish.&lt;br /&gt;&lt;br /&gt;What is wrong with this code?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;File: SimpleMessageRemote.java&lt;/b&gt;&lt;br /&gt;&lt;pre class='prettyprint'&gt;&lt;br /&gt;&lt;br /&gt;package com.blogspot.ramenboy.logintest;&lt;br /&gt;&lt;br /&gt;import javax.ejb.Remote;&lt;br /&gt;&lt;br /&gt;@Remote&lt;br /&gt;public interface SimpleMessageRemote {&lt;br /&gt;&lt;br /&gt;	String sayWorld();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;File: SimpleMessage.java&lt;/b&gt;&lt;br /&gt;&lt;pre class='prettyprint'&gt;&lt;br /&gt;&lt;br /&gt;package com.blogspot.ramenboy.logintest;&lt;br /&gt;&lt;br /&gt;import javax.annotation.security.DeclareRoles;&lt;br /&gt;import javax.annotation.security.RolesAllowed;&lt;br /&gt;import javax.ejb.Stateless;&lt;br /&gt;&lt;br /&gt;@DeclareRoles("AUser")&lt;br /&gt;@Stateless&lt;br /&gt;public class SimpleMessage implements SimpleMessageRemote {&lt;br /&gt;&lt;br /&gt;@RolesAllowed("AUser")&lt;br /&gt;public String sayWorld() {&lt;br /&gt;	return "World!!";&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;File: Main.java&lt;/b&gt;&lt;br /&gt;&lt;pre class='prettyprint'&gt;&lt;br /&gt;&lt;br /&gt;package logintest01;&lt;br /&gt;&lt;br /&gt;import com.blogspot.ramenboy.logintest.SimpleMessageRemote;&lt;br /&gt;import javax.swing.JOptionPane;&lt;br /&gt;import javax.ejb.EJB;&lt;br /&gt;&lt;br /&gt;public class Main {&lt;br /&gt;&lt;br /&gt;@EJB&lt;br /&gt;private static SimpleMessageRemote s;&lt;br /&gt;&lt;br /&gt;public static void main(String[] args) {&lt;br /&gt;	JOptionPane.showMessageDialog(null, "Hello... " + s.sayWorld());&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The problem with this code is (we are assuming that all the XML descriptors are in order) that we are injecting an EJB that is protected.  Now there is nothing wrong with injecting a protected EJB but we shouldn't do this in our Main method.  Injecting secure EJBs should be done once we have established the user as belonging to the system.&lt;br /&gt;&lt;br /&gt;Why?&lt;br /&gt;&lt;br /&gt;If the user fails to login properly (mistyped something or what-have-you).  The Injection fails and the end result is an unusable object.  The object being the whole freaking program, since this is the main method.&lt;br /&gt;&lt;br /&gt;Ergo, don't do this unless you are just writing a simple test.  This isn't really production grade programming to inject secure beans all over the place.  A failed injection will bring your application client to a grinding halt with a very confusing error.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-3176072694731277093?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/3176072694731277093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=3176072694731277093' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/3176072694731277093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/3176072694731277093'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/11/what-wrong-with-me.html' title='What&amp;#39;s wrong with me?'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-3683768853641656648</id><published>2009-11-19T14:15:00.000-06:00</published><updated>2009-11-19T14:15:00.069-06:00</updated><title type='text'>Pretty Print Test</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Okay so I chickened out and started using the Google CSS for syntax highlighting.  Here is a test.&lt;br /&gt;&lt;br /&gt;&lt;pre class='prettyprint'&gt;&lt;br /&gt;&lt;br /&gt;package foo;&lt;br /&gt;&lt;br /&gt;public class Testing {&lt;br /&gt;&lt;br /&gt;	public static void main(String[] args) {&lt;br /&gt;		javax.swing.JOptionPane.showMessageDialog(null,"Hello, World!");&lt;br /&gt;&lt;br /&gt;		System.exit();&lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So I hope this works.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-3683768853641656648?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/3683768853641656648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=3683768853641656648' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/3683768853641656648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/3683768853641656648'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/11/pretty-print-test.html' title='Pretty Print Test'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-6417660498472177138</id><published>2009-11-17T21:56:00.001-06:00</published><updated>2009-11-17T21:56:44.610-06:00</updated><title type='text'>Chest Colds are the worst</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;I think the title says it all.  This would be the seventh time this year that I have gotten sick.  I can not seem to do anything in my personal time other than get sick and try to recover.  I swear, I'm going to post some python code soon.  I just keep getting sick.&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/34883908-6417660498472177138?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/6417660498472177138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=6417660498472177138' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/6417660498472177138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/6417660498472177138'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/11/chest-colds-are-worst.html' title='Chest Colds are the worst'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-7190963828218456508</id><published>2009-11-10T21:28:00.001-06:00</published><updated>2009-11-19T14:21:53.772-06:00</updated><title type='text'>Using the built in login versus ProgrammaticLogin</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Yeah, I figure I'd cover a bit of Glassfish and JavaEE nuances.  Today's gem is logging in.&lt;br/&gt;&lt;br/&gt;When you think of logging into something you may have a sudden urge to think, "Yeah it's just a database with users and passwords stored in it."&lt;br/&gt;&lt;br/&gt;To an extent you are correct.  The broad 10,000 feet view of logging in is that you present something and that something proves you are who you say you are.  In some cases it is a password, some cases it may be a USB stick, and in some cases it may be something on you like your thumbprint.  However, the fun thing about being a programmer is that you not only get to deal with the details of where, what, and how idenities are matched with proof, you also deal with the way it is prosented to the user, interfaced with that presentation, handled during transport, how to transport, and so forth.  Basically you'll leave wondering how the API actually helped you.&lt;br/&gt;&lt;br/&gt;But I'm getting ahead of myself, short end is that no matter what framework you use; be ready to do a bit of leg work when it comes to logging people in.&lt;br/&gt;&lt;br/&gt;Now on to the topic at hand.  In JavaEE there is a set way of how to handle logging in to an AS.  This method is known as JAAS (say it with me: Jazz).  Without going into what that means (you can safely assume that the J stands for Java) JAAS is the standard built-in method for logging into an AS.  Now JAAS is great and all but it was mostly intended for web based applications, so if you are doing a lot of web based apps then just sticking with the default JAAS won't do you wrong.&lt;br/&gt;&lt;br/&gt;Therein is the problem, if you are doing Client Application programming (thick clients) you may seek to have a bit more control over the login process.  JAAS is an okay solution, and you can work around some of it's limitations, but after a point you're just boiler plating and you need to stop.  One thing about JAAS is that it is specific to the Application Control Container (ACC), that's not to say the code isn't cross platform, it means that the ACC handles login, not you, you have to keep poking at the ACC for information about the current state of the login.  This simplifies things at an amazing rate.  You can have a databased back login module in less than five minutes.  In fact you'll spend most of your time with SQL.  The problem is things like making sure the person provides a valid login add complexity because the ACC will toss an Exception at you and your client will receive a very cryptic error message about RMI-IIOP.&lt;br/&gt;&lt;br/&gt;This is all because when something bad happens you can't trap the ACC (that's a good thing security-wise) and therefore authentcation errors blow up your client.  You have to write EJBs that force the system to log you in and then before actually using that login check to make sure it is okay.  This can add a bit of overhead in Client Applications...&lt;br/&gt;&lt;br/&gt;Enter &lt;a href='http://docs.sun.com/app/docs/doc/819-4721/beacp?a=view'&gt;ProgrammaticLogin&lt;/a&gt;.  The purpose is pretty stright forward, handle logins &lt;b&gt;programmatically&lt;/b&gt;.  Two problems with this approach, this will lock your code (once you start coding for ProgrammaticLogin you are locked into Glassfish with you code sans a major rewrite); second, you must handle everything about logging in yourself.  ProgrammaticLogin is lock-in for every platform, yes that's right, everyone has a ProgrammaticLogin (JBoss, Oracle, IBM, etc...), every single one of them makes it look the same (takes two to four parameters, passes information on to EJBs, etc...) but they all do it very differently per AS platform.  Judging by history, this makes it a good candidate for inclusion in the next version of JavaEE (???).&lt;br/&gt;&lt;br/&gt;I guess I'll cover a bit about logging into an AS next time, I'll cover JAAS first.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-7190963828218456508?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/7190963828218456508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=7190963828218456508' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/7190963828218456508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/7190963828218456508'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/11/using-built-in-login-versus.html' title='Using the built in login versus ProgrammaticLogin'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-2894214686734106794</id><published>2009-11-02T13:18:00.001-06:00</published><updated>2009-11-02T13:18:33.489-06:00</updated><title type='text'>Things not to do on Blogger when at work.</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;I'll try to keep updating this list as I go.&lt;br/&gt;&lt;ol&gt;&lt;li&gt;Click the Next Blog link.&lt;/li&gt;&lt;li&gt;Go to a blog that I know is going to have background music.&lt;br/&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-2894214686734106794?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/2894214686734106794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=2894214686734106794' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/2894214686734106794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/2894214686734106794'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/11/things-not-to-do-on-blogger-when-at.html' title='Things not to do on Blogger when at work.'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-8557941565493738631</id><published>2009-11-02T13:07:00.002-06:00</published><updated>2009-11-02T13:14:19.951-06:00</updated><title type='text'></title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Holy smokes!  Did you know it was November already?!  Crap I've got so many car related things to get done it's not even funny.&lt;br/&gt;&lt;ul&gt;&lt;li&gt;Fix my car.  It's got a stuck open thermostat that makes the computer send P0126.  That's a you fail emissions error.&lt;/li&gt;&lt;li&gt;Inflate my freaking tires!  I usually am on top of this but the blasted air machines taunt me by accepting only quarters when I have a ton of dimes!  This also, by-the-way, sends a you fail emissions error.  In fact, every error on my car is a fail emissions error except low oil and low freon.  WTF?!&lt;/li&gt;&lt;li&gt;I turn an age evenly divisible by five this year.  That means that I have to pay to continue to keep my drivers license.  I don't really understand the point of this.  They don't require that you come in and have your eyes checked, your ability to drive checked, or anything that would ensure that you are still able to drive.  In lieu of all of that safety stuff they just want you to mail in a check and a form that &lt;b&gt;ASSERTS&lt;/b&gt; that you still feel able to drive.&lt;/li&gt;&lt;li&gt;My son will be turning, an age that is a single number in binary, years old very soon.  I've so got to get planning and sending out invites done like it was yesterday.&lt;/li&gt;&lt;li&gt;I am so carpet bombing my friend's place.  He has consistently held the pieces of wood that I am using to make shelves for ransom.  He has until this Friday to return them, or I am getting 2,4,6-trinitrotoluene on his rear end.&lt;/li&gt;&lt;/ul&gt;See, this is what happens as you get older.  As a kid you loose track of time on a smaller scale, say minutes or even hours.  As an adult the same thing happens just on a larger scale, say days, months, seasons...  I guess it all just comes down to simply forgetting what year, century, millennium your currently in once you're ready to retire.&lt;br/&gt;&lt;br/&gt;"What?! OH?!  Why are you grabbing me by the arms and dragging me out?!  What do you mean I retired seven years ago?! Let go of me right... oh forget it, I need a nap." &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/34883908-8557941565493738631?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/8557941565493738631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=8557941565493738631' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8557941565493738631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8557941565493738631'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/11/holy-smokes-did-you-know-it-was.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-805961325359291106</id><published>2009-11-02T13:04:00.001-06:00</published><updated>2009-11-02T13:04:02.100-06:00</updated><title type='text'>MS Access and the Gettoness that it is.</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Why on Earth would you have a cross-tab query with no "non-VBA" method of making a report?  Oh well OpenOffice.org is guilty of the same crime.  C'mon, if I'm doing this with GUI magic in the query editor, why can't I do this with the report editor.&lt;br/&gt;&lt;br/&gt;Well off I go to write about 400 lines of VBA code that no one will notice.  Nah, just kidding, it's only like 40 lines.&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/34883908-805961325359291106?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/805961325359291106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=805961325359291106' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/805961325359291106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/805961325359291106'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/11/ms-access-and-gettoness-that-it-is.html' title='MS Access and the Gettoness that it is.'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-192248656539544974</id><published>2009-11-02T12:34:00.001-06:00</published><updated>2009-11-02T12:34:41.559-06:00</updated><title type='text'>Code and Pre Tags</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Hello.&lt;br /&gt;&lt;br /&gt;Usually when I do some code, I just really place it between some &amp;lt;pre&amp;gt; tags.  If it will have a lot of &amp;lt; and &amp;gt; symbols (like C++ code).  I'll do the code really quickly in gedit and replace them with the entities that correspond to them.&lt;br /&gt;&lt;br /&gt;However I was on Microsoft's web site and I really liked the idea of how they surround their code with a little blue box with a bigger top border.&lt;br /&gt;&lt;br /&gt;Now using Firebug to look at the CSS for this, it is a really simply addition to what I was doing.&lt;br /&gt;&lt;br /&gt;&lt;pre style='border-style: solid; border-color: rgb(192, 231, 192); border-width: 10px 1px 1px;white-space: pre-wrap;word-wrap: break-word;'&gt;&lt;br /&gt;This is what I was doing...&lt;br /&gt;&amp;lt;pre style="border:1px solid #8888FF"&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;However, as you can see in the above example, I'm using a similar usage of the MS CSS except I've made it green as such:&lt;br /&gt;&lt;br /&gt;&lt;pre style='border-style: solid; border-color: rgb(192, 231, 192); border-width: 10px 1px 1px;white-space: pre-wrap;word-wrap: break-word;'&gt;&lt;br /&gt;This is my new take.&lt;br /&gt;&amp;lt;pre style="border-style: solid; corder-color: rgb(192,231,192); border-width: 10px 1px 1px;white-space: pre-wrap;word-wrap: break-word;"&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Also I've been trying to understand how ScribeFire works with &amp;lt;br /&amp;gt;.  I am still working on it.  Also, I will try to get my own CSS written and uploaded to Blogger when time permits.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-192248656539544974?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/192248656539544974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=192248656539544974' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/192248656539544974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/192248656539544974'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/11/code-and-pre-tags_7856.html' title='Code and Pre Tags'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-301364955824585476</id><published>2009-11-01T10:08:00.001-06:00</published><updated>2009-11-01T10:08:28.381-06:00</updated><title type='text'>VirtualBox I still love you</title><content type='html'>Well it seems I'm running into a problem.  64-bit guest won't seem to go into long mode on a 64-bit host when AMD-V or Intel VT isn't available.  That's okay because VBox still rocks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-301364955824585476?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/301364955824585476/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=301364955824585476' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/301364955824585476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/301364955824585476'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/11/virtualbox-i-still-love-you.html' title='VirtualBox I still love you'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-8597090340940077979</id><published>2009-10-29T23:41:00.001-05:00</published><updated>2009-10-29T23:41:35.617-05:00</updated><title type='text'>Getting LDAP Ready.</title><content type='html'>If you've never installed a LDAP server don't worry, its very easy.  I like to install via source instead of grabbing packages from repos.  You can find the directions for getting started &lt;a href="http://www.openldap.org/doc/admin24/quickstart.html"&gt;here.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Just so you know, the rootdn (owner the root user for LDAP) can be named anything, in fact I suggest you use something other than cn=Manager, since a lot of people look for that in new LDAP installs.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Also please read up on the &lt;a href="http://www.openldap.org/doc/admin24/access-control.html"&gt;Access Control&lt;/a&gt; chapter before you go off leaving your LDAP server running for any length of time.  Understanding the ACL of LDAP is a little tricky at first so go over it a couple of times just to make sure you have it.  It should be understood that most users will need to connect to your server to &lt;b&gt;get&lt;/b&gt; login information.  Crazy enough, LDAP supports a type of permission called "auth".  This allows an unknown client to query the LDAP server but only receive a connection or nothing from the server.  This way a client can transmit a query with user name and password and hope that a connection is returned.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If the idea of having unknown people query your LDAP server bugs you, you can always setup a Kerberos server to handle the authentication of users, I'll get to that when I cover SASL.  If fact, in some contract jobs with the government, you are legally required to have an external authentication service.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Well I'll fire up VirtualBox and begin doing some LDIF entries into LDAP and then some python code.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-8597090340940077979?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/8597090340940077979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=8597090340940077979' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8597090340940077979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8597090340940077979'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/getting-ldap-ready.html' title='Getting LDAP Ready.'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-1409775194629065063</id><published>2009-10-29T09:52:00.001-05:00</published><updated>2009-10-29T09:52:46.360-05:00</updated><title type='text'>What is LDAP and Friends</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;LDAP stands for the Lightweight Directory Access Protocol, you can read more about it &lt;a href='http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol'&gt;here.&lt;/a&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;Barring that, I'll give you a really quick run down of the history and uses of LDAP.  LDAP is the Internet version of the X.500 Directory Access Protocol (DAP).  In the beginning there was DAP, and no one used it (except maybe a couple of companies and the government, oh and Outlook as well.)  DAP used the full OSI protocol stack which, in short, is seven layers thick.  The Internet runs on a slightly lower calorie protocol, weighing in at four layers.  Now one can transition between the two quite easily.&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;(NOTE: When people hear OSI they think OSI Model, there are also a ton of ITU-T papers that actually define a real set of protocols, you can check them out &lt;a href='http://en.wikipedia.org/wiki/OSI_protocol_suite'&gt;here.&lt;/a&gt;)&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;So at any rate, X.500 defined this whole suite of protocols that allowed globally unique messaging and directory services (basically the precursor to email and a global phone book for all those email accounts.)  Needless to say this was a pretty lofty goal.  Moving on, some companies actually implemented OSI and started using X.400 (mail) and X.500 (directory) for company mail.  Then along came the Internet and suddenly DAP and all related technology found itself isolated.  Enter LDAP, whereas DAP was made to use a seven layer protocol, LDAP was made to use TCP/IP.  This includes IPv4 and IPv6 and TCP and UDP variations.  It is important to note that LDAP runs only on TCP/IP, so if you are using an IPX/SPX network then you will be using something like NDS (Novell eDirectory) which is a X.500 implementation on IPX/SPX (NOTE: NDS doesn't do everything X.500 does, but neither does LDAP).&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;Since LDAP was made to use the protocol of the Internet, and the Internet has become so wildly popular, LDAP has become a very popular replacement for X.500 installations.  The rest of the history of LDAP isn't all that fascinating so I'll leave at that.&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;So what is LDAP used for?  Well it can be used as a limited gateway to X.500 directories (and for a lot of large companies that is exactly what it is used for) but also it can be it's own trimmed down X.500 directory.  Trimmed down because LDAP doesn't implement the parts of X.500 that rely on the OSI protocol.  So what is this directory?  Well it is basically a database that houses user information.  Usually the LDAP database is optimized for many reads and few writes and usually doesn't implement things in a relational manner like an RDBMS.  Instead, LDAP is tree like and the database is optimized to think that way as well.  LDAP is also good at storing user information that can be used on the application side.  A RDBMS usually has data types that you store into it, an LDAP has a schema that is more role based as opposed to data based.&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;As an example, an RDBMS would have a user name and password field for user logins.  LDAP would have a user schema that stores user name and password.  Not much difference really but the schema is mostly role based, as you can imagine you can find a role that fits your needs from the IANA and add that to your LDAP server to fulfill that role.  It makes a lot of sense when you get more complicated examples like a FedEx Account Contact role versus (FULLNAME, ADDRESS1, CITY, STATE, ZIP, ACCOUNT, ...) like you would find in a RDBMS.&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;Also, LDAP is tree like in nature.  To implement the same ability in a RDBMS you need at least two tables, one to hold the normalized data and the other to add the structure you need.  So you may have a list of contacts: in a LDAP directory each branch may separate that contacts role in your company; in a RDBMS you would need another table describing the roles and who belongs to them.  I know it's not a big difference but it makes all the world of difference when you try to make optimizations and LDAP generally requires less administration and complex layouts.&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;So what role does LDAP play in the real world?  Usually it stores user information, logins, contacts, and so on.  Basically the same kind of information you might find in a phone book sans the whole computer aspect of it.  This is really important in the real world as it allows people to centralize user information.  Allowing only a few trusted sources to edit the data and allow the rest of the users to use it while conducting business.  Think of it as a company wide Roladex.  Because it stores contact information it can also store login information (basically a list of contacts that work for the company).  The LDAP server can tell the difference between the role of "Standard-Contact" and "Employee-Contact".  The standard contact might just have the regular information you'd expect, but the Employee contact may have everything a standard contact has and also have a password and username field within it.&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;I hope this gives you a better idea of how LDAP works in the real world.  LDAP stores user information and anything that you might be interested in storing for that user (notes, bookmarks, appointments, etc...)  It's not a replacement for a RDBMS, but it is a good solution for the purpose it was written for.  If you find yourself building an application that doesn't need RDBMS but needs millions of reads and very few writes, LDAP would be a good solution for you.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-1409775194629065063?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/1409775194629065063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=1409775194629065063' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/1409775194629065063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/1409775194629065063'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/what-is-ldap-and-friends.html' title='What is LDAP and Friends'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-5661189569183283580</id><published>2009-10-28T14:24:00.001-05:00</published><updated>2009-10-28T14:24:44.793-05:00</updated><title type='text'>LDAP and Python</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;I have no idea why I am so attracted to LDAP.  At any rate, I'll be over the next couple of weeks posting some LDAP python work that I'm doing. &lt;a href='http://www.python-ldap.org/'&gt;Here&lt;/a&gt; is the python library that I'll be (and most people) using.  I figure it was time that someone made Yet Another LDAP GUI Tool (YALGT).&lt;br/&gt;&lt;br/&gt;&lt;br /&gt;Nah I take that back, that sounds way too much like YAST from Novell.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-5661189569183283580?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/5661189569183283580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=5661189569183283580' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/5661189569183283580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/5661189569183283580'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/ldap-and-python.html' title='LDAP and Python'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-4317773276831520268</id><published>2009-10-28T14:10:00.001-05:00</published><updated>2009-10-28T14:12:59.729-05:00</updated><title type='text'>ScribeFire</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;I love the web proxy at my company.  Basically it is useless.  At any rate, since I can not use the web interface on Blogger, I've started using ScribeFire at work to publish post.  Right now my views about it are mixed.  I just have a funny feeling about it because it has the little logo in the top right corner.&lt;br/&gt;&lt;br/&gt;Why is that a big deal?!  Well ever since we left the era of Netscape Navigator, I haven't seen the logo in the top right corner in some time, except for adware.  Therein lays the point.  The add-on reminds me of adware.  So I'm a little cautious about it.&lt;br/&gt;&lt;br/&gt;Also the &amp;lt;br /&amp;gt; in ScribeFire acts weird and sometimes it tries to add a &amp;lt;div&amp;gt; that adds a invisible tracking pixel to my blog. (Which reminds me I've got to go through and make sure I removed them all).&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-4317773276831520268?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/4317773276831520268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=4317773276831520268' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/4317773276831520268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/4317773276831520268'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/scribefire.html' title='ScribeFire'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-3508336670081867640</id><published>2009-10-28T11:40:00.001-05:00</published><updated>2009-10-28T11:40:38.928-05:00</updated><title type='text'>Anyone know this person?</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Don't know anyone per se in Canada, but it is at least worthwhile to re-post this. &lt;a href='http://dudanogueira.com.br/2009/10/28/off-topic-canadian-women-died-in-brazil-authorities-cant-reach-the-family/'&gt;Please help find this person's family&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-3508336670081867640?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/3508336670081867640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=3508336670081867640' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/3508336670081867640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/3508336670081867640'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/anyone-know-this-person.html' title='Anyone know this person?'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-9162979845261842912</id><published>2009-10-28T11:22:00.001-05:00</published><updated>2009-10-28T11:28:35.167-05:00</updated><title type='text'>Pitfalls of AS400 and MS Access</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Where I work we have an AS400 system that provides our DB.  However, our IT admins decided to use a rather uncommon naming scheme.  Our Libraries "folders if your looking for a Windows equal" have a period in their name.&lt;br /&gt;&lt;br /&gt;Well you may, or may not, know that the period is how the AS400 system tells the difference between a library and a member when using the *SQL naming scheme.  So usually you have something like this:&lt;br /&gt;&lt;br /&gt;&lt;pre style='border: 1px solid rgb(136, 136, 255);'&gt;&lt;br /&gt;FNTUSR.ACCNUMB&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then you have the FNTUSR library and the ACCNUMB member of that library.  But if you have something like this:&lt;br /&gt;&lt;br /&gt;&lt;pre style='border: 1px solid rgb(136, 136, 255);'&gt;&lt;br /&gt;CHK.ENTR.BILLNO&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You basically have garbage, at least as far as ODBC goes.  The problem actually lies within the ODBC driver that IBM includes.  It doesn't follow the same resolution method as the actual AS400 system, maybe because it is local and ODBC is remote but details aren't really that important.  The ODBC driver goes out and yanks the CHK member during the resolution and asks for the BILLNO member, skipping completely the ENTR part of the name.&lt;br /&gt;&lt;br /&gt;Needless to say this may prevent you from using ODBC to connect to the AS400 system.  If there was only a way to pass the name as one chuck so that the ODBC driver would stop parsing the second period and placing the resulting token in the garbage.&lt;br /&gt;&lt;br /&gt;Oh wait, there is...&lt;br /&gt;&lt;br /&gt;The wonderful world of Microsoft allows you to pass a chuck of information into the ODBC parser, bypassing the tokenizer, by surrounding it with quotes!  Hooray!  But wait!  In addition to the wonderful-ness that is Microsoft.  None of their GUI offerings allow you to give quotes (except Excel, go figure).  So if you are wanting to connect to an AS400 system that is administer by half witted admins that place extra periods all over the place in an AS400 system (look *SYS != *SQL, you can not use *SYS when you are brainwashed into thinking that it is the same as *SQL).  You will need to go the VBA route (hooray... please shoot me now).&lt;br /&gt;&lt;br /&gt;For those of you not really familiar with the VBA way of doing things, it involves a lot of pain.  Please observe (I've named the DSN as400_connect):&lt;br /&gt;&lt;pre style='border: 1px solid rgb(136, 136, 255);white-space: pre-wrap;white-space: -moz-pre-wrap;word-wrap: break-word;'&gt;&lt;br /&gt;Public wspAS400 as Workspace&lt;br /&gt;Public cntAS400 as Connection&lt;br /&gt;Public dbAS400 as Database&lt;br /&gt;&lt;br /&gt;Public Function IWroteThisFunctionBecauseOurAdminsAreDumb()&lt;br /&gt;&lt;br /&gt;Dim qryDef as QueryDef&lt;br /&gt;Dim rs as RecordSet&lt;br /&gt;Dim SQLString as String&lt;br /&gt;&lt;br /&gt;On Error GoTo ConnectionError&lt;br /&gt;Set wspAS400 = DBEngine.CreateWorkspace("idiot", "", "", dbUseODBC)&lt;br /&gt;Set dbAS400 = wspAS400.OpenDatabase("idiot_db", , , "ODBC;DSN=as400_connect;DATABASE=SM456J12")&lt;br /&gt;Set cntAS400 = wspAS400.Connections(0)&lt;br /&gt;&lt;br /&gt;On Error GoTo QueryError&lt;br /&gt;SQLString = "SELECT * FROM ""CHK.ENTR""/BILLNO"&lt;br /&gt;Set qryDef = cntAS400.CreateQueryDef("", SQLString)&lt;br /&gt;Set rs = qryDef.OpenRecordset&lt;br /&gt;&lt;br /&gt;DoCmd.SetWarnings False&lt;br /&gt;&lt;br /&gt;'Insert you records into you MS Access DB here&lt;br /&gt;&lt;br /&gt;DoCmd.SetWarnings True&lt;br /&gt;&lt;br /&gt;ConnectionError:&lt;br /&gt;	MsgBox "Something got F***ed up!"&lt;br /&gt;	GoTo CleanUp&lt;br /&gt;&lt;br /&gt;QueryError:&lt;br /&gt;	MsgBox "Something got F***ed up!"&lt;br /&gt;	GoTo CleanUp&lt;br /&gt;&lt;br /&gt;CleanUp:&lt;br /&gt;&lt;br /&gt;	On Error Resume Next&lt;br /&gt;	rs.Close&lt;br /&gt;	qryDef.Close&lt;br /&gt;&lt;br /&gt;	Set rs = Nothing&lt;br /&gt;	Set qryDef = Nothing&lt;br /&gt;&lt;br /&gt;	cntAS400.Close&lt;br /&gt;	wspAS400.Close&lt;br /&gt;&lt;br /&gt;	Set cntAS400 = Nothing&lt;br /&gt;	Set dbAS400 = Nothing&lt;br /&gt;	Set wspAS400 = Nothing&lt;br /&gt;&lt;br /&gt;End Function&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;That should get you started on getting crap out of the AS400 system and into your MS Access database.  Notice that I am using the *SYS naming scheme.  Try both the *SYS and *SQL naming scheme (library/member, library.member) to see which one your AS400 system is using (or at least will resolve).  You can change that bit of information in the DSN entry on your system under ODBC Administration in Windows.&lt;br /&gt;&lt;br /&gt;PS:  Please make sure you have the damn ODBC driver from IBM before you even try setting up the DSN.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-9162979845261842912?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/9162979845261842912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=9162979845261842912' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/9162979845261842912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/9162979845261842912'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/pitfalls-of-as400-and-ms-access.html' title='Pitfalls of AS400 and MS Access'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-7470006680336405851</id><published>2009-10-28T10:42:00.001-05:00</published><updated>2009-10-28T10:42:33.853-05:00</updated><title type='text'></title><content type='html'>Testing from work!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-7470006680336405851?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/7470006680336405851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=7470006680336405851' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/7470006680336405851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/7470006680336405851'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/testing-from-work.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-1651820596592282347</id><published>2009-10-24T23:22:00.000-05:00</published><updated>2009-10-24T23:22:35.726-05:00</updated><title type='text'>I have a problem</title><content type='html'>I think you can see what it is:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;object width="480" height="385"&gt;&lt;param name="movie" value="http://www.youtube.com/v/wHeGX0wqazs&amp;amp;hl=en&amp;amp;fs=1&amp;amp;color1=0x3a3a3a&amp;amp;color2=0x999999"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/wHeGX0wqazs&amp;amp;hl=en&amp;amp;fs=1&amp;amp;color1=0x3a3a3a&amp;amp;color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I'm more upset that they didn't show the peas being eaten as well.&lt;br /&gt;&lt;pre style="border: 1px solid rgb(136, 136, 255);"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;&amp;lt;soap:Envelope&lt;br /&gt;xmlns:soap="http://www.w3.org/2001/12/soap-envelope"&lt;br /&gt;soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;soap:Body&amp;gt;&lt;br /&gt; &amp;lt;m:RSVP xmlns:m="http://justy.yogabagaba.lan/partyparty"&amp;gt;&lt;br /&gt;   &amp;lt;m:InYoTummy&amp;gt;False&amp;lt;/m:InYoTummy&amp;gt;&lt;br /&gt; &amp;lt;/m:RSVP&amp;gt;&lt;br /&gt;&amp;lt;/soap:Body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/soap:Envelope&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;&amp;lt;soap:Envelope&lt;br /&gt;xmlns:soap="http://www.w3.org/2001/12/soap-envelope"&lt;br /&gt;soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;soap:Body&amp;gt;&lt;br /&gt; &amp;lt;m:GreenBeans xmlns:m="http://justy.yogabagaba.lan/partyparty"&amp;gt;&lt;br /&gt;   &amp;lt;m:Message&amp;gt;I feel your pain&amp;lt;/m:Message&amp;gt;&lt;br /&gt; &amp;lt;/m:GreenBeans&amp;gt;&lt;br /&gt;&amp;lt;/soap:Body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/soap:Envelope&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;At least that's how I see a SOAP based conversation going.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-1651820596592282347?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/1651820596592282347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=1651820596592282347' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/1651820596592282347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/1651820596592282347'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/i-have-problem.html' title='I have a problem'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-9078689407310570480</id><published>2009-10-24T22:51:00.001-05:00</published><updated>2009-10-24T22:51:09.756-05:00</updated><title type='text'>USB Zebra doggy style</title><content type='html'>Do you have a Zebra printer that has firmware restrictions?  I'm looking at you FedEx!&lt;br /&gt;&lt;br /&gt;Well, most FedEx printers with custom firmware (99% of them) still understand raw ZPL II commands.  If you have a dotNET or Java application that is sending ZPL II commands to the printer then you already know that the parallel  port is the easiest way to do it.&lt;br /&gt;&lt;br /&gt;But let's say that you code with the assumption that you'll always be on a parallel part and then suddenly you find yourself toe to toe with a locked up FedEx Zebra (Z4M is the one I seem to be running into lately).&lt;br /&gt;&lt;br /&gt;These printers are USB and using the dotNET stack to send USB ZPL II to the printer is not only a headache, but you'll have a better chance to make PNGs and send them to the printer to be printed.&lt;br /&gt;&lt;br /&gt;Instead, setup the printer to have a network share "we'll say Printer in this case", pull up a command line in windows and chant the following words:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border:1px solid #8888FF"&gt;&lt;br /&gt;NET USE LPT1 \\127.0.0.1\Printer /PERSISTENT:YES&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Ta-Da!  Now you can send ZPL II to a USB printer via the usual raw data port API Stuff.  This also has the happy effect of by-passing evil FedEx firmware locking out stuff thingies.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-9078689407310570480?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/9078689407310570480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=9078689407310570480' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/9078689407310570480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/9078689407310570480'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/usb-zebra-doggy-style.html' title='USB Zebra doggy style'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-7251448061191403557</id><published>2009-10-24T22:06:00.001-05:00</published><updated>2009-10-24T22:06:28.018-05:00</updated><title type='text'>JSF and beyond</title><content type='html'>As far as intros to the Java EE go, once you understand the idea of JSP you just start adding layers.&lt;br /&gt;&lt;br /&gt;JavaServer Faces (JSF) uses JSP to dispaly pages, however, instead of messing with the URL or setting cookies to keep track of your session, JSF adds Java objects to keep track of that.  The objects are Java Beans (not to be confused with EJB) that provide a layer between the JSF container and your Java objects.&lt;br /&gt;&lt;br /&gt;That's right, JSF is a container that runs inside a web container.  You might think that this would add a ton of overhead, but you'd be surprise at what they squish in there.&lt;br /&gt;&lt;br /&gt;JSF was based on the ideas of Struts from Apache.  Struts brought a MVC container to the web container.  The ease of MVC made people go ga-ga.  In the end the number of layers and MVC frameworks exploded.  So it would be difficult to try and cover them all.  I am going to focus on ICEFaces here on my page since that is what I use.&lt;br /&gt;&lt;br /&gt;JSF is an awesome method to make web based applications and over the next couple of posts, I'll show some basic uses.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-7251448061191403557?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/7251448061191403557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=7251448061191403557' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/7251448061191403557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/7251448061191403557'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/jsf-and-beyond.html' title='JSF and beyond'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-1365791487066974412</id><published>2009-10-24T14:52:00.000-05:00</published><updated>2009-10-27T11:12:29.416-05:00</updated><title type='text'></title><content type='html'>Maybe it is because I have a kid that this seems all the more funnier.&lt;br /&gt;&lt;br /&gt;At any rate this is very wrong and do not play this in an area where others can hear it.  I can assure you it will offend.&lt;br /&gt;&lt;br /&gt;&lt;object width="480" height="385"&gt;&lt;param name="movie" value="http://www.youtube.com/v/hQp5l4-sfFA&amp;hl=en&amp;fs=1&amp;color1=0x3a3a3a&amp;color2=0x999999"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/hQp5l4-sfFA&amp;hl=en&amp;fs=1&amp;color1=0x3a3a3a&amp;color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;I think the best part is that the Nick Jr. is visible even in the lil' Jon parts.&lt;br /&gt;Update:  So Lazy Town Entrainment decided to enforce their copyright claims on the last video, so par for the course someone re-posted it.  It's a shame that Google has no backbone.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-1365791487066974412?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/1365791487066974412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=1365791487066974412' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/1365791487066974412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/1365791487066974412'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/so-funny-it-past-wrong-and-entered.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-4802998867172915702</id><published>2009-10-19T14:29:00.000-05:00</published><updated>2009-10-24T23:18:59.477-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='non-rant'/><category scheme='http://www.blogger.com/atom/ns#' term='3-tier'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><title type='text'>JSP and Java EE</title><content type='html'>If you are looking for a good intro into the semantics of JSP then may I suggest &lt;a href="http://www.jsptut,com/"&gt;here.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So what are Java Server Pages (JSP)?  If you have done any work with PHP then you'll be right at home with JSP.&lt;br /&gt;&lt;br /&gt;JSP is a method of creating Servlets with specially formatted HTML pages.  You add in Java code scripts inside tags delimited by &amp;lt;% and %&amp;gt;  (properly called: scriptlets &lt;em&gt;I know, I find myself calling them Java Script sometimes too, but that's a whole different thing&lt;/em&gt;)&lt;br /&gt;&lt;br /&gt;Expressions, one line shots of Java code that return a String, are encapsulated in &amp;lt;%= %&amp;gt;&lt;br /&gt;&lt;br /&gt;Here is a quick sample of the two intermixed:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px solid rgb(136, 136, 255); margin-left: auto; margin-right: auto; display: block;"&gt;&lt;br /&gt;&amp;lt;%&lt;br /&gt; int j = 0;&lt;br /&gt; while (j != 12 {&lt;br /&gt;%&amp;gt;&lt;br /&gt;&amp;lt;div style="border:1px dotted #338833"&amp;gt;&lt;br /&gt;This is line #&amp;lt;%= j %&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;% } %&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If that brings up memories of PHP, you wouldn't be the first.  JSP also adds Directives &amp;lt;%@ %&amp;gt; and Declarations &amp;lt;%! %&amp;gt;.  The latter being important because this is how you add methods to the servlet that will be created from your JSP.&lt;br /&gt;&lt;br /&gt;The servlet that is created for also has some special data members added to help you out.  The tutorial covers how to use these quite well.  It is important that you use these members because most of the time you're JSP is assumed to be thread safe (try not to break that assumption.)&lt;br /&gt;&lt;br /&gt;The really cool thing is JSP tags!  Unlike PHP (but like ColdFusion, if you've ever used it) you have access to a tag library.  These tags quickly provide functions that you're most likely to use (like include another page.)  You can also write your own library of JSP tags to encapsulate logic in your pages.  This effectively allows you to separate logic from presentation (the ultimate goal in web application.)&lt;br /&gt;&lt;br /&gt;But this brings us bark to the idea of MVC vs. Three Tier.  JSP acts as our presentation in Java EE, however JSP brings us almost too close to Three-Tier design.  Things that you want to go from page to page (shopping cart contents come to mind) have to either be pushed down to the database or passed through cookies/URL.  This can make a lot of developers feel uneasy because it is a lot of work for such a small gain (easy presentation of Java objects.)  If only there was a way to keep the ease of MVC design, have the ease of JSP presentation, and still have the flexibility of Three-Tier design.&lt;br /&gt;&lt;br /&gt;Lucky for you, there is.  There has been a lot of Java community members banging their heads over this, and over the years it has yielded about a dozen or so very mature frameworks.  All coming together in the Java standard call Java Server Faces (JSF).&lt;br /&gt;&lt;br /&gt;As you can see JSP offers a very powerful method of building presentations of Java objects.  Many companies use JSP as the display end of their products.  Later I'll cover JSF and show you how to bring the ease of MVC design into a Multi-Tier development platform.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-4802998867172915702?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/4802998867172915702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=4802998867172915702' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/4802998867172915702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/4802998867172915702'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/jsp-from-html-to-java.html' title='JSP and Java EE'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-8342525174703956366</id><published>2009-10-18T10:57:00.001-05:00</published><updated>2009-10-18T10:57:49.230-05:00</updated><title type='text'>Going easy on the breaking return!</title><content type='html'>Wow I looked at my post on servlets and I see that I need to lay off the &amp;lt;br /&amp;gt; tag for awhile.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-8342525174703956366?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/8342525174703956366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=8342525174703956366' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8342525174703956366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8342525174703956366'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/going-easy-on-breaking-return.html' title='Going easy on the breaking return!'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-8449712154232123764</id><published>2009-10-18T10:53:00.001-05:00</published><updated>2009-10-18T11:04:55.120-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc'/><category scheme='http://www.blogger.com/atom/ns#' term='non-rant'/><category scheme='http://www.blogger.com/atom/ns#' term='family guy'/><title type='text'></title><content type='html'>If you haven't guessed from the avatar, I'm a fan of family guy.  I know I'm so original.&lt;br /&gt;&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/n_1rSm2MDM4&amp;amp;hl=en&amp;amp;fs=1&amp;amp;color1=0x2b405b&amp;amp;color2=0x6b8ab6"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/n_1rSm2MDM4&amp;amp;hl=en&amp;amp;fs=1&amp;amp;color1=0x2b405b&amp;amp;color2=0x6b8ab6" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="385" width="480"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-8449712154232123764?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/8449712154232123764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=8449712154232123764' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8449712154232123764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8449712154232123764'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/it-peanut-butter-jelly-time.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-1142574291561386802</id><published>2009-10-18T10:40:00.001-05:00</published><updated>2009-10-18T11:03:59.519-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java ee'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='servlet'/><title type='text'></title><content type='html'>Servlets are the starting topic when covering the Java EE platform.  So let's begin.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In a Java environment you have three key pieces to making your program run.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;The Java Virtual Machine (JVM)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The Classpath&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The Class loader&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The class loader is the important one here.  It is the job of the class loader to get your Java class loaded into the JVM.  This is much the same as a &lt;a href="http://en.wikipedia.org/wiki/Loader_%28computing%29"&gt;loader for an OS.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Class Loader is "boot strapped" by the java command line utility.  This is all fine and dandy, up till you get to a point where you need classes loaded by a remote client.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Enter the container.  The container is a concept much like the class is.  A container is a class that loads other classes, much like the class loader.  It can other things as well like support LDAP security, email users, establish an SSL connection, manage database transactions, and so on.  The container is limited by the scope of the system class loader, but the container can load classes based on whatever rules it provides.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Much like a class hides data members from the programmer, containers hide the method of invocation for classes loaded into it.  A web container gets an HTTP request and loads Java objects in response, it doesn't really matter how it goes about doing it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Servlets are the base of the Java EE model.  They are invoked by an HTTP request, by means of a web container (see above).  Servlets implement the Servlet interface which allows a container to invoke and maintain the life cycle of the object.  More than likely you will be looking to extend the &lt;em&gt;javax.servlet.http.HttpServlet&lt;/em&gt; class.  This class comes with pre-built methods to handle the common HTTP request.  Such as:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;doDelete&lt;/strong&gt; - to handle the HTTP DELETE request&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;doGet&lt;/strong&gt; - to handle the HTTP GET request&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;doPost&lt;/strong&gt; - to handle the HTTP POST request&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;and so on...  Each servlet that you create translates into a web page. Each method implements logic to handle a type of request.  You'll be spending the bulk of you code in the doGet and doPost methods.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Working with the base servlet model is not the idea tool for interactive web pages.  Basically you are writing a web page in Java as opposed to HTML, which adds to the complexity.  Using the base servlet model is good for operations that you really want fine grain control over the entire logic flow.  Here is an example of a servlet.  You can readily see that we're just writing a web page within Java.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px solid rgb(136, 136, 255); margin-left: auto; margin-right: auto; display: block;"&gt;&lt;br /&gt;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;import java.io,PrintWriter;&lt;br /&gt;&lt;br /&gt;import javax.servlet.ServletException;&lt;br /&gt;import javax.servlet.http.HttpServlet;&lt;br /&gt;import javax.servlet.http.HttpServletRequest;&lt;br /&gt;import javax.servlet.http.HttpServletResponse;&lt;br /&gt;&lt;br /&gt;public class HelloWorld extends HttpServlet {&lt;br /&gt;&lt;br /&gt; public void doGet(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;throws ServletException, IOException {&lt;br /&gt;&lt;br /&gt;  PrintWriter wout = response.getWriter();&lt;br /&gt;&lt;br /&gt;  wout.println("&amp;lt;html&amp;gt;\n&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Hello, World!&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;\n&amp;lt;body&amp;gt;&amp;lt;h1&amp;gt;Hello, World!&amp;lt;/h1&amp;gt;&amp;lt;/body&amp;gt;\n&amp;lt;html&amp;gt;");&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As you can see this isn't exactly the greatest model.  That's where JSP comes into play, but I'll cover that later.  For now, you can see that a servlet allow fine control over what type of request will cause what action, but it is a lot to be asking you programmers to be Java/Web/Http experts all the time (ie, you could not manage [reasonably] a web site strictly made up of servlets.)  Usually you will reserve servlets for testing EJBs and stuff that requires fine control over the process.  You'll mostly use JSP/JSF for all other stuff.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Cheers!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-1142574291561386802?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/1142574291561386802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=1142574291561386802' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/1142574291561386802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/1142574291561386802'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/understanding-java-ee-servlets.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-5905644480466945830</id><published>2009-10-15T22:15:00.001-05:00</published><updated>2009-10-15T22:15:29.269-05:00</updated><title type='text'>Hello from BloGTK</title><content type='html'>Hello everyone.  I'm trying out &lt;a href="http://blogtk.jayreding.com/"&gt;BloGTK&lt;/a&gt; as a client to Blogger.  Mental note, SVG rendering will crash the program.  So this is my second go at this post.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Pre-formatted code:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border:1px solid #8888FF"&gt;&lt;br /&gt;#include&amp;lt;iostream&amp;gt;&lt;br /&gt;&lt;br /&gt;int main(int argc, char * argv []) {&lt;br /&gt;&lt;br /&gt;	std::cout &amp;lt;&amp;lt; "You entered " &amp;lt;&amp;lt; argc &amp;lt;&amp;lt; " CLI arguments.  They are:" &amp;lt;&amp;lt; std::endl;&lt;br /&gt;&lt;br /&gt;	for(int x=0; x&amp;lt;argc; x++)&lt;br /&gt;		std::cout &amp;lt;&amp;lt; argv[x] &amp;lt;&amp;lt; std::endl;&lt;br /&gt;&lt;br /&gt;	return 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thank you and now a random image.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img style="margin-left:auto;margin-right:auto;display:block;" src="http://java-ee-5-glassfish.packtpub.com/glassfish_front_cover_full.GIF" alt="Java EE 5 Development using GlassFish Application Server cover" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-5905644480466945830?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/5905644480466945830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=5905644480466945830' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/5905644480466945830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/5905644480466945830'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/hello-from-blogtk.html' title='Hello from BloGTK'/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-7121487455910532858</id><published>2009-10-15T20:50:00.000-05:00</published><updated>2009-10-15T21:21:40.674-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc'/><category scheme='http://www.blogger.com/atom/ns#' term='non-rant'/><category scheme='http://www.blogger.com/atom/ns#' term='java ee'/><title type='text'></title><content type='html'>&lt;span style="font-weight: bold;"&gt;Understanding OOP pitfalls in Java EE:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Object Orientated Programming (OOP) is the foundation on which the Java language is built upon.  When you build a Java program you are building a set of objects that will work together towards a goal. This brings me to the first point:  in Java EE it is important to remember to think of the object and not the task.&lt;br /&gt;&lt;br /&gt;A common pitfall is to start adding logic into a class that broadens its scope.  Remember, objects should be single shot, single idea things.  Let's say you have an object call &lt;span style="font-family:times new roman;"&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;BankAccount&lt;/span&gt;&lt;/span&gt;.  You would put into this class the account number, the account name, address, details, balance and so forth.  However, you may be tempted to place logic that converts the object into, say a SQL string or properly formats an address for display in a GUI.  NO!  Do not add logic to the class if it does not need to be added to keep the concept that the class represents, sane.  A bank account does not need to know about SQL, a bank account does not need to know about GUIs.&lt;br /&gt;&lt;br /&gt;The reasoning behind this is that the Java EE platform takes a lot of the bridge work out for you, you adding it back in prevents you from fully accessing all of the features (besides if you're adding them in who is Java to tell you wrong?)&lt;br /&gt;&lt;br /&gt;Complex logic goes into classes that will handle other classes.  In the example above you might include the &lt;span style="font-family:times new roman;"&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;BankController&lt;/span&gt;&lt;/span&gt; class.  It will be this class' job to gather the needed objects to handle the object you pass in.  The &lt;span style="font-family:times new roman;"&gt;&lt;span style="color: rgb(255, 102, 0);"&gt;BankController&lt;br /&gt;&lt;/span&gt;&lt;/span&gt; class may need to gather the objects that handle permissions, validation, database connectivity, and so forth.  The Java EE platform has this covered for you.  So you just worry about modeling classes after the real world thing they represent.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-7121487455910532858?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/7121487455910532858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=7121487455910532858' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/7121487455910532858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/7121487455910532858'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/understanding-oop-pitfalls-in-java-ee.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-7527474899375955790</id><published>2009-10-15T20:46:00.001-05:00</published><updated>2009-10-15T20:46:34.808-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='non-rant'/><category scheme='http://www.blogger.com/atom/ns#' term='3-tier'/><title type='text'></title><content type='html'>&lt;span style="font-weight: bold;"&gt;MVC, why is it so important and why n-tier matters:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you've been programming for a while, you've undoubtedly have come across the &lt;a href="http://en.wikipedia.org/wiki/Model-view-controller"&gt;Model-View-Controller (MVC)&lt;/a&gt; design pattern.  When I started programming my code started out as just one long procedural call, the "everything in the main function" design pattern.  As I got better with programming I started breaking logic into different functions and calling the functions.  Eventually, I got to Object Oriented Programing (OOP) and began the path of looking at programming not as a bunch of steps that need to take place to reach a goal; but instead as distinct ideas and concepts that put together, made a program.&lt;br /&gt;&lt;br /&gt;The MVC design pattern was developed to give developers a way of looking at a problem and separating common areas of a program.  Basically, a program has to deal with the end-user and a database.  We could easily design a monolithic program that did the task, but if something changes in the database, then we need to modify all of our code (or at the very least hunt down the section in our code that deals with the database) to adapt to the change.  Logically speaking, it wasn't long until people started to understand that the user interface should be a separate body of code from the part that deals with the database.  As user interfaces got more and more complex, the logic that handles validation and talking to the database module had to be separated too.  Thus was born the MVC design pattern.  In essence, gurus would preach the divide and conqueror technique of MVC to new developers in hopes that they would start their programs in the vein of MVC.  This way as the program evolved, it evolved with ease.&lt;br /&gt;&lt;br /&gt;However, there is one fall down to MVC.  It assumes that all things are on the same machine.  When we start connecting to a remote database to update our view, we start getting into handling SQL statements, exceptions, invalid return values, and many more issues (does NULL mean that the line should be blank or does it mean invalid?).  The view is not the place to handle this type of code, or at least if you want to keep things simple.  Thus, people holding to the MVC design pattern have created ways of wrapping database connections into convenient APIs that handle the mess, so that you can devote more time to making a good user interface.&lt;br /&gt;&lt;br /&gt;It's a nice thought, but it only goes so far.  Just pick up a book on MySQL and PHP and notice how many times they suggest that you just ignore exceptions.  Eventually, way back in the day don't let me make you think that this is a new development, it was understood that one machine just couldn't run everything (contrary to IBM's claims), and thus we embarked on a mission to find a way to make a program run on multiple machines.  Enter multi-tier design patterns.&lt;br /&gt;&lt;br /&gt;At first, people used messaging systems to communicate between different machines.  Think of it as Bob's copy of program A is running on Server A, Jane's copy of program A in running on Server B, and so on.  Server A and Server B talk to each other to keep data in sync using a messaging protocol.  This was an alright solution, but it really didn't get far from the MVC way of looking at things.  It was also a waste of resources, the View didn't use as much resources as say the Controller; the Model used the most disk space; the View was limited to the interface capabilities of the machine holding the Model and the Controller.  Basically, if your database had eaten all of your hard drive, you upgraded the drives; controller eating all your memory, you added more.  It would have been better to place the Model on a machine with tons of hard disk space, the Controller on the fastest CPU, and the View on a system that supported familiar GUI elements.&lt;br /&gt;&lt;br /&gt;Multi-tier design patterns were developed to allow each layer in the tier (Presentation, Logic, and Data) to run on different machines.  Some used proprietary protocols to achieve this (&lt;a href="http://en.wikipedia.org/wiki/IBM_Systems_Network_Architecture"&gt;SNA&lt;/a&gt; comes to mind).  With the advent of the Internet, the standardization of TCP/IP as the protocol of choice, Microsoft bringing open network connectivity (I know, who would have thought), and the desire for things to be less single vendor and more heterogeneous, new methods would need to be put into place to actually implement multi-tier design patterns.&lt;br /&gt;&lt;br /&gt;This is where multi-tier underwent its first redesign.  Now instead of assuming that the protocol would be packed with the vendor, multi-tier patterns had to abstract protocols altogether; in essence the developer shouldn't have to worry about the protocol, as long as the program can see the server everything should work.  While we haven't gotten away from the idea that a program is tied to a protocol (Web browsers still assume TCP/IP as the transport), we have made progress (Web browsers can used IPv4 or IPv6).  So it's important to remember that multi-tier is still protocol dependent, just now you don't have to worry about directly working with the protocol (unless you really want to!?).&lt;br /&gt;&lt;br /&gt;This redesign is what gives us the model that we all know and love.  It breaks the way an application works into three parts.  Presentation, Logic, and Data.  At face value it looks a lot like MVC, and to an extent it is.  However, in a multi-tier application the Presentation is assumed to never talk to the Data, all things must pass through the Logic layer.  Where as in MVC, the Controller provides input to the Model, and the view gets the output of the Model.  This is the fundamental difference between the two.&lt;br /&gt;&lt;br /&gt;In MVC your View must deal with the data straight from the Model.  In multi-tiered applications the Logic formats the Data into something that can be Presented.&lt;br /&gt;&lt;br /&gt;In MVC, your web designers must know what kind of assumptions should be taken on data from the data source and how to issue the commands to get that data.&lt;br /&gt;In Multi-tiered applications, the Logic handles all of this, your web developers simply access the properties of you logic (much better to write something like &lt;span style="color: rgb(204, 102, 0);font-family:times new roman;" &gt;#{shoppingCart.orderNumber}&lt;/span&gt; versus &lt;span style="color: rgb(204, 102, 0);font-family:times new roman;" &gt;SELECT ORDERNUMB FROM ORDERS WHERE SHOPPINGCART='&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(204, 102, 0);font-family:times new roman;" &gt;cartnumber&lt;/span&gt;&lt;span style="color: rgb(204, 102, 0);font-family:times new roman;" &gt;';&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;All in all, multi-tiered design patterns have been developed to make use of multiple machines, abstract protocols from developers, and allow specialty developers to concentrate better on the task at hand.  I know that some people still have the notion of what three and four tier development was like in the 60's, 70's, and 80's (which wasn't good and took long amounts of time to deploy) but the methods and tools have been refined to a point to make multi-tier more like Rapid Application Development (RAD) software.  Simply put, MVC is an easier model to work within, but Multi-tier is continuing to keep the pressure on MVC as an easy model to develop within.  Multi-tier isn't like it was back in the day, it has mature enough to be seriously considered before you begin your next enterprise application.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-7527474899375955790?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/7527474899375955790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=7527474899375955790' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/7527474899375955790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/7527474899375955790'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/mvc-why-is-it-so-important-and-why-n.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-7036039755364097096</id><published>2009-10-14T22:48:00.000-05:00</published><updated>2009-10-14T23:35:27.527-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='non-rant'/><category scheme='http://www.blogger.com/atom/ns#' term='3-tier'/><title type='text'></title><content type='html'>&lt;span style="font-weight: bold;"&gt;Logic, Database, Your customer:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That's the basic breakdown when it comes to providing central application services.  You centralize the applications so you don't have to network share every single application you want your clients to use (it just doesn't look professional).&lt;br /&gt;&lt;br /&gt;When you centralize your applications in your company, you add many different complex challenges to providing those applications and keeping things manageable and agile.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;How do we secure our applications?&lt;/li&gt;&lt;li&gt;How do we make them available to the clients?&lt;/li&gt;&lt;li&gt;How can we remove redundant functionality?&lt;/li&gt;&lt;li&gt;How can we simplify the deployment process?&lt;/li&gt;&lt;li&gt;Database, logic, and client...Oh my!&lt;/li&gt;&lt;/ul&gt;If you come from a LAMP or RoR background this may all be very new to you.  Basically the setup works as such:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The client (web, thick, thin, or services) calls up an action like: *Create new shopping cart, *Add product #23, #46, #107, and #428-A to the cart&lt;/li&gt;&lt;li&gt;Check out using the following information: (name, address, CC# etc...)&lt;/li&gt;&lt;li&gt;Send back the result of the transaction.&lt;/li&gt;&lt;/ol&gt;In LAMP and Rails one would have web pages that implement the logic of connecting to the database, validating the information, managing the session, and so forth.  Basically all the logic is in the web page.&lt;br /&gt;&lt;br /&gt;In a multi-tier environment, you have separate processes that manage all of that.  You have a web server that sends out the web page, you have an application server that handles the logic of your session and validating values, and you have a presistance layer that handles the logic of connecting to your database.  Each layer can service any other application as well.  You build the logic and use it in every application where it is needed.&lt;br /&gt;&lt;br /&gt;This simplifies management because now you can take a project and break it into many smaller parts, instead of passing around one large PHP file with about a dozen includes.&lt;br /&gt;&lt;br /&gt;It makes sense to break your large projects into smaller more manageable chunks.  It's nice to know that you can write &lt;span style="font-weight: bold;"&gt;and execute&lt;/span&gt; common code once, instead of writing 30 or so include file and having who knows how many threads of execution going over the same include file.  With a multi-tier platform one can manage the ever increasing demand of constantly growing flat file systems, add new features without major code surgery, and reduce the amount of covering the same ground (not only in code, but in CPU cycles as well).&lt;br /&gt;&lt;br /&gt;Giving credit where credit is due, RoR is really starting to mature in the MVC realm of web frameworks, but it still has many short comings like reducing number of threads doing the exact same thing, or rich messaging between processes (however they do have a nice RESTful services API, but so does Java and dotNet).&lt;br /&gt;&lt;br /&gt;In the end, modern web application frameworks provide robust one shot solutions to many problems, but as your demands grow managing those applications becomes harder and harder.  Multi-tier applications make it easy to scale to large deployments with a little investment up front.  Modern multi-tier has come a long way since the days of spending months on each single layer, frameworks have become more compact and interchangeable, providing quick application development, testing, and deployment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-7036039755364097096?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/7036039755364097096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=7036039755364097096' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/7036039755364097096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/7036039755364097096'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/logic-database-your-customer-thats.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-7302813584118331424</id><published>2009-10-14T22:21:00.000-05:00</published><updated>2009-10-14T22:47:13.642-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='misc'/><category scheme='http://www.blogger.com/atom/ns#' term='non-rant'/><category scheme='http://www.blogger.com/atom/ns#' term='java ee'/><category scheme='http://www.blogger.com/atom/ns#' term='dotNET'/><title type='text'></title><content type='html'>&lt;span style="font-weight: bold;"&gt;Java EE 5:&lt;/span&gt;&lt;br /&gt;I'm really big into Java.  I know a ton of people boo Java because they think it is slow or some other reason.  I'm here to tell you that Java is very prevalent and very useful.  Many websites are powered by Java EE and with good reason.&lt;br /&gt;&lt;br /&gt;Over the years Sun and the &lt;a href="http://jcp.org/en/home/index"&gt;Java Community&lt;/a&gt; have added really exciting technologies to the Java Platform.  Some have seen their day come and go, but many have really useful corner cases.  However, the best platform I've seen in some time is the Java EE 5 platform.&lt;br /&gt;&lt;br /&gt;Java EE is one of the few multi-tier application platforms still in town.  The really hot craze right now is your good old &lt;a href="http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29"&gt;LAMP stack&lt;/a&gt; or &lt;a href="http://rubyonrails.org/"&gt;RoR&lt;/a&gt;.  However, these approaches return to the days of monolithic hosting of network applications.  This approach is nice for small to medium deployments, but without some serious modifications, do not scale well in large deployments.  This is one of the reasons why LAMP has taken off so much, the stack is completely open source, so modifications can be done on the code easily to adjust to large deployments.&lt;br /&gt;&lt;br /&gt;Multi-tiered software was made to scale.  It has lost favor since it takes a lot of resources to get started at first (due mostly from configuring and creating the first bits of each layer.)  Java and .NET have taken steps to address this large problem, how do we make multi-tiered APIs but still make it easy for small deployments?&lt;br /&gt;&lt;br /&gt;Java EE 5 and the future EE 6 bring a lot to the table to make it easy to stop boiler plating things and start deploying services to meet your customers demands.  I know it sound a lot like a big commercial.&lt;br /&gt;&lt;br /&gt;Multi-tier software has gotten a bad rap from things like DCOM and CORBA.  But if you sit down and try Java EE 5, I'm sure you'll see that multi-tier has come a long way from where it was.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-7302813584118331424?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/7302813584118331424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=7302813584118331424' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/7302813584118331424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/7302813584118331424'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/java-ee-5-im-really-big-into-java.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-8569064607559334556</id><published>2009-10-14T22:18:00.000-05:00</published><updated>2009-10-14T22:19:21.333-05:00</updated><title type='text'></title><content type='html'>&lt;span style="font-weight: bold;"&gt;Blog Restart ver. 3.0:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: arial;"&gt;Yes, I'm restarting my blog.  Let's see what happens.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-8569064607559334556?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/8569064607559334556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=8569064607559334556' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8569064607559334556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/8569064607559334556'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/10/blog-restart-ver.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-3860571961904554519</id><published>2009-06-09T10:14:00.000-05:00</published><updated>2009-06-09T10:16:28.510-05:00</updated><title type='text'></title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:180%;"&gt;&lt;a href="http://r33b.net/"&gt;ALL GLORY TO THE HYPNOTOAD!&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-3860571961904554519?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/3860571961904554519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=3860571961904554519' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/3860571961904554519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/3860571961904554519'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/06/all-glory-to-hypnotoad.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-6893299509045468041</id><published>2009-05-20T22:48:00.000-05:00</published><updated>2009-05-20T23:04:13.509-05:00</updated><title type='text'></title><content type='html'>A pointer to something that needs to be constant.&lt;br /&gt;&lt;br /&gt;I've seen this code before...&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(192, 192, 192); font-style: italic;"&gt;type *getNodeList() const;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The problem with it is that it should not compile.  The reason?&lt;br /&gt;The "&lt;span style="font-style: italic;"&gt;const&lt;/span&gt;" at the end of the method prototype says that you wont change &lt;span style="font-weight: bold;"&gt;*this&lt;/span&gt;.  However, you are giving no guarantee that you'll keep this promise because you are returning &lt;span style="font-weight: bold;"&gt;type *&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;For all the compiler knows, you're going to be an evil person and use the pointer to change &lt;span style="font-weight: bold;"&gt;*this&lt;/span&gt;.  However, some compilers give you the benefit of the doubt and will happily compile this for you.&lt;br /&gt;&lt;br /&gt;Thankfully, gcc is not one of them.  For this to compile you have to ensure that you won't change &lt;span style="font-weight: bold;"&gt;*this&lt;/span&gt;.  To guarantee this you need to make the pointer a constant type, &lt;span style="font-weight: bold;"&gt;type const *&lt;/span&gt; (I like this method of placing const to the right of the type but &lt;span style="font-weight: bold;"&gt;const type *&lt;/span&gt; means the same thing so it's no big deal.)&lt;br /&gt;&lt;br /&gt;Therefore you get.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 153, 153); font-style: italic;"&gt;type const *getNodeList() const;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This should compile because you now have enough guaratees in place that the compiler will trust you.  Of course you can override this type of behavor but I don't recommend it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-6893299509045468041?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/6893299509045468041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=6893299509045468041' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/6893299509045468041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/6893299509045468041'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2009/05/pointer-to-something-that-needs-to-be.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34883908.post-116961366180979921</id><published>2007-01-23T22:39:00.000-06:00</published><updated>2009-05-21T09:08:31.611-05:00</updated><title type='text'></title><content type='html'>So here's my first example of using the Evolution Sharp Library.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;using System;&lt;br /&gt;using Evolution;&lt;br /&gt;&lt;br /&gt;class MyDemoClass {&lt;br /&gt;&lt;br /&gt; public static void Main(string [] args){&lt;br /&gt;&lt;br /&gt;  Evolution.Book myBook = new Evolution.Book();&lt;br /&gt;  Evolution.BookQuery bq;&lt;br /&gt;  bq = Evolution.BookQuery.AnyFieldContains("A Name");&lt;br /&gt;  Evolution.Contact [] con;&lt;br /&gt;  myBook.Open(false);&lt;br /&gt;  con = myBook.GetContacts(bq);&lt;br /&gt;  foreach(Evolution.Contact c in con)&lt;br /&gt;   Console.WriteLine(c.FullName);&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This you can now replace the "A Name" with a name in your contact listing in Evolution and see their Full name on the console.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;NOTE (2009-19-05):&lt;/span&gt;  This wasn't the first post, but I left it here because I needed a place to scribble some notes down.  I had just gotten a Blogger account back in late 2006 and was using Drivel at the time to post to blogger.  I was just putting notes that I need to carry around with me on the blog not any really useful information except for me.&lt;br /&gt;&lt;br /&gt;I don't know what project I was working on when I posted this note to my blog.  In late 2008 I remembered my Blogger account and in 2009 I chose to use it more than my Livejournal account.  Before I started using the account again I decided to clean it all up and remove a lot of the posts that were just notes and didn't really make any sense at all.&lt;br /&gt;&lt;br /&gt;This post somehow survived the great purge and is one of the few post still left from those days.  I am leaving it here just because it's a little piece of my history.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34883908-116961366180979921?l=ramenboy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramenboy.blogspot.com/feeds/116961366180979921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34883908&amp;postID=116961366180979921' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/116961366180979921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34883908/posts/default/116961366180979921'/><link rel='alternate' type='text/html' href='http://ramenboy.blogspot.com/2007/01/using-evolution-cli.html' title=''/><author><name>Just O Bare</name><uri>http://www.blogger.com/profile/09753215511597070628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_XKZEdtd4GhQ/Stf0YeD4GRI/AAAAAAAAAH4/V7gZVP32NyY/S220/Falimy_Guy___Stewie_Kill_Lois_by_mukeni0.gif'/></author><thr:total>0</thr:total></entry></feed>
