Skip to content

Instantly share code, notes, and snippets.

Maximilian Schremser maxschremser

Block or report user

Report or block maxschremser

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View build.gradle
dependencies {
compile project(':core')
}
apply plugin: 'application'
mainClassName = "com.schremser.spring.jms.client.JmsClient"
run {
standardInput = System.in
}
View JmsClient.java
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;
View default.properties
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
View JmsServer.java
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;
View build.gradle
dependencies {
compile project(':core')
}
apply plugin: 'application'
mainClassName = "com.schremser.spring.jms.server.JmsServer"
View build.gradle
allprojects {
group 'com.schremser'
version '1.0'
apply plugin: 'java'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
View JndiConfiguration.java
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;
You can’t perform that action at this time.