Oracle Application Server Portal Developer Kit (PDK)
Installing the Subscription Sample (V2)

Last Updated: August 10, 2003
Status: Production
Version: PDK Release 2, (9.0.2 and later)

Overview

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 OracleAS 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 OracleAS 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 Key (also known as "Provider Key").  You will begin billing them once you receive confirmation that they have registered your Web provider with their OracleAS Portal.  At registration, they provide the "Subscription Key" you gave them within their OracleAS 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, the main sample provider 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 key to use to register this Subscriber ID Provider. 

This document is an installation and configuration guide to the Subscriber ID sample provider.  One important note when creating a subscriber provider is that you must subclass ProviderInstance and override init(), register(), deregister(), and getSubscriber(). The provider must persist the subscription key passed during registration of an instance, so that it is available in all subsequent calls to that instance, and must remember to remove this persisted information when the instance is deregistered.

The complete source code for this provider is included in the PDK-Java distribution. The relevant files are:

The provider is pre-configured within jpdk.ear, with a service ID of urn:subscriber.

Assumptions

  1. You have already successfully installed the PDK-Java Framework and samples by following the article Installing the PDK-Java Framework and Samples.
  2. You have received a Subscriber ID (Subscription Key) from the Subscriber Registration portlet located in the main 'sample' provider.

Testing the Subscriber Sample

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

  1. Execute the sample from your OracleAS HTTP Server, i.e. the listener where you configured your sample.

    For example:  http://myserver.mydomain.com:port/jpdk/providers/subscriber

  2. Review the content of the test page displayed. If you did not see the test page, verify that you can execute standard servlets using OracleAS.

Registering The Provider

After testing the provider on OracleAS HTTP Server, you must now register the provider with OracleAS Portal before adding the Subscriber ID portlet to your page.

  1. From the Build tab on the OracleAS Portal Home Page, click on Register a Portlet Provider within the portlet called Providers.
  2. Register with the following parameters:
  3. Make sure the following radio button is selected:
  4. In the Subscription Key field, enter the Subscriber ID you were given by the Subscriber Registration portlet.  It is case sensitive.
  5. Click Finish

Once registered, the sample Subscriber ID portlet is displayed in the Portlet Repository.

Adding the 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 OracleAS 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:
Revision No Last Update Description
1.0 June, 2001 Created
2.0 January 18, 2002 Revised for v2 framework
2.1 August 10, 2003 Revised branding and applied PDK Stylesheet

Oracle Corporation
World Headquarters
500 Oracle Parkway
Redwood Shores, CA 94065, USA
http://www.oracle.com/
Worldwide Inquiries:
1-800-ORACLE1
Fax 650.506.7200
Copyright and Corporate Info