title: Portable JNDI name for DataSource
body: <p>I have a EJB with field</p>
  
  <pre><code>@Resource(lookup = "jdbc/sampleDS")
  private DataSource ds;
  </code></pre>
  
  <p>and persistence.xml with entry</p>
  
  <pre><code>&lt;jta-data-source&gt;jdbc/sampleDS&lt;/jta-data-source&gt;
  </code></pre>
  
  <p>I want to make the application easy portable across different Java EE servers. But in JBoss JNDI name has to start with java:/ or java:jboss/. At the same time Glassfish doesn't like symbol ':'. How to achieve portability? I tried to set attribute <code>use-java-context="false"</code> for data source instandalone.xml, but it didn't help me.</p>
  
  <p>Thanks in advance.</p>