Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP 1.50.M3 Standalone
RAP 1.50.M3 Standalone [message #756594] Mon, 14 November 2011 08:16 Go to next message
Edin Edin is currently offline Edin Edin
Messages: 101
Registered: January 2010
Senior Member
Hello im trying to setup a standalone version of a RAP Application based upon this FAQ
http://wiki.eclipse.org/RAP/FAQ#How_do_I_develop_an_RWT_standalone_application_with_RAP_.3E.3D_1.5

My problems are the following:
im getting java.lang.UnsupportedOperationException: The SimpleLifeCycle does not support Display#sleep() in my EntryPoint class with the following code:

Display display = new Display();
Shell shell = new Shell( display );
Label label = new Label( shell, SWT.NONE );
label.setText( "Hello RAP World" );
label.setBounds(50, 50, 200, 30);
shell.setSize( 500, 400 );
shell.open();
while( !shell.isDisposed() ) {
if( !display.readAndDispatch() )
display.sleep();
}
display.dispose();
return 0;

The second one is the question, how to get the following code be loaded:
public class HelloWorldConfigurator implements ApplicationConfigurator {
public void configure( ApplicationConfiguration configuration ) {
configuration.addEntryPoint( "default", ExampleEntryPoint.class );
}
}

My ExampleEntryPoint is never get loaded when i start the application from the RAP Tooling, so my brandig is not loaded.
Is it true that i even dont need OSGi anymore when startig RAP on this way? Is it then possible to define every plugin.xml setting with the Java classes?

Greetings Edin
Re: RAP 1.50.M3 Standalone [message #756664 is a reply to message #756594] Mon, 14 November 2011 10:46 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger Herrmann
Messages: 335
Registered: July 2009
Senior Member
Edin,

there was a mistake in the FAQ entry which is now corrected. Remove the
event loop from the example entry point and it should work.

You can basically use RAP at three different levels
1. RWT Standalone as described in the FAQ, plus optionally Forms, JFace,
Databinding and everything else that doesn't require OSGi to run.
2. RWT + OSGi, like RWT Standalone but running on OSGi. See [1] for more
details.
3. RAP Workbench, this is the full RAP stack which allows
single-sourcing with RCP.

Regarding the plugin.xml, those extension points that control behavior
of RWT are naturally also available as Java API. The
ApplicationConfigurator (see the FAQ) is where such settings are now made.

HTH
Rüdiger

[1] http://www.codeaffine.com/2011/10/05/raprwt-osgi-integration-ii/

On 14.11.2011 14:16, dedagic wrote:
> Hello im trying to setup a standalone version of a RAP Application based
> upon this FAQ
> http://wiki.eclipse.org/RAP/FAQ#How_do_I_develop_an_RWT_standalone_application_with_RAP_.3E.3D_1.5
>
>
> My problems are the following:
> im getting java.lang.UnsupportedOperationException: The SimpleLifeCycle
> does not support Display#sleep() in my EntryPoint class with the
> following code:
>
> Display display = new Display();
> Shell shell = new Shell( display );
> Label label = new Label( shell, SWT.NONE );
> label.setText( "Hello RAP World" );
> label.setBounds(50, 50, 200, 30);
> shell.setSize( 500, 400 ); shell.open();
> while( !shell.isDisposed() ) {
> if( !display.readAndDispatch() )
> display.sleep();
> }
> display.dispose();
> return 0;
>
> The second one is the question, how to get the following code be loaded:
> public class HelloWorldConfigurator implements ApplicationConfigurator {
> public void configure( ApplicationConfiguration configuration ) {
> configuration.addEntryPoint( "default", ExampleEntryPoint.class );
> }
> }
>
> My ExampleEntryPoint is never get loaded when i start the application
> from the RAP Tooling, so my brandig is not loaded.
> Is it true that i even dont need OSGi anymore when startig RAP on this
> way? Is it then possible to define every plugin.xml setting with the
> Java classes?
>
> Greetings Edin
>
--
Rüdiger Herrmann
http://codeaffine.com
Re: RAP 1.50.M3 Standalone [message #756734 is a reply to message #756664] Mon, 14 November 2011 15:50 Go to previous messageGo to next message
Edin Edin is currently offline Edin Edin
Messages: 101
Registered: January 2010
Senior Member
Hi Rüdiger,

thanx for your replay. We want to take the first version, without osgi and with rwt, like it is described in the FAQ. Is such a standalone version usefull for multiuser rap application? Or are there some restrictions to expect? We also have an css file that we use in our Theme, mostly to load Button Images with aButton.getData(WidgetUtil.CUSTOM_VARIANT), or to format Labels, color table row background and so on. This Helper class seems not to work for standalone RAP application version, is it correct? If so, is there a possibility still to use it? My last question is, when i implement a example oriented on the FAQ and do provide my own ApplicationConfigurator class and then run the application only wit rap Tooling as described (choose UIEntriPoint class and then run as RWT), my MyApplicationConfigurator class methods that override the ApplicationConfigurator abstract class are never called. Which is the easiest way to realise a simple demo version running with rap tooling to be able to test ApplicationConfigurator functionalitites without OSGi?

Greetings Edin
Re: RAP 1.50.M3 Standalone [message #756901 is a reply to message #756734] Tue, 15 November 2011 08:26 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger Herrmann
Messages: 335
Registered: July 2009
Senior Member
Edin,

as long as you don't have an urgent need for the workbench, RWT
standalone is a good choice.

To contribute CSS files to a theme, use the addStyleSheet() method in
the ApplicationConfiguration. To contribute to the default theme,
specify ThemeManager#DEFAULT_THEME_ID in the themeId argument.

To launch an application with an ApplicationConfigurator you first need
a web.xml like the one from the FAQ [1]. Make sure the
org.eclipse.rwt.Configurator init param points to your implementation of
ApplicationConfigurator. Then create a new launch configuration, select
"Run from web.xml" and enter the path to the web.xml and the name of the
servlet path ("rap" if you follow the FAQ).

Regards,
Rüdiger

[1]
http://wiki.eclipse.org/RAP/FAQ#How_do_I_develop_an_RWT_standalone_application_with_RAP_.3E.3D_1.5

On 14.11.2011 21:50, dedagic wrote:
> Hi Rüdiger,
> thanx for your replay. We want to take the first version, without osgi
> and with rwt, like it is described in the FAQ. Is such a standalone
> version usefull for multiuser rap application? Or are there some
> restrictions to expect? We also have an css file that we use in our
> Theme, mostly to load Button Images with
> aButton.getData(WidgetUtil.CUSTOM_VARIANT), or to format Labels, color
> table row background and so on. This Helper class seems not to work for
> standalone RAP application version, is it correct? If so, is there a
> possibility still to use it? My last question is, when i implement a
> example oriented on the FAQ and do provide my own
> ApplicationConfigurator class and then run the application only wit rap
> Tooling as described (choose UIEntriPoint class and then run as RWT), my
> MyApplicationConfigurator class methods that override the
> ApplicationConfigurator abstract class are never called. Which is the
> easiest way to realise a simple demo version running with rap tooling to
> be able to test ApplicationConfigurator functionalitites without OSGi?
>
> Greetings Edin
--
Rüdiger Herrmann
http://codeaffine.com
Re: RAP 1.50.M3 Standalone [message #758690 is a reply to message #756901] Thu, 24 November 2011 04:34 Go to previous messageGo to next message
Edin Edin is currently offline Edin Edin
Messages: 101
Registered: January 2010
Senior Member
Hi Rüdiger,

thx for your help. Eveything works fine now. Only two small things, that are not important for running, but for me to easy develop and structure my project:
1) i cannot see javadoc of RAP classes in eclipse, i add rwt jars to my buildpath (including source jars). Do i have to make some other settings or add some other jars for that?
2) putting some ressources (like theme.css) into other folder than src folders is not working (theme.css will not be found, and im getting illegalargument exception on startup). As far as i make new folder to be a source folder, then it works. This is not so important to me, but runing rap earlier with osgi and setting rap runtime as target platform, didnt make no problems.

The second point is not really important, but i would ike to know why. The first one is more important, its annoying to read API somewhere else. Smile

Best regards, Edin
Re: RAP 1.50.M3 Standalone [message #758876 is a reply to message #758690] Thu, 24 November 2011 16:47 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger Herrmann
Messages: 335
Registered: July 2009
Senior Member
Edin,

please see my comments below.

HTH,
Rüdiger

On 24.11.2011 10:34, dedagic wrote:
> Hi Rüdiger,
>
> thx for your help. Eveything works fine now. Only two small things, that
> are not important for running, but for me to easy develop and structure
> my project:
> 1) i cannot see javadoc of RAP classes in eclipse, i add rwt jars to my
> buildpath (including source jars). Do i have to make some other settings
> or add some other jars for that?
It is useless to add the source jars to you build path. Use the source
jars as a source attachment:
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fref-properties-source-attachment.htm
This will also bring you the JavaDoc.

> 2) putting some ressources (like theme.css) into other folder than src
> folders is not working (theme.css will not be found, and im getting
> illegalargument exception on startup). As far as i make new folder to be
> a source folder, then it works. This is not so important to me, but
> runing rap earlier with osgi and setting rap runtime as target platform,
> didnt make no problems.
Please make sure you understand the difference between running on OSGi
and running plain Java.
Basically, in OSGi you can access files that are not on the class path
but reside inside a bundle with methods like Bundle#getEntry(),
#findEntries(). This is how your theme.css is loaded in OSGi.
When running a plain Java application, only what is on the class path
can be accessed during runtime. Other artifacts from your project aren't
accessible.

> The second point is not really important, but i would ike to know why.
> The first one is more important, its annoying to read API somewhere
> else. :)
>
> Best regards, Edin
--
Rüdiger Herrmann
http://codeaffine.com
Re: RAP 1.50.M3 Standalone [message #758971 is a reply to message #758876] Fri, 25 November 2011 07:39 Go to previous messageGo to next message
Edin Edin is currently offline Edin Edin
Messages: 101
Registered: January 2010
Senior Member
Hello again,

thnx for your help. Now i have another problem. I implemented a class called Login based upon jface Dialog class. Im calling it from the IEntrPoint#createUI metod:
public int createUI() {
Display display = new Display();
Shell shell = new Shell(display, SWT.ON_TOP);
shell.setSize(600, 400);
//shell.setMaximized(true);
new Login(shell).open();
return 0;
}

But now im getting the infinity loop, throwing this exception:

java.lang.UnsupportedOperationException: The SimpleLifeCycle does not support Display#sleep().
at org.eclipse.rwt.internal.lifecycle.SimpleLifeCycle.sleep(SimpleLifeCycle.java:152)
at org.eclipse.swt.widgets.Display.sleep(Display.java:1177)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:842)
at org.eclipse.jface.window.Window.open(Window.java:817)
at com.acarsoft.smartcomm.HelloWorld.createUI(HelloWorld.java:16)
at org.eclipse.rwt.internal.lifecycle.EntryPointManager.createUI(EntryPointManager.java:90)
at org.eclipse.rwt.internal.lifecycle.PrepareUIRoot.createUI(PrepareUIRoot.java:43)
at org.eclipse.rwt.internal.lifecycle.PrepareUIRoot.execute(PrepareUIRoot.java:34)
at org.eclipse.rwt.internal.lifecycle.PhaseExecutor.execute(PhaseExecutor.java:34)
at org.eclipse.rwt.internal.lifecycle.SimpleLifeCycle.execute(SimpleLifeCycle.java:132)
at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.runLifeCycle(LifeCycleServiceHandler.java:80)
at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.synchronizedService(LifeCycleServiceHandler.java:58)
at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:48)
at org.eclipse.rwt.internal.service.ServiceManager$HandlerDispatcher.service(ServiceManager.java:34)
at org.eclipse.rwt.engine.RWTServlet.handleValidRequest(RWTServlet.java:66)
at org.eclipse.rwt.engine.RWTServlet.doPost(RWTServlet.java:45)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:939)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

jFace Window class tries to put Display sleep but the SiplyCifeCycle does not support sleep method. Is probably the same problem as mentioned before. But how to solve it this time?

Best regards, Edin
Re: RAP 1.50.M3 Standalone [message #758972 is a reply to message #758876] Fri, 25 November 2011 07:39 Go to previous messageGo to next message
Edin Edin is currently offline Edin Edin
Messages: 101
Registered: January 2010
Senior Member
Hello again,

thnx for your help. Now i have another problem. I implemented a class called Login based upon jface Dialog class. Im calling it from the IEntrPoint#createUI metod:
public int createUI() {
Display display = new Display();
Shell shell = new Shell(display, SWT.ON_TOP);
shell.setSize(600, 400);
//shell.setMaximized(true);
new Login(shell).open();
return 0;
}

But now im getting the infinity loop, throwing this exception:

java.lang.UnsupportedOperationException: The SimpleLifeCycle does not support Display#sleep().
at org.eclipse.rwt.internal.lifecycle.SimpleLifeCycle.sleep(SimpleLifeCycle.java:152)
at org.eclipse.swt.widgets.Display.sleep(Display.java:1177)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:842)
at org.eclipse.jface.window.Window.open(Window.java:817)
at com.acarsoft.smartcomm.HelloWorld.createUI(HelloWorld.java:16)
at org.eclipse.rwt.internal.lifecycle.EntryPointManager.createUI(EntryPointManager.java:90)
at org.eclipse.rwt.internal.lifecycle.PrepareUIRoot.createUI(PrepareUIRoot.java:43)
at org.eclipse.rwt.internal.lifecycle.PrepareUIRoot.execute(PrepareUIRoot.java:34)
at org.eclipse.rwt.internal.lifecycle.PhaseExecutor.execute(PhaseExecutor.java:34)
at org.eclipse.rwt.internal.lifecycle.SimpleLifeCycle.execute(SimpleLifeCycle.java:132)
at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.runLifeCycle(LifeCycleServiceHandler.java:80)
at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.synchronizedService(LifeCycleServiceHandler.java:58)
at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:48)
at org.eclipse.rwt.internal.service.ServiceManager$HandlerDispatcher.service(ServiceManager.java:34)
at org.eclipse.rwt.engine.RWTServlet.handleValidRequest(RWTServlet.java:66)
at org.eclipse.rwt.engine.RWTServlet.doPost(RWTServlet.java:45)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:939)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

jFace Window class tries to put Display sleep but the SiplyCifeCycle does not support sleep method. Is probably the same problem as mentioned before. But how to solve it this time?

Best regards, Edin
Re: RAP 1.50.M3 Standalone [message #758995 is a reply to message #758972] Fri, 25 November 2011 09:32 Go to previous messageGo to next message
Edin Edin is currently offline Edin Edin
Messages: 101
Registered: January 2010
Senior Member
By the way, calling MessageDialog.openError(getShell(), "Fehler beim Anmelden", e1.getMessage()); causes the same infinite loop...

Greetings Edin
Re: RAP 1.50.M3 Standalone [message #758997 is a reply to message #758972] Fri, 25 November 2011 09:32 Go to previous messageGo to next message
Edin Edin is currently offline Edin Edin
Messages: 101
Registered: January 2010
Senior Member
By the way, calling MessageDialog.openError(getShell(), "Fehler beim Anmelden", e1.getMessage()); causes the same infinite loop...

Greetings Edin
Re: RAP 1.50.M3 Standalone [message #759310 is a reply to message #758972] Mon, 28 November 2011 05:50 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger Herrmann
Messages: 335
Registered: July 2009
Senior Member
with the support for transparent session failover [1] in RAP 1.5 M1, we
implemented an alternative life cycle. This life cycle isn't fully
compatible with SWT. In particular, it hasn't a dedicated UI thread
which is necessary to support blocking dialogs.

You can now, either switch back to the SWT compatible life cycle or go
without blocking (JFace) dialogs.

To switch back to SWT compatibility, specify an ApplicationConfigurator
as explained in the FAQ [2] and call configuration.setOperationMode(
OperationMode.SWT_COMPATIBILITY ) in its configure() method.

Alternatively you can stay with the default operation mode and open
JFace dialogs in a non-blocking way (call Window.setBlockOnOpen( false
)). If you do not rely on having JFace to manage your dialogs, you can
also use plain SWT dialogs together with the
org.eclipse.rwt.widgets.DialogUtil helper class.

HTH
Rüdiger

[1] http://wiki.eclipse.org/RAP/RWT_Cluster
[2]
http://wiki.eclipse.org/RAP/FAQ#How_do_I_develop_an_RWT_standalone_application_with_RAP_.3E.3D_1.5

On 25.11.2011 13:39, dedagic wrote:
> Hello again,
>
> thnx for your help. Now i have another problem. I implemented a class
> called Login based upon jface Dialog class. Im calling it from the
> IEntrPoint#createUI metod:
> public int createUI() {
> Display display = new Display();
> Shell shell = new Shell(display, SWT.ON_TOP);
> shell.setSize(600, 400);
> //shell.setMaximized(true);
> new Login(shell).open();
> return 0;
> }
>
> But now im getting the infinity loop, throwing this exception:
>
> java.lang.UnsupportedOperationException: The SimpleLifeCycle does not
> support Display#sleep().
> at
> org.eclipse.rwt.internal.lifecycle.SimpleLifeCycle.sleep(SimpleLifeCycle.java:152)
>
> at org.eclipse.swt.widgets.Display.sleep(Display.java:1177)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:842)
> at org.eclipse.jface.window.Window.open(Window.java:817)
> at com.acarsoft.smartcomm.HelloWorld.createUI(HelloWorld.java:16)
> at
> org.eclipse.rwt.internal.lifecycle.EntryPointManager.createUI(EntryPointManager.java:90)
>
> at
> org.eclipse.rwt.internal.lifecycle.PrepareUIRoot.createUI(PrepareUIRoot.java:43)
>
> at
> org.eclipse.rwt.internal.lifecycle.PrepareUIRoot.execute(PrepareUIRoot.java:34)
>
> at
> org.eclipse.rwt.internal.lifecycle.PhaseExecutor.execute(PhaseExecutor.java:34)
>
> at
> org.eclipse.rwt.internal.lifecycle.SimpleLifeCycle.execute(SimpleLifeCycle.java:132)
>
> at
> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.runLifeCycle(LifeCycleServiceHandler.java:80)
>
> at
> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.synchronizedService(LifeCycleServiceHandler.java:58)
>
> at
> org.eclipse.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:48)
>
> at
> org.eclipse.rwt.internal.service.ServiceManager$HandlerDispatcher.service(ServiceManager.java:34)
>
> at org.eclipse.rwt.engine.RWTServlet.handleValidRequest(RWTServlet.java:66)
> at org.eclipse.rwt.engine.RWTServlet.doPost(RWTServlet.java:45)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
> at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
> at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
>
> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> at org.mortbay.jetty.Server.handle(Server.java:326)
> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:939)
>
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> at
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
>
> at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
>
>
> jFace Window class tries to put Display sleep but the SiplyCifeCycle
> does not support sleep method. Is probably the same problem as mentioned
> before. But how to solve it this time?
>
> Best regards, Edin

--
Rüdiger Herrmann
http://codeaffine.com
Re: RAP 1.50.M3 Standalone [message #760120 is a reply to message #759310] Thu, 01 December 2011 06:24 Go to previous messageGo to next message
Edin Edin is currently offline Edin Edin
Messages: 101
Registered: January 2010
Senior Member
Hi Rüdiger,

does it mean, with this new lifecycle alternative it will be not possible to block the application to force user to make a decision before continue using the rap application? Is there some other simple way to disable the rest of the application, till we get the user response, or do i have to disable all swt.controls in the application, until i get the answer? Moreover what do i have to consider in a multiuser rap application using this alternative lifecycle, when you say, there is no user specific UIThread? Are there still all features onboard that are user/session specific ?

Best regards, Edin
Re: RAP 1.50.M3 Standalone [message #760121 is a reply to message #759310] Thu, 01 December 2011 06:24 Go to previous messageGo to next message
Edin Edin is currently offline Edin Edin
Messages: 101
Registered: January 2010
Senior Member
Hi Rüdiger,

does it mean, with this new lifecycle alternative it will be not possible to block the application to force user to make a decision before continue using the rap application? Is there some other simple way to disable the rest of the application, till we get the user response, or do i have to disable all swt.controls in the application, until i get the answer? Moreover what do i have to consider in a multiuser rap application using this alternative lifecycle, when you say, there is no user specific UIThread? Are there still all features onboard that are user/session specific ?

Best regards, Edin
Re: RAP 1.50.M3 Standalone [message #760289 is a reply to message #760120] Thu, 01 December 2011 14:12 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger Herrmann
Messages: 335
Registered: July 2009
Senior Member
Edin,

with the alternative (aka JEE compatible) operation mode it is possible
to have modal dialogs, but not blocking dialogs.

If a dialog is modal, the user can only interact with controls in this
dialog. The rest of the application is inaccessible while a modal dialog
is active.
Whereas a blocking dialog halts the program flow, usually until the
dialogs is closed.

To create a modal dialog, just make sure that the Shell which represents
the dialog is created with one of the SWT.XXX_MODAL flags.

Modal behavior need not necessarily apply to the program flow. With the
JEE compatible operation mode, you can create modal dialogs but not
blocking dialogs. To continue the program flow after the dialogs was
closed, you'll have to add a close-listener and continue the program
flow from there. For SWT dialogs, we provide the DialogUtil helper class
to assist with this task.

Rest assured that the JEE compatible operation mode has no influence on
the session behavior. All multi-user/multi-session features stay the
same, whichever operation mode you choose.

Does that answer your questions?

Regards,
Rüdiger

On 01.12.2011 12:24, dedagic wrote:
> Hi Rüdiger,
> does it mean, with this new lifecycle alternative it will be not
> possible to block the application to force user to make a decision
> before continue using the rap application? Is there some other simple
> way to disable the rest of the application, till we get the user
> response, or do i have to disable all swt.controls in the application,
> until i get the answer? Moreover what do i have to consider in a
> multiuser rap application using this alternative lifecycle, when you
> say, there is no user specific UIThread? Are there still all features
> onboard that are user/session specific ?
> Best regards, Edin
--
Rüdiger Herrmann
http://codeaffine.com
Re: RAP 1.50.M3 Standalone [message #761269 is a reply to message #760289] Tue, 06 December 2011 03:03 Go to previous messageGo to next message
Edin Edin is currently offline Edin Edin
Messages: 101
Registered: January 2010
Senior Member
Yes thnank you!! by the way, my messages are always added twice in the topic, any idea why?
Re: RAP 1.50.M3 Standalone [message #761272 is a reply to message #760289] Tue, 06 December 2011 03:03 Go to previous messageGo to next message
Edin Edin is currently offline Edin Edin
Messages: 101
Registered: January 2010
Senior Member
Yes thnank you!! by the way, my messages are always added twice in the topic, any idea why?
Re: RAP 1.50.M3 Standalone [message #761604 is a reply to message #761269] Tue, 06 December 2011 13:08 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger Herrmann
Messages: 335
Registered: July 2009
Senior Member
Edin,

the duplicate messages seem to be caused by the forum software. I am
using an NNTP client and it doesn't cause duplicate entries.
Could you file a bugzilla [1] so that the Eclipse.org webmasters can
look into this issue?

TIA,
Rüdiger

[1] https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Community
Choose "Forums andNewsgroup" in the Component field

On 06.12.2011 09:03, dedagic wrote:
> Yes thnank you!! by the way, my messages are always added twice in the
> topic, any idea why?
--
Rüdiger Herrmann
http://codeaffine.com
Re: RAP 1.50.M3 Standalone [message #766346 is a reply to message #761604] Thu, 15 December 2011 10:34 Go to previous messageGo to next message
Edin Edin is currently offline Edin Edin
Messages: 101
Registered: January 2010
Senior Member
Hi again,
sometimes when i gett some Exception thrown, without rap.ui it is show as HTTP Error 500 page and the application is away. Where and should i define my exception handler to avoid showing that 500 error? Instead of that i want to show some messagebox and send a mail to admin about the error. The applicaiton should continue working.

Best regards Edin
Re: RAP 1.50.M3 Standalone [message #767964 is a reply to message #766346] Mon, 19 December 2011 04:41 Go to previous messageGo to next message
Edin Edin is currently offline Edin Edin
Messages: 101
Registered: January 2010
Senior Member
Ok i found out that if an exception is thrown and it is not cacthed it will be at the end handled by jettys ServletHandler handle method, which in my case ends in line 475 of the ServletHandler class: response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,th.getMessage()); And the browser then displays simple HTTP Error 500 with Exception. Is there any central place for standalone RAP version to catch the exceptions before they are handled by jetty? If not, this is going to be a big problem for us, if the customers gets such HTTP Error response and the applications crash. Perhaps is there some workaround about it?

Greetings, Edin
Re: RAP 1.50.M3 Standalone [message #767993 is a reply to message #766346] Mon, 19 December 2011 05:37 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger Herrmann
Messages: 335
Registered: July 2009
Senior Member
Edin,

currently, having a central exception handling depends on the operation
mode.

In the SWT_COMPATIBILITY operation mode, all application code is
executed in Display#readAndDispatch. When you wrap the event loop in a
try-catch block you can handle all exception. Make sure to let
ThreadDeath exceptions pass.
Note that JFace brings its own exception handler for windows and
dialogs. If you want to change it, see Window#setExceptionHandler.

The JEE_COMPATIBILITY mode does not have a way to centrally handle
exceptions yet. Would you mind to file an enhancement request?

HTH
Rüdiger

On 15.12.2011 16:34, dedagic wrote:
> Hi again,
> sometimes when i gett some Exception thrown, without rap.ui it is show
> as HTTP Error 500 page and the application is away. Where and should i
> define my exception handler to avoid showing that 500 error? Instead of
> that i want to show some messagebox and send a mail to admin about the
> error. The applicaiton should continue working.
>
> Best regards Edin
--
Rüdiger Herrmann
http://codeaffine.com
Re: RAP 1.50.M3 Standalone [message #768994 is a reply to message #767993] Wed, 21 December 2011 03:13 Go to previous messageGo to next message
Edin Edin is currently offline Edin Edin
Messages: 101
Registered: January 2010
Senior Member
Hi Rüdiger,
where is the place to make such requests?

Re: RAP 1.50.M3 Standalone [message #768998 is a reply to message #767993] Wed, 21 December 2011 03:13 Go to previous messageGo to next message
Edin Edin is currently offline Edin Edin
Messages: 101
Registered: January 2010
Senior Member
Hi Rüdiger,
where is the place to make such requests? Another Question is how to make a war File for the standalone rap version, because of standard java projects. Till now i used the way of creating product file.

Greetings Edin

[Updated on: Wed, 21 December 2011 03:55]

Report message to a moderator

Re: RAP 1.50.M3 Standalone [message #769028 is a reply to message #768994] Wed, 21 December 2011 04:23 Go to previous message
Ralf Sternberg is currently offline Ralf Sternberg
Messages: 1290
Registered: July 2009
Senior Member

On 12/21/2011 09:13 AM, dedagic wrote:
> Hi Rüdiger, where is the place to make such requests?

http://eclipse.org/rap/bugs/

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:why does the document.getElementById(this._id) return null?
Next Topic:Combining RWT with the Eclipse Workbench
Goto Forum:
  


Current Time: Wed Aug 27 23:25:19 EDT 2014

Powered by FUDForum. Page generated in 0.04543 seconds