NonStop Servlets for JavaServer Pages (5.0) System Administrator's Guide

Configuring NSJSP
NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide525644-002
3-43
DataSourceRealm
useContextClassLoader
Instructs the JAASRealm to use the context’s loader for loading the user specified
LoginModule and associated classes. The default is true.
debug
The level of debugging logged by the Logger. The default is 0.
For more information about configuring JAASRealm or creating your own login module,
see the Tomcat 5.0 Specification at
http://jakata.apache.org/tomcat/tomcat-5.0-doc.index.html.
DataSourceRealm
DataSourceRealm is an implementation of NSJSP's Realm interface that uses a user
database accessed using a JNDI named JDBC DataSource. Similar to the
JDBCRealm, the DataSourceRealm requires a set of underlying SQL database tables
to be available.
A DataSourceRealm can be configured in the iTP_server.xml configuration file
nested inside a service or a virtual host. In addition, it can also be configured for a
specific context by nesting the <Realm> element inside the <Context> element in the
context configuration file. Example 3-29 shows an example configuring
DataSourceRealm.
DataSourceRealm Element Attributes
To configure DataSourceRealm, create a <Realm> element and nest it in your
$NSJSP_HOME/conf/iTP_server.xml file or in the <Context> element in the
context configuration file, as in Example 3-20. The following attributes are supported
for DataSourceRealm.
className
The value is org.apache.catalina.realm.DataSourceRealm.
dataSourceName
Specifies a defined JNDI named JDBC DataSource for your database.
Example 3-29. DataSourceRealm
<Realm className="org.apache.catalina.realm.DataSourceRealm"
dataSourceName="jdbc/userDB"
roleNameCol="role_name"
userCredCol="user_pass"
userNameCol="user_name"
userRoleTable="$$DATA00.REALMDB.USERROLE"
userTable="$$DATA00.REALMDB.USERS" />