title: Overriding EJB binding name in WebSphere 8.5
body: <p>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. </p>
  
  <p>For example the real application uses following binding name:</p>
  
  <pre><code>binding-name="java:global/company-app-calculator-ear/company-app-calculator-ejb/CalculatorSb!com.company.beans.app.calculator.CalculatorSbRemote" 
  </code></pre>
  
  <p>But now the binding name looks like this:</p>
  
  <pre><code>binding-name="java:global/general-mock-ear/company-app-calculator-ejb/CalculatorSb!com.company.beans.app.calculator.CalculatorSbRemote" 
  </code></pre>
  
  <p>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:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;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"&gt;
  
      &lt;session name="CalculatorSb"&gt;
          &lt;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"/&gt;
      &lt;/sescomon&gt;
  &lt;/ejb-jar-bnd&gt;
  </code></pre>
  
  <p>I'm using IBM WebSphere 8.5 running on Java 1.6 EE.</p>