Allow custom JNDI ConnectionFactory lookup
Add a `spring.jms.jndi-name` property to allow a JMS ConnectionFactory to be obtained from a custom JNDI location. Fixes gh-1471
This commit is contained in:
@@ -282,6 +282,7 @@ content into your application; rather pick only the properties that you need.
|
||||
spring.hornetq.embedded.cluster-password= # customer password (randomly generated by default)
|
||||
|
||||
# JMS ({sc-spring-boot-autoconfigure}/jms/JmsProperties.{sc-ext}[JmsProperties])
|
||||
spring.datasource.jndi-name= # JNDI location of a JMS ConnectionFactory
|
||||
spring.jms.pub-sub-domain= # false for queue (default), true for topic
|
||||
|
||||
# SPRING BATCH ({sc-spring-boot-autoconfigure}/batch/BatchDatabaseInitializer.{sc-ext}[BatchDatabaseInitializer])
|
||||
|
||||
@@ -1855,6 +1855,20 @@ resolved against their provided names.
|
||||
|
||||
|
||||
|
||||
[[boot-features-jms-jndi]]
|
||||
==== Using a JNDI ConnectionFactory
|
||||
If you are running your application in an Application Server Spring Boot will attempt to
|
||||
locate a JMS `ConnectionFactory` using JNDI. By default the locations `java:/JmsXA` and
|
||||
`java:/XAConnectionFactory` will checked. You can use the
|
||||
`spring.jms.jndi-name` property if you need to specify an alternative location:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
spring.jms.jndi-name=java:/MyConnectionFactory
|
||||
----
|
||||
|
||||
|
||||
|
||||
[[boot-features-using-jms-template]]
|
||||
[[boot-features-using-jms-sending]]
|
||||
==== Sending a message
|
||||
|
||||
Reference in New Issue
Block a user