Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Requesting to be started bundle list to virgo
Requesting to be started bundle list to virgo [message #1691994] Sat, 11 April 2015 16:44 Go to next message
Mathilde Ffrench is currently offline Mathilde FfrenchFriend
Messages: 24
Registered: July 2015
Junior Member
Hello all,

I would like to know if there is a way to request the bundle list which will be started in the virgo startup phase in real time.

For example I've bundle a,b,c,d. After a is started, a wants to know which bundle will be started after it (so b,c,d at first call and then c,d and then nothing).

Is that possible ?

Thank you
Re: Requesting to be started bundle list to virgo [message #1692569 is a reply to message #1691994] Thu, 16 April 2015 14:26 Go to previous messageGo to next message
Florian Waibel is currently offline Florian WaibelFriend
Messages: 160
Registered: June 2010
Senior Member
Hi,

I don't want to let you down, but I'm not able to come up with a solution so far.
Are those bundles running in the user region?

May I ask why a bundle would like to know which other bundles haven't been started yet?

Regards,
florian

[Updated on: Thu, 16 April 2015 14:26]

Report message to a moderator

Re: Requesting to be started bundle list to virgo [message #1692578 is a reply to message #1692569] Thu, 16 April 2015 15:37 Go to previous messageGo to next message
GianMaria Romanato is currently offline GianMaria RomanatoFriend
Messages: 72
Registered: July 2009
Member
@Mathilde Maybe something as simple as a BundleListener?

@Florian I remember Glyn posting to this newsgroup that there was a service in Virgo that could be obtained via an OSGi registry lookup and which allowed client code to observe deployment events. Glyn was suggesting that service to a forum user who had an application which wanted to be aware of the successful deployment and activation of the whole plan/par content.


Developing for Virgo using PDE: http://bit.ly/1w0tTit
Global JNDI in Virgo: http://bit.ly/1to42mn
Hyperic to monitor Virgo: http://bit.ly/W1Fst9
Profile Virgo with JProfiler http://bit.ly/1FBLGCw
Re: Requesting to be started bundle list to virgo [message #1692989 is a reply to message #1692569] Tue, 21 April 2015 06:30 Go to previous messageGo to next message
Mathilde Ffrench is currently offline Mathilde FfrenchFriend
Messages: 24
Registered: July 2015
Junior Member
Hi,

to answer your question Florian :

Firs you need to know I have implemented some hibernate functionality which allow me to extend a JPA domain thanks OSGI bundle (https://github.com/echinopsii/net.echinopsii.3rdparty.hibernate-orm).

Let's say bundle A is owning the main JPA domain. I have bundles B and bundles C which are extending definition of this JPA domain (IE : bundle B and bundle C are adding new entities to JPA domain owned by A).

Currently to extend the JPA domain of bundle A, I need to stop the main JPA domain, extend the main JPA domain entities with bundle B or C entities and then restart the main JPA domain. This is not really sexy but I think this is the safier way to extend hibernate JPA domain with my current hibernate knowledge.

So with that solution we clearly have a main JPA domain inititialisation sequence where the JPA main domain may be not available until it is fully defined (ie : I need to wait all the bundle adding entities to this domain are started)...

That's why I was thinking that if bundle A is abble to know if bundle B and C are started it can say it's initialization sequence is done and the JPA main domain if fully usable ...

Cheers,

Mathilde
Re: Requesting to be started bundle list to virgo [message #1692990 is a reply to message #1692578] Tue, 21 April 2015 06:31 Go to previous messageGo to next message
Mathilde Ffrench is currently offline Mathilde FfrenchFriend
Messages: 24
Registered: July 2015
Junior Member
@GianMaria : thank you for the suggestion I will look into this. Smile
Re: Requesting to be started bundle list to virgo [message #1693000 is a reply to message #1692990] Tue, 21 April 2015 07:43 Go to previous message
GianMaria Romanato is currently offline GianMaria RomanatoFriend
Messages: 72
Registered: July 2009
Member
Mathilde,

I don't know Hibernate enough nor the github project you linked to give you advice about how to use Hibernate for your needs.

However, based on your comments regarding bundle A,B,C and I think you can solve this with a SynchronousBundleListener or a BundleTracker.

You could have a custom MANIFEST header, say "Extend-Domain:" and declare it in the MANIFEST.MF of B and C. You can than use a bundle listener or bundle tracker that is called by the framework OSGi every time a bundle is started. When invoked, the bundle tracker checks the bundle headers for the presence of the "Extend-Domain" header and if found acts accordingly:

String value = aBundle.getHeaders().get("Extend-Domain")

This is indeed what is normally referred to as the OSGi Extender pattern. http://toedter.com/2010/07/05/osgi-4-2-extender-pattern-and-bundletracker/


Developing for Virgo using PDE: http://bit.ly/1w0tTit
Global JNDI in Virgo: http://bit.ly/1to42mn
Hyperic to monitor Virgo: http://bit.ly/W1Fst9
Profile Virgo with JProfiler http://bit.ly/1FBLGCw
Previous Topic:java.io.tmpdir points to an unexsiting folder
Next Topic:Virgo Tomcat 3.6.3 - Websocket JSR 356 - 404 error?
Goto Forum:
  


Current Time: Sun Sep 23 12:28:01 GMT 2018

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

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

Back to the top