In the console, you could do the following:
*karaf*@root()> feature:install scheduler
*karaf*@root()> schedule --period 1 { each $($.context bundles) { try { $it
start } } }
*karaf*@root()>
After that, every one second, the script will try to start all bundles.
2016-12-05 10:19 GMT+01:00 Aymen Furter <[email protected]>:
> Hi,
>
> Thanks for your feedback & your advice.
>
> I will contact the mailing list (if required) if we run into issues
> solving the root cause of the problem ourself.
>
> best regards
> Aymen
>
> On 03.12.2016 15:39, James Carman wrote:
> I would say you might want to figure out the timing issues and perhaps do
> things differently. Are you using blueprint, declarative services, or just
> plain OSGi? What is the interdependency? Services?
>
> On Sat, Dec 3, 2016 at 7:32 AM Aymen Furter <<mailto:aymen.furter@prodyna.
> com>[email protected]<mailto:[email protected]>> wrote:
> Yes, like a retry!
>
> I ran into issues having bundles that bring each other into Failure state
> during deployment.
> (If you restart all bundles afterwards it works fine)
>
> The solution is obviously to fix this inside the bundles (Usually OSGi
> related problems) you are developing.
>
> However, especially on a dev machine it would be nice if there would be an
> "auto restart if bundle goes into Failure state after x amount of time for
> n tries". If there is no such option (or if you would say there is no need
> for that option) that's a valuable and helpful answer for me aswell ;-)
>
> best regards
> Aymen
>
> Like a "retry"? What type of temporary failure are you looking to handle
> gracefully?
>
> On Fri, Dec 2, 2016 at 6:24 PM Aymen Furter <<mailto:<mailto:aymen.furter@
> prodyna.com>[email protected]<mailto:[email protected]
> >><mailto:[email protected]>[email protected]<mailto:ayme
> [email protected]><mailto:<mailto:[email protected]>
> [email protected]<mailto:[email protected]>>> wrote:
> Hi,
>
> Yes exactly!
>
> best regards
> Aymen
> > Hi,
> >
> > I guess you mean "automatically" ? Without any action from the user.
> >
> > Right ?
> >
> > Regards
> > JB
> >
> > On 12/02/2016 04:22 PM, Aymen Furter wrote:
> >> Hi all,
> >>
> >> One small question:
> >> Is there a way in karaf to automatically restart a bundle, if it is in
> >> "Failure" state?
> >>
> >> best regards
> >> Aymen
> >>
> >>
>
>
>
>
>
--
------------------------
Guillaume Nodet
------------------------
Red Hat, Open Source Integration
Email: [email protected]
Web: http://fusesource.com
Blog: http://gnodet.blogspot.com/