Skip to content

Instantly share code, notes, and snippets.

View rhoegg's full-sized avatar

Ryan Hoegg rhoegg

View GitHub Profile
@rhoegg
rhoegg / mule-m2e-3.4-notes.txt
Created March 18, 2013 16:58
Mule Studio 3.4 with m2e
notes on getting m2e to work in studio 3.4:
1. Needed to use settings.xml mirrors to avoid dev.ee.mulesource.com. This is coming from muleesb-3.4-M3.pom.
<mirrors>
<mirror>
<id>mule-ee-proxy</id>
<name>Hack to not use dev.ee.mulesource.com</name>
<url>https://repository.mulesoft.org/releases/</url>
<mirrorOf>mule-ee-releases,mule-ee-snapshots,libs-releases,ext-releases</mirrorOf>
@rhoegg
rhoegg / mule
Last active July 21, 2017 03:03
RHEL init.d script for Mule ESB
#!/bin/bash
# RHEL Mule Init Script
#
# chkconfig: 2345 65 64
# description: Mule ESB service
. /etc/init.d/functions
#
if [ -f /etc/sysconfig/mule ]; then
. /etc/sysconfig/mule
@rhoegg
rhoegg / StringFromResource.java
Last active December 22, 2015 22:38
Pull a string out of a file on the classpath in spring
package com.foo;
import org.apache.commons.io.IOUtils;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.core.io.Resource;
public class StringFromResource implements FactoryBean<String> {
private Resource resource;
public Resource getResource() {
@rhoegg
rhoegg / gist:7024591
Created October 17, 2013 13:09
externalized configuration
<context:property-placeholder
location="classpath:myapp-config.properties,classpath:myapp-config-${MULE_ENV}.properties,file:/opt/mule/conf/${MULE_ENV}/myapp-config.properties"
ignore-resource-not-found="true"
ignore-unresolvable="true" />
@rhoegg
rhoegg / wrapper.conf
Created October 17, 2013 13:26
setting MULE_ENV system property in wrapper.conf
wrapper.java.additional.4=-DMULE_ENV=staging
@rhoegg
rhoegg / mule.sh
Created October 17, 2013 13:31
setting MULE_ENV when starting mule
$MULE_HOME/bin/mule start -M-DMULE_ENV=staging
@rhoegg
rhoegg / gist:7030088
Created October 17, 2013 18:45
mindful usage of mule logger message processor
<logger doc:name="INFO"
category="com.confluex.mule.MyApplicatioName.MyFlowName"
level="INFO"
message="Added #[payload.size()] customer records to ERP system from CRM" />
# Mule and some dependencies
log4j.logger.org.mule=WARN
log4j.logger.com.mulesoft=WARN
log4j.logger.org.mule.DefaultMuleContext=INFO
log4j.logger.org.springframework=WARN
log4j.logger.org.apache=WARN
# Calm down, DataMapper
log4j.logger.org.jetel=WARN
log4j.logger.Tracking=WARN
package com.confluex.test.salesforce.sforce
import groovy.util.logging.Slf4j
import org.w3c.dom.Document
import org.w3c.dom.Element
import javax.xml.parsers.DocumentBuilderFactory
import javax.xml.stream.XMLOutputFactory
import javax.xml.transform.dom.DOMResult
@rhoegg
rhoegg / idea.txt
Created November 4, 2013 16:15
some concrete requirements for the sample problem
CREATE TABLE door_access (
badge_id INT NOT NULL,
door_id INT NOT NULL,
when TIMESTAMP
)
- monitor table for inserts, there will be no updates
- Send Door ID 53 to AMQP exchange 'SuperSecureBank.alerts.VaultAccess'
- Send Doors 17, 11, 2, 3, 5 to CSV file on box.com folder TBD
- log a warning if any other door badge in occurs