title: resource injection of string variable returns null
body: <p>I am tying to inject an file directory string using <code>@resource</code> , the declaration of this string is in the <code>application.xml</code> file, here is my code</p>
  
  <pre><code>&lt;application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://java.sun.com/xml/ns/javaee" xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd"
  id="Application_ID" version="6"&gt;
  
  &lt;display-name&gt;Project_APP&lt;/display-name&gt;
  
  &lt;module&gt;
      &lt;ejb&gt;Project_Dalayer.jar&lt;/ejb&gt;
  &lt;/module&gt;
  &lt;module&gt;
      &lt;web&gt;
          &lt;web-uri&gt;Project_UI.war&lt;/web-uri&gt;
          &lt;context-root&gt;Project_UI&lt;/context-root&gt;
      &lt;/web&gt;
  &lt;/module&gt;
  
  &lt;env-entry&gt;
      &lt;env-entry-name&gt;java:app/env/logDirName&lt;/env-entry-name&gt;
      &lt;env-entry-type&gt;java.lang.String&lt;/env-entry-type&gt;
      &lt;env-entry-value&gt;/app/Project_Data/logs/&lt;/env-entry-value&gt;
  &lt;/env-entry&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>The class in the dal layer</strong></p>
  
  <pre><code>@Startup
  @Singleton
  public class LoggingManager{
      @Resource(name = "java:app/env/logDirName")
       private String logDirName;
  }
  </code></pre>
  
  <p>This string <code>logDirName</code> returns <code>null</code>.</p>