Assuming that this is your datasource configuration:
<datasources>
| <local-tx-datasource>
| <jndi-name>MyAppDS</jndi-name>
|
<connection-url>jdbc:oracle:thin:@youroraclehost:1521:yoursid</connection-url>
| .....
|
| </datasources>
Note the jndi-name that you have specified for your datasource. The datasource
will be bound to java:/MyAppDS jndi-name(in this example). From your web
application, you can do a jndi lookup of this datasource, using the jndi-name
that you have specified for the datasource, which will return you a Datasource
object. You can then invoke the getConnection() method on the returned object.
Something like:
Context ctx = new InitialContext();
| Datasource ds = ctx.lookup("java:/MyAppDS");
| Connection conn = ds.getConnection();
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980247#3980247
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980247
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user