Oracle9iAS Portal Developer Kit
Installing the Susbscriber ID Sample (V2)

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 Key (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 "Subscription 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, 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:

- SubscriberProvider.java: in src/oracle/portal/sample/v2/devguide/subscriber

- SubscriberRenderer.java: in src/oracle/portal/sample/v2/devguide/subscriber

- provider.xml: under jpdk/jpdk/WEB-INF/providers/subscriber in jpdk.ear

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

1. Execute the sample from your Oracle 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 receive the test page, verify that you can execute standard servlets using Oracle9iAS.

REGISTERING THE PROVIDER

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

1. From the Build tab on the Oracle Portal Home Page, click on Register a Portlet Provider within the portlet called Providers.

2. Register with the following parameters:

   - Name: SubscriberProvider
   - Display Name: Subscriber ID Provider
   - Timeout: 100
   - Implementation Style: Web
   - URL: http://<host>:<port>/jpdk/providers
   - Service Id: urn:subscriber
   - Login Frequency: Once Per User Session

3. Make sure the following radio button is selected:

   The user has the same identity in the Web providers application as in the Single Sign-On identity

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 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:

- January 2002
- June, 2001