Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Fake OSGi in enterprise applications?
Fake OSGi in enterprise applications? [message #79477] Mon, 18 December 2006 18:04 Go to next message
Erkki Lindpere is currently offline Erkki LindpereFriend
Messages: 90
Registered: July 2009
Member
Running Equinox in a servlet container is pretty cool, and it's great
that there are people working on bringing OSGi to Java EE, but I'm
wondering what would it take to use some half-baked, fake OSGi concepts
in Web/EJB applications without all those bundle lifecycle concerns?

I find myself reinventing a generic ServiceLocator implementation for a
web application architecture to decouple what technology is used to
access services, but it would be interesting to use OSGi services or
extension points instead, while not worrying about the "services may
come & go at any time" way of things.

I know BIRT has done something to use extension points inside web apps,
with some kind of fake Eclipse runtime. Has anyone tried to generalize
that and maybe move it out of BIRT?

I don't see all of our web apps needing full OSGi dynamics any day soon,
but it would be interesting to use only some concepts of OSGi / Equinox.

Erkki Lindpere
Re: Fake OSGi in enterprise applications? [message #79492 is a reply to message #79477] Mon, 18 December 2006 21:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

IMNSHO the bundle aspect is one of the more important parts, not least :-) What problems do you see with all those bundle life-cycle concerns?

Alex.
Re: Fake OSGi in enterprise applications? [message #79567 is a reply to message #79492] Tue, 19 December 2006 17:42 Go to previous messageGo to next message
Erkki Lindpere is currently offline Erkki LindpereFriend
Messages: 90
Registered: July 2009
Member
Alex Blewitt wrote:
> IMNSHO the bundle aspect is one of the more important parts, not least :-) What problems do you see with all those bundle life-cycle concerns?
>
> Alex.

I agree that the bundle aspect is one of the most important in the long
run, but I don't think it's usable in a production environment right
now. Also, we have a lot of applications installed in our cluster and
have a policy that each applications should preferably come as a single
EAR, I don't think admins would be happy with dynamically updateable
bundles and also configuration that wouldn't survive a restart (or would
it? We are using Weblogic 8.1, 9.2 soon).

Even if they would buy into the dynamically updateable bundles stuff,
they wouldn't take something that isn't well supported and documented.

Erkki
Re: Fake OSGi in enterprise applications? [message #79611 is a reply to message #79477] Tue, 19 December 2006 18:23 Go to previous messageGo to next message
Simon Kaegi is currently offline Simon KaegiFriend
Messages: 22
Registered: July 2009
Junior Member
Hi Erkki,

I think if you're just looking to use the extension registry there's been
considerable work to decouple it from OSGi. You might be able to use it in
the context of a web application without bringing along bundles etc. To be
honest I've never tried but it should work and it definitely worth a look.

> I know BIRT has done something to use extension points inside web apps,
> with some kind of fake Eclipse runtime. Has anyone tried to generalize
> that and maybe move it out of BIRT?
BIRT uses code based on an early snapshot of the Servletbridge's
FrameworkLauncher which launches Equinox, so they're running a "real"
Eclipse runtime not just a fake.

-Simon
Re: Fake OSGi in enterprise applications? [message #79655 is a reply to message #79567] Tue, 19 December 2006 23:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

> I agree that the bundle aspect is one of the most important in the long
> run, but I don't think it's usable in a production environment right
> now.

Each to their own, I guess. I personally see it as production ready.

> Also, we have a lot of applications installed in our cluster and
> have a policy that each applications should preferably come as a single
> EAR, I don't think admins would be happy with dynamically updateable
> bundles and also configuration that wouldn't survive a restart (or would
> it? We are using Weblogic 8.1, 9.2 soon).

There's no intrinsic difference between a dynamically restartable EAR and a dynamically restartable bundle. They both work in the same way, which is to support classloaders per archive (although the EAR approach often launches a separate Java process anyway, depending on J2EE server). It's just a different name/extension.

The bigger problem, perhaps, is that the current J2EE servers (including Weblogic/WebSphere) just have command-and-control systems for running EARs, so the admin tools are very EAR focussed. Of course, that doesn't prevent you running OSGi inside the EAR if you wanted; except that each EAR would be bundled with its own separate OSGi engine. That would give you the benefit of allowing it to work both in an EAR and also in other configurations at a later stage.

Don't quite know what you're referring to with the configuration data, so can't answer that one.

Alex.
Re: Fake OSGi in enterprise applications? [message #79670 is a reply to message #79655] Wed, 20 December 2006 08:20 Go to previous messageGo to next message
Erkki Lindpere is currently offline Erkki LindpereFriend
Messages: 90
Registered: July 2009
Member
> Each to their own, I guess. I personally see it as production ready.

Actually, if BIRT has been using Equinox in the webapp, I might reconsider
my opinion about production readyness. The last time I looked at the BIRT
code it seemed to me that it was using it's own concepts of Platform etc.
and it's own plugin registry.

> Don't quite know what you're referring to with the configuration data, so
> can't answer that one.

What I meant was that if bundles in the application get updated during
runtime, and then for some reason the server has to be restarted, normally,
I think the application would be deployed from the EAR again, forgetting any
updates or OSGi configuration changes that were done in the meantime. Maybe
this can be avoided, though -- I must admit I'm not familiar with all the
specs/possibilities in Weblogic or J2EE servers in general.

Erkki
Re: Fake OSGi in enterprise applications? [message #79715 is a reply to message #79670] Thu, 21 December 2006 04:14 Go to previous message
Eclipse UserFriend
Originally posted by: jeff_mcaffer.REMOVE.ca.ibm.com

Erkki Lindpere wrote:
>> Each to their own, I guess. I personally see it as production ready.
>
> Actually, if BIRT has been using Equinox in the webapp, I might reconsider
> my opinion about production readyness. The last time I looked at the BIRT
> code it seemed to me that it was using it's own concepts of Platform etc.
> and it's own plugin registry.

Depends on what you are talking about but, for example, the new version
of IBM Websphere App Server is based on Equinox. They are not
themselves using the servlet bridge etc since they are implementing the
app server. I do know of a few very significant projects using the
servlet bridge and related technology.

>> Don't quite know what you're referring to with the configuration data, so
>> can't answer that one.
>
> What I meant was that if bundles in the application get updated during
> runtime, and then for some reason the server has to be restarted, normally,
> I think the application would be deployed from the EAR again, forgetting any
> updates or OSGi configuration changes that were done in the meantime. Maybe
> this can be avoided, though -- I must admit I'm not familiar with all the
> specs/possibilities in Weblogic or J2EE servers in general.

Not sure what answer you want here. The short answer is that nothing is
random. If you want the configuration to stay the same from run to run,
don't update it. If you want it to get the latest stuff that is there,
then update the configuration. This should all be in your control.

Jeff
Previous Topic:Init-Params
Next Topic:How to remove "persistentlyStarted" flag?? I don't want a bundle to be resumed after resta
Goto Forum:
  


Current Time: Fri Apr 19 06:57:58 GMT 2024

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

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

Back to the top