java.lang.Object | |||
↳ | org.springframework.jndi.JndiAccessor | ||
↳ | org.springframework.jndi.JndiLocatorSupport | ||
↳ | org.springframework.jms.support.destination.JndiDestinationResolver |
DestinationResolver
implementation which interprets destination names
as JNDI locations (with a configurable fallback strategy).
Allows for customizing the JNDI environment if necessary, for example specifying appropriate JNDI environment properties.
Dynamic queues and topics get cached by destination name. As a consequence,
you need to use unique destination names across both queues and topics.
Caching can be turned off through the "cache"
flag.
Note that the fallback to resolution of dynamic destinations
is turned off by default. Switch the
"fallbackToDynamicDestination"
flag on to enable this functionality.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.jndi.JndiLocatorSupport
|
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.jndi.JndiAccessor
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Clear the entire destination cache.
| |||||||||||
Remove the destination with the given name from the cache
(if cached by this resolver in the first place).
| |||||||||||
Resolve the given destination name, either as located resource
or as dynamic destination.
| |||||||||||
Set whether to cache resolved destinations.
| |||||||||||
Set the
DestinationResolver to use when falling back to dynamic
destinations. | |||||||||||
Set whether this resolver is supposed to create dynamic destinations
if the destination name is not found in JNDI.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Validate the given Destination object, checking whether it matches
the expected type.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.jndi.JndiLocatorSupport
| |||||||||||
From class
org.springframework.jndi.JndiAccessor
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.jms.support.destination.CachingDestinationResolver
| |||||||||||
From interface
org.springframework.jms.support.destination.DestinationResolver
|
Clear the entire destination cache.
To be called in case of general JMS provider failure.
Remove the destination with the given name from the cache (if cached by this resolver in the first place).
To be called if access to the specified destination failed, assuming that the JMS Destination object might have become invalid.
destinationName | the name of the destination |
---|
Resolve the given destination name, either as located resource or as dynamic destination.
session | the current JMS Session
(may be null if the resolver implementation is able to work without it) |
---|---|
destinationName | the name of the destination |
pubSubDomain | true if the domain is pub-sub, false if P2P |
JMSException |
---|
Set whether to cache resolved destinations. Default is "true".
This flag can be turned off to re-lookup a destination for each operation, which allows for hot restarting of destinations. This is mainly useful during development.
Note that dynamic queues and topics get cached by destination name. As a consequence, you need to use unique destination names across both queues and topics.
Set the DestinationResolver
to use when falling back to dynamic
destinations.
The default is Spring's standard DynamicDestinationResolver
.
Set whether this resolver is supposed to create dynamic destinations if the destination name is not found in JNDI. Default is "false".
Turn this flag on to enable transparent fallback to dynamic destinations.
Validate the given Destination object, checking whether it matches the expected type.
destination | the Destination object to validate |
---|---|
destinationName | the name of the destination |
pubSubDomain | true if a Topic is expected,
false in case of a Queue
|