'ejbCreate() takes last MDB in weblogic-ejb-jar.xml

After upgrading WebLogic 12.1.3 to 12.2.1 application is failing to create JMS queue connection for different MDBs in weblogic-ejb.jar.xml file. I have 9 unique MDBs but at deployment ejbCreate() method is only linking to last one in the file. And when submitting message to different MDB they end up in the same queue. I'm not sure were exactly the error comes from as logs are clean without errors.

The project is configured like below (in the order I believe it goes through):

  • Multiple <weblogic-enterprise-bean> and its subtags created on weblogic-ejb-jar.xml
  • Multiple <session> and <message-driven> and its subtags configs created on ejb-jar.xml. Each of these configs have multiple <env-entry> that are referenced in the processor class through @Resource.
  • Finally the single processor that is the same for all MDBs, and implements MessageListener and MessageDrivenBean. ejbCreate() is here and it is actually being processed. This is where the error seems to be as I can see the logs for every instantiation of this processor, all its @Resource annotated fieds are using the same value as for the last <env-entry> definition in the ejb-jar.xml. This class is also anotated with @MessageDriven, TransactionManagement, TransactionAttribute, and Interceptors


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source