1 Reply Latest reply on Dec 5, 2003 3:51 AM by micke

    Access with JBOSS

    ramy monei Newbie

      hi all
      how can I define the odbc connection in jboss . I want to connect to MS access from JBOSS .The jndi name in web.xml in war file is


      right now I want to define and map the jndi name of the datasource to actual driver and database created by access .

      my url for Database is : jdbc:odbc:sample
      driver is : sun.jdbc.odbc.JdbcOdbcDriver

      please give me the steps and the files in jboss to define my JDBC connection to Access Database


        • 1. Re: Access with JBOSS
          micke Novice

          Add this to your jboss-xml.

          Your msaccess-ds.xml

          Get a connection at run-time.
          Context ctx= new InitialContext();
          DataSource ds = (DataSource)initial.lookup("java:comp/env/jdbc/AcmeDB");
          Connection con = ds.getConnection();