title: Environment entry duplicated for Web module on WebSphere
body: <p>My <code>ear</code> contains one EJB module and one Web module. One singleton EJB within the EJB module has a String field annotated with <code>@Resource</code>:</p>
  
  <p><code>@Resource(name = "lecmConfigServiceLookupName")
   private String lecmConfigServiceLookupName;</code></p>
  
  <p>The META-INF/ejb-jar.xml specifies a mapping for this environment entry:</p>
  
  <p><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns="http://java.sun.com/xml/ns/javaee"
           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
           version="3.1"&gt;
      &lt;enterprise-beans&gt;
          &lt;session id="ConfigSingleton"&gt;
              &lt;ejb-name&gt;ConfigSingleton&lt;/ejb-name&gt;
              &lt;ejb-class&gt;ru.brbpm.custom_search_ejb.ConfigSingleton&lt;/ejb-class&gt;
              &lt;session-type&gt;Singleton&lt;/session-type&gt;
              &lt;init-on-startup&gt;true&lt;/init-on-startup&gt;
              &lt;env-entry&gt;
                  &lt;env-entry-name&gt;lecmConfigServiceLookupName&lt;/env-entry-name&gt;
                  &lt;env-entry-type&gt;java.lang.String&lt;/env-entry-type&gt;
                  &lt;env-entry-value&gt;ejb/lecm/common-service.jar/ConfigServiceImpl#ru.brbpm.lecm.shared.api.ConfigServiceRemote&lt;/env-entry-value&gt;
              &lt;/env-entry&gt;
          &lt;/session&gt;
      &lt;/enterprise-beans&gt;
  &lt;/ejb-jar&gt;</code></p>
  
  <p>When I get to deploying the ear to WebSphere 8.5.5.3 I see two identical environment entries - one for the EJB module and the other for the Web module:
  <a href="https://i.stack.imgur.com/38DT3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/38DT3.png" alt="enter image description here"></a></p>
  
  <p>The entry for the web module also does not have the default value and adding an ejb-jar.xml to WEB-INF folder does not help.</p>
  
  <p>How do I get rid of the environment entry for the Web module or at least provide it with a default value? As long as the entry for the Web module is not specified the application will not start.</p>