Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Registration of ServiceHandlers
Registration of ServiceHandlers [message #50844] Mon, 08 October 2007 09:59 Go to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
When are the servicehandler.xml files are parsed? When the application is
started or with the start-up of the first session?

Regards,
Stefan.
Re: Registration of ServiceHandlers [message #50872 is a reply to message #50844] Mon, 08 October 2007 11:39 Go to previous messageGo to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
I found some lines of code in the class ServiceManager where (I think) the
parsing should take place. However, these lines in a static initializer are
never executed because ResourceManagerImpl.getInstance() returns null.

If nobody complains, I will submit a bug for this :-)


"Stefan R
Re: Registration of ServiceHandlers [message #50900 is a reply to message #50872] Mon, 08 October 2007 12:26 Go to previous messageGo to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=205716


"Stefan R
Re: Registration of ServiceHandlers [message #52252 is a reply to message #50900] Wed, 17 October 2007 10:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

the servicehandler xml files are not parsed due to the classloader
architecture of the OSGi framework. The files are simply not found. Because
of this the servicehandler files are only useful in standalone RWT/W4Toolkit
applications. Currently servicehandlers can only be added programmatically
in RAP applications. To add servicehandlers declaratively in RAP we have to
introduce an extension point. I will add this info to the bug entry.

Ciao
Frank

"Stefan R
Re: Registration of ServiceHandlers [message #52811 is a reply to message #52252] Thu, 18 October 2007 05:59 Go to previous messageGo to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
Hi Frank,

when do you think should the registration be triggered by code? I once tried
to do this in a PluginActivator-class but this seems to be to early as some
needed internal objects have not been initialized yet (Exception from the
deep...).

However, I want to call the registration on application startup and even
from plugins which have no ApplicationEntryPoint on their own...
Any suggestion?

Regards,
Stefan.

"Frank Appel" <fappel@innoopract.com> schrieb im Newsbeitrag
news:ff4opj$pia$1@build.eclipse.org...
> Hi,
>
> the servicehandler xml files are not parsed due to the classloader
> architecture of the OSGi framework. The files are simply not found.
> Because of this the servicehandler files are only useful in standalone
> RWT/W4Toolkit applications. Currently servicehandlers can only be added
> programmatically in RAP applications. To add servicehandlers declaratively
> in RAP we have to introduce an extension point. I will add this info to
> the bug entry.
>
> Ciao
> Frank
>
> "Stefan R
Re: Registration of ServiceHandlers [message #52865 is a reply to message #52811] Thu, 18 October 2007 06:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

from looking at the code I don't know why that Activator approach didn't
work, since there is only an access to a class variable holding a map. Maybe
the RWT bundle wasn't activated so that the class could not be found.
Anyway, one trick could be to use a one-time phaselistener if it is
sufficient to have the additional service handler running after the first
request of any client has taken place.

But actually I don't think that this a good solution for concurrency
reasons. As an alternative you could register an extra servlet at the http
service of OSGi. That's not much different to the service handler approach
of RWT. Instead working with request-parameters you would have to address a
different servlet with your requests.

Hope that helps.

Ciao
Frank


"Stefan R
Re: Registration of ServiceHandlers [message #55844 is a reply to message #52865] Fri, 26 October 2007 13:22 Go to previous message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
Frank, you're right, the Activator approachs works. I tried this once
some weeks ago and got an exception, which doesn't happen by now.

The only problem is, that some plugins are lazy loaded when one class of
them is accessed the first time. Is there a way to specify, that all
available plugins should be loaded at application startup (and so, all
activators are called)?

Regards,
Stefan.


Frank Appel schrieb:
> Hi,
>
> from looking at the code I don't know why that Activator approach didn't
> work, since there is only an access to a class variable holding a map. Maybe
> the RWT bundle wasn't activated so that the class could not be found.
> Anyway, one trick could be to use a one-time phaselistener if it is
> sufficient to have the additional service handler running after the first
> request of any client has taken place.
>
> But actually I don't think that this a good solution for concurrency
> reasons. As an alternative you could register an extra servlet at the http
> service of OSGi. That's not much different to the service handler approach
> of RWT. Instead working with request-parameters you would have to address a
> different servlet with your requests.
>
> Hope that helps.
>
> Ciao
> Frank
>
>
Previous Topic:Change the Alias-Path
Next Topic:Image on server used by js lib
Goto Forum:
  


Current Time: Fri Apr 26 11:54:29 GMT 2024

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

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

Back to the top