Skip to content

Instantly share code, notes, and snippets.

package com.schremser.spring.jms.core;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.jms.connection.TransactionAwareConnectionFactoryProxy;
import org.springframework.jndi.JndiObjectFactoryBean;
allprojects {
group 'com.schremser'
version '1.0'
apply plugin: 'java'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
package com.schremser.spring.jms.server;
import com.schremser.spring.jms.core.JndiConfiguration;
import com.schremser.spring.jms.server.receiver.QueueMessageReceiver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
java.naming.provider.url=file:../jms/jms_test
java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
java.naming.security.principal=guest
java.naming.security.credentials=guest
jms.queue.export=exportQueue
jms.queue.import=importQueue
jms.connection.factory=ConnectionFactory
dependencies {
compile project(':core')
}
apply plugin: 'application'
mainClassName = "com.schremser.spring.jms.server.JmsServer"
dependencies {
compile project(':core')
}
apply plugin: 'application'
mainClassName = "com.schremser.spring.jms.client.JmsClient"
run {
standardInput = System.in
}
package com.schremser.spring.jms.client;
import com.schremser.spring.jms.core.JndiConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;