Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Eclipse Scout 8.0 application with two clients(AssertionException due to multiple instances of IClientSession)
Eclipse Scout 8.0 application with two clients [message #1806556] Fri, 10 May 2019 10:55 Go to next message
Bernard Brinkhus is currently offline Bernard BrinkhusFriend
Messages: 3
Registered: October 2017
Junior Member
I have a Eclipse Scout 8.0 application with two clients and one server. One is a presentation client, no login, no permissions, the other an admin client. It works OK in eclipse but after deploying it to our tomcat server I am getting the following exception:

2019-05-10 11:09:03,394 ERROR [ajp-bio-8009-exec-82] org.eclipse.scout.rt.ui.html.json.JsonMessageRequestHandler.handlePost(JsonMessageRequestHandler.java:134) - Error while initializing UI session - MDC[principal=brinkhus, cid=SB6VD9kd6zt/1]
org.eclipse.scout.rt.platform.util.Assertions$AssertionException: Assertion error: multiple instances found for query: interface org.eclipse.scout.rt.client.IClientSession [IBean[@Bean eu.agro.apps.gatekeeper.client.ClientSession], IBean[@Bean eu.agro.apps.gatekeeper.client.ClientSessionShow]] [user=brinkhus]
        at org.eclipse.scout.rt.platform.util.Assertions.fail(Assertions.java:629)
        at org.eclipse.scout.rt.platform.internal.BeanManagerImplementor.optBean(BeanManagerImplementor.java:239)
        at org.eclipse.scout.rt.platform.BEANS.opt(BEANS.java:55)
....


Is there a solution to do this or do I have to use permissions or two applications to achieve the separation.

Basically is it possible to have multiple clients served by a single server and how.
Re: Eclipse Scout 8.0 application with two clients [message #1806576 is a reply to message #1806556] Fri, 10 May 2019 15:01 Go to previous message
Andre Wegmueller is currently offline Andre WegmuellerFriend
Messages: 59
Registered: September 2012
Location: Baden-D├Ąttwil, Switzerla...
Member
Hi Bernard

In a typical Scout application the Scout client and Scout server are two components of the _same_ application. In Scout the "client" (aka UI server) is a server component too. It is responsible for handling multiple client sessions (= users connecting to the UI server with a browser). I guess it is somehow possible to have two different clients connecting to the same backend server. But that's definitely not a standard set-up, so I'd not recommend to do that.

As you already suggested, you should use permissions instead. Your client application will probably have two views/outlines: presentation and administration. Depending on the permissions of the logged in user you set the visibleGranted property, so the user will only see the outlines he is permitted to see.

To solve your access requirements you must set up an AuthFilter in your web.xml, which grants read-only access to anonymous users. However: a user with administrator permissions would have to request the /login.html directly (or call a secured URL like /admin) in order to log in as a user with admin-permissions. See the Scout widgets application for an AuthFilter example.



Eclipse Scout Homepage | Documentation | GitHub
Previous Topic:Rich content in desktop notifications
Next Topic:Resizing font icon in AbstractImageField
Goto Forum:
  


Current Time: Thu Oct 17 11:06:52 GMT 2019

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

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

Back to the top