Oracle9iAS Portal Developer Kit
Installing the Subscriber ID Sample

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:  

ASSUMPTIONS

  1. 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

  2. According to these install instructions, you already have the location of the samples.jar in the jserv.properties file. 

  3. You have received a Subscriber ID (Provider Key) from the Subscriber Registration portlet located in the PDK-Java Framework samples.

SETTING UP ORACLE HTTP SERVER

  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

  1. Open the zone.properties file. 

    This document uses the root zone which has a virtual path of "/servlets".  For manageability, you may choose to use a different zone.

  2. Under the Servlet Aliases section, add the alias that points to the Provider Adapter:

         servlet.subscriber.code=oracle.portal.provider.v1.http.HttpProvider

  3. Under the Aliased Servlet Init Parameters section, add the initial arguments needed by the sample. 

    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

  1. Save and close the zone.properties file.

Testing the Subscriber Sample

You can test that you have setup the sample properly using Oracle9iAS.

  1. Start your Oracle HTTP Server.

  2. 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

  3. Review the content of the test page displayed.

    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.

REGISTERING THE PROVIDER

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.

  1. Under the Administer tab (on Oracle Portal home page), click on Add a Portlet Provider within the portlet called Provider.

  2.  Fill out provider information for the sample.
    1. Name: SubscriberProvider

    2. Display Name: Subscriber ID Provider

    3. Timeout: 10

    4. Timeout Message: Subscriber Provider Timed Out

    5. Implementation Style: Web

    6. Register on Remote Nodes: No

    7. Provider Login Frequency: Once per User Session

    8. URL: http://myserver.mydomain.com:port/servlets/subscriber (replace this with your URL)

    9. Select the following radio button: The user has the same identity in the HTTP providers application as in the Single Sign-On identity. 

    10. Provider Key:  SubscriberID

      Note:  Replace this with the Subscriber ID you were given by the Subscriber Registration portlet.  It is case sensitive.

    11. Proxy:  No (As long as no proxy is required to contact the Provider Adapter).

  3. Click OK.

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.

ADDING SAMPLE PORTLET TO A PAGE

  1. Display the contents of the Portlet Repository and view the sample portlet.
  2. Add the subscriber ID portlet listed under the Provider called "Subscriber ID Provider' to a portal page.

    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: