<html><body>Hi Jack,<br>
<br>
<br>
By the Java EE spec, all local references (ejb-ref, resource-ref, env-ref) are supposed to be under java:comp/env/. The specs also says this prefix is ommited from the standard deployment descriptors (web.xml, ejb-jar.xml) and so JBoss AS is simply being consistent by omitting also from its proprietary deploymento descriptos (jboss-web.xml, jboss.xml)<br>
<br>
<br>
[]s, Fernando Lozano<br><br>
<blockquote style="border-left: solid 2px #000000; margin-left: 5px; padding-left: 5px">---- Original Message ----<br><b>From</b>: Jack Stevens &lt;do-not-reply@jboss.com&gt;<br><b>To</b>: "User development" &lt;jboss-user@lists.jboss.org&gt;<br><b>Sent</b>: Qui, Jun 2, 2011, 6:19 AM<br><b>Subject</b>: [jboss-user] [Beginner's Corner] - Re: javax.naming.NameNotFoundException: jdbc not bound<br><br>



<div>
<table style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;" bgcolor="#FFFFFF" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>

<td>

<table style="border: solid 2px #ccc; wmx_background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;" bgcolor="#FFFFFF" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;" height="58px" bgcolor="#000000" valign="middle">
<h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
<!-- To have a header image/logo replace the name below with your img tag -->
<!-- Email clients will render the images when the message is read so any image -->
<!-- must be made available on a public server, so that all recipients can load the image. -->
<a onclick="return checkLinkHref(this.href);" target="_blank" href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
</td>

</tr>
<tr>
<td style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;" bgcolor="#FFFFFF"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Re: javax.naming.NameNotFoundException: jdbc not bound
</h3>
<span style="margin-bottom: 10px;">
    created by <a onclick="return checkLinkHref(this.href);" target="_blank" href="http://community.jboss.org/people/samalexander10">Jack Stevens</a> in <i>Beginner's Corner</i> - <a onclick="return checkLinkHref(this.href);" target="_blank" href="http://community.jboss.org/message/608223#608223">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; wmx_background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi Peter,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><p>For this:</p><p>jboss-web.xml: </p><pre class="jive-pre" style="background-color: #ffffff; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 2px; font-size: 12px; margin-top: 10px; margin-right: 20px; margin-bottom: 10px; margin-left: 20px; border-top-color: #eeeeee; border-right-color: #eeeeee; border-bottom-color: #eeeeee; border-left-color: #cccccc; wmx_background-position: repeat repeat; border-style: solid; padding: 10px;"><p><code class="jive-code jive-java">&lt;jboss-web&gt; </code></p><p><code class="jive-code jive-java">&lt;resource-ref&gt; </code></p><p><code class="jive-code jive-java">&lt;res-ref-name&gt;jdbc/TheDS&lt;/res-ref-name&gt; </code></p><p><code class="jive-code jive-java">&lt;jndi-name&gt;java:jdbc/SomeDS&lt;/jndi-name&gt; </code></p><p><code class="jive-code jive-java">&lt;/resource-ref&gt; </code></p><p><code class="jive-code jive-java">&lt;/jboss-web&gt;</code></p></pre><p>why wouldn't it be:</p><p>jboss-web.xml: </p><pre class="jive-pre" style="background-color: #ffffff; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 2px; font-size: 12px; margin-top: 10px; margin-right: 20px; margin-bottom: 10px; margin-left: 20px; border-top-color: #eeeeee; border-right-color: #eeeeee; border-bottom-color: #eeeeee; border-left-color: #cccccc; wmx_background-position: repeat repeat; border-style: solid; padding: 10px;"><p><code class="jive-code jive-java">&lt;jboss-web&gt; </code></p><p><code class="jive-code jive-java">&lt;resource-ref&gt; </code></p><p><code class="jive-code jive-java">&lt;res-ref-name&gt;<code class="jive-code jive-java"><span style="color: red;">java:comp/env/</span></code>jdbc/TheDS&lt;/res-ref-name&gt; </code></p><p><code class="jive-code jive-java">&lt;jndi-name&gt;java:jdbc/SomeDS&lt;/jndi-name&gt; </code></p><p><code class="jive-code jive-java">&lt;/resource-ref&gt; </code></p><p><code class="jive-code jive-java">&lt;/jboss-web&gt;</code></p></pre><p>How does JBoss know to include <code class="jive-code jive-java"><span style="color: red;">java:comp/env/</span></code> in the &lt;res-ref-name&gt; if we just put <code class="jive-code jive-java">&lt;res-ref-name&gt;jdbc/TheDS&lt;/res-ref-name&gt;</code></p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a onclick="return checkLinkHref(this.href);" target="_blank" href="http://community.jboss.org/message/608223#608223">going to Community</a></p>
<p style="margin: 0;">Start a new discussion in Beginner's Corner at <a onclick="return checkLinkHref(this.href);" target="_blank" href="http://community.jboss.org/choose-container%21input.jspa?contentType=1&amp;containerType=14&amp;container=2075">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>


</blockquote></body></html>