Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Scout/Tutorial/3.7/Minicrm/Set up SQL Service"

< Scout‎ | Tutorial‎ | 3.7
m (Create a new AbstractDerbySqlService)
(Replaced content with "The Scout documentation has been moved to https://eclipsescout.github.io/.")
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{note|Scout Tutorial|This page belongs to the [[Scout/Tutorial/Minicrm Step-by-Step|Minicrm Step-by-Step Tutorial]]. It explains how to use a database from your new Eclipse Scout project. You need to have a bare-bones {{ScoutLink|Tutorial|Setup a New Eclipse Scout Project|Scout Project up and running}} in order to continue.}}
+
The Scout documentation has been moved to https://eclipsescout.github.io/.
 
+
We want to connect to a database. In Scout terms, the client might want to fill a table with data from the database. It calls a service on the server to provide some table data. That service in turn has to get the data from somewhere. In this case, it sends a SQL statement to a yet another service, the '''SQL service'''. This service will handle connecting to the database and the rest.
+
 
+
Eclipse Scout comes with support for [http://db.apache.org/derby/ Apache Derby], [http://www.postgresql.org/ PostgreSQL], and [http://www.oracle.com/de/products/database/index.html Oracle] out of the box. Switching to other solutions like [http://www.hibernate.org/ Hibernate] possible, but is beyond the scope of the tutorial. (Essentially you'll need to use Hibernate beans instead of the FormData objects Eclipse Scout provides for you to communicate between client and server.)
+
 
+
We will use '''Apache Derby''' in this tutorial. Derby is an open source relational database implemented entirely in Java and available under the Apache License.
+
 
+
== Create a new AbstractDerbySqlService ==
+
 
+
Go to the server node and open the tree, drill down to ''Sql Services'' below ''Common Services'' and right click in order to open the wizard to create a new SQL service.
+
 
+
[[Image:SqlServiceWizard.jpg|SqlServiceWizard.jpg]]
+
 
+
Name your new service ''DerbySqlService'' and choose ''AbstractDerbySqlService'' from the combobox ''Super Type'' then click finish.
+
 
+
[[Image:Newsqlservice.jpg|Newsqlservice.jpg]]
+
 
+
If the Super Type ''AbstractDerbySqlService'' doesn't appear within the combobox, you need to organize your server project's ''plugin.xml''. Go to the Java Perspective, double click on the server project, open the plugin.xml and in the box ''Required Plug-Ins'' add the plug-in ''org.eclipse.scout.rt.jdbc.derby''. If the Super Type still does not appear, make sure that the ''derby.jar'' is in the lib folder of the Java installation. You can get this library directly from [http://db.apache.org/derby/ Apache Derby].
+
 
+
[[Image:Serverplugin.jpg|Serverplugin.jpg]]
+
 
+
== Change default configuration settings ==
+
 
+
Adjust the default settings in your ''DerbySqlService'' by editing the ''Jdbc Mapping Name'', this should point to the folder where you unzipped the DerbyDb to. As username/password use ''minicrm''/''minicrm''.
+
 
+
[[Image:Derbydb.jpg|Derbydb.jpg]]
+

Latest revision as of 07:25, 18 March 2024

The Scout documentation has been moved to https://eclipsescout.github.io/.

Back to the top