Skip to content

Instantly share code, notes, and snippets.

View rdebusscher's full-sized avatar

Rudy De Busscher rdebusscher

View GitHub Profile
@rdebusscher
rdebusscher / LocalTestContext.java
Last active October 7, 2022 17:00
Testing MicroProfile Config
public class LocalTestContext {
private static final LocalTestContext INSTANCE = new LocalTestContext();
private final ThreadLocal<Map<String, String>> localTestData = ThreadLocal.withInitial(HashMap::new);
private LocalTestContext() {
}
public void addConfigValue(String key, String value) {
@rdebusscher
rdebusscher / gist:ad914ba528dbe638f926e6bf2fdbd3e9
Last active April 2, 2019 08:23
MicroProfile LRA Participant recovery scenario
Example has 3 components
- A client application which can be anything. It calls 2 endpoints to process a User action.
- The client application retrieves the actual URLs of the endpoint from a service discocvery component just before calling them as they can be located at any URL.
- A service A which is the first step in the transaction
- A service B which is the second step.
What happens when the ServiceB cancels the LRA but service A is crashed at that moment and restored at a different URL.
How is the cancelStepA() called eventually?
@rdebusscher
rdebusscher / gist:7172178
Last active December 26, 2015 15:19
Example of declarative usage of tree widget with AngularPrime
<div id="default" pui-tree="nodeSelect" >
<div pui-treenode="Documents" id="documents">
<div pui-treenode="Work" id="work">
<div pui-treenode="Expenses.doc" id="expenses" ></div>
<div pui-treenode="Resume.doc" id="resume"></div>
</div>
<div pui-treenode="Home" >
<div pui-treenode="Invoices.txt" id="invoices"></div>
</div>
</div>