Skip to content

Instantly share code, notes, and snippets.

@pmuir
Created September 17, 2010 17:57
Show Gist options
  • Save pmuir/584638 to your computer and use it in GitHub Desktop.
Save pmuir/584638 to your computer and use it in GitHub Desktop.
public void breakWeld(HttpRequestContext requestContext, @Basic RequestContext basicRequestContext) {
requestContext.invalidate(); // This would cause the store to be marked invalid
requestContext.deactivate(); // This would cause the context to be marked inactive, and if invalid, cause bean instances to be destroyed
basicRequestContext.activate(); // This would cause a new request context to start
// Now you have broken your app totally.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment