tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From david delbecq <delbd+jaka...@oma.be>
Subject Re: Configuring DataSourceRealm using Oracle
Date Mon, 03 Mar 2008 20:11:18 GMT
And, actually, you didn't do the part where you configure the datasource 
that your realm will use, information that is provided in the link i 
pointed you to. If you did actually configure the datasource (which is 
separate from the datasourcerealm), you wouldn't say

> I still wonder
> how Tomcat would know where to go
moreover none of the configuration statements you pasted show any track 
of your datasource configuration, which agina is separate from the realm.


Jason Ling a écrit :
> Thank you, David.
>
> Sorry, I sent this message two times, each time only the quoted message was
> sent, but not my reply.  This is another try.
>
> Actually I did read the document you provided the link to.  In that document
> (The Realm Component) the following attributes are listed for the
> DataSourceRealm:
>
>    dataSourceName
>    roleNameCol
>    userCredCol
>    userNameCol
>    userRoleTable
>    userTable
>
> and I actually used all of them in my first attempted configuration as shown
> in my original email:
>
>    First attempt:
>    ++++++++++
>    I replaced the above-mentioned <Realm> element with the following one,
> mimicking the example for mySQL in the documentation:
>
>       <Realm  className="org.apache.catalina.realm.DataSourceRealm"
>          dataSourceName="jdbc/webappDB"
>               userTable="users" userNameCol="user_name"
> userCredCol="user_pass"
>           userRoleTable="user_roles" roleNameCol="role_name" />
>
> And that did not work out, you know, as I mentioned.  I still do not know
> what was wrong with my configuration for DataSourceRealm.  I still wonder
> how Tomcat would know where to go to look for the users table and the
> user_roles table, which are on the Oracle server which is sb.lehman.cuny.edu,
> and is not in any of the attributes listed above.  Did I miss any components
> in the configuration that I tried?
>
>
> Jason
>
>
>
> On Mon, Mar 3, 2008 at 1:11 PM, David Delbecq <delbd+jakarta@oma.be> wrote:
>
>   
>> Jason Ling a écrit :
>>     
>>> I changed the <Realm> element in the server.xml file, and it became:
>>>
>>>       <Realm  className="org.apache.catalina.realm.DataSourceRealm"
>>>          dataSourceName="jdbc/webappDB"
>>>              driverName="oracle.jdbc.OracleDriver"
>>>           connectionURL="jdbc:oracle:thin:@sb.lehman.cuny.edu:1521:idm0"
>>>          connectionName="webappdb" connectionPassword="GreenHorn"
>>>               userTable="users" userNameCol="user_name"
>>> userCredCol="user_pass"
>>>           userRoleTable="user_roles" roleNameCol="role_name" />
>>>
>>>
>>>       
>> your are using the datasourcerealm with parameters from the jdbcrealm,
>> those are two separate realms. For datasource realm, you need to define
>> a datasource that matches the one specified in
>>
>> dataSourceName="jdbc/webappDB"
>>
>> To get more information on how to configure a datasource, please go
>> there:
>>
>> http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>     
>
>   


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


Mime
View raw message