Deploying the Resilience4j Application
The following steps describe how to deploy the application to your Cloud Foundry environment using the cf command line interface tool.
- Procedure
- Log into your Cloud Foundry environment using the cf command line interface.
- Copy the manifest file from the samples directory to the location where you placed your EAR file in the previous section.
- Edit the
path variable in the
manifest.yml
file.Make sure you have the name of your Circuit Breaker service in your manifest file. - Set the
path to the location of the EAR file.
Check the user provided or managed service name, it should match with the service in your Cloud Foundry environment.
- Save the file.
- In your Cloud Foundry environment change to the directory where you placed your EAR file.
- Run the following command:
cf push -f manifest.yml
- Copy the routable URL of the application once it starts executing.
- Edit the
request_news.html
page found in directory. - Replace the URL
http://127.0.0.1:8080
with the routable URL of the application.For example,bwce-resilience4j.<domainName>.com
- Save the file.
- Open the
request_news.html
file in a web browser - Click the Get News from Wiki! button to request headlines from the associated web page.
ResultTo see the log output use the command:
cf logs application name --recent
When the application deploys successfully, you can see a similar output in the console log:
16:13:31.231 INFO [Framework Event Dispatcher: Equinox Container: 007ddba5-b2ac-0016- 16a8-b400b6aea43d] com.tibco.thor.frwk.Application - TIBCO-THOR- FRWK-300018: Deploying BW Application[tibco.bwce.sample.core.Resilience4j.application:1.0]. 16:13:36.025 INFO [Framework Event Dispatcher: Equinox Container: 007ddba5- b2ac-0016- 16a8-b400b6aea43d] com.tibco.thor.frwk.Application - TIBCO-THOR-FRWK-300021: All Application dependencies are resolved for Application[tibco.bwce.sample.core.Resilience4j.application:1.0] 16:13:38.266 INFO [Thread-21] com.tibco.thor.frwk.Application - TIBCO-THOR-FRWK-300006: Started BW Application[tibco.bwce.sample.core.Resilience4j.application:1.0] 05:00:28.966 INFO [bwEngThread:In-Memory Process Worker-2] c.t.b.p.g.L.t.b.s.p.h.R.Log - Response sent successfully!!