1

I am developing JMS based module which consume message from IBM MQ and persist the data. My app is running in TomEE 8.0.0-M2. While starting my application I notice that Auto-linking resource-ref 'openejb/Resource is happening against all my EJB beans. I have configured my IBM MQ related factory and queue and Topic in resources.xml . All IBM MQ related resources are trying to auto link with all my EJB beans which is consuming more startup time.

None of my EJB doesn't have @Resource configuration. I have MDB beans which has @MessageDriven annotation.

Why TomEE is trying to auto link to all EJB beans ?

How to fix this auto liking ?

I am ready to do any one time configuration in web.xml or in resources.xml

Sample log against one EJB Bean ( SimpleService)

08-Mar-2019 13:33:07.558 INFO [localhost-startStop-1] org.apache.openejb.config.AutoConfig.processResourceRef Auto-linking resource-ref 'openejb/Resource/ROOT/imq_ra' in bean SimpleService to Resource(id=imq_ra)
08-Mar-2019 13:33:07.559 INFO [localhost-startStop-1] org.apache.openejb.config.AutoConfig.processResourceRef Auto-linking resource-ref 'openejb/Resource/imq_ra' in bean SimpleService to Resource(id=imq_ra)
08-Mar-2019 13:33:07.559 INFO [localhost-startStop-1] org.apache.openejb.config.AutoConfig.processResourceRef Auto-linking resource-ref 'openejb/Resource/ROOT/ibm.mq.connfactory' in bean SimpleService to Resource(id=ibm.mq.connfactory)
08-Mar-2019 13:33:07.559 INFO [localhost-startStop-1] org.apache.openejb.config.AutoConfig.processResourceRef Auto-linking resource-ref 'openejb/Resource/ibm.mq.connfactory' in bean SimpleService to Resource(id=ibm.mq.connfactory)
08-Mar-2019 13:33:07.561 INFO [localhost-startStop-1] org.apache.openejb.config.AutoConfig.processResourceRef Auto-linking resource-ref 'openejb/Resource/ROOT/imq_container-javax.jms.QueueConnectionFactory' in bean SimpleService to Resource(id=imq_container-javax.jms.QueueConnectionFactory)
08-Mar-2019 13:33:07.562 INFO [localhost-startStop-1] org.apache.openejb.config.AutoConfig.processResourceRef Auto-linking resource-ref 'openejb/Resource/imq_container-javax.jms.QueueConnectionFactory' in bean SimpleService to Resource(id=imq_container-javax.jms.QueueConnectionFactory)
08-Mar-2019 13:33:07.562 INFO [localhost-startStop-1] org.apache.openejb.config.AutoConfig.processResourceRef Auto-linking resource-ref 'openejb/Resource/ROOT/imq_container-javax.jms.TopicConnectionFactory' in bean SimpleService to Resource(id=imq_container-javax.jms.TopicConnectionFactory)
08-Mar-2019 13:33:07.563 INFO [localhost-startStop-1] org.apache.openejb.config.AutoConfig.processResourceRef Auto-linking resource-ref 'openejb/Resource/imq_container-javax.jms.TopicConnectionFactory' in bean SimpleService to Resource(id=imq_container-javax.jms.TopicConnectionFactory)
08-Mar-2019 13:33:07.566 INFO [localhost-startStop-1] org.apache.openejb.config.AutoConfig.processResourceRef Auto-linking resource-ref 'openejb/Resource/ROOT/download.topic' in bean SimpleService to Resource(id=download.topic)
08-Mar-2019 13:33:07.571 INFO [localhost-startStop-1] org.apache.openejb.config.AutoConfig.processResourceRef Auto-linking resource-ref 'openejb/Resource/download.topic' in bean SimpleService to Resource(id=download.topic)
Gnana
  • 2,130
  • 5
  • 26
  • 57

0 Answers0