In the vast majority of cases, HTTP requests are processed synchronously: the operation that the client wants to perform on the targeted resource is executed by the same thread and the result is returned right away. This is usually done by connecting the HTTP layer directly to the service layer.
This post demonstrates a slightly different approach where HTTP requests are first sent to a messaging layer, then processed by dedicated agents whose responses are eventually returned synchronously to the client that is blocked waiting.
I wrote an article recently on InfoQ about how REST replaced SOAP on the web. The comments rolled in and I found myself if a debate that I have had many times before – “why do I need an integration platform?” There are a number of answers to this, but stripping features away the key principle that answers this question is Loose Coupling. Let me explain.
Jasypt is an open source Java library which provides basic encryption capabilities using a high-level API. This library can be used with Mule to avoid clear text passwords for connectors and endpoints.First, download the latest Jasypt distribution, unpack it and copy icu4j and jasypt jars to MULE_HOME/lib/user directory.
Then add the following snippet to your Mule config file:
Next, you will need to encrypt your passwords using Jasypt command line tools. For example, if your Mule application connects to the MySql database using password “dbpassword”, encrypt it using the following command:
Where MyEncryptionPassword is your encryption key. This command will produce the following output:
ka56rcI0bDpUWoAhy5Y+PrVvqu/wMCnL
Now create a properties file that will list your encrypted passwords and place it in your project src/main/resources directory, e.g. credentials.properties:
Note the ENC() around our encrypted password, this is a que for Jasypt that it is dealing with an encrypted value.
Add the name of this file to the list of locations in the propertyConfigurer bean. Now you can use the property name in your data source configuration:
Finally, create a system variable with the same name as the value of the passwordEnvName property in the first snippet, e.g. MULE_ENCRYPTION_PASSWORD and set its value to the encryption key used for the encrypting your password, e.g.:
Thats it. You can now encrypt all passwords or any other values and Mule can read them and it starts up.
Who doesn’t know about Redis? It’s harder and harder to find someone giving a positive answer to this question as the popularity of this key/value store is constantly increasing. With an extensive support for diverse data structures, file-based persistence, a publish/subscribe engine and an upcoming (and highly anticipated) support for clustering, it is indeed not surprising to find Redis running in more and more environments.
Therefore, we’re happy to announce the first release of the Redis Connector for Mule. Read on to see all the cool things Mule and Redis can do together…