PostgreSQL Adapter Sent for Code Review

For this semester, I was part of a team at CDOT developing a PostgreSQL Adapter for NexJ Express.
The open source framework only had support for MySQL and with the addition of this adapter, PostgreSQL will now to be supported.

Over the next few days, I will post blogs about my experience from participating in this project.
So look forward to:
– Compare bytea data to a Large Object on server side
– Work around to fix org.postgresql.util.PSQLException: Method org.postgresql.jdbc3.Jdbc3PreparedStatement.setQueryTimeout(int) is not yet implemented.
– Work around PostgreSQL JDBC’s limited implementation of CLOBs
– Create a Large Object from bytea data on server side

Presenting at FSOSS 2010

Friday 29th October, I will be presenting at the Free Software and Open Source Symposium (FSOSS) at Seneca College.

The presentation is scheduled for 13:00.

I will be presenting the following topics:

Get started with Modelling in NexJ Express Studio

NexJ Express Studio, the IDE for creating models to run on Nexj Express Server is now available from

It is a good place to start to get used to the concepts of model driven engineering. NexJ Express Server is being used to develop the Application Integration Platform for integrating and leveraging the expertise of the other Open Health Tools projects.

Below is a screen shot of Studio



NexJ Express Project Page on CDOT

Keep track of what is going on with the JSON Adapter project:

Mac OS X: Run Firefox and Minefield at the same time by launching from the dock.

Most of the solutions for running firefox and minefield at the same time on Mac OS X instruct you to always start the browsers from the command line because you need to pass the arguments “-noremote -p” to the firefox-bin executable.

Here is what the arguments do:
-no-remote Enables running multiple instances of the application with different profiles
-P Starts the Profile Manager were you can choose/create a profile for testing
*** Make sure to uncheck, “Don’t ask at Startup”

So, now have your minefield running from the command-line:
Right click the icon in the dock,
Click Options > Keep in Dock

Close minefied and click the icon in your dock.
Minefiled starts with the same arguments that you had on the command-line and will ask you to choose a profile. Just make sure to choose a different one from the one that firefox is using.

Enjoy testing minefield

Becoming An Eclipse Power User: Start Here – Eclipse and Java Video Tutorials

I started using eclipse, like most of us do, because I had to. It was needed for the project I was working on.
Recently I was made aware of a set of tutorials on using eclipse, the tutorials range from beginner lessons to advanced lessons on using the debugger.
So here you go:
Eclipse Tutorial
Total Beginner
Debugger Tutorial

Becoming an Eclipse Power User: ShortCuts

Remember the first time that you saw some guy using a program that you normally use but that person was doing stuff really fast and efficiently?
I experienced that recently when I sent some time doing code a walk through with some programmers. All I would see is three fingers hitting the keyboard and up comes a pop up to find a file, or class declaration ….
So here are some shortcuts have I found the most useful so far:

  • New to eclipse and have no idea were to find short cuts
    Ctrl+Shift+L (a shortcut to show you a list of shortcuts)
  • Looking for a particular file while working with a lot of packages / projects / files:
    Open Resource
  • Reading through code for the very first time and need to look at a declaration of some variable or class:
    Select the variable and then F3 or Ctrl + left-click
  • Need to know where a method is being called in a project:
    Select the method and then Ctrl+Shift+G
  • Incremental Search (search as you type):
    Ctrl+J then start typing. Pressing Ctrl+J to find next occurrence
  • Go directly to a member (method, variable) of a huge class file
    Go To member
  • Useful links:
    PDF containing shortcuts
    10 time-saving techniques in Eclipse IBM ID required to view
Tagged ,

NexJ Server Express: JSON Adapter

So my project has now been defined.
I will be working on extending the capabilities of NexJ Express Server: a J2EE server software that provides cost effective services for deploying highly-scalable, fault tolerant, distributed enterprise solutions. The server framework commonly referred to as “OpenCore” makes use of several open source projects like: Jboss, Apache Xalan, Apache Xerces, JavaMail, JMS and others.

So for my project, for the reminder of the summer, I am to develop a JSON Adapter to expose NexJ server Objects in JSON via a RESTful web service. Have a look at the project landing page on CDOT’s wiki.

current implementation:

<?xml version="1.0" encoding="utf-8"?>
<_Collection xmlns="" xmlns:xs=""
 xmlns:xi="" xmlns:ns="">
 <_values xi:nil="true"/>
 <_values xi:nil="true"/>
 <_values xi:nil="true"/>

JSON implementation:

“_Collection”: {
“item”: {
“_keys”: [“primaryTelcom”, “primaryLanguage”, “initials”],
“type”: “Person”,
“locking”: 0,
“_oid”: “104C083E8A4E8A4AD2BAF3011B6A393C97”,
“_version”: 0,
“_values”: [
{“nil”: true},
{“nil”: true},
{“nil”: true}
“firstName”: “Foo”,
“company”: {
“_oid”: “10209394A0D92641BC9E0FCF36DDAD1C23”,
“_version”: 0
“lastName”: “Bar”

Tagged ,

Windows: Multiple Instances of MySQL – Error can not create hostname.lower-test – SOLVED

Today, I went about getting multiple instances of MySQL running on my Windows 7 machine.
You may be wondering why do you need multiple instances. Well for one thing, when debugging, you will usually need to work with a clean configuration otherwise, you can get unexpected results because of some configuration that you did a while ago for application x and now application y complains about it.
So I went through,

  • creating a new my.ini configuration ( i made a copy of my current one).
    The following needed to be pointed to a different location than the current instance:
    # The TCP/IP Port the MySQL Server will listen on
    #Path to the database root
    #*** INNODB Specific options ***
  • adding the new instance as a service
    run command:
    mysqld-nt --install-manual MySQL_Instance2 --defaults0-file=c:/install/folder/mysql/my-instance2.ini
  • starting the service
    net start mysql_Instance2

This is when i got this error Can't create test file C:\new\location\Data\hostname.lower-test

So i created the folders

I started the service and received the same error.
Turns out that, the mysql database needs to exist in the data folder.

  • You can copy you current mysql database over (but this will contain all the changes you have made so far)
    To get a fresh copy, download the no-install package from MySQL.
  • Unzip it
  • Copy and paste the contents of the location/unzipped/mysql/data to /new/location/data
  • Start the service and you are good to go.

You now have two instances running.
To connect to the new instance, use
mysql -u root -P 3307

Tagged , ,

Javascript: A Powerful Prototypal Programming Language

Last week I released that I had the wrong idea about Javascript. I always thought that it was not a serious language and that I would get by just fine if I kept up with my C/C++ or C# and just transferred that knowledge to Javascript.
Turns out, Javascript is a whole new game. It does look like C in many ways but its power comes from its difference between C programming family languages. Javascript is prototypal (prototype defines objects) vs C++ which is classical (classes define objects).
What caused the change in me this MSDN article and also i found these really informative videos about Javascript. The first one will help get you head into the right thinking about JS and the others will teach you the stuff you probably did not know that JS can do. enjoy.

Tagged , ,