Wednesday, June 25, 2008

An embedded or a non-embedded ?

For those who want to run light quick and portable apps, embedded DBs are the way to go. But what if you have an enterprise web application that would be used by all the departments in the an enterprise company and you have a web site to hook to the DB too and your company is a very important financial institution ? Would you use an embedded Db or a solid network based , non - embedded DB ? I would rather throw aside the embedded ones if I need a solid , fault tolerant database ... and of all, they should be written in non VM based languages like Java.

So let's touch on why I think embedded aren't going to be a good option in my view. Embedded are mostly optimized for the portable stuff... small and sleek... but the compensation for some small stuff is mostly ... the ability to tolerant huge traffic ... lots of faults and errors occuring. What do you really expect for something made so small and used for embedded applications ?

I would prefer to go for those solid MySQL or Postgres servers which are dedicated servers with networking capabilites. Codes are not needed to be withold to make it small and light ... instead... codes are made in these stable database servers , to withstand enormous amounts of faults and traffic.

Why do I say that it's not recommended to use VM based languages to create enterprise databases ? Simply because, before the codes upon execution , have to pass through the VM tier before actually executing. If you use a code that directly 'speaks' native language, you bypass the troublesome VM tier. It would be faster indeed.

So if you want a database to handle real enterprise stuff, I would prefer to use a dedicated , non-embedded database and if better.

Thursday, June 19, 2008

My First HORRIBLE JSF tutorial with NetBeans 6.1

I thought since I have been trained in some JSP and servlets and there's so much hype and buzz about JEE 5 , Glassfish server... JSF ... why not try them out and so, I use my 'trusty' NetBeans 6.1 . I use Netbeans because I was introduced to Netbeans during my courses and that Netbeans is Sun supported so ... what better to use than something that is endorsed and supported by Sun (maker of Java).

I browsed the Netbeans website and found a simple HelloWeb web apps tutorial for the JSF. The link to the tutorial is .

I setup my web apps according to what is said and set my server to Glassfish V2 since I wanted to try out Glassfish for the first time (I have to manually point Netbeans to the Glasshfish folder since Tomcat is set as default server) and I selected JEE 5 since I have not used JEE 5 but J2EE 1.4 during my courses.

First half of the HelloWeb went fine and I managed to create the specified app where you keep in your name and it echoes back.

The second half needs a Java DB/ Apache Derby database installed together with NetBeans package using the PERSON table in the TRAVEL database.

I managed most parts until when I hit the portion where the database is needed. I tried to connect to the TRAVEL database to view the database tables as they specified. I right click > Connect ... and guess what ?

ERROR ! Unable to Connect ! Cannot establish a connection to .... using org.apache.derby.jdbc.ClientDriver (DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ040, SQLERRMC: Failed to start database 'travel', see the next exception for details.::SQLSTATE: XSLANDatabase at C:\...\.netbeans-derby\travel has an incompatible format with the current version of the software. The database was created by or upgraded by version 10.2.).

I thought... oh no ... of all moments.. why now. I have been able to connect to databases using NetBeans 6.1 and I can even connect to my favourite database systems , the H2 database.

I thought to myself.. fine... why don't I look into other databases for use in this tutorial and of all things none of them worked !!!

I thought maybe since I can use H2 and I am getting more familiar with H2, why not use it to create a mock up TRAVEL database with just one table... called PERSON since that's the only table to be used and in the PERSON table, make a PERSONID and NAME field rather than the rest of the fields since the fields needed for this tutorial is simply the NAME field. I made it, got NetBeans to connect (I need to specify the schema manually too) , and I am done . I created and populated the database before getting NetBeans to connect just in case anything breaks. I can view the data I populated it with but when linking the PERSON table to the drop down list in the part 2, it didn't automatically or even show the names of users in the visual web editor as was said in the tutorial and when I tried to bind the drop down list to the database , there wasn't any values of the fields for me to select which field to bind.

I tried to create a Java DB / Derby database by using the database tools in NetBeans ... all those right click , create connection ..tables... the list of databases did not show the database I made at all !


As like many NetBeans tutorials I have attempted... it's always vague and leaving you to guess things.

I gave up on this JSF tutorial and just blog what happened here.

Firstly, why in the world is there such compatibility issues with Derby ? From the start, I don't like Derby because it just doesn't just run right off the box and you need to tweak things here and there.. use consoles... no out of the box GUI console to set up for you like what H2 and MySQL provide. Now, Derby just drop lower in my eyes after this incident. Why of all things is there a compatibility issue I have to handle and not handled by the system ? H2 and MySQL , for what I know by using them , didn't give me such stupid compatibility issues.

And one thing... why would the drop down list not recognize my H2 database's TRAVEL database ? The errors aren't even H2 database but most point towards some internal error and things inside screwing up ! Why would a database created using NetBeans provided tools not be displayed in the side bar after I tried to create a Derby database to use in the tutorial ?

NetBeans and Derby developers, if you are reading this, do look into the matters.

Just a word for Derby developers... if you want to truely make your database better ... make it feel 'warm and friendly' like what H2 did. At least have some GUI so people wouldn't be lost especially during setup.

Saturday, June 14, 2008

aTunes, 1.9.0 Mistral

aTunes is a Java based music player and music manager. It can be used cross-platform as long as you can run Java. It can even perform audio CD ripping too with it's utilities. Currently, aTunes supports formats like mp3, ogg, wav, wma, flac, mp4, ape, mpc, mac, radio streaming and podcasts.

aTunes make use of MPlayer as it's music engine to play the sound required.

It's frontend GUI is superb and well designed using Java's Swing GUI and some other open source packages to extend the capabilities of Swing GUI. There are 26 native skins within aTunes to select for your own preference. That's quite a lot of skin provided by default.

Like other modern commercial music players, aTunes can fetch lyrics , artist information, song information and any other similar songs... and the twist is... this aTunes is open source and completely freeware and allows the user to freely copy and distribute as they wish and even make modifications to the source codes if the user knows how to program(GNU GPL version 2 license).

aTunes have a left and right side panel which displays useful information about the songs or podcast or anything it is playing or doing. The left panel shows you the songs you have in your repository which you can select it to be displayed according to the artist, the albums , the genres of music or simply .. to display a view of the folders. If you think that the side panels are too much of a clutter, which I feel it is since I prefer simplicity, you can simply hide the side panels with a click of their respective buttons and they would hide neatly and what is left is a clean table containing the list of songs without the clutter of too much information.

I doubt if Apple's iTunes or Window Music Player do give you so much flexibility in choice. aTunes is pro - choices where it gives power in the user's hand. All the user needs is to know how to tweak it and select the configuration they want to be displayed.

In aTunes, if you want a new playlist, you simply click on the playlist button and select the New Playlist, rename it to what you like, go to your repository and start dragging songs to populate the playlist or maybe, you may consider going directly to the files containing the songs or your music folder and you can start doing drag and drops of the songs to be played.

The only few bad things I can think of aTunes is that it still isn't ready to allow plugins to be scripted and loaded and the other is that sometimes if you are running heavy memory intensive stuff, your music that you are playing may have a bit of jerkiness to it. Hopefully in the near future, the memory footprint for aTunes , which uses 29 MB of RAM.

Other than all the few negative points, aTunes is having a good amount of user base which exceed 268000 downloads from the point of inception of the aTunes project in 2006. The ease of usability in aTunes is very good. If you can use any music player, you can use aTunes. The cross platform advantage because it is made using Java programming language is a plus bonus so you can use it on your Mac OS X , Linux , Windows... as long as you have an up to date Java Virtual Machine.

To download the latest version of aTunes codenamed Mistral, use the URL:

To visit the aTunes project page:

To visit the aTunes homepage: