Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting to IBM MQ with Spring Boot and JMS #2

Open
FrankenGit opened this issue Nov 18, 2016 · 3 comments
Open

Connecting to IBM MQ with Spring Boot and JMS #2

FrankenGit opened this issue Nov 18, 2016 · 3 comments

Comments

@FrankenGit
Copy link

Piotr,
sorry I am not a Spring-expert but we need to use Spring to connect to Websphere-MQ.
How would you wire up the code and make it start from within Spring.
A sample call would be nice!
Thanks a lot for your help!
Regards Frank

@cpiotr
Copy link
Owner

cpiotr commented Nov 19, 2016

@cpiotr cpiotr closed this as completed Nov 19, 2016
@cpiotr cpiotr reopened this Nov 19, 2016
@FrankenGit
Copy link
Author

Piotr,
yes, we have checked you page. That was our starting point. My problem is, that I am not a Spring Boot expert and what you describe as "piece of cake" is my problem.
Spring boot itself comes with is a couple of MQ-sample (including activemq..) but unfortunately not with Websphere MQ.
So if you could provide me with a 3 liner on how to instantiate spring boot using your Gateway-class it would be a great help.
Thanks in advance!

@FrankenGit
Copy link
Author

Piotr,
we figured it out but couldn't get it running with the TransactionManagement enabled.

//@EnableTransactionManagement
public class MQConfiguration {
@Inject
MQConfiguration.MQProperties properties;

//@Autowired
//PlatformTransactionManager transactionManager;

@Bean(name = "DefaultJmsListenerContainerFactory")
public DefaultJmsListenerContainerFactory provideJmsListenerContainerFactory() {
	DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory();			
	factory.setConnectionFactory(connectionFactory());
	//factory.setTransactionManager(transactionManager);
	factory.setConcurrency("5-10");
	factory.setSessionAcknowledgeMode(Session.CLIENT_ACKNOWLEDGE);
	factory.setSessionTransacted(true);
	return factory;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants