Article:
  Configuring JBoss 4.0 JDBC Connectivity
Subject:   Configuring Jboss for MS Access Dtabase
Date:   2005-05-12 22:20:24
From:   doubtman
hi,
Can u tell me how to configure the jboss-cmp-jdbc.xml for Access database.
thanks
Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • Configuring Jboss for MS Access Dtabase
    2005-05-14 05:55:34  Deepak Vohra | [View]


    To configure with the MS Access driver:

    1. Copy the MS access jdbc-odbc driver jar file to the server/default/lib directory.
    http://java.sun.com/j2se/1.3/docs/guide/jdbc/getstart/bridge.doc.html


    Copy msaccess-ds.xml from /docs/examples/jca directory to
    /server/default/deploy directory.

    In the msaccess-ds.xml set the connection-url to jdbc:odbc:<DSNNAME>. <DSNNAME> variable is the DSN name. Set the user-name and password.

    In the standardjbosscmp-jdbc.xml set

    <jbosscmp-jdbc>
    <defaults>
    <datasource>java:/MSAccessDS</datasource>
    <datasource-mapping>MS ACCESS</datasource-mapping>
    </defaults>
    </jbosscmp-jdbc>


    In the standardjbosscmp-jdbc.xml add a type-mapping for MS ACCESS.

    In the login-config.xml add a login configuration for MS ACCESS

    <application-policy name = "MSACESSDbRealm">
    <authentication>
    <login-module code =
    "org.jboss.resource.security.ConfiguredIdentityLoginModule"
    flag = "required">
    <module-option name = "principal"></module-option>
    <module-option name = "userName"></module-option>
    <module-option name = "password"></module-option>
    <module-option name ="managedConnectionFactoryName">
    jboss.jca:service=LocalTxCM,name=MSAccessDS
    </module-option>
    </login-module>
    </authentication>
    </application-policy>