Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » SpringFramework & RAP
SpringFramework & RAP [message #549989] Wed, 28 July 2010 16:28 Go to next message
Jesus   Luna Quiroga is currently offline Jesus Luna QuirogaFriend
Messages: 67
Registered: July 2009
Location: Mexico
Member

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] Thu, 29 July 2010 03:19 Go to previous messageGo to next message
Yury Mising name is currently offline Yury Mising nameFriend
Messages: 95
Registered: May 2010
Location: Russia
Member
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 07:10 Go to previous messageGo to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
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 04:00 Go to previous messageGo to next message
Elias Volanakis is currently offline Elias VolanakisFriend
Messages: 43
Registered: July 2009
Member
@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 06:45 Go to previous messageGo to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
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 11:06 Go to previous message
Stefan Hansel is currently offline Stefan HanselFriend
Messages: 103
Registered: July 2009
Senior Member
<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: Thu Apr 25 09:38:16 GMT 2024

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

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

Back to the top