You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Cesar Hernandez <ce...@gmail.com> on 2019/07/02 16:30:08 UTC

Re: mp-custom-healthcheck example review

Hi Jose,
The example is great!
It was my mistake to not fully navigate the sourcecode to understand that
the endpoint as part of the application and not the one from the internet.

By looking at the example, I think instead of modifying the existing one,
more examples can be created for interesting scenarios like monitoring DB,
ActiveMQ broker or other third-party resources TomEE users use. Also some
Operating System classics like "To many open Files" or "full hard disk" ;).
Again, this is just an idea outside of the scope of the current example ;)

El dom., 30 jun. 2019 a las 14:04, Jose Henrique Ventura
(<jo...@protonmail.com.invalid>) escribió:

> Hi guys,
>
> Is all good with that example?
> and yes, I used the openweathermap url just to give an idea of how it can
> be used.
>
> I can help to improved the example if needed. =)
>
>
> Best Regards,
> José Henrique Ventura.
>
>
> Sent with ProtonMail Secure Email.
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Friday, June 28, 2019 6:58 PM, David Salter <we...@gmail.com>
> wrote:
>
> > Lol. Sounds like someone has already done what we’re talking about :)
> >
> > David.
> >
> > On Fri, 28 Jun 2019 at 18:53, Cesar Hernandez cesarguate@gmail.com
> wrote:
> >
> > > Disregard my previous email, looking more closely to the code it seems
> the
> > > example include a mock version of the real endpoint
> > >
> https://github.com/apache/tomee/blob/master/examples/mp-custom-healthcheck/src/main/java/org/superbiz/WeatherServiceHealthCheck.java#L39
> > > El vie., 28 jun. 2019 a las 11:47, Cesar Hernandez (<
> cesarguate@gmail.com
> > >
> > > > )
> > > > escribió:
> > >
> > > > Hi list,
> > > > Currently, we have a nice example for mp-custom-healthcheck but
> digging
> > > > into the tests, it seems the tests depends on an online service from
> > > > http://api.openweathermap.org/data/2.5/
> > >
> > >
> https://github.com/apache/tomee/blob/master/examples/mp-custom-healthcheck/src/test/java/org/superbiz/test/WeatherServiceTest.java#L74
> > >
> > > > My two cents about this dependency is that it can produce at some
> point
> > > > failing builds in our CI if the api.openweathermap.org is on
> mantainacne
> > > > or there is some kind of dns isssue.
> > > > My proposal is to:
> > > >
> > > > 1.  Create a ticket to describe the problem
> > > > 2.  Include in the ticket a high-level alternative to don't depend
> on a
> > > >     third party endpoint. For example haveing two endpoints within
> the
> > > >     exzample, one alwasy resturning 200 and another one returning
> always a
> > > >     401
> > > >     or any other != 200 http response code.
> > > >
> > > >
> > > > What do you think?
> > > > --
> > > > Atentamente:
> > > > César Hernández.
> > >
> > > --
> > > Atentamente:
> > > César Hernández.
>
>
>

-- 
Atentamente:
César Hernández.