Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Calling RAP Code From The Outside
Calling RAP Code From The Outside [message #1061952] Wed, 05 June 2013 02:35 Go to next message
Eclipse UserFriend
Hi everyone!

I have a small two-tier application for managing stuff, and I want to implement some kind of job that runs every night (or every weekend, it doesn't really matter). My distant dream would be to call an OSGi service via URL (or any other way) to get everything running, but I'm open to suggestions.

Some details: I'm running a RAP 2.0 WAR only (e.g. no EAR), JPA is done via Gemini / EclipseLink, but I'm strictly implementing against the spec, not the implementation. Consequently, I don't want to code against a specific OSGi implementation or server, I'm using JBoss AS7 right now but I want to evaluate other possibilities later on.

So what are my options on calling RAP code from the outside world?

Thanks in advance,

S. Schulz
Re: Calling RAP Code From The Outside [message #1062082 is a reply to message #1061952] Wed, 05 June 2013 15:05 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I would assume you are not wanting to call actual RAP API from your scheduled task, but rather just code that resides in the same application. It sounds like what you are looking for is something like this[1] which lets you publish OSGi services via REST.

[1] https://github.com/hstaudacher/osgi-jax-rs-connector

Hope that helps,

Cole
Re: Calling RAP Code From The Outside [message #1062114 is a reply to message #1062082] Thu, 06 June 2013 01:43 Go to previous messageGo to next message
Eclipse UserFriend
Yes, you are right, I don't want to call the RAP API, I just wanted to make sure that I will need the RAP context (e.g. the OSGi services) of the application, so calling Enterprise Beans of a specialized job-EAR is out of the question.

Thanks for the link, I'll take a look. But if someone has a different option, feel free to share it!
Re: Calling RAP Code From The Outside [message #1062848 is a reply to message #1061952] Tue, 11 June 2013 01:58 Go to previous messageGo to next message
Eclipse UserFriend
Just a thought: Would it be possible to simply add a second entry point and call it with some kind of admin credentials, and let it call the necessary methods?
Re: Calling RAP Code From The Outside [message #1063444 is a reply to message #1062848] Thu, 13 June 2013 04:13 Go to previous messageGo to next message
Eclipse UserFriend
> Just a thought: Would it be possible to simply add a second entry point
> and call it with some kind of admin credentials, and let it call the
> necessary methods?

Of course, you can add an entrypoint and provide some kind of admin UI.
But if you don't need a UI, a plain servlet is sufficient to access OSGi
services or EJBs. If you need access to the application context, you
could use a service handler [1].

Regards,
Ralf

[1]
http://download.eclipse.org/rt/rap/doc/2.1/guide/reference/api/org/eclipse/rap/rwt/service/ServiceHandler.html

--
Ralf Sternberg

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Calling RAP Code From The Outside [message #1063973 is a reply to message #1061952] Mon, 17 June 2013 01:18 Go to previous message
Eclipse UserFriend
Thanks Ralf, this suits my needs perfectly.
Previous Topic:What is the correct to set a CSS selector on a subclass
Next Topic:E4/RAP Integration
Goto Forum:
  


Current Time: Wed Jul 23 16:46:49 EDT 2025

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

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

Back to the top