Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: for the plan.

Jump to: navigation, search

Scout/HowTo/3.9/Create a Standalone Client with DB Access

< Scout‎ | HowTo‎ | 3.9
Revision as of 10:09, 13 September 2013 by Unnamed Poltroon (Talk) (Demo Project with Offline Support)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The Scout documentation has been moved to

A common Scout application typically consists of a client part (front end) and a server part (back end). The client part takes care of presenting the data whereas the server part is responsible for the processing, loading and storing. This is a very clean and powerful architecture for enterprise application. But what if you don't need a server? What if you only want to have a client which accesses the database? Is Scout able to handle this? Yes it is! The key word is offline support.

Make your application offline capable

An offline Scout application is basically the same as an online Scout application beside the need of a server (like Tomcat). The business logic is still implemented in the server plugins whereas the presentation logic stays at the client plugins. So basically what you need to do is to start the server plugins together with the client plugins.

Follow these steps to make your application offline capable:

Extend the product

Extend your existing client product (SWT or Swing) with the server plugin and its dependencies. If you only add the server plugin org.eclipse.scout.demo.offline.server you will notice on startup that some plugins are missing. Either use the button "Add Required Plugins" which adds the missing plugins automatically or use "Validate Plugins" in the "Run configuration" and add the missing plugins manually.

Offline Product

Register the offline dispatcher service

Register the OfflineDispatcherService in your server plugin which actually represents the server on client side and takes care of transactions.


Configure the offline support

Configure the offline support by setting the following property in the config.ini of your clients:

Enable the offline support

Enable the offline support by adding the following code to beginning of the ClientSession#execLoadSession:


This delegates the proxy service calls which are normally received and dispatched by the ServiceTunnelServlet to the OfflineDispatcherService.

Benefits of offline support compared to plain jdbc

  1. Server functionality like transaction handling is available on client side
  2. DB access and GUI Logic is well separated out of the box because the application design is the same as with a regular Scout client/server applications
  3. Existing tutorials for client/server applications can be reused since the development process is the same
  4. Switching to online mode is possible any time if you want to

Demo Project with Offline Support

Back to the top