Skip to content

Commit

Permalink
add purge queue to explorer example
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Yates committed Oct 16, 2019
1 parent 768e51a commit 586c2de
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
11 changes: 10 additions & 1 deletion explorer/demo-explorer-war/src/demo/SimpleServletFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha
tsq = new TSQ();
tsq.setName(SimpleServlet.TSQ_NAME);
tsq.setType(TSQType.MAIN);
this.destroy();
purgeQueue(tsq);

Faker faker = new Faker();

Expand Down Expand Up @@ -66,4 +66,13 @@ public void destroy() {
}
}

private void purgeQueue(TSQ tsq){
try{
tsq.delete();
}catch(CicsConditionException cce){
//purging the queue will fail if the queue doesn't exist
//so ignore this exception
}
}

}
6 changes: 4 additions & 2 deletions maven/demo-war/demo-maven-war.launch
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
<booleanAttribute key="M2_OFFLINE" value="false"/>
<stringAttribute key="M2_PROFILES" value=""/>
<listAttribute key="M2_PROPERTIES">
<listEntry value="deploy-user=${string_prompt:Deploy user ID}"/>
<listEntry value="deploy-password=${password_prompt:Deploy password}"/>
<!--<listEntry value="deploy-user=${string_prompt:Deploy user ID}"/>
<listEntry value="deploy-password=${password_prompt:Deploy password}"/>-->
<listEntry value="deploy-user=yatesw"/>
<listEntry value="deploy-password=sagep0rk"/>
</listAttribute>
<stringAttribute key="M2_RUNTIME" value="EMBEDDED"/>
<booleanAttribute key="M2_SKIP_TESTS" value="false"/>
Expand Down

0 comments on commit 586c2de

Please sign in to comment.