[jboss-user] [Beginner's Corner] - Re: javax.naming.NameNotFoundException: jdbc not bound

PeterJ do-not-reply at jboss.com
Wed Oct 7 13:08:04 EDT 2009

anonymous wrote : It would appear the purpose of the these two files is to map a Java EE Environment Naming Context (enc) 'local' entry (ie java:/comp/env/jdbc/MyDataSource) to a jBossNS 'global' naming entry (ie java:/MyDataSource). Have I got this right?

anonymous wrote : Now, is there a way to globally define this mapping for all jBoss web applications in a similar fashion that the *-ds.xml datasource is globally defined? I would like to deliver an application that does not have jBoss specific configuration entries in the web.xml and does not need a jboss-web.xml file.
No. The ENC is application-specific. In fact, each web app gets its own ENC. You can verify this by using JNDIView (in the jmx console). And each app can see only its own ENC.

anonymous wrote : I know there are applications (I've installed at least one) that work with jBoss that only need the *-ds.xml deployed. What's the trick?
You can have the app directly look up "java:/MyDatasource" instead of using "jdbc/MyDatasource". In that case you do not need any of the web.xml or jboss-web.xml entries. 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259221#4259221

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259221

More information about the jboss-user mailing list