Package io.micronaut.jms.annotations
Annotation Interface JMSConnectionFactory
@Documented
@Retention(RUNTIME)
@Target({METHOD,TYPE})
@Bean
@DefaultScope(jakarta.inject.Singleton.class)
public @interface JMSConnectionFactory
Denotes a JMS Connection Factory bean. Any connection factory that a
JMSListener
references must be annotated with this annotation. If a
connection factory is present in the Bean Context but not annotated with
this annotation, the post-processing logic will fail and the
JMSListener
will not work.
Usage:
@JMSConnectionFactory("myConnectionFactory") public ConnectionFactory myConnectionFactory() { return new ActiveMqConnectionFactory("vm://localhost?broker.persist=false"); }
- Since:
- 1.0.0
- Author:
- Elliott Pope
-
Required Element Summary
-
Element Details
-
value
Name to identify theConnectionFactory
bean in the context. This is used by theAbstractJMSListenerMethodProcessor
and theJMSListener
to identify whichConnectionFactory
to use.- Returns:
- the name of the bean.
- See Also:
-