I am running two instances of my java based desktop application on same HSQLDB database. I am trying to operate in such a way that when record is inserted from one instance it should be immediately reflected/displayed in another instance of application. But the issue is HSQL keeps data in temporary memory area and writes the data to disk after database is closed/shutdown. I just want to know,is it possible what i am trying ? or how one can implement this functionality ? Thank You.
Asked
Active
Viewed 58 times
1
-
Can't you refresh your data display on both app instances continuously (for example every 2 minutes)? – ra2085 Jul 15 '14 at 05:33
-
@ra2085 Thank you for your reply. I have committed data after every transaction and re-executing the select query each time i open that particular JFrame in apps but still it is not showing data. – FullStack Jul 15 '14 at 05:37
-
Can you confirm that the data has been commited by means of the HSQL Database Manager? In short, can you query your data outside of your app scope? – ra2085 Jul 15 '14 at 05:43
-
I'm guessing you're not using the in-app embedded mode of HSQLDB... – ra2085 Jul 15 '14 at 05:45
-
Yes you guessed right,i am not using HSQLDB in embedded mode.I didn't tried querying my database from outside of application.Is there any way to refresh/autorefresh the database after each operation or anything else ? – FullStack Jul 15 '14 at 05:50
-
Why would you need to refresh the database? Doesn't make sense. The database must keep data and transaction integrity, no need to do that manually/programatically. Give a try to query the database outside the application and let me know the results. – ra2085 Jul 15 '14 at 05:52