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
Required Elements
-
Element Details
-
value
Name to identify theConnectionFactorybean in the context. This is used by theAbstractJMSListenerMethodProcessorand theJMSListenerto identify whichConnectionFactoryto use.- Returns:
- the name of the bean.
- See Also:
-