Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Pluggable Skins
Pluggable Skins [message #103293] Fri, 04 January 2008 09:27 Go to next message
Eclipse UserFriend
Originally posted by: benno.luthiger.id.ethz.ch

Hello all

I try to implement a servlet application with pluggable skins. Writing a
bundle-based server application using Equinox seems the right way to realize
this plan. The idea was that I have a bundle containing the business model
and the application logic and one or more bundles containing the 'skins',
i.e. the resources that define the style of the views displayed (images, css
files etc). I thought the best way to realize this is to implement these
skins as extensions of the "org.eclipse.equinox.http.registry.resources"
extension point. My scenario was that bundles providing skins for my
application have to implement this extension point where the alias attribute
is "/++resources++". My application has an active skin. Each request of
"/++resources++" is routed to this bundle's resources directory. All other
skin bundles are stopped. If I switch to another skin bundle, I stop the
previous skin bundle and start the newly selected skin bundle, which then
becomes the active skin. Every future request of "/++resources++" then
accesses the resources provided by the new skin bundle. This way, I can
dynamically change the outlook of my application.

However, this scenario does not work. The reason is that the
"org.eclipse.equinox.http.registry" bundle tracks all
"org.eclipse.equinox.http.registry.resources" extensions without
consideration of their bundle status, i.e. whether the bundle is active or
only resolved (i.e. ready to be activated). Moreover, there is only one
extension registered for the same alias attribute. If I prescribe that every
skin has to declare the resources with the alias "/++resources++", only the
first such extension is registered, every other such extension is ignored.
Therefore, I have no possibilities to dynamically control the application's
appearance by activating and deactivating skin bundles.

Is there another way to implement pluggable skins?

Can "org.eclipse.equinox.http.registry" be improved to make such scenarios
possible?

Benno
Re: Pluggable Skins [message #103436 is a reply to message #103293] Fri, 04 January 2008 22:10 Go to previous messageGo to next message
Simon Kaegi is currently offline Simon KaegiFriend
Messages: 381
Registered: July 2009
Senior Member
Hi Benno,

It sounds like you need lifecycle control and unfortuantely registry
extensions are tied to the RESOLVED state.
When you want to have resources registered with START and STOP bundle states
I would write an Activator and directly use the HttpService instead of the
extensions.

HTH
-Simon

"Luthiger" <benno.luthiger@id.ethz.ch> wrote in message
news:flku6b$5qc$1@build.eclipse.org...
> Hello all
>
> I try to implement a servlet application with pluggable skins. Writing a
> bundle-based server application using Equinox seems the right way to
> realize this plan. The idea was that I have a bundle containing the
> business model and the application logic and one or more bundles
> containing the 'skins', i.e. the resources that define the style of the
> views displayed (images, css files etc). I thought the best way to realize
> this is to implement these skins as extensions of the
> "org.eclipse.equinox.http.registry.resources" extension point. My scenario
> was that bundles providing skins for my application have to implement this
> extension point where the alias attribute is "/++resources++". My
> application has an active skin. Each request of "/++resources++" is routed
> to this bundle's resources directory. All other skin bundles are stopped.
> If I switch to another skin bundle, I stop the previous skin bundle and
> start the newly selected skin bundle, which then becomes the active skin.
> Every future request of "/++resources++" then accesses the resources
> provided by the new skin bundle. This way, I can dynamically change the
> outlook of my application.
>
> However, this scenario does not work. The reason is that the
> "org.eclipse.equinox.http.registry" bundle tracks all
> "org.eclipse.equinox.http.registry.resources" extensions without
> consideration of their bundle status, i.e. whether the bundle is active or
> only resolved (i.e. ready to be activated). Moreover, there is only one
> extension registered for the same alias attribute. If I prescribe that
> every skin has to declare the resources with the alias "/++resources++",
> only the first such extension is registered, every other such extension is
> ignored. Therefore, I have no possibilities to dynamically control the
> application's appearance by activating and deactivating skin bundles.
>
> Is there another way to implement pluggable skins?
>
> Can "org.eclipse.equinox.http.registry" be improved to make such scenarios
> possible?
>
> Benno
>
>
Re: Pluggable Skins [message #103515 is a reply to message #103436] Mon, 07 January 2008 11:56 Go to previous message
Eclipse UserFriend
Originally posted by: benno.luthiger.id.ethz.ch

Ah, good tip, I'll try this.

Thanks for the reply
Benno

"Simon Kaegi" <simon_kaegi@ca.ibm.com> wrote in message
news:flmas9$7vq$1@build.eclipse.org...
> Hi Benno,
>
> It sounds like you need lifecycle control and unfortuantely registry
> extensions are tied to the RESOLVED state.
> When you want to have resources registered with START and STOP bundle
> states I would write an Activator and directly use the HttpService instead
> of the extensions.
>
> HTH
> -Simon
>
> "Luthiger" <benno.luthiger@id.ethz.ch> wrote in message
> news:flku6b$5qc$1@build.eclipse.org...
>> Hello all
>>
>> I try to implement a servlet application with pluggable skins. Writing a
>> bundle-based server application using Equinox seems the right way to
>> realize this plan. The idea was that I have a bundle containing the
>> business model and the application logic and one or more bundles
>> containing the 'skins', i.e. the resources that define the style of the
>> views displayed (images, css files etc). I thought the best way to
>> realize this is to implement these skins as extensions of the
>> "org.eclipse.equinox.http.registry.resources" extension point. My
>> scenario was that bundles providing skins for my application have to
>> implement this extension point where the alias attribute is
>> "/++resources++". My application has an active skin. Each request of
>> "/++resources++" is routed to this bundle's resources directory. All
>> other skin bundles are stopped. If I switch to another skin bundle, I
>> stop the previous skin bundle and start the newly selected skin bundle,
>> which then becomes the active skin. Every future request of
>> "/++resources++" then accesses the resources provided by the new skin
>> bundle. This way, I can dynamically change the outlook of my application.
>>
>> However, this scenario does not work. The reason is that the
>> "org.eclipse.equinox.http.registry" bundle tracks all
>> "org.eclipse.equinox.http.registry.resources" extensions without
>> consideration of their bundle status, i.e. whether the bundle is active
>> or only resolved (i.e. ready to be activated). Moreover, there is only
>> one extension registered for the same alias attribute. If I prescribe
>> that every skin has to declare the resources with the alias
>> "/++resources++", only the first such extension is registered, every
>> other such extension is ignored. Therefore, I have no possibilities to
>> dynamically control the application's appearance by activating and
>> deactivating skin bundles.
>>
>> Is there another way to implement pluggable skins?
>>
>> Can "org.eclipse.equinox.http.registry" be improved to make such
>> scenarios possible?
>>
>> Benno
>>
>>
>
>
Previous Topic:Is
Next Topic:Bundle-classpath and Eclipse question
Goto Forum:
  


Current Time: Thu Apr 18 17:00:38 GMT 2024

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

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

Back to the top