Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Setup for Standalone RAP with Spring
Setup for Standalone RAP with Spring [message #1145012] Sat, 19 October 2013 07:27 Go to next message
Stefan Klaus is currently offline Stefan KlausFriend
Messages: 21
Registered: February 2011
Junior Member
Hi there!

I want to setup a standalone RAP Application as described in the developer guide and connect it to a spring service layer.
Have you any ideas or experience how such a setup could work. My idea was to have in the end something like OSGi-Services Activator.getDefault().getService(Class<ServiceType> clazz) with spring managed beans.

What i have found what looks like what i want was the vaading spring integration https://vaadin.com/wiki/-/wiki/Main/Spring%20Integration but its not up to date.

Would be great if anybody has an idea for such an application setup.
Stefan
Re: Setup for Standalone RAP with Spring [message #1148834 is a reply to message #1145012] Mon, 21 October 2013 19:33 Go to previous message
Stefan Klaus is currently offline Stefan KlausFriend
Messages: 21
Registered: February 2011
Junior Member
I found an solution which works for me. As described in the Spring Vaadin Integration you could easily use this code to get a spring managed bean (Configuration in web.xml via org.springframework.web.context.ContextLoaderListener):

ServletContext servletContext = RWT.getUISession().getHttpSession()
				.getServletContext();
		WebApplicationContext context = WebApplicationContextUtils
				.getRequiredWebApplicationContext(servletContext);

		TestService testService = (TestService) context.getBean("testService");


I had to fight with the RWT Launcher as it only takes the web.xml from the WEB-INF Folder and ignores anything else in there. As my applicationContext.xml also was in the WEB-INF folder, the spring context was never loaded with RWT Launcher.

Now i am using the wtp tools to deploy to a tomcat and everything works fine.
Previous Topic:Label text is initially truncated
Next Topic:e4 and RAP? Current status?
Goto Forum:
  


Current Time: Sat Apr 27 01:33:43 GMT 2024

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

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

Back to the top