-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Assaf,

exkor wrote:
| The problem im having right now (which i believe is relatively simple)
| is that my app doesn't connect to the DB. I configured server.xml back
| to use MemoryRealm because i want only the app to use the DB. Then
| I've changed my apps context.xml to this:
|
| <?xml version="1.0" encoding="UTF-8"?>
|
| <Context path="/hamula" docBase="hamula"

:( Remove the path and docBase, assuming that <Context> is being
correctly placed within META-INF/context.xml in your web application.

|     <Resource name="jdbc/hamula"
|               auth="Container"
|               type="javax.sql.DataSource"
|               driverClassName="com.mysql.jdbc.Driver"
|
url="jdbc:mysql://localhost:3306/hamula?autoReconnect=true"/>

Don't use 'autoReconnect=true'... use validationQuery='SELECT 1'.

|               username="root"
|               password="skywalker"
|             digest="MD5"
|             userTable="users"
|             userNameCol="uid"
|               userCredCol="password"
|               userRoleTable="users"
|             roleNameCol="role"
|               logAbandoned="true"
|               removeAbandoned="true"
|               removeAbandonedTimeout="10"
|               maxActive="20"
|               maxIdle="10"
|               maxWait="-1"/>

I think you have some stuff confused... <Resource> sets up a database
connection (JNDI DataSource), while a <Realm> should include the
information about userCredCol and all that stuff. You seem to be missing
the <Realm> element in your <Context>.

Note that <Realm>s using local <Resource>s need to have
localDataSource="true" in your <Realm> element.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhWufgACgkQ9CaO5/Lv0PDWEgCgqyXDPirLcgFYGpfAzmm6NtkN
kpkAnRTCNgeq8dYpT7HxM6cFIEVTOVSf
=CvDU
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to