ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugeny N Dzhurinsky <eugeny...@jdevelop.com>
Subject JNDI resource configuration (Tomcat 5.0)
Date Wed, 22 Feb 2006 13:58:45 GMT
I seem to miss something - I configured JNDI resource in context like this

<Context path="/myapp">
    <Realm className="org.apache.catalina.realm.JAASRealm" appName="PortalRealm"
    userClassNames="com.liferay.portal.jaas.PortalPrincipal"
    roleClassNames="com.liferay.portal.jaas.PortalRole" debug="99"
    useContextClassLoader="false" />
    <Resource name="jdbc/DBConn" auth="Container" type="javax.sql.DataSource" />
    <ResourceParams name="jdbc/DBConn">
        <parameter>
            <name>factory</name>
            <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
        </parameter>

        <parameter>
            <name>username</name>
            <value>root</value>
        </parameter>

        <parameter>
            <name>password</name>
            <value>
            </value>
        </parameter>

        <parameter>
            <name>driverClassName</name>
            <value>org.gjt.mm.mysql.Driver</value>
        </parameter>

        <parameter>
            <name>url</name>
            <value>jdbc:mysql://localhost/database</value>
        </parameter>
    </ResourceParams>
</Context>

in iBATIS I configured mapping.xml to use it

<transactionManager type="JDBC">
    <dataSource type="JNDI">
	<property name="DataSource" value="java:jdbc/DevCase" />
    </dataSource>
</transactionManager>

but application complains about it can't find 'jdbc' resource. Any
suggestions?

-- 
Eugene N Dzhurinsky

Mime
View raw message