Welcome to the PDK-Java. Now that you have successfully installed the PDK-Java Framework and samples, you may want to install and view the Subscriber ID portlet sample. The Subscriber ID portlet demonstrates how to use Oracle9iAS Portal and Web portlets for portal-based subscription billing.
From an application stand point, you may build a Web portlet that companies may register for and use within Oracle9iAS Portal. They may register to use your Web portlet by phone or website and in return you provide them with a URL and a Subscriber ID (also known as "Provider Key"). You will begin billing them once you receive confirmation that they have registered your Web provider with their Oracle9iAS Portal. At registration, they provide the "Provider Key" you gave them within their Oracle9iAS Portal, and this allows your Web portlet to associate their portal instance and provider ID with the Subscriber ID given. At this point you know which customer to bill for your Web portlet services.
The Subscriber ID portlet sample is demonstrated in two parts. When you install the PDK-Java Framework and samples, it includes a Subscriber ID registration form. Here you register to use the Subscriber ID portlet by supplying your Name and Company information. In return, the portlet provides a case sensitive Subscriber ID (Provider Key) to use to register this Subscriber ID Provider.
This document is an installation and configuration guide to the Subscriber ID sample. One important note when creating a subscriber portlet is that you must subclass the DefaultProvider and override register(), init(), and getSubscriber(). Please refer to the source code within the PDK-Java Framework for more information:
SubscriberProvider: jpdk\src\oracle\portal\sample\devguide\subscriber
SubscriberRenderer: jpdk\src\oracle\portal\sample\devguide\subscriber
provider.xml: jpdk\providers\subscriber
You have already successfully installed the PDK-Java Framework and samples by following the article Installing the PDK-Java Framework and Samples. This sample uses the PDK-Java Framework
According to these install instructions, you already have the location of the samples.jar in the jserv.properties file.
This section will update the Oracle HTTP Server configuration file zone.properties which is located at %ORACLE_HOME%\Apache\Jserv\servlets on NT and $ORACLE_HOME/Apache/Jserv/etc on UNIX. It is important to backup this file prior to making changes.
Configuring the Subscriber Sample
This document uses the root zone which has a virtual path of "/servlets". For manageability, you may choose to use a different zone.
Under the Servlet Aliases section, add the alias that points to the Provider Adapter:
servlet.subscriber.code=oracle.portal.provider.v1.http.HttpProvider
This points the Provider Adapter (sample) to the location of the provider.xml file. Make sure to modify the directory to point to the correct location of the provider.xml file.
servlet.subscriber.initArgs=provider_root=D:\jpdk\providers\subscriber,prov_key_to_sub_map_root=D:\jpdk\providers\sample,sessiontimeout=1800000
Note: The Subscriber ID registration form stores information in a file called providerKeyToSubscriberInfoMap.ser. It stores this file in the same directory as the provider.xml of the PDK-Java Framework samples. The Subscriber ID portlet takes in an argument called prov_key_to_sub_map_root and it points to the location of the file created by the Subscriber ID registration form. So, if your provider_root argument for the samples points to D:\jpdk\providers\sample, then so will the prov_key_to_sub_map_root argument.
The subscriber ID sample may also use an additional (optional) argument. Currently, the Subscriber ID portlet uses the directory where the provider.xml is located to store its persistent information. If you would like that information stored elsewhere, you can provide an argument called map_root. For example:
servlet.subscriber.initArgs=provider_root=D:\jpdk\providers\subscriber,map_root=D:\jpdkmap,prov_key_to_sub_map_root=D:\jpdk\providers\sample,sessiontimeout=1800000
Save and close the zone.properties file.
Testing the Subscriber Sample
You can test that you have setup the sample properly using Oracle9iAS.
Start your Oracle HTTP Server.
Execute the sample from your Oracle HTTP Server, i.e. the listener where you configured your sample.
For example: http://myserver.mydomain.com:port/servlets/subscriber
If you did not receive the test page, verify that you can execute standard servlets using Oracle9iAS. Then, verify all the steps within the previous sections.
After setting up the provider with Oracle HTTP Server, you must now register the provider with Oracle9iAS Portal before adding the Subscriber ID portlet to your page.
Under the Administer tab (on Oracle Portal home page), click on Add a Portlet Provider within the portlet called Provider.
Name: SubscriberProvider
Display Name: Subscriber ID Provider
Timeout: 10
Timeout Message: Subscriber Provider Timed Out
Implementation Style: Web
Register on Remote Nodes: No
Provider Login Frequency: Once per User Session
URL: http://myserver.mydomain.com:port/servlets/subscriber (replace this with your URL)
Select the following radio button: The user has the same identity in the HTTP providers application as in the Single Sign-On identity.
Provider Key: SubscriberID
Note: Replace this with the Subscriber ID you were given by the Subscriber Registration portlet. It is case sensitive.
Proxy: No (As long as no proxy is required to contact the Provider Adapter).
Once registered, the sample Subscriber ID portlet is displayed in the Portlet Repository.
Note: When registering a new provider with Oracle9iAS Portal, only the user who registered the provider has privileges to see the provider/portlets. If necessary, go to the Folder with the name of the provider within the Portlet Repository content area and update the provider privileges as required.
Please refer to Oracle9iAS Portal online documentation for more information on adding portlets to a page.
You have now successfully installed and setup the Subscriber ID Sample.
Revision History:
June, 2001