Skip to content

Instantly share code, notes, and snippets.

View SingleShot's full-sized avatar

Mike Whittemore SingleShot

View GitHub Profile
@SingleShot
SingleShot / gist:8189916
Created December 30, 2013 23:22
You can read the Spring Integration flow as follows: 1. Receive a java object from the RsmpMessageSender interface, placing it on the rsmpOutboundJava channel. 2. Transform it to a JSON String, placing the result on the rsmpOutboutJson channel. 3. Transform the JSON String to bytes. 4. Publish the bytes to a TCP connection (the RSMP server). Ite…
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:int-ip="http://www.springframework.org/schema/integration/ip"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/ip http://www.springframework.org/schema/integration/ip/spring-integration-ip.xsd">
<int:gateway id="rsmpOutboundGateway"
@SingleShot
SingleShot / gist:1403323
Created November 29, 2011 03:51 — forked from naaman/gist:1053217
Hot Swapping With Maven, Jetty and IntelliJ

Hot Swapping With Maven, Jetty and IntelliJ

Based on Configuring Jetty, Maven, and Eclipse together with Hot Swap

I've always been a bit jealous when it comes to the Play! framework and the great dev mode they have for hot swapping classes at runtime. Jetty has a configuration setting, scanIntervalSeconds, that mimics this when working with a more traditional WAR, but does so by looking for changes to a file and restarting the server.

Fortunately, Jetty also provides the ability to rapidly test code with hot swapping. No more server restarts. The trick to getting hot swapping to work is to attach a remote debugger to your Jetty process. The following instructions outline how to do this in IntelliJ (tested with IDEA 10.5 CE).

Modify your jetty-maven-plugin to ignore the scan interval

  1. Open your pom and locate the plugins section