Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Offline Storage of Derby Database for Raspberry Pi(database storage)
Offline Storage of Derby Database for Raspberry Pi [message #1757991] Wed, 22 March 2017 15:22 Go to next message
Jared Ebersole is currently offline Jared EbersoleFriend
Messages: 2
Registered: March 2017
Junior Member
I have create an Eclipse Scout project, and am hosting it on a Raspberry Pi. The database workd perfect (Add employee and store info in database). The only problem is if the Rapberry Pi shuts off all of the data is gone.

So, how do I store the data locally so that if anyting happens to the Raspberry Pi the data does not dissappear?
Re: Offline Storage of Derby Database for Raspberry Pi [message #1758007 is a reply to message #1757991] Wed, 22 March 2017 17:54 Go to previous messageGo to next message
Paolo Bazzi is currently offline Paolo BazziFriend
Messages: 33
Registered: January 2017
Location: Switzerland
Member
Hi Jared,

Do you use the Apache Derby in-memory database? In this case the database content is only kept in memory and deleted if the Raspberry is rebooted. You could try to use the Apache Derby database with a file as persistence location. Derby can be operated as database embedded to your Java Scout application. See for instance https://db.apache.org/derby/papers/DerbyTut/embedded_intro.html

Regards,
Paolo




Eclipse Scout Homepage | Documentation | GitHub
Re: Offline Storage of Derby Database for Raspberry Pi [message #1758009 is a reply to message #1757991] Wed, 22 March 2017 18:03 Go to previous messageGo to next message
Eclipse UserFriend
My assumption is you are using the Derby in memory DB. Have a look in your AbstractDerbySqlService getConfiguredJdbcMappingName method implementation. And use something like jdbc:derby:/var/myDatabase. Ensure to have a database at the given location.
Visit Derby Manual for more information.

-andreas
Re: Offline Storage of Derby Database for Raspberry Pi [message #1758047 is a reply to message #1758007] Thu, 23 March 2017 02:47 Go to previous messageGo to next message
Jared Ebersole is currently offline Jared EbersoleFriend
Messages: 2
Registered: March 2017
Junior Member
Do you know how I could implement this? I can't teallow follow that tutorial.

Jared
Re: Offline Storage of Derby Database for Raspberry Pi [message #1758117 is a reply to message #1758047] Thu, 23 March 2017 16:55 Go to previous message
Paolo Bazzi is currently offline Paolo BazziFriend
Messages: 33
Registered: January 2017
Location: Switzerland
Member
Hi Jared

Theres is an implementation example in the Scout beginners guide:

https://eclipsescout.github.io/6.0/beginners-guide.html#sec-my_contacts_guide

The code of the mentioned contacts demo application is available here:
https://github.com/BSI-Business-Systems-Integration-AG/org.eclipse.scout.docs/tree/releases/6.0.x/code/contacts

E.g. the SQL service implementation is here:
https://github.com/BSI-Business-Systems-Integration-AG/org.eclipse.scout.docs/blob/releases/6.0.x/code/contacts/org.eclipse.scout.contacts.server/src/main/java/org/eclipse/scout/contacts/server/sql/DerbySqlService.java

Maybe you could also find some additional input in this thread: https://www.eclipse.org/forums/index.php/t/1076182/

Regards,
Paolo


Eclipse Scout Homepage | Documentation | GitHub
Previous Topic:How to integrate Eclipse Scout [Neon] with JasperReports
Next Topic:SpringBoot and EclipseScout
Goto Forum:
  


Current Time: Tue Apr 23 13:27:32 GMT 2024

Powered by FUDForum. Page generated in 0.03407 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top