Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » How to know when virgo finished loading all plugins
How to know when virgo finished loading all plugins [message #1017270] Mon, 11 March 2013 12:11 Go to next message
Ana Mising name is currently offline Ana Mising nameFriend
Messages: 4
Registered: March 2010
Junior Member

I need to execute some logic when my virgo server is up, and the web access is enabled.
What is the correct way to hook with the started event?
Re: How to know when virgo finished loading all plugins [message #1018800 is a reply to message #1017270] Thu, 14 March 2013 13:41 Go to previous messageGo to next message
Charlie Mordant is currently offline Charlie MordantFriend
Messages: 88
Registered: July 2010
Member

Hi,

What about a service tracker?
Re: How to know when virgo finished loading all plugins [message #1018823 is a reply to message #1018800] Thu, 14 March 2013 14:34 Go to previous messageGo to next message
Ana Mising name is currently offline Ana Mising nameFriend
Messages: 4
Registered: March 2010
Junior Member
Thanks for the idea,

Service tracking tracks some specific service, but as i understand the web access is disable until all plugins finish deployment, the number of plugins and their mixture can vary in our case, and i don't really know which one will be the last one.
Re: How to know when virgo finished loading all plugins [message #1018830 is a reply to message #1018823] Thu, 14 March 2013 14:45 Go to previous messageGo to next message
Charlie Mordant is currently offline Charlie MordantFriend
Messages: 88
Registered: July 2010
Member

I think that if you put your tracked service and your webapp in a scoped plan (with service starting at last), it will do the trick.
Re: How to know when virgo finished loading all plugins [message #1061261 is a reply to message #1017270] Thu, 30 May 2013 20:37 Go to previous message
Sandile Keswa is currently offline Sandile KeswaFriend
Messages: 3
Registered: May 2013
Junior Member
You can use the org.eclipse.virgo.kernel.install.artifact.InstallArtifact class to subscribe to virgo deployment events. Through this event handling, you could have logic executed when certain artifacts have been installed.

You register for start and install events by declaring an artifact lifecycle handler bean (extending org.eclipse.virgo.kernel.install.artifact.InstallArtifactLifecycleListenerSupport) in your spring context. Add them to your spring context (as follows):
<bean id="installArtifactLifecycleHandler" class="path.to.your.ArtifactLifecycleHandler" />

The org.eclipse.virgo.kernel.install.artifact.InstallArtifactLifecycleListenerSupport class has onStarted(...), onInstalled(...) event handler methods etc.

Good Luck!
Previous Topic:Virgo does not start up on Windows 2008 64 bit Virtual machine- Timeout exception thrown
Next Topic:userregionfactory failed to start (only after reboot).
Goto Forum:
  


Current Time: Thu Apr 25 01:57:09 GMT 2024

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

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

Back to the top