I was quite happily using my MDB in webLogic, but when I changed its configuration, it did not pick up the new changes. It took a day to find out why, and I have learned much more about deploying MDBS.
My connection factory was using SYSTEM.DEF.SVRCONN, I changed it to use a different client channel. I stopped SYSTEM.DEF.SVRCONN, ( so I could check the change had worked), and restarted the webLogic instance. I was surprised when my MDB failed to start, because the channel was stopped. The MDB was trying to use that channel. It took a lot of head scratching to get it to work as I expected.
- I had messages like <BEA-015073> Message-Driven Bean … is configured with unknown activation-config-property name failIfQuiesce. This message is wrong, failIfQuiesce is supported by the IBM Resource adapter.
- I had the same message with activation-config-property name cfLookup. This was my problem. I should have specified connectionFactoryLookup.
- If you have <activation-config-property-name>connectionFactoryLookup… (specified in the ejb-jar) any other parameters you specify in the ejb-jar.xml file are ignored.
- If you do not specify a connectionFactoryLookup, nor properties in the ejb-jar.xml file, defaults are provided, see Configuring the resource adapter for inbound communication. In my case I had not specified activation-config-property-name channel, and this defaulted to SYSTEM.DEF.SVRCONN, which is why it continued to use that channel.
- It worth putting <activation-config-property-name>applicationName … in your definitions so you can see what you are using.
- dis qstatus(JMSQ3) type(handle) gave me APPLTAG(CF3Name) so I can tell which definitions are being used.
- If you get APPLTAG(weblogic.Server) then you are taking the defaults.
- The Oracle documentation says the precedence order is as below. I do not think this is 100% accurate. (I could not specify some of the parameters on the weblogic-ejb-jar.xml file). I didnt try the java program.
- properties set in the weblogic-ejb-jar.xml deployment descriptor
- activation-config-property properties set in the ejb-jar.xml deployment descriptor
- activationConfigProperty annotation properties in the java program.
What do I need to specify?
As a minimum you need to use connectionFactoryLookup or specify
- applicationName – so you can identify which definitions are being used
- channel – which channel to use
- failIfQuiesce
- hostName
- port
The ejb-jar.xml file is in the META-INF directory. Change the ejb-jar.xml or weblogic-ejb-jar.xml file. IUpdate the jar file using a command like jar -uvf MDB4.jar META-INF/ejb-jar.xml, and redeploy it.
One thought on “Whoops -deploying MDB in weblogic”