Wednesday, August 20, 2008

Lurking at Hypersonic data

There are times when you want to look at your database data during development.
It is also very common to keep using Hypersonic as a database during that same phase.

But do you know how to look at your JBoss Portal data ? Here is an entry-level explanation on how to do it. I got the idea of this blog entry by reading a question on a forum and hope it could help.

JBoss AS includes the "HSQL Database Manager" a GUI to execute SQL request on a HSQL server. To access it, you will need to go through the JMX console and locate the startDatabaseManager() operation on the jboss:database=localDB,service=Hypersonic MBean.

Clicking on "Invoke" should open up a new application that looks like this:

You see the content of the default datasource of JBoss AS. Now to see the default datasource of JBoss Portal click on File>Connect... You will see the following screen (after enlarging the window horizontally):In the URL just change the final part: /data/hypersonic/localDB to /data/portal/hypersonic/database then click Ok.

Voila, you can now browse the default JBoss Portal database and do SQL queries on it:
Note: If you wish to restart from fresh with default data, you simply need to delete the files from: server/default/data/portal and restart JBoss AS.

2 comments:

Alexandre Simundi said...

Hi,

I'm studying and testing JBoss Portal with others frameworks, such as JSF, Spring MVC and Spring Security.

In my tests I had difficulties to integrate Spring Security with JBoss Portal. I can't get User Roles of the portal. So, I decided to create a Class to make it.

Do you make somethings with Spring Security and JBoss Portal??

How I get a reference to DataSource of the Hypersonic ??


Sorry my English. I'm still learning English.

Thanks

Unknown said...

Thanks Friend, Really helps me!

Thank u once again!,

Also i am developing Jboss Portal functionaly now.

Is it possible to get in touch with you? my mail karthivb@gmail.com