In this article, I will explain how to execute a Java method once or on Mulesoft Application Startup. With this approach, we can add or execute some needed tasks before a Mule Application fully deployed such as User Notification or Data Clean-Up (Truncation of Database Tables or purging of files from the temporary storage within the server).

First, we need to create a Custom Java Class that implements the interface MuleContextNotificationListener<MuleContextNotification> and override the onNotification() method. We also need to make sure that our startup logic should run after the Mule Context started.

Source de l’article sur DZONE

0 réponses

Laisser un commentaire

Participez-vous à la discussion?
N'hésitez pas à contribuer!

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *