Women in Technology

Hear us Roar



Article:
  Configuring JBoss 4.0 JDBC Connectivity
Subject:   Code Snippet for using the configured Datasource
Date:   2006-06-09 00:42:25
From:   solarsiva
After configuring the datasource for diffent datasource how do I connect to the configured datasource. I am new to Datasource reference and it would be great if some one can post the code snippet for the same.
regards,
Siva
Full Threads Newest First

Showing messages 1 through 1 of 1.

  • Code Snippet for using the configured Datasource
    2006-06-09 07:24:12  Deepak Vohra | [View]

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