Eclipse Scout 8.0 application with two clients [message #1806556] |
Fri, 10 May 2019 06:55  |
Eclipse User |
|
|
|
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 11:01  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.08222 seconds