"offline" wrote : So just to get this straight:  If i use the datasource binding with 
a command line application i'm wasting my time.  There's no way?
correct

"offline" wrote : And also, if i am using the datasource from within a bean, as 
defined above, i need to use it as java:comp/evn/jdbc/MySQLDS ?
Within the JVM you can can either 
-access it via it's global JNDI name: java:/MySQLDS
-Bind it in the ENC of your web layer or EJB and access it via something like 
java:comp/env/jdbc/MySQLDS. To use this you would need to ad the following to your 
web.ml (if done in web layer) or ejb-jar.xml (if done in ejb):

  | <resource-ref>
  | <res-ref-name>jdbc/MySQLDS</res-ref-name>
  | <res-type>javax.sql.DataSource</res-type>
  | <res-auth>Container</res-auth>
  | </resource-ref>
  | 

then add to jboss.xml (if ejb) or jboss-web.xml (if web):

  | <resource-ref>
  | <res-ref-name>jdbc/MySQLDS</res-ref-name>
  | <res-type>javax.sql.DataSource</res-type>
  | <jndi-name>java:/MySQLDS</jndi-name><!--basically maps comp/env/jdbc/MySQLDS to 
the global name java:/MySQLDS -->
  | </resource-ref>
  | 



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

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


-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to