Class BeanFactoryDestinationResolver

java.lang.Object
org.springframework.jms.support.destination.BeanFactoryDestinationResolver
All Implemented Interfaces:
Aware, BeanFactoryAware, DestinationResolver

public class BeanFactoryDestinationResolver extends Object implements DestinationResolver, BeanFactoryAware
DestinationResolver implementation based on a Spring BeanFactory.

Will lookup Spring managed beans identified by bean name, expecting them to be of type jakarta.jms.Destination.

Since:
2.5
Author:
Juergen Hoeller
See Also:
  • Constructor Details

  • Method Details

    • setBeanFactory

      public void setBeanFactory(BeanFactory beanFactory)
      Description copied from interface: BeanFactoryAware
      Callback that supplies the owning factory to a bean instance.

      Invoked after the population of normal bean properties but before an initialization callback such as InitializingBean.afterPropertiesSet() or a custom init-method.

      Specified by:
      setBeanFactory in interface BeanFactoryAware
      Parameters:
      beanFactory - owning BeanFactory (never null). The bean can immediately call methods on the factory.
      See Also:
    • resolveDestinationName

      public Destination resolveDestinationName(@Nullable Session session, String destinationName, boolean pubSubDomain) throws JMSException
      Description copied from interface: DestinationResolver
      Resolve the given destination name, either as located resource or as dynamic destination.
      Specified by:
      resolveDestinationName in interface DestinationResolver
      Parameters:
      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
      Returns:
      the JMS destination (either a topic or a queue)
      Throws:
      JMSException - if the JMS Session failed to resolve the destination