starzero: an ideacandi playground — Uncategorized

Posts categorized “Uncategorized”.

April 7th 2010

Goodbye Old, Hello New

With my recent departure from my last place of employment, I have been brought to an exciting frontier in my career in Software Development / IT.  I accepted IT / Systems Director position and am currently in my first week at MyOutdoorTv.com in beautiful Franklin, Tennessee.  I couldn’t be happier right now and am excited to create great things at one of the web’s premier outdoor how-to video outlet.  Thank you DD for the interesting experience, time to move up and out!

March 22nd 2010

Launch Day!

As is fairly common when a developer is busy, their blog contents tends toward zero (I believe there is a limit rule for that some where … I’ll have to consult the old Calculus book).  For those following along, TeamPalz.com launched this last weekend to much celebration.  Give it a link and a nod and let me know what you think.  This site is using Zend Framework, MySQL, Hibernate, Smart Fox Server, and Open Space.

Enjoy!

October 16th 2009

SmartFox Server and Hibernate

I have been working with SmartFox Server Pro for about 3 months now.  In those 3 months, I have had many ups and downs dealing with a relatively steep learning curve with respect to some of SmartFox’s quirks.  I wanted to pass on what I have learned thus far to the community in hopes that it may help to facilitate more growth in this area with what seems to be a stellar product.

So let’s start with Hibernate

As many of you know, Hibernate is an ORM (Object Relational Mapper).  My purpose here is not to discuss how to use Hibernate (their community has done a phenomenal job of doing this for you already … I also recommend the fantastic book, Java Persistence with Hibernate … I would not have been able to learn Hibernate with out it), but to discuss what I have done to get it working with SmartFox.  I want to start the discussion by explaining how I have SmartFox set up and it will help to understand why things need to go where I am going to tell you to put them.

SmartFox has two ways that it can be started, either through start.sh in the /Server folder or via the sfs start command.  The sfs start command will use the Java Service Wrapper with the configuration file contained in /Server/config/wrapper.conf.  I choose the latter simply because of the power that the Wrapper allows for (including debugging, which is indispensable when developing a SmartFox application).  If you open this file and look around a bit, or are familiar with the Java Service Wrapper, you will find that it is chiefly responsible for defining Java’s classpath that is used when SmartFox starts up.  The wrapper.java.classpath directive is extremely important.  This brings us to the first configuration note that begins our journey to Hibernate happiness.  There are 4 library (jar) files that are required to utilize all of Hibernate’s glorious features.  Essentially you will make 4 separate entries in wrapper.conf that look like below:

wrapper.java.classpath.41=/opt/SFS_PRO_1.6.6/Server/lib/hibernate3.jar
wrapper.java.classpath.43=/opt/SFS_PRO_1.6.6/Server/lib/log4j-1.2.15.jar
wrapper.java.classpath.47=/opt/SFS_PRO_1.6.6/Server/lib/hibernate-annotations.jar
wrapper.java.classpath.48=/opt/SFS_PRO_1.6.6/Server/lib/javax.persistence_1.99.0.v200906021518.jar
wrapper.java.classpath.49=/opt/SFS_PRO_1.6.6/Server/lib/hibernate-commons-annotations.jar
wrapper.java.classpath.50=/opt/SFS_PRO_1.6.6/Server/lib/ejb3-persistence.jar

I must apologize at this point because I want to go off on a tangent for a moment.  If you will notice there is a fifth entry there for log4j.  I have not, despite countless hours and most of my hair now missing, been able to get log4j to properly work with Hibernate (or at all, for that matter).  If anyone could leave a comment or contact me on the SmartFox server forums (starzero, is my name) on how to do this, I would be eternally grateful.

Please note that each wrapper.java.classpath entry has an integer value that is incrementing by 1.  This is very important as it is a Wrapper convention (so, please follow it).  Now, as you are no doubt aware, you will restart the SmartFox server with the command sfs restart (if you are new to SmartFox development and utilize a large body of Java based extensions, you will get used to restarting the server).  Once the server is restarted each of those libraries will be available to you within your Zone or Room based extension.  You are now free to create your Entities fire up your Sessions and control Transaction Demarcation to your database (sounds exciting, doesn’t it?)!

This has been a very short post, but thank you for reading it.  It is my hope you learned something.  I hope to put together many more of these including my development environment / methodology with SmartFox as well as a brief tutorial (with pictures) on how to debug your extensions (yes, this is covered in the forums, but may be helped with a bit more explanation).

September 16th 2009

Seriously?

is it possible to get squeeze anymore sell out douche baggery here?

is it possible to get squeeze anymore sell out douche baggery here?

August 9th 2009

Vibram

my new "shoes"

my new "shoes"

July 28th 2009

How not to authenticate user/pass

I think my blog is becoming a diatribe on what not to do in php.

saynotoxss

July 21st 2009

Well that settles the kindle buying debate

amazonkindlesuck

and the answer is no

July 16th 2009

A Worthwhile Feature

readerlikeI’m not sure if this has been around for a bit or if it is, in face, a new feature. However, I think this is the most compelling feature since the redesign of google reader.

July 7th 2009

poulsbo

So I’ll go ahead and add my frustration to the fact that Intel seems to have dropped the ball utterly and completely with respect to linux support of the poulsbo chipset.  Particularly in the graphics dept.  I won’t rehash as there are many others that have already done so.  Too bad … moblin looked pretty cool. **sigh**

Links