I’m developing Java EE application which has many integrations with other services. All integrations are done over remote EJB beans. So currently I have 3 or 4 EJB projects which are deployed as EARs on WebSphere to serve as mocks (since I don’t have access to real services in my development environment). What I want to do is to combine all of those mocks into one EAR package so I can have a single configuration page for mocks (return values, exceptions, etc.). So I made generalMock.ear application. The problem is now that EJB binding name is different than before.
For example the real application uses following binding name:
binding-name="java:global/company-app-calculator-ear/company-app-calculator-ejb/CalculatorSb!com.company.beans.app.calculator.CalculatorSbRemote"
But now the binding name looks like this:
binding-name="java:global/general-mock-ear/company-app-calculator-ejb/CalculatorSb!com.company.beans.app.calculator.CalculatorSbRemote"
Is there a way to change the global binding name? I have tried to create file “ibm-ejb-jar-bnd.xml” and add it to EJB mock’s META-INF folder where I wanted to change the binding name but I’s not working. Here is the content of my “ibm-ejb-jar-bnd.xml” configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar-bnd xmlns="http://websphere.ibm.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-ejb-jar-bnd_1_0.xsd"
version="1.0">
<session name="CalculatorSb">
<interface
binding-name="java:global/company-app-calculator-ear/company-app-calculator-ejb/CalculatorSb!com.company.beans.app.calculator.CalculatorSbRemote"
class="com.company.beans.app.calculator.CalculatorSbRemote"/>
</sescomon>
</ejb-jar-bnd>
I'm using IBM WebSphere 8.5 running on Java 1.6 EE.