I normally just try and post up useful code snippets and howto's. I am breaking this rule to rave about how great JRebel is! If you haven't heard of it, it INSTANTLY deploys code from your workspace onto your server, yes INSTANTLY. So, not just your JSP/XHTML changes but your CODE changes. So, say good-bye to your code and re-deployment cycles, and give JRebel a try.
P.S. I am no way affiliated with them, just love the idea of skipping the deployment cycle and wasting my precious time.
Problems and solutions I have found working with Hibernate, Spring, Struts, Seam and JEE.
Showing posts with label Tools. Show all posts
Showing posts with label Tools. Show all posts
Thursday, June 09, 2011
Tuesday, May 24, 2011
HyperSonic/HyperSQL Quickstart
HyperSQL is a fantastic tool for local rapid development and testing. A lot of people don't seem to know about it, or just how useful it is. Some advantages:
As mentioned it saves all updates in a plain text file. So if you run:
To shutdown the server cleanly type 'SHUTDOWN' in your SQL editor (such as Squiral SQL). You will notice it shutdown, and copies the data cleanly from the temp.log file into temp.script. This file is actually editable, so you can edit the SQL driectly in the script file, cool huh?
Hope this is useful for someone, shout out if it is!
- You do not need to install it, so you do not need local admin rights (a hurdle in corporate environments).
- It saves everything in a readable, and editable text file. In other words, the database IS the text file (see below for example).
- It starts up in no time (an empty DB for me starts up in 385 ms!).
- It is fully JDBC compatible.
- Download the latest HyperSQL/HSQLDB zip file
- extract it to your local drive, in this example C:\bin\hsql
- cd C:\bin\hsqldb-2.2.2\hsqldb\bin
- make a new batch file, call it say hsqlStart.bat
- edit the batch file, and put this in it:
- java -cp ../lib/hsqldb.jar org.hsqldb.server.Server --database.0 file:C:\bin\hsqldb-2.2.2\hsqldb\data\myDb --dbname.0 test
- Run the batch file from the comman prompt from the bin folder
- Connect to the database using the jdbc compatible SQL editor of your choice, using the connection string: jdbc:hsqldb:hsql://localhost/test", "SA", "", and the driver found at: C:\bin\hsqldb-2.2.2\hsqldb\lib\hsqldb.jar
- Refer to the HyperSQL/HSQLDB User Guide for anything not covered by this quick start.
As mentioned it saves all updates in a plain text file. So if you run:
create table my_tbl(and then open the file: C:\bin\hsqldb-2.2.2\hsqldb\data\temp.log, you will see it has the create table directly in there. This is VERY useful for troubleshooting and sanity checks during rapid development.
my_key INT primary key,
some_text VARCHAR(256)
)
To shutdown the server cleanly type 'SHUTDOWN' in your SQL editor (such as Squiral SQL). You will notice it shutdown, and copies the data cleanly from the temp.log file into temp.script. This file is actually editable, so you can edit the SQL driectly in the script file, cool huh?
Hope this is useful for someone, shout out if it is!
Subscribe to:
Posts (Atom)