Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » SpringFramework & RAP
SpringFramework & RAP [message #549989] Wed, 28 July 2010 12:28 Go to next message
Eclipse UserFriend
Hi,

I have a RCP application I would like to port to RAP.
This application uses SpringFramework for IoC and initialization purposes and communicates with an application server via sockets,
I have wrapped this layer in some plugins.

In RCP works as follows, when the application starts, it instantiates the IoC so that every required class get their values, then it connects via sockets to application server. The application server sends back an ip/port so that the application connects to it.

I put this communication layer in a RAP application, but since in RAP there is only one instance of the application running, it works fine for only one client, but when I try to run another client it tries to use the same instance of the communication layer plugins and doesn't initialize them again creating errors.

Can you help me with this?
Re: SpringFramework & RAP [message #550070 is a reply to message #549989] Wed, 28 July 2010 23:19 Go to previous messageGo to next message
Eclipse UserFriend
Hi, Jesus Luna Quiroga.
I guess the session singleton is that you need http://wiki.eclipse.org/RAP/FAQ#What_is_a_Session_Singleton_ and_how_can_I_implement_one.3F.

Yury.
Re: SpringFramework & RAP [message #550097 is a reply to message #549989] Thu, 29 July 2010 03:10 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I think there are at least two issues:

1. Application start
In RCP you probably use the BundleActivator, in RAP you should use your
IEntryPoint implementation to initialize each session.

2. Bean scope
By default, Spring beans are singletons which is fine for your RCP app
but might not be what you want in RAP. You could either try to switch to
"Prototype" or provide your own "session" scope that stores the beans in
a RAP session.

Regards,
Stefan.
Re: SpringFramework & RAP [message #550352 is a reply to message #550097] Fri, 30 July 2010 00:00 Go to previous messageGo to next message
Eclipse UserFriend
@Stefan: FYI IEntryPoint is no longer needed. Since RAP 1.3 you can also
start from a regular RCP IApplication. Just enter the application id
instead of the entry point id in the launcher. This should be executed
once for each session.

Kind regards,
Elias.

On 7/29/2010 00:10, Stefan Roeck wrote:
> Hi,
>
> I think there are at least two issues:
>
> 1. Application start
> In RCP you probably use the BundleActivator, in RAP you should use your
> IEntryPoint implementation to initialize each session.
>
> 2. Bean scope
> By default, Spring beans are singletons which is fine for your RCP app
> but might not be what you want in RAP. You could either try to switch to
> "Prototype" or provide your own "session" scope that stores the beans in
> a RAP session.
>
> Regards,
> Stefan.
Re: SpringFramework & RAP [message #550370 is a reply to message #550352] Fri, 30 July 2010 02:45 Go to previous messageGo to next message
Eclipse UserFriend
Elias, thanks for the clarification. What I wanted to says is that using
the BundleActivator may not be a good idea.

Regards,
Stefan.
Re: SpringFramework & RAP [message #554758 is a reply to message #550097] Tue, 24 August 2010 07:06 Go to previous message
Eclipse UserFriend
<font size=2 face="sans-serif">Some time ago (might be a year or more
already *duh*) I wrote how we integrated Spring with RAP, using session+request-scoped
beans like in typical Spring-Web-Applications.</font>
<br><font size=2 face="sans-serif">Search this newsgroup for Spring I guess
to find the topics.</font>
<br>
<br><font size=2 face="sans-serif">Regards</font>
<br><font size=2 face="sans-serif">Stefan</font>
Previous Topic:DND feedback and effects
Next Topic:Custom widget resource loading
Goto Forum:
  


Current Time: Sat Jul 12 18:41:49 EDT 2025

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

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

Back to the top