Skip to content

Instantly share code, notes, and snippets.

@ricston-git
ricston-git / one-way-ssl.xml
Last active December 17, 2015 13:39
HTTPS blog post: one way ssl
<https:connector name="httpsServerConnector" doc:name="HTTP\HTTPS" validateConnections="true">
<https:tls-key-store path="server-keystore.jks" keyPassword="keypass" storePassword="keypass" />
</https:connector>
<https:connector name="httpsClientConnector" doc:name="HTTP\HTTPS" validateConnections="true">
<https:tls-server path="client-truststore.jks" storePassword="keypass"/>
</https:connector>
@ricston-git
ricston-git / mutual-auth-https-server.xml
Last active December 17, 2015 13:39
mutual-auth-https-server.xml
<https:connector name="httpsServerConnector" doc:name="HTTP\HTTPS" validateConnections="true">
<https:tls-key-store path="server-keystore.jks" keyPassword="keypass" storePassword="keypass" />
<https:tls-server path="server-truststore.jks" requireClientAuthentication="true" storePassword="keypass" />
</https:connector>
@ricston-git
ricston-git / mutual-auth-https-server-flow.xml
Last active December 17, 2015 13:39
mutual-auth-https-client.xml
<flow name="httpsServer" doc:name="httpsServer">
<https:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8083" connector-ref="httpsServerConnector" doc:name="HTTPS" />
<logger message="accessed https server successfully!" level="INFO" doc:name="Logger" />
</flow>
<https:connector name="httpsClientConnector" doc:name="HTTP\HTTPS" validateConnections="true" >
<https:tls-key-store path="client-keystore.jks" keyPassword="keypass" storePassword="keypass" />
<https:tls-server path="client-truststore.jks" storePassword="keypass"/>
</https:connector>
@ricston-git
ricston-git / mutual-auth-client-flow.xml
Created May 21, 2013 11:19
mutual-auth-client-flow.xml
<flow name="httpsClient" doc:name="httpsClient">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP" path="test">
</http:inbound-endpoint>
<logger message="sending request from https client to https server..." level="INFO" doc:name="Logger" />
<https:outbound-endpoint exchange-pattern="request-response" host="localhost" port="8083" connector-ref="httpsClientConnector" doc:name="HTTP" />
</flow>
package com.ricston.jdbc.xapool;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.util.logging.Logger;
import javax.sql.XAConnection;
import javax.sql.XADataSource;
import org.enhydra.jdbc.pool.StandardXAPoolDataSource;
@ricston-git
ricston-git / MyAdvice.java
Last active December 19, 2015 18:29
mule spring aop example
public class MyAdvice {
public void interceptBefore() {
System.out.println("a message is on its way to MyComponent...");
}
public void interceptAfter() {
System.out.println("a message is exiting MyComponent...");
}
@ricston-git
ricston-git / BatchManager.xml
Last active December 19, 2015 22:49
Batch Select Example
<!-- Setting up the Batch Manager -->
<spring:bean id="idStore"
class="com.mulesoft.mule.transport.jdbc.util.IdStore">
<spring:property name="fileName" value="/tmp/large-dataset.txt" />
</spring:bean>
<spring:bean id="seqBatchManager"
class="com.mulesoft.mule.transport.jdbc.components.BatchManager">
<spring:property name="idStore" ref="idStore" />
<spring:property name="batchSize" value="2" />
@ricston-git
ricston-git / mule-fork-join.xml
Created July 19, 2013 15:15
mule fork join example
<flow name="flows1Flow1" doc:name="flows1Flow1">
<http:inbound-endpoint exchange-pattern="one-way"
host="localhost" port="8081" doc:name="HTTP" />
<not-filter>
<wildcard-filter pattern="*favicon*" />
</not-filter>
<request-reply>
@ricston-git
ricston-git / MapperInterfaces.java
Last active December 20, 2015 23:18
MyBatisModule
public interface AddressMapper {
public Address selectAddress(Integer id);
public List<Address> selectAddressesByPersonId(Integer id);
public void insertAddress(Address person);
public void updateAddress(Address person);
}