Rapthor-
take a look at http://developer.mimer.com/howto/howto_29.htm
JDBCRealm is a technique for storing user information in a database.
Where JDBCRealm info is accessed via your connection handle (and hopefully
acquired from connection pool ) defined within server.xml as in this example
<Resource name="jdbc/MimerPool" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/WhateverPoolYouAreUsing">
<parameter>
<name>user</name>
<value>HOTELADM</value>
</parameter>
<parameter>
<name>password</name>
<value>HOTELADM</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mimer.jdbc.Driver</value>
</parameter>
<parameter>
<name>driverName</name>
<value jdbc:mimer://localhost/UniqueNameForYourDriver</value>
</parameter>
</ResourceParams
more specifically DataSource is defined within your app's web.xml as in
<resource-ref>
<resource-ref-name>jdbc/WhateverPoolYouAreUsing</resource-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
To quote mimer.com doc:
JDBCRealm is a technique for storing user information in a database. The first
step to enable storing user information is to create the necessary tables.
(The context is where the connection handle is typically stored..)
Context = new InitialContext();
Get a data source, for example:
DataSource ds = (DataSource)
context.lookup("java:comp/env/jdbc/WhateverPoolYouAreUsing");
Get a connection, for example:
Connection con = ds.getConnection();
the connection handle will be used to access JDBCRealm information-
Martin--
----- Original Message -----
From: "Rapthor" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, March 27, 2006 5:49 AM
Subject: Re: Get JDBCRealm's current user
>
> I didn't find the ConnectionHandle ... it's an interface but where is my
> instance of "ConnectionHandle"? Do I get it by using one of the Servlet's
> request, response or session objects?
> --
> View this message in context:
> http://www.nabble.com/Get-JDBCRealm%27s-current-user-t1341315.html#a3607425
> Sent from the Tomcat - User forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>