<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-7774229</id><updated>2007-04-11T06:22:58.492-07:00</updated><title type='text'>Space Program Blog</title><link rel='alternate' type='text/html' href='http://www.spaceprogram.com/knowledge/index.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default'></link><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.spaceprogram.com/knowledge/atom.xml'></link><author><name>Travis Reeder</name></author><generator version='7.00' uri='http://www2.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><entry><id>tag:blogger.com,1999:blog-7774229.post-7336741110107975203</id><published>2007-01-02T17:59:00.000-08:00</published><updated>2007-01-02T18:00:45.618-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'></category><category scheme='http://www.blogger.com/atom/ns#' term='tomcat'></category><category scheme='http://www.blogger.com/atom/ns#' term='ssl certificates'></category><title type='text'>Renewing SSL Certificates on Tomcat</title><content type='html'>&lt;p&gt;So I had to renew a couple of SSL certificates that are used by sites running standalone Tomcat, here is what I had to do: &lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Generate a new CSR request. This is easier than when first starting out since you've already created your keypair from the last time you bought your certificate:&lt;br /&gt;&lt;span style="color:#6600cc;"&gt;keytool -certreq -keyalg RSA -alias tomcat -file certreq.csr -keystore .keystore&lt;/span&gt; &lt;li&gt;Now open certreq.csr in a text editor and copy and paste the contents into your SSL issuers website form to finish the process of getting your new certificate. &lt;li&gt;Now you should get an email to verify that you are the one who submitted the request and a link to Approve it. This email will go to the email address on your whois record for your domain name to verify that you own the domain. &lt;li&gt;After you Approve the SSL request, you can download your new certificate along with the issuers intermediary certificate. &lt;li&gt;You must first install the issuers Intermediate Certificate:&lt;br /&gt;&lt;span style="color:#6600cc;"&gt;keytool -import -alias intermed -keystore .keystore -trustcacerts -file sf_issuing.crt&lt;/span&gt; &lt;li&gt;&lt;span style="color:#000000;"&gt;Then import your fresh new certificate:&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#6600cc;"&gt;keytool -import -alias tomcat -keystore .keystore -trustcacerts -file ariel1.spaceprogram.com.crt&lt;/span&gt; &lt;li&gt;&lt;span style="color:#000000;"&gt;And finally, restart Tomcat and double check by surfing to your page and checking out your certificate by clicking on the padlock icon on your web browser. Make sure the expiry date is correct.&lt;/span&gt; &lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;That's about it. Nice and easy. &lt;/p&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://www.spaceprogram.com/knowledge/2007/01/so-i-had-to-renew-couple-of-ssl.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/7336741110107975203'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/7336741110107975203'></link><author><name>Travis Reeder</name></author></entry><entry><id>tag:blogger.com,1999:blog-7774229.post-115861557604535990</id><published>2006-09-18T14:39:00.000-07:00</published><updated>2006-09-18T14:40:54.166-07:00</updated><title type='text'>Poor Man's Oracle Client</title><content type='html'>&lt;p&gt;I generally despise having to install Oracle software because it's so big and bloated, it's scary. Most downloads won't fit on a typical CD, even their Oracle Express edition is bigger than Microsoft Windows!&amp;nbsp;I don't know what Express means to them, but "huge" isn't the description I would think of.&lt;/p&gt; &lt;p&gt;But there is light at the end of the tunnel, Oracle now has &lt;a href="http://www.oracle.com/technology/tech/oci/instantclient/index.html"&gt;Instant Client&lt;/a&gt; which is only 35MB! Wow! And all you have to do is unzip it. It includes OCI, OCCI, and JDBC drivers, but if you want to make it useful out of the box, you should get the SQL Plus package for Instant Client (722KB!) and unzip it into the same directory.&amp;nbsp; Put your tnsnames.ora into the directory as well if required.&amp;nbsp; Then run sqlplus.exe as you normally would and voila, you're done.&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Download &lt;a href="http://www.oracle.com/technology/tech/oci/instantclient/index.html"&gt;Oracle Instant Client&lt;/a&gt;&lt;/li&gt; &lt;li&gt;Download SQL*Plus for Instant Client (from same download page)&lt;/li&gt; &lt;li&gt;Unzip Instant Client into a directory&lt;/li&gt; &lt;ol&gt; &lt;li&gt;eg: c:\oracle_ic&lt;/li&gt;&lt;/ol&gt; &lt;li&gt;Unzip SQL*Plus into the same directory&lt;/li&gt; &lt;li&gt;Put tnsnames.ora into the same directory (OPTIONAL)&lt;/li&gt; &lt;li&gt;Run: sqlplus &lt;a href="mailto:username/password@SID"&gt;username/password@SID&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Get &lt;a href="http://eclipsesql.sourceforge.net/"&gt;SQL Explorer&lt;/a&gt;&amp;nbsp;for a free JDBC based client if you want to connect with a visual client.&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://www.spaceprogram.com/knowledge/2006/09/poor-mans-oracle-client.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/115861557604535990'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/115861557604535990'></link><author><name>Travis Reeder</name></author></entry><entry><id>tag:blogger.com,1999:blog-7774229.post-113704341862506990</id><published>2006-01-11T20:59:00.000-08:00</published><updated>2006-08-26T10:36:29.286-07:00</updated><title type='text'>Mozy has Nailed Remote Backups</title><content type='html'>&lt;a href="https://mozy.com/ref/TKXL43"&gt;Mozy&lt;/a&gt; has nailed it.  I have been very interested in remote backup solutions for a long time for two reasons:&lt;br /&gt;&lt;br /&gt;1. Everyone should do backups&lt;br /&gt;2. Automated remote backups is the only way to go&lt;br /&gt;&lt;br /&gt;My interest goes so far that I created a peer to peer distributed backup system in University (if you want to read my papers on it, &lt;a href="http://www.spaceprogram.com/distributed_backup_system/"&gt;check here&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Today, most people are getting sold on the ol' external hard drive unit with one click backup, backup to CD, or some other lame manual process.  Manual being the keyword here.  Nobody is going to remember to backup their stuff every time they change it.  Lets say you edit a word document, are you going to be sure to back it up right after you're done?  CD or DVD backups are the worst of the options because are you going to burn a new CD for a 1KB file?  And what if you're house burns down?  Then you've lost all your CD's and your external hard drive anyways.&lt;br /&gt;&lt;br /&gt;Those types of systems are not for regular backups.  A backup system must have the following properties:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Automated - setup once, and don't think about it again&lt;/li&gt;&lt;li&gt;Incremental - will only backup modified files&lt;/li&gt;&lt;li&gt;Encrypted - it should be encrypted on the client before being sent for the best security&lt;/li&gt;&lt;li&gt;Remote - this one may be questionable to some, but I think it's essential&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;The location one is important due to fire, robbery, etc, but is also important for laptop users since they may not be at home.&lt;br /&gt;&lt;br /&gt;I'm trying not to stray too far off topic here, but I wanted to provide background as to why I think I have found the new winner for backups. And the winner is: &lt;a href="https://mozy.com/ref/TKXL43"&gt;Mozy&lt;/a&gt; .  It has all of the required properties in a nice easy to use package, but the best part is&lt;span style="font-weight: bold;"&gt;&lt;/span&gt; you get up to 2 GB free!  There are other solutions out there, but free is not in their vocabulary.</content><link rel='alternate' type='text/html' href='http://www.spaceprogram.com/knowledge/2006/01/mozy-has-nailed-remote-backups.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/113704341862506990'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/113704341862506990'></link><author><name>Travis Reeder</name></author></entry><entry><id>tag:blogger.com,1999:blog-7774229.post-115205253593739346</id><published>2006-07-04T15:35:00.000-07:00</published><updated>2006-07-06T09:42:19.183-07:00</updated><title type='text'>Db4oUtil (aka. The Easiest Way to Get Started With Db4o)</title><content type='html'>Want the quickest and easiest way to get started with &lt;a href="http://www.db4o.com"&gt;db4o&lt;/a&gt;?  Use the following Db4oUtil class.  This class is very similar to the HibernateUtil class that you may be familiar with if you're a Hibernate user. It uses a thread local object so &lt;span style="font-weight: bold;"&gt;it's thread safe, makes multi-tier usage a no brainer and it's just plain simple to use.&lt;br&gt;&lt;br&gt;&lt;span style="font-weight: bold;"&gt;The simple step-by-step for this tutorial:&lt;br&gt;&lt;/span&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;Copy the Db4oUtil.java code below into a new class&lt;/li&gt;&lt;li&gt;Use the Db4oUtil methods in your code, samples below&lt;br&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br&gt;That is it... seriously.  You can optionally tweak the fields in Db4oUtil to your liking, like you'll want to change the YAPFILENAME field for each application you will use this with.&lt;br&gt;&lt;h2&gt;Db4oUtil.java&lt;br&gt; &lt;/h2&gt; &lt;pre class="code"&gt;public class Db4oUtil {&lt;br&gt;    // EDIT THESE SETTINGS&lt;br&gt;    private static final String YAPFILENAME = "test.db4o.yap";&lt;br&gt;    private static final int PORT = 0;&lt;br&gt;    /*&lt;br&gt;     If you want the server to be networked, change the port number above and uncomment the USER, PASSWORD lines below/&lt;br&gt;     Then in getObjectServer, uncomment the objectServer.grantAccess line&lt;br&gt;     */&lt;br&gt;    //private static final String USER = "username";&lt;br&gt;    //private static final String PASSWORD = "password";&lt;br&gt;    &lt;br&gt;    private static ObjectServer objectServer;&lt;br&gt;&lt;br&gt;    private static final ThreadLocal dbThreadLocal = new ThreadLocal();&lt;br&gt;&lt;br&gt;    public static ObjectContainer getObjectContainer() {&lt;br&gt;        ObjectContainer oc = (ObjectContainer) dbThreadLocal.get();&lt;br&gt;        if (oc == null || oc.ext().isClosed()) {&lt;br&gt;            oc = getObjectServer().openClient();&lt;br&gt;            dbThreadLocal.set(oc);&lt;br&gt;        }&lt;br&gt;        return oc;&lt;br&gt;    }&lt;br&gt;&lt;br&gt;    public static void closeObjectContainer() {&lt;br&gt;        ObjectContainer oc = (ObjectContainer) dbThreadLocal.get();&lt;br&gt;        dbThreadLocal.set(null);&lt;br&gt;        if (oc != null) oc.close();&lt;br&gt;    }&lt;br&gt;&lt;br&gt;    public synchronized static ObjectServer getObjectServer() {&lt;br&gt;        if (objectServer == null) {&lt;br&gt;            objectServer = getObjectServerForFilename(YAPFILENAME, PORT);&lt;br&gt;            // and give access&lt;br&gt;            //objectServer.grantAccess(USER, PASSWORD);&lt;br&gt;        }&lt;br&gt;        return objectServer;&lt;br&gt;    }&lt;br&gt;&lt;br&gt;&lt;br&gt;    public static void shutdown() {&lt;br&gt;        if (objectServer != null) {&lt;br&gt;            objectServer.close();&lt;br&gt;        }&lt;br&gt;    }&lt;br&gt;&lt;br&gt;    public static ObjectServer getObjectServerForFilename(String yapfilename, int port) {&lt;br&gt;        File parentDir = getDbDirectory();&lt;br&gt;        File dbfile = new File(parentDir, yapfilename);&lt;br&gt;&lt;br&gt;        // for replication //////////////////////////&lt;br&gt;        Db4o.configure().generateUUIDs(Integer.MAX_VALUE);&lt;br&gt;        Db4o.configure().generateVersionNumbers(Integer.MAX_VALUE);&lt;br&gt;&lt;br&gt;        // other options&lt;br&gt;        Db4o.configure().exceptionsOnNotStorable(true);&lt;br&gt;        Db4o.configure().objectClass("java.math.BigDecimal").translate(new com.db4o.config.TSerializable());&lt;br&gt;&lt;br&gt;        // now open server&lt;br&gt;        ObjectServer objectServer = Db4o.openServer(dbfile.getPath(), port);&lt;br&gt;&lt;br&gt;        return objectServer;&lt;br&gt;    }&lt;br&gt;&lt;br&gt;    private static File getDbDirectory() {&lt;br&gt;        // will store data files in {user.home}/db4o/data directory&lt;br&gt;        String dbfile = System.getProperty("user.home") + "/db4o/data";&lt;br&gt;        File f = new File(dbfile);&lt;br&gt;        if (!f.exists()) {&lt;br&gt;            f.mkdirs();&lt;br&gt;        }&lt;br&gt;        return f;&lt;br&gt;    }&lt;br&gt;}&lt;br&gt;&lt;/pre&gt; You can edit the fields at the top to modify your database filename, etc.&lt;br&gt; &lt;h2&gt;   Using Db4oUtil &lt;/h2&gt; This is a simple code sample of usage:&lt;br&gt; &lt;pre class="code"&gt;// Get ObjectContainer - you can repetitively call this function in different methods without the need to pass the ObjectContainer around&lt;br&gt;ObjectContainer oc = Db4oUtil.getObjectContainer();&lt;br&gt;&lt;br&gt;// YOUR CODE HERE - use the ObjectContainer and do all your stuff here&lt;br&gt;&lt;br&gt;// Close ObjectContainer when done &lt;br&gt;Db4oUtil.closeDb();&lt;br&gt;&lt;br&gt;// Close object server when completely exiting application&lt;br&gt;Db4oUtil.shutdown();&lt;br&gt;&lt;/pre&gt; That's all there is to it!&lt;br&gt;&lt;br&gt;</content><link rel='alternate' type='text/html' href='http://www.spaceprogram.com/knowledge/2006/07/db4outil-aka-easiest-way-to-get.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/115205253593739346'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/115205253593739346'></link><author><name>Travis Reeder</name></author></entry><entry><id>tag:blogger.com,1999:blog-7774229.post-114798576846630432</id><published>2006-05-18T13:53:00.000-07:00</published><updated>2006-05-20T19:57:11.246-07:00</updated><title type='text'>Say Goodbye to your Relational Database</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;h3 xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;a href="http://www.db4o.com" title="   db40"&gt;   db40&lt;/a&gt; Has Entered the Building&lt;br style="font-family: Verdana;"/&gt; &lt;/h3&gt; &lt;span style="font-family: Verdana;"&gt; I have been using db4o a LOT lately, and &lt;/span&gt;&lt;a href="http://www.imdb.com/title/tt0120737/quotes" style="font-family: Verdana;" title="I don't expect I shall return"&gt;I don't expect I shall return&lt;/a&gt;&lt;span style="font-family: Verdana;"&gt;.  I can say without question that it has increased my productivity by at least...  &lt;/span&gt;&lt;a href="http://www.austinpowers.com/drevil/" style="font-family: Verdana;" title="1 million times"&gt;1 million times&lt;/a&gt;&lt;span style="font-family: Verdana;"&gt;.  Well probably not that much, but a heck of a lot.  It definitely takes a bit of getting use to if you come from a relational database world, but consider &lt;/span&gt;&lt;span style="font-weight: bold; font-family: Verdana;"&gt;never having to map your objects to a relational database&lt;/span&gt;&lt;span style="font-family: Verdana;"&gt;.  And how about &lt;/span&gt;&lt;span style="font-weight: bold; font-family: Verdana;"&gt;never having to make the database at all!&lt;/span&gt;&lt;span style="font-family: Verdana;"&gt;  You just worry about your object model and db4o will take care of the &lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Persistence" style="font-family: Verdana;" title="persistence"&gt;persistence&lt;/a&gt;&lt;span style="font-family: Verdana;"&gt; (long term storage).&lt;/span&gt;&lt;br style="font-family: Verdana;"/&gt; &lt;br style="font-family: Verdana;"/&gt; &lt;span style="font-family: Verdana;"&gt; Check out these examples to see just how easy it is.&lt;/span&gt;&lt;br style="font-family: Verdana;"/&gt; &lt;h3 style="font-family: Verdana;"&gt;   Starting the Database Server&lt;br/&gt; &lt;/h3&gt; &lt;blockquote style="font-family: Verdana;"&gt;&lt;code style="font-family: Courier New;"&gt;// openServer() takes the filename where you want your database stored and a port&lt;/code&gt;&lt;br style="font-family: Courier New;"/&gt;&lt;code&gt;&lt;span style="font-family: Courier New;"&gt;ObjectServer server = Db4o.openServer("somefilename.yap", 1234); &lt;/span&gt;&lt;br style="font-family: Courier New;"/&gt;&lt;span style="font-family: Courier New;"&gt;// Now you can give access to particular logins&lt;/span&gt;&lt;br style="font-family: Courier New;"/&gt;&lt;span style="font-family: Courier New;"&gt; server.grantAccess("username","password");&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;code style="font-family: Verdana;"&gt;There are other ways of doing this: you can run it in non-server mode, but I don't recommend that since you'll probably just end up changing it down the road if your application is multi-threaded (and what application isn't these days?); you can also use an embedded server by using port zero [&lt;/code&gt;&lt;code style="font-family: Verdana;"&gt;ObjectServer server = Db4o.openServer("somefilename.yap", 0);] and getting connections from the ObjectServer directly [&lt;/code&gt;&lt;code style="font-family: Verdana;"&gt;ObjectContainer db = server.openClient();] which isn't too bad because it'll be faster, but it can't be networked.&lt;/code&gt;&lt;br style="font-family: Verdana;"/&gt; &lt;code style="font-family: Verdana;"&gt;&lt;br/&gt;When your program is ready to shutdown, you'll want to call &lt;span style="font-weight: bold;"&gt;server.close() &lt;/span&gt;to shut it down.&lt;br/&gt;&lt;/code&gt; &lt;h3 style="font-family: Verdana;"&gt;   Getting a Connection &lt;/h3&gt; &lt;code style="font-family: Verdana;"/&gt;&lt;blockquote style="font-family: Verdana;"&gt;&lt;code&gt;&lt;span style="font-family: Courier New;"&gt;ObjectContainer db = Db4o.openClient("localhost",PORT,USER,PASSWORD);&lt;/span&gt;&lt;br style="font-family: Courier New;"/&gt;&lt;span style="font-family: Courier New;"&gt;try{&lt;/span&gt;&lt;br style="font-family: Courier New;"/&gt;&lt;span style="font-family: Courier New;"&gt;     // with the client, we can do all the fun stuff in the examples below &lt;/span&gt;&lt;br style="font-family: Courier New;"/&gt;&lt;span style="font-family: Courier New;"&gt;    // ALL EXAMPLES ARE ASSUMED TO BE PLUGGED IN HERE&lt;/span&gt;&lt;br style="font-family: Courier New;"/&gt;&lt;span style="font-family: Courier New;"&gt;} finally {&lt;/span&gt;&lt;br style="font-family: Courier New;"/&gt;&lt;span style="font-family: Courier New;"&gt;     db.close();&lt;/span&gt;&lt;br style="font-family: Courier New;"/&gt;&lt;span style="font-family: Courier New;"&gt;}&lt;/span&gt;&lt;br/&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;code style="font-family: Verdana;"/&gt;&lt;h3 style="font-family: Verdana;"&gt;Saving and Updating an Object&lt;br/&gt;&lt;/h3&gt;&lt;span style="font-family: Verdana;"&gt;Doesn't get much easier than this.&lt;/span&gt;&lt;br style="font-family: Verdana;"/&gt;&lt;blockquote style="font-family: Verdana;"&gt;&lt;span style="font-family: Courier New;"&gt;db.set(myObject);&lt;/span&gt;&lt;br/&gt;&lt;/blockquote&gt; &lt;h3 style="font-family: Verdana;"&gt;Query&lt;/h3&gt;&lt;span style="font-family: Verdana;"&gt;This is equivalent to your SQL Select.  For this example, lets say we saved a couple of objects that looked like this:&lt;/span&gt;&lt;br style="font-family: Verdana;"/&gt;&lt;blockquote style="font-family: Verdana;"&gt;&lt;span style="font-family: Courier New;"&gt;Contact contact = new Contact();&lt;/span&gt;&lt;br style="font-family: Courier New;"/&gt;&lt;span style="font-family: Courier New;"&gt;contact.setName("Travis");&lt;/span&gt;&lt;br style="font-family: Courier New;"/&gt;&lt;span style="font-family: Courier New;"&gt;db.set(contact);&lt;/span&gt;&lt;br style="font-family: Courier New;"/&gt;&lt;span style="font-family: Courier New;"&gt;contact = new Contact();&lt;/span&gt;&lt;br style="font-family: Courier New;"/&gt;&lt;span style="font-family: Courier New;"&gt;contact.setName("Jimbo");&lt;/span&gt;&lt;br style="font-family: Courier New;"/&gt;&lt;span style="font-family: Courier New;"&gt;db.set(contact);&lt;/span&gt;&lt;br/&gt;&lt;/blockquote&gt;&lt;span style="font-family: Verdana;"&gt;Now to query for the contact named Travis, you do this:&lt;/span&gt;&lt;br style="font-family: Verdana;"/&gt;&lt;blockquote style="font-family: Verdana;"&gt;&lt;span style="font-family: Courier New;"&gt;Query q = db.query();&lt;/span&gt;&lt;br style="font-family: Courier New;"/&gt;&lt;span style="font-family: Courier New;"&gt;q.constrain(Contact.class);&lt;/span&gt;&lt;br style="font-family: Courier New;"/&gt;&lt;span style="font-family: Courier New;"&gt;q.descend("name").constrain("Travis");&lt;/span&gt;&lt;br style="font-family: Courier New;"/&gt;&lt;code style="font-family: Courier New;"&gt;ObjectSet result = q.execute();&lt;br/&gt;while (result.hasNext()) {&lt;br/&gt;     Contact c = (Contact) result.next();&lt;br/&gt;     System.out.println("Contact: " + c.getName());&lt;br/&gt;}&lt;/code&gt;&lt;br/&gt;&lt;/blockquote&gt;&lt;p style="font-family: Verdana;"&gt;The example above is a &lt;a href="http://sodaquery.sourceforge.net/" title="SODA"&gt;SODA&lt;/a&gt;   query which as you can see, uses strings and can be built dynamically. db4o does have another method of querying called &lt;a href="http://www.ddj.com/184406432" title="Native Queries"&gt;Native Queries&lt;/a&gt;. db4objects recommends Native Queries and it's for good reason. Native queries don't reference fields by strings, they're compile time checked, are object oriented and, most importantly, they are refactorable. &lt;br/&gt;&lt;/p&gt;&lt;p style="font-family: Verdana;"&gt;&lt;br/&gt;&lt;/p&gt;&lt;blockquote style="font-family: Verdana;"&gt;&lt;p style="font-family: Courier New;"&gt;&lt;code&gt;List &amp;lt;Contact&amp;gt; contacts = db.query(new Predicate&amp;lt;Contact&amp;gt;() {&lt;br/&gt;     public boolean match(Contact contact) {&lt;br/&gt;         return contact.getName().equals("Travis");&lt;/code&gt;&lt;/p&gt;&lt;p style="font-family: Courier New;"&gt;&lt;code&gt;      }&lt;/code&gt;&lt;/p&gt;&lt;p style="font-family: Courier New;"&gt;&lt;code&gt;});&lt;/code&gt;&lt;/p&gt;&lt;p style="font-family: Courier New;"&gt;&lt;code/&gt;for (Contact contact: contacts) {&lt;/p&gt;&lt;span style="font-family: Courier New;"&gt;     &lt;/span&gt;&lt;code style="font-family: Courier New;"&gt;System.out.println("Contact: " + c.getName());&lt;/code&gt;&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;}&lt;/span&gt;&lt;br/&gt;&lt;code/&gt; &lt;/p&gt;&lt;/blockquote&gt;&lt;h3 style="font-family: Verdana;"&gt;Deleting an Object&lt;/h3&gt;&lt;blockquote style="font-family: Verdana;"&gt;&lt;span style="font-family: Courier New;"&gt;db.delete(myObject);&lt;/span&gt;&lt;br/&gt;&lt;/blockquote&gt;&lt;h2 style="font-family: Verdana;"&gt;Gotchas&lt;/h2&gt;&lt;span style="font-family: Verdana;"&gt;Now not everything is greener on the other side, there are still many little gotchas that may bite you, for instance:&lt;/span&gt;&lt;br style="font-family: Verdana;"/&gt;&lt;ul style="font-family: Verdana;"&gt;&lt;li&gt;No ID support like Hibernate / EJB so you can't let db4o rebind objects based on an id field in your objects&lt;/li&gt;&lt;ul&gt;&lt;li&gt;This is extremely apparent in a web based application where you have to be sure to reload your objects in every request, so they can be in your new db4o session (assuming session per request pattern).  I have figured out ways to work around this though to make it automated and I'll try to share these with you in a later post.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Weak management GUI&lt;/li&gt;&lt;ul&gt;&lt;li&gt;If you're used to working with nice tools like the tools provided by major database vendors, the db4o Object Manager doesn't really compare. But hopefully with time and with more adopters, the Object Manager will get better and we'll see third party tools. &lt;br/&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;No joins&lt;/li&gt;&lt;ul&gt;&lt;li&gt;This isn't bad if your object model is not complex and you can have all your objects connected to each other in your object graph, but you have to be careful when your data set gets large and your object model is a complex graph with bidirectional relationships because you may end up loading your entire database! Or at least a good chunk of data that you may not always need. And this is a *huge* performance killer.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;Now the obvious answer would be to break apart your object model which is easy to do in a relational database because you have id's and foreign keys. In db4o, if you break apart your model, there is no built in way to reference your disconnected objects. &lt;br/&gt;&lt;/li&gt;&lt;li&gt;It is possible to workaround this though, by using keys and ID's as fields in your objects and querying for the related objects when you need them.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br/&gt;&lt;h2 style="font-family: Verdana;"&gt;Conclusion&lt;/h2&gt;&lt;span style="font-family: Verdana;"/&gt;&lt;span style="font-family: Verdana;"&gt;In any case, &lt;/span&gt;&lt;a href="http://developer.db4o.com/user/Profile.aspx?UserID=2114" id="ctl00___ctl00___ctl00_ctl00_bcr_ctl00___Entry___AuthorLink"&gt;Carl Rosenberger&lt;/a&gt;&lt;span style="font-family: Verdana;"&gt; &lt;/span&gt;&lt;span style="font-family: Verdana;"&gt;and the &lt;/span&gt;&lt;a href="http://www.db4o.com/" title="db4objects"&gt;db4objects&lt;/a&gt;  &lt;span style="font-family: Verdana;"&gt; folks have done a great job with this open source object database and they are definitely the leaders in the space.  The simplicity, performance, and productivity gains outweight and disadvantages by a long shot. &lt;/span&gt;&lt;span style="font-family: Verdana;"&gt;I urge you to try it.  &lt;/span&gt;&lt;span style="font-family: Verdana;"&gt;&lt;br/&gt;&lt;br/&gt;Also, I plan on sharing more of my experiences with db4o in the near future, along with code such as how to easily use it in a web application, how to partition, and how to scale.&lt;/span&gt;&lt;br style="font-family: Verdana;"/&gt;&lt;br style="font-family: Verdana;"/&gt;&lt;br/&gt;&lt;br /&gt;Tags: &lt;a href="http://technorati.com/tag/rel8r" rel="tag"&gt;db4o&lt;/a&gt; | &lt;a href="http://technorati.com/tag/tagging" rel="tag"&gt;object databases&lt;/a&gt; | &lt;a href="http://technorati.com/tag/spam" rel="tag"&gt;tutorial&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='alternate' type='text/html' href='http://www.spaceprogram.com/knowledge/2006/05/say-goodbye-to-your-relational.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/114798576846630432'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/114798576846630432'></link><author><name>Travis Reeder</name></author></entry><entry><id>tag:blogger.com,1999:blog-7774229.post-114797659963226970</id><published>2006-05-18T09:31:00.000-07:00</published><updated>2006-05-18T11:36:06.573-07:00</updated><title type='text'>Installing Java 5 JDK and Tomcat on Ubuntu (using VMWare)</title><content type='html'>This document will walk you through installing &lt;a href="http://tomcat.apache.org/"&gt;Apache Tomcat&lt;/a&gt; on &lt;a href="http://www.ubuntu.com/"&gt;Ubuntu Linux&lt;/a&gt; using &lt;a href="http://www.vmware.com/"&gt;VMware&lt;/a&gt; for virtualization. Most of the steps apply even if you're not using VMware.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Download and install VMWare on your server&lt;/li&gt;&lt;li&gt;Download and install VMWare client on your workstation (if it is different than your server)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Option 1: Prepackaged Ubuntu VM (Please note, this will NOT work on a headless server)&lt;br /&gt;&lt;/li&gt;&lt;ol&gt;&lt;li&gt;Download Ubuntu VM from &lt;a href="http://www.vmware.com"&gt;www.vmware.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Open Ubuntu VM (user/pass is ubuntu/ubuntu) in VMWare client&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;Option 2: New fresh install of Ubuntu (you have to do this if you have a headless server)&lt;/li&gt;&lt;ol&gt;&lt;li&gt;Download Ubuntu ISO from &lt;a href="http://www.ubuntu.com"&gt;www.ubuntu.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Create new virtual machine in vmware, choose Linux -&gt; Ubuntu&lt;/li&gt;&lt;li&gt;Mount the cd drive for the virtual machine to your downloaded iso in the virtual machine settings&lt;/li&gt;&lt;li&gt;Start virtual machine, this will ask if you want to install, so perform the full install (this is just a regular Ubuntu install)&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;Now you should be in Ubuntu linux&lt;/li&gt;&lt;li&gt;modify /etc/apt/sources.list (ex: run: sudo nano -w /etc/apt/sources.list)&lt;br /&gt;- Change the first section lines deb http://archive.ubuntu.com/ubuntu breezy main restricted&lt;br /&gt;to deb http://archive.ubuntu.com/ubuntu breezy main restricted universe multiverse&lt;br /&gt;You can also add universe multiverse to deb-src and do the same to the breezy-update lines too.&lt;br /&gt;(breezy will be dapper in 6.X versions)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;run: sudo apt-get update&lt;/li&gt;&lt;li&gt;Install JDK&lt;/li&gt;&lt;ol&gt;&lt;li&gt;Option 1:&lt;/li&gt;&lt;ol&gt;&lt;li&gt;run: sudo apt-get install sun-java5-jdk&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;Option 2: (if option 1 doesn't work)&lt;/li&gt;&lt;ol&gt;&lt;li&gt;download jdk 1.5 from sun, the Self extracting linux version, .bin extension (NOT rpm)&lt;/li&gt;&lt;li&gt;run: sudo apt-get java-package&lt;/li&gt;&lt;li&gt;run: fakeroot jdk***.bin&lt;/li&gt;&lt;li&gt;run: sudo update-alternatives --config java&lt;br /&gt;- select the j2sdk1.5-sun option&lt;/li&gt;&lt;li&gt;run: java -version&lt;br /&gt;- just to make sure it's the new version&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;li&gt;add:&lt;br /&gt;export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.06&lt;br /&gt;if you used Option 1 for installing JDK above or:&lt;br /&gt;export JAVA_HOME=/usr/lib/j2sdk1.5-sun&lt;br /&gt;if option 2 was used&lt;br /&gt;to /home/ubuntu/.bashrc&lt;/li&gt;&lt;li&gt;Open a new console window to continue with the rest of the steps&lt;/li&gt;&lt;li&gt;Download tomcat 5.5 from &lt;a href="http://tomcat.apache.org/"&gt;tomcat.apache.org&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;extract tomcat (to a directory under your HOME directory is a good idea - /home/ubuntu/java/apache-tomcatXXX)&lt;/li&gt;&lt;li&gt;go to tomcat directory/bin&lt;/li&gt;&lt;li&gt;run: ./startup.sh&lt;/li&gt;&lt;li&gt;surf to http://yournewserversip:8080/&lt;/li&gt;&lt;ol&gt;&lt;li&gt;You should see the Tomcat welcome page&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;If you want to run Tomcat as a service: http://tomcat.apache.org/tomcat-5.5-doc/setup.html&lt;br /&gt;&lt;br /&gt;Other tips:&lt;br /&gt;- If you want to use 7-zip which is nice for all compression/decompression tasks, run: "sudo apt-get install p7zip", then to extract anything, you just run "7za x myfile" (.zip or .tar or .tar.gz or .7z, etc)&lt;br /&gt;- If you want an ssh server (sshd) on your new ubuntu box, run: "sudo apt-get install openssh-server". Apparently Ubuntu does not come with an ssh server installed out of the box.&lt;br /&gt;- if you use nano, while you're editing .bashrc above, it's a good idea to add an alias for nano with the -w option like: alias nano='nano -w'&lt;br /&gt;- VMware kicks a**, so be sure to try it (note: I have no affiliation with VMware, I just like good products)&lt;br /&gt;&lt;br /&gt;If you have any issues with the steps above or want to add anything, please post your comment below.&lt;br /&gt;&lt;br /&gt;Good night and good luck...</content><link rel='alternate' type='text/html' href='http://www.spaceprogram.com/knowledge/2006/05/installing-java-5-jdk-and-tomcat-on.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/114797659963226970'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/114797659963226970'></link><author><name>Travis Reeder</name></author></entry><entry><id>tag:blogger.com,1999:blog-7774229.post-114685769049092858</id><published>2006-05-05T12:32:00.000-07:00</published><updated>2006-05-17T11:32:44.186-07:00</updated><title type='text'>Normalize Schnormalize (aka Real-Time Data Warehousing)</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Some applications need real-time reporting, &lt;a href="http://www.ecommstats.com/" title="ecommStats Web Analytics" xmlns="http://www.w3.org/1999/xhtml"&gt;ecommStats Web Analytics&lt;/a&gt; is one such app.  ecommStats customers want to see what is happening on their website and they want to see it now.&lt;br /&gt;&lt;br /&gt;A little background might be in order: In general, with enterprise software, you move and transform data from your &lt;a href="http://en.wikipedia.org/wiki/Database_transaction" title="Transactional Database"&gt;Transactional Database&lt;/a&gt; (the one that is involved in the day to day work and storing every little piece of data) to your &lt;a href="http://en.wikipedia.org/wiki/Data_warehouse" title="Data Warehouse"&gt;Data Warehouse&lt;/a&gt; so that you can generate reports faster and easier, which basically boils down to &lt;a href="http://en.wikipedia.org/wiki/Business_Intelligence" title="Business Intelligence"&gt;Business Intelligence&lt;/a&gt;.  And this is generally a heavy process so it will run once per day, once per week, or whatever fits into the business needs and the gap must be longer than it takes to actually run the process (if the process takes 24 hours to run, it's probably not a good idea to run it every day).&lt;br /&gt;&lt;br /&gt;But why wait until the night time (&lt;a href="http://www.lyricsfreak.com/a/adam+sandler/joining+the+cult_20003930.html" title="the night time is the right time"&gt;the night time is the right time&lt;/a&gt;) or the weekend to move all that data into a separate database when you can do simple preemptive operations on your database to give your users real-time data?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Database_normalization" title=" Normalization"&gt; Normalization&lt;/a&gt; is great and all, but a &lt;span style="font-weight: bold;font-size:100%;" &gt;hybrid approach can work wonders&lt;/span&gt;.  The data is still normalized, but we have extra tables and extra columns that act as our data warehouse.&lt;br /&gt;&lt;br /&gt;Lets take the Search Phrase report for instance, it is a time based report which shows you how many people have searched on a particular search phrase or keyword.  In a normalized system, you would have your search phrase in one table and the request that came in in another table (this is seriously simplified to make a point):&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;table style="color: rgb(51, 51, 255);" border="1" cellpadding="3" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="50%"&gt;&lt;span style="font-weight: bold;"&gt;SearchPhrase&lt;/span&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="50%"&gt;id&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="50%"&gt;phrase&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;table style="color: rgb(51, 51, 255);" border="1" cellpadding="3" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="100%"&gt;&lt;span style="font-weight: bold;"&gt;SearchRequest&lt;/span&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="100%"&gt;id&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="100%"&gt;phraseId&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="100%"&gt;date&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="" height="" width="100%"&gt;user&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now you could sum up all the requests that used the phrase everytime someone wants the Search Phrase report, but do you want to make your users wait for this report?  There could be thousands of words and thousands of requests for each word which quickly puts you into the millions of rows!   The user might as well go have a coffee while they're waiting.  And do you want your poor server to have to work so hard for this little report?&lt;br /&gt;&lt;br /&gt;But by adding a single column, we can make the report almost instantaneous:&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;table style="color: rgb(51, 51, 255);" border="1" cellpadding="3" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="50%"&gt;&lt;span style="font-weight: bold;"&gt;SearchPhrase&lt;/span&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="50%"&gt;id&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="50%"&gt;phrase&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="" height="" width="50%"&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;requestCount&lt;/span&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="vertical-align: top;"&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;lastRequestDate&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now when we're showing that report, we don't even have to look at the SearchRequest table, so what used have to go through potentially millions of rows, now is just a few thousands rows (or however many search phrases you are looking at).  Obviously this example won't give you the time based reporting, but using an extra time bucket table, with similar techniques can get the results you want.&lt;br /&gt;&lt;br /&gt;And lets say you also wanted to show when the last time some searched for a particular phrase. You could look in the SearchRequest table, sort by date descending and then grab the first one, but this is time, disk and processor intense if the request table is large. So try simply adding a date column to the SearchPhrase table like above and update it when the request is made. &lt;span style="font-weight: bold;"&gt;Don't be afraid to duplicate data when the performance benefits can be substantial&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Now how much harder is this to implement in your code?  It's actually very simple in most cases, usually just requiring an extra update.  In the example above, when saveSearchRequest(SearchPhrase phrase) is called in the code, it will save the SearchRequest, &lt;span style="font-style: italic;"&gt;and&lt;/span&gt; do a simple update on the requestCount column:&lt;br /&gt;&lt;blockquote&gt;UPDATE SearchPhrase SET requestCount = requestCount + 1, lastRequestDate = sysdate where id = PHRASE_ID;&lt;br /&gt;&lt;/blockquote&gt; &lt;br /&gt;&lt;br /&gt;This one time update is insignificant when compared to the many times that queries will be run against your tables.&lt;br /&gt;&lt;br /&gt;In conclusion, using these hybrid techniques for database design can reduce wait time significantly and you can report in near real-time, rather than making your users wait days for their data. The new columns and/or tables may take up more space, but space is cheap and peformance is not.  It truly is a small price to pay when compared to the huge price of doing this repeatedly in a purely normalized database or a non-real-time huge bulk process to move the data into a data warehouse.&lt;br /&gt;&lt;br /&gt;Tags: &lt;a href="http://technorati.com/tag/rel8r" rel="tag"&gt;normalizing&lt;/a&gt; | &lt;a href="http://technorati.com/tag/tagging" rel="tag"&gt;data warehouse&lt;/a&gt; | &lt;a href="http://technorati.com/tag/spam" rel="tag"&gt;analytics&lt;/a&gt; | &lt;a href="http://technorati.com/tag/ranking" rel="tag"&gt;real-time&lt;/a&gt; | &lt;a href="http://technorati.com/tag/blog" rel="tag"&gt;databases&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='alternate' type='text/html' href='http://www.spaceprogram.com/knowledge/2006/05/normalize-schnormalize-aka-real-time.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/114685769049092858'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/114685769049092858'></link><author><name>Travis Reeder</name></author></entry><entry><id>tag:blogger.com,1999:blog-7774229.post-113995866365167545</id><published>2006-02-14T15:09:00.000-08:00</published><updated>2006-02-14T15:11:03.663-08:00</updated><title type='text'>New rel8r Blog!</title><content type='html'>I've decided to start a new blog focused on rel8r topics such as tagging, blogging, tag and blog spam, etc.&lt;br /&gt;&lt;br /&gt;Check it out here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blog.rel8r.com/"&gt;http://blog.rel8r.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And be sure to subscribe!</content><link rel='alternate' type='text/html' href='http://www.spaceprogram.com/knowledge/2006/02/new-rel8r-blog.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/113995866365167545'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/113995866365167545'></link><author><name>Travis Reeder</name></author></entry><entry><id>tag:blogger.com,1999:blog-7774229.post-113486463083196197</id><published>2005-12-17T15:57:00.000-08:00</published><updated>2005-12-17T16:18:48.516-08:00</updated><title type='text'>Satellite Radio vs the iPod</title><content type='html'>I've been thinking about getting a satellite radio for myself for Christmas, but I wanted to compare the TCO (total cost of ownership) vs an ipod.&lt;br /&gt;&lt;br /&gt;Satellite Radio&lt;br /&gt;Pros: Always changing content, always new content, no time wasted finding and downloading songs, never have to buy songs, 100's of channels, unique content like &lt;a href="http://www.howardstern.com/"&gt;Howard Stern&lt;/a&gt; on &lt;a href="http://www.sirius.com"&gt;Sirius&lt;/a&gt; live content like sports (&lt;a href="http://www.nfl.com"&gt;NFL&lt;/a&gt;)&lt;br /&gt;cons: monthly subscription fee, large form factor receivers&lt;br /&gt;&lt;br /&gt;ipod&lt;br /&gt;pros: listen to what you want when you want, small receivers, very nice looking, can hold other data such as pictures&lt;br /&gt;cons: have to find songs, get them from your computer to your ipod, purchase songs or get them illegally, stale content, expensive units, expensive songs&lt;br /&gt;&lt;br /&gt;So here's the cost comparison assuming you are downloading songs legally:&lt;br /&gt;&lt;br /&gt;Satellite Radio: $100 for receiver (can get them for much cheaper if you look around) plus $12.99 per month subscription fee.  That would be $255.88 for first year, 155.88 each year after.&lt;br /&gt;&lt;br /&gt;iPod: $299 for unit plus $.99 per song&lt;br /&gt;Lets say you want 50 songs to start, $49.50, so starting price is $348.50.&lt;br /&gt;&lt;br /&gt;Now you easily tire of your fifty songs playing over and over, so you buy say a new album each month for $9.99.  So the first year with the ipod, you're cost is $468.38 plus $119.88 each year after.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;TABLE width="100%" border="1" style="left: 0pt; top: 0pt;" id="s1" class="spreadsheet"&gt;&lt;THEAD&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;Unit&lt;/TD&gt;&lt;TD&gt;Additional Year&lt;/TD&gt;&lt;TD&gt;First Year&lt;/TD&gt;&lt;TD&gt;Second Year&lt;/TD&gt;&lt;TD&gt;Third Year&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Satellite&lt;/TD&gt;&lt;TD format="format:'num',numType:'c'"&gt;&lt;DIV class="spreadsheetCellFormatted"&gt;$100.00&lt;/DIV&gt;&lt;/TD&gt;&lt;TD format="format:'num',numType:'c'"&gt;&lt;DIV class="spreadsheetCellFormatted"&gt;$155.88&lt;/DIV&gt;&lt;/TD&gt;&lt;TD formula="=B2+C2" format="format:'num',numType:'c'"&gt;&lt;DIV class="spreadsheetCellFormatted"&gt;$255.88&lt;/DIV&gt;&lt;/TD&gt;&lt;TD formula="=D2+C2" format="format:'num',numType:'c'"&gt;&lt;DIV class="spreadsheetCellFormatted"&gt;$411.76&lt;/DIV&gt;&lt;/TD&gt;&lt;TD formula="=E2+C2" format="format:'num',numType:'c'"&gt;&lt;DIV class="spreadsheetCellFormatted"&gt;$567.64&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;iPod&lt;/TD&gt;&lt;TD format="format:'num',numType:'c'"&gt;&lt;DIV class="spreadsheetCellFormatted"&gt;$299.00&lt;/DIV&gt;&lt;/TD&gt;&lt;TD format="format:'num',numType:'c'"&gt;&lt;DIV class="spreadsheetCellFormatted"&gt;$119.88&lt;/DIV&gt;&lt;/TD&gt;&lt;TD formula="=B3+C3" format="format:'num',numType:'c'"&gt;&lt;DIV class="spreadsheetCellFormatted"&gt;$418.88&lt;/DIV&gt;&lt;/TD&gt;&lt;TD formula="=D3+C3" format="format:'num',numType:'c'"&gt;&lt;DIV class="spreadsheetCellFormatted"&gt;$538.76&lt;/DIV&gt;&lt;/TD&gt;&lt;TD formula="=E3+C3" format="format:'num',numType:'c'"&gt;&lt;DIV class="spreadsheetCellFormatted"&gt;$658.64&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;With the unlimited songs and all the variety, the value proposition of the satellite radio is much better than the ipod.  And as you can see in the table above, satellite radio is actually significantly cheaper than owning an iPod.&lt;br /&gt;&lt;br /&gt;Tags: &lt;a href="http://technorati.com/tag/sirius" rel="tag"&gt;Sirius&lt;/a&gt; | &lt;a href="http://technorati.com/tag/xm" rel="tag"&gt;XM Radio&lt;/a&gt; | &lt;a href="http://technorati.com/tag/satellite" rel="tag"&gt;Satellite&lt;/a&gt; | &lt;a href="http://technorati.com/tag/radio" rel="tag"&gt;Radio&lt;/a&gt; | &lt;a href="http://technorati.com/tag/satellite+radio" rel="tag"&gt;Satellite Radio&lt;/a&gt; | &lt;a href="http://technorati.com/tag/ipod" rel="tag"&gt;iPod&lt;/a&gt;</content><link rel='alternate' type='text/html' href='http://www.spaceprogram.com/knowledge/2005/12/satellite-radio-vs-ipod.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/113486463083196197'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/113486463083196197'></link><author><name>Travis Reeder</name></author></entry><entry><id>tag:blogger.com,1999:blog-7774229.post-113271272423343649</id><published>2005-11-22T18:01:00.000-08:00</published><updated>2005-12-12T15:18:01.543-08:00</updated><title type='text'>AJAXifying JSF (aka Making AJAX Enabled Components in MyFaces)</title><content type='html'>There has been a lot of discussion on the MyFaces developers list on how best to incorporate &lt;a href="http://en.wikipedia.org/wiki/AJAX"&gt;AJAX&lt;/a&gt; (Asynchronous JavaScript and XML) into &lt;a href="http://en.wikipedia.org/wiki/JavaServer_Faces"&gt;JavaServer Faces (JSF)&lt;/a&gt; components. The first components were simple updating components that would retrieve updated information from the server and replace some elements' innerHTML. These included an InputSuggestAjax component that worked like &lt;a href="http://www.google.com/webhp?complete=1&amp;hl=en"&gt;Google Suggest&lt;/a&gt; and AutoUpdateDataTable that would get updated list information and update a table in place at a specified interval. Both very cool components made by Martin Marinschek. The main work on these was to encode an ajax response that was just the html required to replace the current html that was being displayed.&lt;br /&gt;&lt;br /&gt;I needed components that could be interactive and update the backing model on the server side as well as update so there was a lot of extra work required.&lt;br /&gt;&lt;br /&gt;On the client:&lt;br /&gt;&lt;ol&gt;   &lt;li&gt;Instead of submitting forms in the traditional way, everything has to be submitted through the XMLHttpRequest using javascript.&lt;/li&gt;   &lt;li&gt;Components had to be javascript ready to push their changes to the server&lt;/li&gt;   &lt;li&gt;Error handling (validation, etc) had to be done dynamically on the client side&lt;br /&gt;&lt;/li&gt; &lt;/ol&gt; On the server:&lt;br /&gt;&lt;ol&gt;   &lt;li&gt;Decode an incoming request&lt;/li&gt;   &lt;li&gt;Update backing model components&lt;/li&gt;   &lt;li&gt;Return an error response or a success response&lt;/li&gt; &lt;/ol&gt;The normal JSF lifecycle consists of the following phases:&lt;br /&gt;&lt;ol&gt; &lt;li&gt;Restore view&lt;/li&gt;&lt;li&gt;Apply request values; process events&lt;/li&gt;&lt;li&gt;Process validations; process events&lt;/li&gt;&lt;li&gt;Update model values; process events&lt;/li&gt;&lt;li&gt;Invoke application; process events&lt;/li&gt;&lt;li&gt;Render response&lt;/li&gt; &lt;/ol&gt; With a normal request you would go through this entire process on every component in the view tree. When you are just updating a single component, this lifecycle is far from optimal. In order to short circuit this lifecycle, a PhaseListener is executed before the Apply Request Values phase, performs the lifecycle &lt;span style="font-style: italic;"&gt;on the affected component(s) only&lt;/span&gt;, renders a relatively tiny ajax xml response, then completes the response so nothing further is done.  So the only phase that is fully executed is the Restore View phase.  This should show some major performance improvements.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;The Components&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;All of the components had to be modified to support this new scripting when decoding and when encoding (rendering). The currently available components that you can use and test are:&lt;br /&gt;&lt;br /&gt;- inputText (with options to show buttons for submit and cancel, default is to&lt;br /&gt;submit onChange)&lt;br /&gt;- selectManyCheckbox&lt;br /&gt;- selectOneRadio&lt;br /&gt;- selectBooleanCheckbox (with options to use on/off images instead of&lt;br /&gt;a checkbox)&lt;br /&gt;&lt;br /&gt;These are available as part of the MyFaces Sandbox package.  See inputAjax.jsp for examples on usage.  The best thing about these components to a developer is the ease of use, for instance, using inputTextAjax is just as simple as using inputText:&lt;br /&gt;&lt;br /&gt;&amp;lt;s:inputtextajax value="#{inputAjaxBean.text2}" id="text2" forceid="true" onsuccess="successful" onfailure="failure" onstart="starting" showokbutton="true" showcanceltext="true"/&amp;gt;&lt;br /&gt;&lt;br /&gt;( See &lt;a href="http://wiki.apache.org/myfaces/MyFacesComponents"&gt;wiki documentation&lt;/a&gt; for more info on usage. )&lt;br /&gt;&lt;a href="http://wiki.apache.org/myfaces/MyFacesComponents"&gt;&lt;/a&gt;&lt;br /&gt;I'd love to hear any comments or suggestions you may have.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;s:message&gt;&lt;/s:message&gt;</content><link rel='alternate' type='text/html' href='http://www.spaceprogram.com/knowledge/2005/11/ajaxifying-jsf-aka-making-ajax-enabled.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/113271272423343649'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/113271272423343649'></link><author><name>Travis Reeder</name></author></entry><entry><id>tag:blogger.com,1999:blog-7774229.post-113212224433781913</id><published>2003-10-25T14:54:00.000-07:00</published><updated>2005-11-20T13:15:28.060-08:00</updated><title type='text'>Using Cron and SCP for Backups and Such</title><content type='html'>&lt;h5&gt;Introduction&lt;/h5&gt;This document will explain the steps required to use scp in cron. This is generally useful to do automated backups on Linux and other nix variations.&lt;br /&gt;    &lt;h5&gt;Instructions&lt;/h5&gt;These instructions will walk you through what it takes.&lt;br /&gt;    &lt;p&gt;&lt;strong&gt;1. Generate a private/public key pair &lt;/strong&gt;&lt;/p&gt;      &lt;p&gt;Simple command to do this: &lt;/p&gt;&lt;blockquote  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;ssh-keygen -t rsa&lt;/span&gt;&lt;/blockquote&gt;Leave the passphrase empty so that cron can use it passwordless. Just be sure nobody gets your private key.&lt;br /&gt;    &lt;p&gt;&lt;strong&gt;2. Copy the public key to the remote server &lt;/strong&gt;&lt;/p&gt;           &lt;div style="font-family: courier new;" class="cprompt"&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;scp ~/.ssh/id_rsa.pub remote_host:&lt;/span&gt;&lt;/blockquote&gt;&lt;/div&gt;     &lt;p&gt;&lt;strong&gt;3. Add local key to remote servers trusted key &lt;/strong&gt;&lt;/p&gt;Log on to the remote server and if there has never been a key created for this user on the remote machine, run the &lt;span style="font-family: courier new;"&gt;ssh-keygen&lt;/span&gt;&lt;span style="font-family: courier new;" class="cprompt"&gt;-t rsa&lt;/span&gt; just to get the key directory and stuff set up.&lt;br /&gt;    &lt;p&gt;Then concatenate the new key to your authorized_keys file:&lt;br /&gt;    &lt;/p&gt;&lt;p style="font-family: courier new;" class="cprompt"&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt; cat ~/id_rsa.pub &amp;gt;&amp;gt; ~/.ssh/authorized_keys&lt;/span&gt;&lt;/blockquote&gt; &lt;/p&gt;Now for some reason, you may have to do this to the keys file:&lt;br /&gt;    &lt;p style="font-family: courier new;" class="cprompt"&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;chmod 644 ~/.ssh/authorized_keys&lt;/span&gt;&lt;/blockquote&gt; &lt;/p&gt;&lt;strong&gt;4. Now try logging into the remote machine again from local &lt;/strong&gt;&lt;br /&gt;    &lt;p style="font-family: courier new;" class="cprompt"&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;ssh REMOTE_USERNAME@remote_host&lt;/span&gt;&lt;/blockquote&gt;&lt;/p&gt;This &lt;em&gt;should&lt;/em&gt; log you in without asking for a password. If it doesn't, then something must be wrong at this point and you should go through the steps above again. This should also mean that scp will work the same way and you might want to test that scp works by copying a file from local to remote usingscp. If no password, then we're all good.      &lt;p&gt;&lt;strong&gt;5. Now lets test the cron script&lt;/strong&gt;&lt;/p&gt;My cron script for this example is simply going to copy a directoryof files using scp to the remote server.&lt;br /&gt;    &lt;p style="font-family: courier new;" class="code"&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;scp -r /PATH_TO_FILES/ REMOTE_USER@remote_host:BACKUPS/&lt;/span&gt;&lt;/blockquote&gt; &lt;/p&gt;And that's about all she wrote. Save that in a file called backup.sh (or whatever you want to call it), chmod 755 i it and then try running it. ./backup.sh to run it. If it works, then next stop is to cron it.&lt;br /&gt;    &lt;p&gt;&lt;strong&gt;6. Add script to cron jobs&lt;/strong&gt;&lt;/p&gt;Easiest way is to simply copy the backup.sh file into /etc/cron.daily/ . This will make it run every day. Choose another cron.SOMETIME to make it run more or less often. If you want more control on when it's run, read up on adding it to the crontab.&lt;br /&gt;    &lt;p&gt;  &lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://www.spaceprogram.com/knowledge/2003/10/using-cron-and-scp-for-backups-and_25.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/113212224433781913'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/113212224433781913'></link><author><name>Travis Reeder</name></author></entry><entry><id>tag:blogger.com,1999:blog-7774229.post-109727256021332360</id><published>2004-01-09T14:55:00.000-08:00</published><updated>2005-11-20T13:12:30.726-08:00</updated><title type='text'>Starting Tomcat as a Service on Linux</title><content type='html'>&lt;h3&gt;Introduction&lt;/h3&gt;This document will teach you how to setup Tomcat to run as a service (startup when booted) on Linux.&lt;br /&gt;    &lt;h5&gt;Intended Audience&lt;/h5&gt;System admins.&lt;br /&gt;    &lt;h5&gt;Instructions&lt;/h5&gt;This is actually pretty easy and will be presented step by step.&lt;br /&gt;    &lt;p&gt;&lt;strong&gt;1. Save tomcat start / stop script &lt;/strong&gt;&lt;/p&gt;Copy and paste the following script into your text editor:&lt;br /&gt;    &lt;div class="code"&gt;&lt;br /&gt;&lt;pre&gt;# This is the init script for starting up the&lt;br /&gt;#  Jakarta Tomcat server&lt;br /&gt;#&lt;br /&gt;# chkconfig: 345 91 10&lt;br /&gt;# description: Starts and stops the Tomcat daemon.&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;# Source function library.&lt;br /&gt;. /etc/rc.d/init.d/functions&lt;br /&gt;&lt;br /&gt;# Get config.&lt;br /&gt;. /etc/sysconfig/network&lt;br /&gt;&lt;br /&gt;# Check that networking is up.&lt;br /&gt;[ "${NETWORKING}" = "no" ] &amp;&amp;amp; exit 0&lt;br /&gt;&lt;br /&gt;tomcat=/usr/local/jakarta-tomcat&lt;br /&gt;startup=$tomcat/bin/startup.sh&lt;br /&gt;shutdown=$tomcat/bin/shutdown.sh&lt;br /&gt;export JAVA_HOME=/usr/local/jdk&lt;br /&gt;&lt;br /&gt;start(){&lt;br /&gt; echo -n $"Starting Tomcat service: "&lt;br /&gt; #daemon -c&lt;br /&gt; $startup&lt;br /&gt; RETVAL=$?&lt;br /&gt; echo&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;stop(){&lt;br /&gt; action $"Stopping Tomcat service: " $shutdown &lt;br /&gt; RETVAL=$?&lt;br /&gt; echo&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;restart(){&lt;br /&gt;  stop&lt;br /&gt;  start&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# See how we were called.&lt;br /&gt;case "$1" in&lt;br /&gt;start)&lt;br /&gt; start&lt;br /&gt; ;;&lt;br /&gt;stop)&lt;br /&gt; stop&lt;br /&gt; ;;&lt;br /&gt;status)&lt;br /&gt;      # This doesn't work ;)&lt;br /&gt; status tomcat&lt;br /&gt; ;;&lt;br /&gt;restart)&lt;br /&gt; restart&lt;br /&gt; ;;&lt;br /&gt;*)&lt;br /&gt; echo $"Usage: $0 {start|stop|status|restart}"&lt;br /&gt; exit 1&lt;br /&gt;esac&lt;br /&gt;&lt;br /&gt;exit 0&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Edit the lines that start with tomcat and export to match where you installed&lt;br /&gt;tomcat and your jdk.&lt;/p&gt;&lt;p&gt;Note: I can't remember where I first got the original version of this script&lt;br /&gt;so if you deserve credit for this, let us know. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;2. Save to /etc/init.d and chmod &lt;/strong&gt;&lt;/p&gt;     &lt;p&gt; Save the edited file above to /etc/init.d directory as "tomcat" (at&lt;br /&gt;      least on most newer releases since /etc/init.d is a standard now). Then&lt;br /&gt;      you have to allow execute access to the script, so run:&lt;/p&gt;&lt;blockquote style="font-family: courier new;"&gt;&lt;span style="font-size:85%;"&gt;chmod a+x tomcat &lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;     &lt;p&gt;&lt;strong&gt;3. Add to appropriate run level directories &lt;/strong&gt;&lt;/p&gt;The easy way to do this is to just simply run:&lt;br /&gt;    &lt;p style="font-family: courier new;" class="cprompt"&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;chkconfig --add tomcat&lt;/span&gt;&lt;/blockquote&gt;  &lt;/p&gt;And that's all she wrote.&lt;br /&gt;    &lt;p&gt;  &lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://www.spaceprogram.com/knowledge/2004/01/starting-tomcat-as-service-on-linux.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/109727256021332360'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/109727256021332360'></link><author><name>Johnny</name></author></entry><entry><id>tag:blogger.com,1999:blog-7774229.post-113246340751395476</id><published>2005-11-19T20:49:00.000-08:00</published><updated>2005-11-20T11:59:03.243-08:00</updated><title type='text'>Is Tagging Relevant?</title><content type='html'>rel8r is an experimental project I launched on Nov. 17, 2005 at &lt;a href="http://www.rel8r.com/"&gt;http://www.rel8r.com/&lt;/a&gt; .  I made it for several reasons, but one such reason was to see if &lt;a href="http://en.wikipedia.org/wiki/Tags"&gt;tagging&lt;/a&gt; is actually relevant.  I didn't know the answer, but I set to find out and the result is rel8r.&lt;br /&gt;&lt;br /&gt;The most interesting thing as it turns out is that searching on tags lets you find things that you wouldn't have thought to look for.  It's more of a discovery than a search.  I think this is where the difference between regular search engines and searching on tags lies.  With Google and other search engines you are looking for very specific things and the better the engine, the more chance you have of finding what you want.  With rel8r, it's more something like "what will I find if I search for X", where X can be anything (assuming people have tagged something with X).&lt;br /&gt;&lt;br /&gt;Lets try an example so you can see what I mean.  First, lets try "golden gate bridge", on &lt;a href="http://www.rel8r.com/tags/golden%20gate%20bridge/"&gt;rel8r&lt;/a&gt; and &lt;a href="http://www.google.com/search?q=golden+gate+bridge"&gt;Google&lt;/a&gt;.  The first thing you'll probably notice is the pictures that people have tagged showing up on rel8r since those catch the eye first.  It's a nice augmentation to normal search results, but when you get to reading the text entries, you'll find seemingly random things that are actually related to the Golden Gate Bridge; upcoming parties and events, things that people have bookmarked, some people offering boat trips in the San Francisco Bay, among other things.  Now the Google results are more specific, the first result is &lt;a href="http://www.goldengatebridge.org/"&gt;http://www.goldengatebridge.org/&lt;/a&gt;, the next couple are more government sites that have to do with the bridge, and then some results are sites with information and tourism types of things.  The Google search is obviously very relevant if you are trying to learn more about the bridge.  The rel8r search is more about what's new with the bridge, what people are saying, and what people are seeing.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://static.flickr.com/32/64926998_1dde0e407d_s_d.jpg" align="right" /&gt;Now lets try a product search, how about the Xbox 360 since there is so much hype about it right now and I'll use Yahoo as the search engine this time to be fair (I really like what I'm seeing on Yahoo search these days btw, just as good as Google I dare say).  My &lt;a href="http://www.rel8r.com/tags/xbox+360/"&gt;rel8r search&lt;/a&gt; showed many things including some pictures of the xbox like the one to the right, and &lt;a href="http://www.ps3blog.net/2005/11/19/played-xbox-360-today/"&gt;someones first review of playing the xbox&lt;/a&gt; at the local Best Buy.  The &lt;a href="http://myweb2.search.yahoo.com/search?p=xbox%20360&amp;amp;ei=UTF-8"&gt;Yahoo search&lt;/a&gt; had a link to the xbox official site, some reviews, cheats, and places to buy it. The Yahoo results are probably what you actually want to see in general.&lt;br /&gt;&lt;br /&gt;So far, after a few days of having it up, I find that I keep going back to try out different tags that might bring up interesting results.  And because of this, rel8r is a discovery tool, rather than a search.  That may sound counter intuitive, but try it to see what I mean. It's got a much more personal feel.  Search for the city where you live, search for your name, search for a product you are interested in.  And after you do, I'd love to hear your comments and feedback, good or bad.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;a href="http://technorati.com/tag/rel8r" rel="tag"&gt;rel8r&lt;/a&gt; | &lt;a href="http://technorati.com/tag/tagging" rel="tag"&gt;tagging&lt;/a&gt; | &lt;a href="http://technorati.com/tag/tags" rel="tag"&gt;tags&lt;/a&gt; | &lt;a href="http://technorati.com/tag/search" rel="tag"&gt;search&lt;/a&gt; | &lt;a href="http://technorati.com/tag/blogs" rel="tag"&gt;blogs&lt;/a&gt; | &lt;a href="http://technorati.com/tag/flickr" rel="tag"&gt;flickr&lt;/a&gt; | &lt;a href="http://technorati.com/tag/relevance" rel="tag"&gt;relevance&lt;/a&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://www.spaceprogram.com/knowledge/2005/11/is-tagging-relevant.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/113246340751395476'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/113246340751395476'></link><author><name>Travis Reeder</name></author></entry><entry><id>tag:blogger.com,1999:blog-7774229.post-113212232860593732</id><published>2004-01-17T14:57:00.000-08:00</published><updated>2005-11-19T21:24:53.666-08:00</updated><title type='text'>Daily (Nightly) MySQL Backups</title><content type='html'>&lt;h5&gt;Introduction&lt;/h5&gt;      &lt;p&gt;This document will explain how to do automated daily MySQL backups to a remote using Cron and SCP. &lt;/p&gt;     &lt;h5&gt;Instructions&lt;/h5&gt;These instructions will walk you through what it takes.&lt;br /&gt;&lt;p&gt;&lt;strong&gt;1. Follow the steps in our Cron and SCP Backup Document &lt;/strong&gt;&lt;/p&gt;&lt;a href="http://www.spaceprogram.com/knowledge/cron_scp.html"&gt;Document&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;2. Create a user in mysql to use for backups &lt;/strong&gt;&lt;/p&gt;This user should only have SELECT privileges on the particular database to backup and only from localhost.&lt;br /&gt;&lt;div class="cprompt"  style="font-family:courier new;"&gt;&lt;p&gt;&lt;span style="font-size:100%;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;mysql -uroot -p mysql&lt;br /&gt;&lt;br /&gt;  &amp;gt; Enter password&lt;br /&gt;&lt;br /&gt;  mysql&amp;gt; GRANT SELECT,LOCK TABLES ON databasename.* TO backupuser@localhost;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;span style="font-size:100%;"&gt;The LOCK TABLES is required for doing a mysqldump.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;strong&gt;3. Now create a script for cron to run &lt;/strong&gt;&lt;br /&gt;&lt;p&gt;This sample script below will dump the entire database identified by databasename &lt;/p&gt;&lt;blockquote  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;mysqldump --opt -ubackupuser DATABASENAME &amp;gt; /home/temp/databasename.sql&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;span class="code"  style="font-size:85%;"&gt;scp /home/temp/databasename.sql REMOTE_USER@REMOTE_HOST:BACKUPS/&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;span class="code"&gt;&lt;/span&gt;&lt;/p&gt;Make sure the BACKUPS/ directory is available under the REMOTE_USER directory on the REMOTE_HOST computer that you wish to backup to. Save the script, call it backups.sh or something. chmod 644 ~/.ssh/authorized_keys&lt;br /&gt;&lt;p&gt;&lt;strong&gt;4. Test the script &lt;/strong&gt;&lt;/p&gt;Test the script to see if it works ok.&lt;br /&gt;&lt;p class="cprompt"  style="font-family:courier new;"&gt;&lt;span style="font-size:85%;"&gt;&lt;blockquote&gt;./backups.sh&lt;/blockquote&gt;&lt;/span&gt;&lt;/p&gt;After it completes, you should check the BACKUPS directory on the remote host and make sure the backup file is there.&lt;br /&gt;&lt;p&gt;&lt;strong&gt;5. Move script to /etc/cron.daily/ directory&lt;/strong&gt;&lt;/p&gt;   &lt;p style="font-family: courier new;" class="cprompt"&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;mv backups.sh /etc/cron.daily/&lt;/span&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;/p&gt;That should run every night at some point, whenever the cron.daily is set to run in your crontab. Voila!&lt;br /&gt;&lt;br /&gt;&lt;p&gt; &lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://www.spaceprogram.com/knowledge/2004/01/daily-nightly-mysql-backups_17.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/113212232860593732'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/113212232860593732'></link><author><name>Travis Reeder</name></author></entry><entry><id>tag:blogger.com,1999:blog-7774229.post-109996358543237267</id><published>2002-06-12T14:52:00.000-07:00</published><updated>2005-11-19T21:18:18.853-08:00</updated><title type='text'>Recovering from a deleted log file on SQL Server</title><content type='html'>&lt;h5&gt;Introduction&lt;/h5&gt;This document will give instructions on how to recover from a deleted database log file on Microsoft SQL Server. The database this was done on was SQL Server 7 with SQL Server 2000. You will get a &lt;strong&gt;suspect &lt;/strong&gt;beside the name of the database when this happens.&lt;br /&gt;&lt;p&gt;You may be interested in the document if one of the following happened:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;You're log file got too big so you decided to shutdown SQL Server,&lt;br /&gt;    then delete the log file. &lt;/li&gt;&lt;li&gt;Salvage data from a damaged SQL data (.MDF) file. ( Someone &lt;a href="http://www.spaceprogram.com/knowledge/sqlserver_recover_emails_received.html#salvage"&gt;emailed about this&lt;/a&gt; ).&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;That's the only reason I can think of right now and that is the reason I have come to figuring this out, so here goes.&lt;br /&gt;&lt;/p&gt;&lt;h5&gt;Instructions&lt;/h5&gt;If you have a recent backup of the database, USE IT! Forget about this article and do a normal restore procedure. Otherwise read on. First of all, you are SOL if you want a full recovery. You just can'tget all the data back because the log file itself contained a lot of transactions that may never have made it to the data file. &lt;!--For example, I lost almost          2 months of people's e-mails. Harsh I know and I know I will soon here          about it. Just glad it's not something mission critical. --&gt;&lt;br /&gt;  &lt;p&gt;So anyways, I read just about everything possible on this topic and nothing worked, I mean nothing. I tried going into emergency mode, running stored procedures that did squat, using sp_detach_db, then sp_attach_db, etc, even trying db_rebuild_log() (the rebuild_log thing seems to be an undocumented feature that someone must have figured out... easter egg?? not really since there are some serious warnings against using it, but hey, when you're in dire straits, you'll try anything once, right?).&lt;/p&gt;This restore procedure doesn't seem to be formally documented anywhere.  I guess you're just not supposed to be this stupid, but everybody makes mistakes don't they? And hey, I'm no DBA or anything! I just use the damn things. ;-)&lt;br /&gt;  &lt;p&gt;Anyways, on to the guts of the article. I am trying to make this as simple&lt;br /&gt;  as possible and pulling this from memory so if there is something I am&lt;br /&gt;  missing, please post a comment.&lt;/p&gt;There's one thing to note here and if someone could verify it, that would be great. First thing I'd like to verify is if you can just skip to step 9 right off the bat? So as soon as you get a suspect database, can you just start at step 9? Can someone please try that and let me know. SEE&lt;br /&gt;&lt;p&gt;&lt;strong&gt;     UPDATE: JAN. 6, 2003 BELOW&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;     &lt;ol&gt;&lt;li&gt;Backup the data (.mdf) file! Just in case. We take no responsibility&lt;br /&gt;    for anything that happens following this procedure.&lt;/li&gt;&lt;li&gt; EXEC sp_detach_db 'dbname' -- this will detach the database from&lt;br /&gt;    the server&lt;/li&gt;&lt;li&gt;Restart SQL Server&lt;br /&gt;    The database may still be seen in enterprise manager, but just ignore&lt;br /&gt;    it.&lt;/li&gt;&lt;li&gt; Create a new database with the same name or a different name. You&lt;br /&gt;    will have to use a different physical file name, which is fine.&lt;/li&gt;&lt;li&gt;Stop SQL Server.&lt;/li&gt;&lt;li&gt;Rename the new data file that was created to something else (ex: add.bak&lt;br /&gt;    to the end)&lt;/li&gt;&lt;li&gt;Rename the old data file that you want to restore to the name of the&lt;br /&gt;    newly created file (the same name as the file you changed in the step&lt;br /&gt;    above)&lt;/li&gt;&lt;li&gt;Start SQL Server&lt;br /&gt;    Now the db will still be suspect but you now have a log file. &lt;/li&gt;&lt;li&gt;Switch to emergency mode on the database. You do this by doing the&lt;br /&gt;    following:&lt;br /&gt;    &lt;ol&gt;&lt;br /&gt;&lt;li&gt; Right click on the database root node in Enterprise manager and&lt;br /&gt;        bring up the properties.&lt;/li&gt;&lt;li&gt;Under the Server Settings tab, check of "Allow modifications&lt;br /&gt;        to be made directly to the system catalogs".&lt;/li&gt;&lt;li&gt;click ok&lt;/li&gt;&lt;li&gt;Now go to the &lt;em&gt;master &lt;/em&gt; database and open the sysdatabases&lt;br /&gt;        table. &lt;/li&gt;&lt;li&gt;Find the suspected database in here and modify the status column,&lt;br /&gt;        setting it to: 32768. This will put it into emergency mode.&lt;/li&gt;&lt;li&gt;stop then start sql server&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt;Now here's the tricky part and I'm not sure how this will work on&lt;br /&gt;    a single install, i was lucky enough to have SQL Server 2000 installed.&lt;br /&gt;    But anyways, open up the Import and Export Data (DTS) program from the&lt;br /&gt;    start menu. And you want to copy data from the old database to a brand&lt;br /&gt;    new one. Just copy tables and views.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;And voila, this should work smoothly. Let me emphasize should.&lt;br /&gt;  &lt;h4&gt;UPDATE: Jan. 6, 2003&lt;/h4&gt;I just received an email from someone who tried starting at step 9 and he said it worked. If I can get someone else to confirm that, then I'll get rid of 1-8.&lt;br /&gt;  &lt;h4&gt;UPDATE: June 18, 2003&lt;/h4&gt;It seems that some people can just do 9-10 and some have to do all the steps.&lt;br /&gt;  &lt;h4&gt;Emails Received in Response to this Article&lt;/h4&gt;There have been many emails we have received about this article both sharing their experience and praising the instructions.&lt;br /&gt;  &lt;p&gt;&lt;a href="http://www.spaceprogram.com/knowledge/sqlserver_recover_emails_received.html"&gt;Read the emails here&lt;/a&gt;&lt;/p&gt;     &lt;p&gt; &lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://www.spaceprogram.com/knowledge/2002/06/recovering-from-deleted-log-file-on_12.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/109996358543237267'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/109996358543237267'></link><author><name>Travis Reeder</name></author></entry><entry><id>tag:blogger.com,1999:blog-7774229.post-113246217516468074</id><published>2005-11-19T20:47:00.000-08:00</published><updated>2005-11-19T20:49:35.173-08:00</updated><title type='text'>It's been a long hiatus from blogging, but I'm back baby... I'm back</title><content type='html'>A few posts in as many years all the while the little voice in my head kept nagging me to do it more, but I found it hard to get the time to actually sit and get something useful written.  I didn't want to just post my comments about other people's blogs, I wanted some real meat to the posts.  So anyways, I figure I've got enough stuff crammed into my brain now that I'll start spilling it out.&lt;br /&gt;&lt;br /&gt;It starts...</content><link rel='alternate' type='text/html' href='http://www.spaceprogram.com/knowledge/2005/11/its-been-long-hiatus-from-blogging-but.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/113246217516468074'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/113246217516468074'></link><author><name>Travis Reeder</name></author></entry><entry><id>tag:blogger.com,1999:blog-7774229.post-113212218660602827</id><published>2003-06-18T14:54:00.000-07:00</published><updated>2005-11-15T22:23:06.610-08:00</updated><title type='text'>Fixing the Tomcat 302 Redirect Issue</title><content type='html'>&lt;h5&gt;Introduction&lt;/h5&gt;&lt;br /&gt;     &lt;p&gt;This problem has to do with Tomcat redirecting people to a different&lt;br /&gt;       page when entering a url like:&lt;/p&gt;&lt;br /&gt;     &lt;p&gt;http://www.spaceprogram.com or http://www.spaceprogram.com/ &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;     &lt;p&gt;Tomcat sends a redirect to the browser to make them go to: &lt;/p&gt;&lt;br /&gt;     &lt;p&gt;http://www.spaceprogram.com/index.jsp or http://www.spaceprogram.com/index.html&lt;br /&gt;       or whatever the default page is. &lt;/p&gt;&lt;br /&gt;     &lt;p&gt;When what should happen is an internal forward so the browser doesn't&lt;br /&gt;       get redirected. This affects search engine crawling (some will stop at&lt;br /&gt;       the first sign of a redirect on a sites main page).&lt;/p&gt;&lt;br /&gt;     &lt;h5&gt;Intended Audience&lt;/h5&gt;&lt;br /&gt;     &lt;p&gt;This document is for programmers that can look through source code and&lt;br /&gt;       compile. If there is enough need, we may be able to post already compiled&lt;br /&gt;       downloads on this page, but we'll see in time.&lt;/p&gt;&lt;br /&gt;     &lt;h5&gt;Instructions&lt;/h5&gt;&lt;br /&gt;&lt;br /&gt;     &lt;p&gt;There are 2 ways we can accomplish this, one is to subscribe to the &lt;a href="http://jakarta.apache.org/site/mail2.html" target="_blank"&gt;tomcat-dev&lt;br /&gt;       mailing list&lt;/a&gt; and beg for them to add this very simple fix. The other&lt;br /&gt;       is to do it yourself and follow the instructions below.&lt;/p&gt;&lt;br /&gt;     &lt;p&gt;NOTE: This was done in Tomcat 4.1.18 so may need to be modified a bit&lt;br /&gt;       for different versions.&lt;br /&gt;&lt;br /&gt;       Also tried in 4.1.27 and it works fine - Aug. 18, 2003.&lt;/p&gt;&lt;br /&gt;     &lt;p&gt;You will need to download the tomcat source distribution or get it from&lt;br /&gt;       cvs. The Tomcat homepage is &lt;a href="http://jakarta.apache.org/tomcat/" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;     &lt;p&gt;These steps apply to org.apache.catalina.servlets.DefaultServlet. After&lt;br /&gt;       you're done making changes, you can simply take the newly compiled version&lt;br /&gt;       of DefaultServlet and put it in a non source tomcat release under the&lt;br /&gt;       CATALINA_HOME/server/classes directory. &lt;/p&gt;&lt;br /&gt;     &lt;p&gt;&lt;strong&gt;1. Add New Variable&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;     &lt;p&gt; /**&lt;br /&gt;&lt;br /&gt;       * for forwarding instead of redirecting on 300 errors ie: when www.x.com&lt;br /&gt;       is sent, instead&lt;br /&gt;&lt;br /&gt;       * of doing redirect, it will just change the response.&lt;br /&gt;&lt;br /&gt;       * TR&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;       */&lt;br /&gt;&lt;br /&gt;       private boolean redir301 = true;&lt;/p&gt;&lt;br /&gt;     &lt;p&gt;&lt;strong&gt;2. Then down in init(), added this:&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;     &lt;p&gt; /**&lt;br /&gt;&lt;br /&gt;       * added this too&lt;br /&gt;&lt;br /&gt;       * TR&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;       */&lt;br /&gt;&lt;br /&gt;       try {&lt;br /&gt;&lt;br /&gt;       value = getServletConfig().getInitParameter("redir301");&lt;br /&gt;&lt;br /&gt;       redir301 = (new Boolean(value)).booleanValue();&lt;br /&gt;&lt;br /&gt;       } catch (Throwable t) {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;       ;&lt;br /&gt;&lt;br /&gt;       }&lt;/p&gt;&lt;br /&gt;     &lt;p&gt;&lt;strong&gt;3. Then in serveResource() changed to this, find where the first&lt;br /&gt;       line is then see what I did.&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;     &lt;code&gt;&lt;br /&gt;     &lt;/code&gt;&lt;pre&gt;&lt;br /&gt;ResourceInfo welcomeFileInfo = checkWelcomeFiles(path, resources);&lt;br /&gt;           if (welcomeFileInfo != null) {&lt;br /&gt;               String redirectPath = welcomeFileInfo.path;&lt;br /&gt;&lt;br /&gt;               if(redir301){ // added TR&lt;br /&gt;                   String contextPath = request.getContextPath();&lt;br /&gt;                   if ((contextPath != null) &amp;&amp;amp; (!contextPath.equals("/"))) {&lt;br /&gt;                       redirectPath = contextPath + redirectPath;&lt;br /&gt;                   }&lt;br /&gt;               }&lt;br /&gt;&lt;br /&gt;               redirectPath = appendParameters(request, redirectPath);&lt;br /&gt;              &lt;br /&gt;                /**&lt;br /&gt;                * Changed this for 301 stuff&lt;br /&gt;                * TR&lt;br /&gt;                */&lt;br /&gt;               if(redir301){&lt;br /&gt;                   response.sendRedirect(redirectPath);&lt;br /&gt;               }&lt;br /&gt;               else{&lt;br /&gt;                   request.getRequestDispatcher(redirectPath).forward(request, response);&lt;br /&gt;               }&lt;br /&gt;               return;&lt;br /&gt;           }&lt;br /&gt;   &lt;/pre&gt;&lt;br /&gt;     &lt;br /&gt;     &lt;p&gt;&lt;strong&gt;4. Add new param to web.xml in catalina_home/conf/web.xml under&lt;br /&gt;       default servlet. &lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;     &lt;p&gt; &amp;lt;init-param&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;param-name&amp;gt;redir301&amp;lt;/param-name&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;param-value&amp;gt;false&amp;lt;/param-value&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;/init-param&amp;gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;     &lt;p&gt;You must set this to false or else it will just act the same as before.&lt;/p&gt;&lt;br /&gt;     &lt;p&gt;Now restart tomcat and that should be it.&lt;/p&gt;&lt;br /&gt;     &lt;p&gt; &lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://www.spaceprogram.com/knowledge/2003/06/fixing-tomcat-302-redirect-issue_18.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/113212218660602827'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/113212218660602827'></link><author><name>Travis Reeder</name></author></entry><entry><id>tag:blogger.com,1999:blog-7774229.post-113212208783136564</id><published>2002-04-04T14:50:00.000-08:00</published><updated>2005-11-15T22:21:41.410-08:00</updated><title type='text'>Installing Tomcat 4 on Sun Cobalt (or probably any server for that matter)</title><content type='html'>&lt;p&gt;This document will explain how to setup/install the &lt;a href="http://jakarta.apache.org/tomcat" target="_blank"&gt;Jakarta&lt;br /&gt; Tomcat 4.x Java Application Server&lt;/a&gt;. Because as we all know, Cobalt's&lt;br /&gt; are kind of messed up and are even more messed up if you decide to install&lt;br /&gt; the Cobalt JDK or whatever they call it. My recommendation... don't touch&lt;br /&gt; the Cobalt supplied thing as this is somewhat similar to pulling out your&lt;br /&gt; Desert Eagle and shooting yourself in the foot (am I playing too much&lt;br /&gt; Tac Ops?). If you have installed it you can follow the directions below&lt;br /&gt; with it still installed, but when you are done installing Tomcat 4, DISABLE&lt;br /&gt; the JDK. The instructions on how to do this is in the Cobalt JDK manual/user&lt;br /&gt; guide. Basically just comment out all the tomcat things that it put into&lt;br /&gt; your httpd.conf file. Then setup the sites that require Java using the&lt;br /&gt; Tomcat WARP protocol as explained below.&lt;/p&gt;&lt;br /&gt;  &lt;p&gt;First get the latest stable release from the Jakarta site. Make sure&lt;br /&gt; you get the tar.gz compressed binaries, not the zip (major problems).&lt;br /&gt;  &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;Install as per instructions which are pretty basic. Check to make sure&lt;br /&gt; it's running on port 8080.&lt;/p&gt;&lt;br /&gt;  &lt;p&gt;Connecting Tomcat to Apache...&lt;/p&gt;&lt;br /&gt;  &lt;p&gt;Now we'll need mod_webapp to use Warp, the new protocol. You can use&lt;br /&gt; this precompiled file, &lt;a href="http://www.blogger.com/mod_webapp.so"&gt;mod_webapp.so&lt;/a&gt; (works&lt;br /&gt; on raq4r and raqXTR) or you can build it pretty easily. To build it yourself,&lt;br /&gt; download the mod_webapp source from &lt;a href="http://jakarta.apache.org/builds/jakarta-tomcat-4.0/archives/v4.0/src/" target="_blank"&gt;http://jakarta.apache.org/builds/jakarta-tomcat-4.0/archives/v4.0/src/&lt;/a&gt;&lt;br /&gt; . After extracting, run ./configure in the mod_webapp dir. Then mod_webapp&lt;br /&gt; will end up in Apache 1.3 dir, so copy this to /etc/httpd/modules directory.&lt;br /&gt;  &lt;/p&gt;&lt;br /&gt;  &lt;p&gt;Then add this to httpd.conf:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;&lt;span style="font-family:Courier New,Courier,mono;"&gt;LoadModule webapp_module modules/mod_webapp.so&lt;br /&gt;&lt;br /&gt; AddModule mod_webapp.c&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;  &lt;p&gt;Somewhere above your virtual hosts, i put mine below all the other LoadModule&lt;br /&gt; commands. Then put the following also above your virtual hosts.&lt;/p&gt;&lt;br /&gt;  &lt;p&gt;&lt;span style="font-family:Courier New,Courier,mono;"&gt;&amp;lt;IfModule mod_webapp.c&amp;gt;&lt;br /&gt;&lt;br /&gt; WebAppConnection conn warp localhost:8008&lt;br /&gt;&lt;br /&gt; WebAppDeploy examples conn /examples&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; WebAppInfo /webapp-info&lt;br /&gt;&lt;br /&gt; &amp;lt;/IfModule&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;  &lt;p&gt;Then from here you "should" be able to get at your examples&lt;br /&gt; directory without putting the port in. &lt;/p&gt;&lt;br /&gt;  &lt;p&gt;Then add the following inside each &amp;lt;VirtualHost ...&amp;gt; tag that you&lt;br /&gt; want to be able to use Tomcat.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;&lt;span style="font-family:Courier New,Courier,mono;"&gt;WebAppDeploy anyuniquenameyouwant&lt;br /&gt; conn /&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;  &lt;p&gt;Notice this uses the same connection that we stated above in the WebAppConnection&lt;br /&gt; statement. This is fine and good, you want to use the same connection&lt;br /&gt; in most cases.&lt;/p&gt;&lt;br /&gt;  &lt;p&gt;And now you need a matching Host in server.xml file in Tomcat/conf dir.&lt;br /&gt; MAKE SURE you put this in the right section, not the Tomcat-Standalone,&lt;br /&gt; but within:&lt;/p&gt;&lt;br /&gt;  &lt;p&gt;&lt;span style="font-family:Courier New,Courier,mono;"&gt;&amp;lt;!-- Define an Apache-Connector&lt;br /&gt; Service --&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;Service name="Tomcat-Apache"&amp;gt;&lt;br /&gt;&lt;br /&gt; Hosts go here&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;/Service&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;  &lt;p&gt;Which should be at the bottom of your server.xml file. &lt;/p&gt;&lt;br /&gt;  &lt;p&gt;Each site should have something like the following:&lt;br /&gt;&lt;br /&gt; &lt;span style="font-family:Courier New,Courier,mono;"&gt;&amp;lt;Host name="www.spaceprogram.com"&lt;br /&gt; debug="0" appBase="/home/sites/www.spaceprogram.com/web"&lt;br /&gt; unpackWARs="true"&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;Context path="" docBase="" debug="0"&lt;br /&gt; reloadable="false" crossContext="false"&amp;gt;&amp;lt;/Context&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;/Host&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;p&gt;This will load when user surfs to www.spaceprogram.com because we didn't&lt;br /&gt; specify any path or docBase. &lt;/p&gt;&lt;br /&gt;  &lt;p&gt;And that's about it I guess. If I missed something, let me know, I've&lt;br /&gt; been pissing around with this for about 11 hours now and I was just about&lt;br /&gt; to jump out my window, but then I finally got it working. And I am writing&lt;br /&gt; down my recollections here so I hope I got it all.&lt;/p&gt;&lt;br /&gt;  &lt;p&gt;Check out &lt;a href="http://www.bluerax.com/" target="_blank"&gt;Bluerax&lt;/a&gt;&lt;br /&gt; if you want a good Java host.&lt;/p&gt;</content><link rel='alternate' type='text/html' href='http://www.spaceprogram.com/knowledge/2002/04/installing-tomcat-4-on-sun-cobalt-or_04.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/113212208783136564'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/113212208783136564'></link><author><name>Travis Reeder</name></author></entry><entry><id>tag:blogger.com,1999:blog-7774229.post-109996336880260482</id><published>2004-07-27T22:48:00.000-07:00</published><updated>2004-11-08T17:22:48.803-08:00</updated><title type='text'>Tomcat 5 with mod_jk2  on Plesk 7 - Redhat</title><content type='html'>Finally! I got this&lt;br /&gt;working so you can have jsp pages in your root directory. It is&lt;br /&gt;actually pretty simple, along the lines of the following:&lt;br /&gt;&lt;br /&gt;This is on Redhat version of Plesk 7.0&lt;br /&gt;&lt;ol type="1"&gt; &lt;li&gt;install latest jdk&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;install tomcat 5&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;download jk2 connectors Fedora Core binaries&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;copy the mod_jk2.so file into httpd modules dir&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;add the LoadModule line for mod_jk2&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Remove at_domains_index.html from the DirectoryIndex line!&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;make your hosts in server.xml ( see &lt;a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/vhosthowto.html" target="_blank"&gt;http://jakarta.apache.org/tomcat/to...vhosthowto.html&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;make workers2.properties file in /etc/httpd/conf directory ( see link above )&lt;br /&gt;&lt;/li&gt; &lt;/ol&gt; I think that's the jist of it for the most part.</content><link rel='alternate' type='text/html' href='http://www.spaceprogram.com/knowledge/2004/07/tomcat-5-with-modjk2-on-pl_109996336880260482.html'></link><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/109996336880260482'></link><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7774229/posts/default/109996336880260482'></link><author><name>Travis Reeder</name></author></entry></feed>