ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Configuring JBoss 4.0 JDBC Connectivity
Subject:   Code Snippet for using the configured Datasource
Date:   2006-06-09 07:24:12
From:   dvohra09
Response to: Code Snippet for using the configured Datasource

InitialContext initialContext = new InitialContext();
javax.sql.DataSource ds = (javax.sql.DataSource) initialContext
.lookup("java:MySqlDS");
java.sql.Connection conn = ds.getConnection();