Thursday 20 March 2008

Schema Spy

SchemaSpy is a database reverse engineering tool that generates information about your database, including relationships, constraints, columns, and it even detects potential anomalies that may exist in your database. In order to maximise the benefit, you'd need to install GraphViz so that the HTML report would include nice graphical stuff.

I recently downloaded both software and run it against an Oracle database with this command:

# java -jar schemaSpy_3.1.1.jar -cp "D:\oraclexe\..\jdbc\lib\ojdbc14.jar"
-t ora -db [dbname] -s [schema] -u [user] -p [password] -cid -o output

I installed the latest Oracle Express Edition so that I get the latest Oracle client and JDBC driver. Make sure ORACLE_HOME is set, and include "GraphViz\bin" and "ORACLE_HOME\bin" in your PATH.

Thursday 13 March 2008

Javascript Calendar

There are lots of Javascript Calendars out there, both in the form of javascript(s) or within an AJAX library (DOJO, Scriptaculous). Recently, I came across The Coolest DHTML / JavaScript Calendar [dynarch.com] and it was extremely easy to use! It only requires a few lines of codes in your HTML and bang, you've got a working date picker.

One thing to note is, it can clash with your existing css. JsCalendar is actually using "calendar" class for its div, and it has a table within the div. The solution to this problem is by adding this piece of css code:

.calendar table {
width: auto;
}

Monday 10 March 2008

JBoss Deployment Order

JBoss by default deploys ear files before war files, but if you want to have this changed, here is how to do it:
  • Edit C:\jboss-4.2.0.GA\server\default\conf\xmdesc\org.jboss.deployment.MainDeployer-xmbean.xml
  • Look for EnhancedSuffixOrder
  • Under descriptors tag, there is a value tag, and you would see "value" attribute
  • Change the priority of the file type that you want. The format is "priority:file type" (the bigger the number, the lower the priority)

Thursday 6 March 2008

Sun Tech Days

I've been attending Sun Tech Days in Darling Harbour. I attended the "Enterprise Track", but wanted to go to the "Desktop Track" at around 12:20 to check out "Java SE 6 Top 10 Features and Java SE 7", but it was full. It turned out that I was not the only one planning to do such a thing. I met some colleagues and ex-colleagues and had a time to catch up during lunch. The afternoon sessions were, I have to say, more useful to me, as there were practical examples and demos that I can relate to.

A few attendees asked an interesting question during the last session. The question was something like "If I was to create a java application with RDBMS back end, which framework should I use?". This is definitely one of the questions that I had always wanted to ask. It was a very good question, I thought, given the vast amount of frameworks that java developers can use in order to create an application. Well, there was no definite answer. Each framework has its own advantage/disadvantage. Spring's advantage, for example, is its ability to unit test business logic outside the container, and also AOP is useful. It is also interesting to note that Glassfish server now almost matches Tomcat in terms of startup time. I did notice that when the presenter started the server using NetBeans, it was pretty quick.

Anyway, I had fun in the event, and we had free lunch, dinner, and drinks, both alcoholic and non alcoholic..
Share |