| Creation Date: | October 25, 2002 |
| Status: | Production |
| Version: | PDK Release 2, (9.0.2.4.0 and later) |
This document describes the steps necessary to package your provider for deployment.
One of the biggest differences between PDK-Java v1 and PDK-Java v2 is the packaging and deployment process. In PDK-Java v1, a Web Provider was essentially just a Servlet and it was registered in JServ's zone.properties along with any Servlets you referenced in your provider definition file. You also had to make sure all the other components of your provider were in the correct place so they could be referenced. This was not too difficult when you had a small number of providers on a single machine, but it became a real headache when you had to deal with a large number of providers in a load-balanced environment - everything had to be replicated correctly. J2EE introduces the concepts of Enterprise Applications and Web Applications and their associated EAR and WAR files.
WAR and EAR files are used to deploy applications in a J2EE application server, such as OC4J. The purpose of the WAR and EAR files is to encapsulate all the components necessary to run an application in a single file. This makes the deployment of an application packaged this way very easy and very consistent, reducing the possibility of errors due when an application needs to be moved from development to test, to production. However, this does require a little more work from developers to create the files.
WAR files represent a web application and include all the components of that web application including java libraries or classes, servlet definitions and parameter settings, JSP files, static HTML files and any other resources the application might need.
EAR files represent an "enterprise application". This is primarily an EJB concept, but also provides a grouping mechanism for web applications.
The PDK-Java now allows you to deploy multiple providers under a single adapter servlet. The providers are identified by a service name or service identifier. For those of you who are familiar with the SOAP standard, this is similar to the SOAP service identifier. When you deploy a new provider you must assign a service name to the provider and use that service name when creating your provider WAR file.
Once your provider has been deployed, the correct service name must be used when registering your provider in Oracle Portal to ensure that requests are sent to the correct provider. For older releases of Oracle Portal that do not understand the concept of a service name, you can choose one of your providers to be the default. If the adapter servlet receives a request that does not specify a service name, the request will be forwarded to the default provider.
The first step in deploying your provider is to create the WAR file that contains the provider and all the resources it needs to execute. The steps below represent manual configuration of a WAR file. If you are familiar with one of the various utilities for assembling WAR files, you are free to use it.
The default service is the provider that should receive any request that does not specify a service name. This feature is provided to allow you to register your provider on release 3.0.9 of Oracle Portal.
The default provider is specified by editing the _default.properties file in the deployment directory of your WAR file. The _default.properties file looks something like this:
serviceClass=oracle.webdb.provider.v2.adapter.soapV1.ProviderAdapter
loaderClass=oracle.portal.provider.v2.http.DefaultProviderLoader
showTestPage=true
definition=providers/sample/provider.xml
autoReload=true
Edit the "definition" entry so it points to the provider definition file that represents your default provider. The directory path should be based on the contents of you WAR file, not the physical location of the file on the filesystem.
If you are not using a provider definition file to define your provider, you need to create an implementation of the ProviderLoader interface and edit the "loaderClass" entry.
Once you have specified the contents of your WAR file, you are ready to create the WAR file itself. To create the WAR file:
The steps below represent manual configuration of an EAR file. If you are familiar with one of the various utilities for assembling EAR files, you are free to use it.
<?xml version "1.0">
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/j2ee/dtds/application_1_3.dtd">
<application>
<display-name>this is the display name of the application</display-name>
<description>this is a description of the application</description>
<module>
<web>
<web-uri>yourwarfile.war</web-uri>
<context-root>/</context-root>
</web>
</module>
</application>
$IAS_HOME/oc4j/j2ee/home/applications
<application name="{application name}"
path="../applications/{ear file name}" />Replace the substitution strings with appropriate values.
{application name} - the name of the application
{ear file name} - the name of the .ear file containing the provider
eg </application name="Application Name" path="../application/upgradedProvider.ear" />
<web-app application="{application name}"
Replace the substitution strings with appropriate values.
name="{deployment name}"
root="/{application path}" />
{application name} - the name of the application as specified in server.xml
{deployment name} - the name associated with this deployment of the application
{application path} - the relative URI for the applicatione.g. <web-app application="Global Application Name"
name="Local Application Name"
root="/newProvider" />
http://{server}:{port}/{application path}/providers/
Replace the substitution strings with appropriate values.
{server} - the name of the server hosting the 9iAS listener
{port} - the port for the 9iAS listener
{application path} - the relative URI for the application defined in step 3e.g. http://iashost:80/newProvider/providers/
Verify that the provider has been deployed and is accessible. You should see the familiar test page for your default provider (assuming your .properties file specifies showTestPage=true). To view the test page for specific provider service, append the service name to the above URL
e.g. http://iashost:80/newProvider/providers/myService
As mentioned earlier in this document, web providers now have service names or identifiers as well as a URL. The URL represents the location of the adapter servlet and the service name identifies a provider deployed on that adapter. Since service names did not exist in release 3.0.9 of Oracle Portal, the registration process is slightly different.
When registering your web provider on Oracle Portal 3.1, the registration wizard now includes fields for both the provider URL and service name. The URL is the URL of the adapter servlet and the service name is the name of the provider service you want to register. You should specify both the URL and the service name. If you omit the service name, you will, in effect, be registering the default provider. You are encouraged to always use the service name so you are sure which provider you are registering.
When registering on Oracle Portal 3.0.9, the service name is specified by appending it to the adapter URL
For example:
service name: sample
servlet URL: http://iashost:80/newProvider/providers/
registration URL: http://iashost:80/newProvider/providers/sample
If you omit the "sample" from the registration URL then any requests will be forwarded to the provider specified in _default.properties (see Specifying Your Default Service). This feature is provided so you can upgrade existing providers to the new version of PDK-Java and deploy them using the original URL, without impacting any portals that were using the provider.
| Revision History: |
|
| 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 |