Technical Notes |
|
This technical note describes how to personalize Reflection for the Web sessions with information stored in an SQL Server database (or any database with a jdbc driver).
For information about personalizing Reflection for the Web sessions with information stored in a text file, see Technical Note 1807.
Note: This technical note applies to Reflection for the Web version 7.01.546 or higher. To determine your version, open the Administrative WebStation and click Resources > About Reflection for the Web.
Reflection for the Web provides an SQL plug-in. Proceed through the sections below to configure Reflection for the Web to use the SQL plug-in for personalization.
In your SQL Server database, create a table that maps clients with Reflection for the Web settings. The example provided in this technical note creates a table with two fields, my_dns_fieldname and my_devicename_fieldname, which contain client DNS names and their corresponding IBM devicenames or logical units (LUs).
To enable the Personalization feature in Reflection, you must edit two files in the ReflectionData folder to identify the plug-in and to create the data source.
Open <install path>\ReflectionData\PropertyDS.xml and locate the following lines:
<CORE_PROPERTY NAME="AC.P13nPlugin"> <STRING></STRING> </CORE_PROPERTY> <CORE_PROPERTY NAME="AC.P13nPlugin"> <STRING>sql.SqlPlugin</STRING> </CORE_PROPERTY>Follow the steps in this section to create a customized data source. First determine the parameters and properties you want to customize; then modify the p13_sql_conf.txt file.
For information on valid parameters you could use in your SQL statement (such as %%DNS), see the comments in the <install path>/ReflectionData/p13n_sql_conf.txt file.
Many properties can also be used with personalization. For a list of valid properties, see the Administrative WebStation > Advanced > API and Scripting > API Reference.
Note: If the authentication method is None, then the identity of the end user cannot be determined.
Open <install path>/ReflectionData/p13n_sql_conf.txt, to which you will add your data mappings. The file contains comments describing the required format. Each line that begins with a # symbol is a comment.
Add the following lines to the p13n_sql_conf.txt file, replacing the variables with the correct values for your environment. The variables are described in the table following the sample.
View this sample p13n_sql_conf.txt to see how to connect to a Microsoft SQL Server database using Sun’s jdbc:odbc bridge and the ODBC driver included with Microsoft Windows. However, you can use any database with a jdbc driver.
DbDriver: sun.jdbc.odbc.JdbcOdbcDriver DbURL: jdbc:odbc:Driver={SQL Server};server= <my_sql_server>;database=<my_sql_database> DbMngName: <my_username> DbMngPwd: <my_encoded_password> SearchStatement: SELECT * FROM <my_sql_table> WHERE <my_dns_fieldname> = %%DNS Field_Name_0: <my_devicename_fieldname> Field_RWebParamName_0: deviceName Field_TranslationClass_0: |
The variables used in this sample are defined in the following table.
| Variable |
Description |
| my_sql_server |
The name of the database server. |
| my_sql_database |
The SQL Server database name. |
| my_username |
The SQL Server login user. |
| my_encoded_password |
The Base64 encoded SQL Server login password. The database password is stored as a Base64 encoded string. If you do not have a Base64 encoder tool, you can easily find one by searching the web for "base64 encoder." Once you have obtained a Base64 encoder, encode your database password and then paste the results into the p13n_sql_conf.txt file. |
| my_sql_table |
The SQL Server table name. |
| my_dns_fieldname |
The field in your table containing the client DNS names. |
| my_devicename_fieldname |
The field in your table containing the corresponding devicenames. |