Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » How to connect two Scout Projects?(Especially: how can I combine the Desktops of two Scout Applications?)
icon7.gif  How to connect two Scout Projects? [message #1752636] Wed, 25 January 2017 16:54 Go to next message
David Klein is currently offline David KleinFriend
Messages: 15
Registered: June 2015
Junior Member
Hi there,

I am working on a specific problem and got stuck at some point. I would be glad if someone could help me out with this one...

Introduction.

I have a Scout project (core application) and one (or more) Scout projects should extend this core (different products for different customers). The goal is that if I deploy one product, the customer gets this product plus the core, and analoguesly the second product should contain product 2 plus the core such that I can work on both products seperately, but only have to maintain one core which contains such features as the administration panel, etc. etc.

Additionally it would be cool to deploy also a third project, which contains product 1, product 2 and the core.

In a simple imaginary world, it could be that product 1 adds an outline to the core, and product 2 adds another outline. Both products can go standalone and the third project could contain all core outlines plus the outlines of product 1 and 2.

Right now, the structure (in the new Neon release) is such that the core project acts as the deliverer of all Scout related packages. The first product (extension project) therefore has the core as its parent (in the pom).

Also, I have configured the [webapp] dev ui.launch files on the product and the whole construct is runnable at least in dev-mode (yay!) - I havent tried to deploy the stuff yet.

Questions:

1. Is the pom structure as seen below ok?
2. How can I now tell the first product (prod1) to "inherit" the Desktop from the core and extend it? I have an idea to do this via an own client session on product 1 which has its own desktop which is derived from the core desktop. Is this the right way to do this?

Here is the dependency tree in detail:
Quote:

core.pom
--parent:
----scout.maven_rt_plugin_config-master
--modules:
----core.shared/core.server/core.client/core.server.app.war/core.ui.html/core.ui.html.app.war
--dependencyManagement:
----dependencies:
------scout.rt
------core.client/core.shared/core.server/core.ui.html


core.client.pom
--parent:
----core
--dependencies:
---scout.rt.client/scout.rt.client.test/core.shared


core.server.pom
--parent:
----core
--dependencies:
---scout.rt.server/scout.rt.server.test/javax.servlet-api/core.shared


core.server.app.dev.pom
--parent:
----core
--packaging
----war
--dependencies:
---scout.dev.jetty/core.server


core.server.app.war.pom
--parent:
----core
--packaging
----war
--dependencies:
---core.server


core.shared.pom
--parent:
----core
--dependencies:
---scout.rt.shared/scout.rt.shared.test/jul-to-slf4j/ch.qos.logback-classic


core.ui.html.pom
--parent:
----core
--dependencies:
---scout.rt.ui.html/core.client/javax.servlet-api


core.ui.html.app.dev.pom
--parent:
----core
--dependencies:
---scout.dev.jetty/core.ui.html


core.ui.html.app.dev.pom
--parent:
----core
--packaging:
----war
--dependencies:
---scout.dev.jetty/core.ui.html


core.ui.html.app.war.pom
--parent:
----core
--packaging:
----war
--dependencies:
---core.ui.html

----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------

prod1.pom
--parent:
----core
--modules:
----prod1.shared/prod1.server/prod1.client/prod1.server.app.war/prod1.ui.html/prod1.ui.html.app.war
--dependencyManagement:
----dependencies:
------prod1.client/prod1.shared/prod1.server/prod1.ui.html


prod1.client.pom
--parent:
----prod1
--dependencies:
---core.client/prod1.shared


prod1.server.pom
--parent:
----prod1
--dependencies:
---core.server/prod1.shared


prod1.server.app.dev.pom
--parent:
----prod1
--packaging:
--war
--dependencies:
---scout.dev.jetty/prod1.server


prod1.server.app.war.pom
--parent:
----prod1
--packaging:
--war
--dependencies:
---prod1.server


prod1.shared.pom
--parent:
----prod1
--dependencies:
---core.shared


prod1.ui.html.pom
--parent:
----prod1
--dependencies:
---core.ui.html/prod1.client


prod1.ui.html.app.dev.pom
--parent:
----prod1
--packaging:
----war
--dependencies:
---scout.dev.jetty/prod1.ui.html


prod1.ui.html.app.war.pom
--parent:
----prod1
--packaging:
----war
--dependencies:
---prod1.ui.html
Re: How to connect two Scout Projects? [message #1752687 is a reply to message #1752636] Thu, 26 January 2017 08:15 Go to previous messageGo to next message
Patrick Baenziger is currently offline Patrick BaenzigerFriend
Messages: 96
Registered: September 2011
Member
Hello David

Your project structure looks good and should work very well.

To extend the Desktop you have multiple options.
The one you listed, which is a perfectly valid implementation: Using the @Replace annotation in the "product 1/2/3" to override the parent implementation of the IClientSession and create a different Desktop.

Or alternatively, you could do it slightly different:
Make a (possibly abstract) desktop in the core (which you likely already have) and annotate it with @Bean. In your client session in the core:

setDesktop(BEANS.get(AbstractMyCoreDesktop.class));


Then, in your products, you can just create subclasses of your abstract desktop and annotate them with @Replace. Unless you have any customization of the client session in your product, you wouldn't even need an additional implementation in product1/2/3.
Re: How to connect two Scout Projects? [message #1752737 is a reply to message #1752687] Thu, 26 January 2017 17:41 Go to previous message
David Klein is currently offline David KleinFriend
Messages: 15
Registered: June 2015
Junior Member
Hi Patrick,

thank you very much for the valuable input. I struggled a bit because the @Replace annotation did not work at first. I managed to solve the issue and found the solution in the following post:

https://www.eclipse.org/forums/index.php?t=msg&th=1083599&goto=1751378&

Quote:
Ivan Motsch wrote:
Only modules containing a META-INF/scout.xml are included in the bean inventory.


After adding this file, everything is working now! The construct in general is a wonderful solution for us Smile

Thanks again!
Previous Topic:[neon] How to replace org.osgi.service.prefs.Preferences
Next Topic:MYSQL database connection getting closed intermittently
Goto Forum:
  


Current Time: Fri Apr 19 13:48:55 GMT 2024

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

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

Back to the top