Sahoo,

  Thanks, I entered Issue #14004.

  As for why the ordering was needed, it seems we were running into a couple of 
different problems during framework restarts, some of which were probably 
unrelated to bundle dependency.  It's quite possible that the problems were 
caused by other problems, or could be solved in another manner.  I will put 
together a comprehensive description and start a thread on glassfish shortly- 
it might be a few days as we are up against a deadline for some testing.

Thanks,
 Larry


> -----Original Message-----
> From: Sahoo [mailto:[email protected]]
> Sent: Thursday, October 14, 2010 11:26 PM
> To: [email protected]
> Cc: Larry Touve
> Subject: Re: Start Level lost on framework restart
> 
> Larry,
> 
> Your observation is correct, but description is not. It is not that
> bundle cache is managed on a per bundle basis, it's that GlassFish
> uninstalls any bundle deployed using "asadmin deploy --type=osgi" when
> server goes down and reinstalls them upon restart. Don't ask me why it
> is done that way, but I can change it to do the right thing. File a bug
> against GlassFish please. It would have been enough to just stop and
> start. "asadmin deploy --type=osgi" is sort of half cooked in GlassFish,
> so I encourage people to use FileInstall or OSGi Web Console to deploy
> bundles.
> 
> Since the bundles get uninstalled, next time they get installed, their
> start level is reset to 1, which is the initial start level of newly
> installed bundles in GlassFish. On the contrary, if you deploy your
> bundles to one of the FileInstalled monitored directories such as
> domain1/autodeploy/bundles/, you won't face any such issues. This should
> explain your observed behavior.
> 
> Having said that, I do not understand what is the ordering issue you are
> trying to solve and how the current implementation impacts your
> application bundles. Next time when the server starts, it should install
> and start them in the same order that you had earlier deployed. Is that
> not happening? Can you elaborate please? I do feel this issue is more
> appropriate to be discussed in GlassFish forum. Move it to GlassFish
> forum where more people may be interested in this discussion.
> 
> Thanks,
> Sahoo
> 
> On Friday 15 October 2010 05:56 AM, Larry Touve wrote:
> > Some more information...
> >
> > When you install a bundle using 'asadmin deploy...', the bundle cache
> is removed when stopping the framework.  This seems contrary to normal
> practice.  How can you persist anything this way?  When you install by
> copying to autodeploy/bundles, the bundle cache is persisted between
> framework restarts.
> >
> > We were originally deploying by using autodeply/bundles, but changed
> over to using asadmin so we could deploy easily to a remote server.  I
> will do some more testing with the StartupManager using autodeploy.
> >
> > Larry
> >
> >
> >
> >> Subject: Start Level lost on framework restart
> >>
> >> I've been trying to figure out how to manage the startup of our
> >> application bundles (~25).  There are some dependencies between
> bundles
> >> and we can get them running by deploying them (using asadmin -
> type=osgi)
> >> in the order we want.  Everything runs fine, except when we restart
> the
> >> framework (we're using Glassfish 3.0.1 which has Felix 2.0.2).  It
> >> doesn't seem to happen all the time, but occasionally we get severe
> >> startup errors.
> >>
> >>   I attempted to install a startup manager, by using the StartLevel
> >> service and a BundleListener.  When one of my bundles was installed,
> I
> >> would set the startlevel.  That appeared to work on the initial
> >> deployment.  When the bundles were examined through the Felix Web
> >> Console, they showed the correct Start Level (3).  However, when the
> >> framework was restarted, the bundles reverted to the default Start
> Level
> >> (1).   It seemed that either they were started up prior to my Manager
> >> (which was at Start Level 1), or they weren't triggering an INSTALL
> >> event, just a STARTUP event, since they were already deployed.  I
> >> noticed that one of the bundles that I started by dropping in the
> >> autostart/bundles directory did retain the Start Level, since that is
> >> recorded in the bundle's cache directory, but it looks like the
> bundles
> >> that are started via 'asadmin deploy' behave differently.
> >>
> >>    Has anyone had any luck developing their own Startup Manager?
> >>
> >> Thanks,
> >>   Larry
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
> 
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.862 / Virus Database: 271.1.1/3195 - Release Date: 10/14/10
> 14:34:00

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to