-
1. Re: the database of Seam application
gavin.king Sep 18, 2006 5:44 PM (in response to clockdva)It is a HSQLDB database, embedded in JBoss.
-
2. Re: the database of Seam application
clockdva Sep 18, 2006 6:02 PM (in response to clockdva)"gavin.king@jboss.com" wrote:
It is a HSQLDB database, embedded in JBoss.
and how can i see this database??
do i loose my data when i stop jboss?
thanks -
3. Re: the database of Seam application
bfo81 Sep 19, 2006 5:49 AM (in response to clockdva)By default yes. The data is only stored in memory. So all your bookings get lost. The hotels are only still there cause they are created upon starting the server. There's a file called import.sql that contains the hotels ;).
But there is a possibility to save the data on the disk instead. I'm not sure how this works exactly (I'm too lazy to search for that in the docs right now *g*).
This is even quite interesting for Java SE. You can easily create standalone desktop applications with a built-in database by using Hibernate and HSQLDB... or let's say I hope this is possible ;). -
4. Re: the database of Seam application
clockdva Sep 19, 2006 6:15 AM (in response to clockdva)"bfo81" wrote:
By default yes. The data is only stored in memory. So all your bookings get lost. The hotels are only still there cause they are created upon starting the server. There's a file called import.sql that contains the hotels ;).
But there is a possibility to save the data on the disk instead. I'm not sure how this works exactly (I'm too lazy to search for that in the docs right now *g*).
This is even quite interesting for Java SE. You can easily create standalone desktop applications with a built-in database by using Hibernate and HSQLDB... or let's say I hope this is possible ;).
and how can i see this database??
there is a way to see the data?
thanks -
5. Re: the database of Seam application
norman.richards Sep 19, 2006 9:03 AM (in response to clockdva)They hypersonic database files are in the server/default/data/hypersonic directory. Changes to the hypersonic database are NOT lost when JBoss stops. However, the example applications use the create-drop table generation strategy, which causes the tables to be deleted when the apps are redeployed.
To see the data, look in the jmx-console for the database manager MBean. There is a start database manager operation that will launch a GUI admin tool. -
6. Re: the database of Seam application
clockdva Sep 19, 2006 9:48 AM (in response to clockdva)at the url:
http://localhost:8080/
i see these links:
JBoss Documentation
JBoss Wiki
JBoss JIRA
JBoss Forums
Tomcat status (full) (XML)
JMX Console
JBoss Web Console
i click on JMX Console and i see a lot of links
what i have to do??
thanks -
7. Re: the database of Seam application
norman.richards Sep 19, 2006 11:29 AM (in response to clockdva)Woops - that'll teach me to not look at that example. The original poster was right that the hypersonic instance in the booking example is entirely in memory. We normally don't recommend using a private instance like this, but it works for the example. To use the JBoss-managed HSQL instance, change the connection-url in booking-ds.xml to:
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
Redeploy the application (not just the datasource) and then from the JMX console, find the jboss:database=localDB,service=Hypersonic MBean. Click the link, then invoke the startDatabaseManager operation. You'll see your data.
You can look at the DVD store for another example. The DVD store uses it's own HSQL instance, but it registers it as a proper MBean so you can manage the data.
Hope that helps. -
8. Re: the database of Seam application
clockdva Sep 19, 2006 11:56 AM (in response to clockdva)thanks
now it works also for other examples (seam-messages, ecc.ecc.)