Created
May 22, 2012 02:47
-
-
Save johndemic/2766225 to your computer and use it in GitHub Desktop.
Synchronously Invoke JMS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ResponseBody | |
@RequestMapping(method = RequestMethod.POST) | |
public Product save(@RequestBody Product product) throws Exception { | |
MuleMessage response = muleClient.send("jms://products", product, null, 2000); | |
if (response == null || response.getPayload() instanceof NullPayload) { | |
throw new InvalidProductResponseException(); | |
} else { | |
return (Product) response.getPayload(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment