Introduction
Contents
Requirements
Deploying the PL/SQL Generator
Deploying the PL/SQL Generator to a stand-alone OC4J server
Manual Deployment
Hot Deployment
Deploying the PL/SQL Generator to an OracleAS 10g OC4J Instance
Using the Application Server Control
Using the dcmctl utility
Generating the provider and portlet packages
Publishing the generated PL/SQL portlet
Installing the provider and portlet packages into the database
Registering the database provider with OracleAS Portal 10g
Adding the generated PL/SQL portlet to a portal page
PL/SQL Generator supported tags
The PL/SQL Generator is a Web application that creates installable PL/SQL code for a database provider and its portlets based on the provider and portlet definitions that are stored in the form of an XML file. This document describes how to install and configure the PL/SQL Generator. It also explains how to install the generated PL/SQL code into the Oracle database, register the database provider, and publish the PL/SQL portlet to your portal page.
This section describes the content of the PL/SQL Generator download. It includes one application file, one documentation file and supporting image files, and a sample provider and portlet definition XML file.
Application File
- Copy the plsqlgenerator.ear file into the applications subdirectory under the OC4J home directory. Usually, this directory is:
$OC4J_HOME/j2ee/home/applications
Note: $OC4J_HOME is the root directory of your stand alone OC4J installation. You can also find directories named bin, jdk, lib, jlib etc. under this directory.- Add the following line to the $OC4J_HOME/config/server.xml file:
<application name="plsqlgenerator" path="../applications/plsqlgenerator.ear" />
- Bind the application to the default site by adding the following line to the $OC4J_HOME/config/http_web_site.xml file:
<web-app application="plsqlgenerator" name="plsqlgenerator" root="/plsqlgenerator" />
- Start up the OC4J server. This will automatically deploy the application based on the information specified in Step 3. To start up the OC4J instance, run the following command from the $OC4J_HOME/j2ee/home directory:
java -jar oc4j.jar
- Access PL/SQL Generator using the following URL:
http://<hostname>:<OC4J_port>/plsqlgenerator/generator.html
This method explains the concept of hot deployment where you can deploy a Web application without restarting the OC4J server.
- Copy the plsqlgenerator.ear file into the OC4J home directory. Usually, this directory is:
$OC4J_HOME/j2ee/home
- Verify whether your OC4J server is running. If not, start the OC4J server by running the following command from the $OC4J_HOME/j2ee/home directory:
java -jar oc4j.jar
- Deploy the plsqlgenerator.ear file to the OC4J server by running the following command from the $OC4J_HOME/j2ee/home directory:
java -jar admin.jar ormi://<host>:<ormi_OC4J_port> <adminuser> <password>
-deploy -file plsqlgenerator.ear -deploymentName plsqlgeneratorNote: ormi_OC4J_port is the port number for the ORMI protocol.
You should see output similar to the following upon the successfull deployment:
Notification ==> Application Deployer for plsqlgenerator STARTS [ 2004-03-26T10:05:41.627PST ]
Notification ==> Undeploy previous deployment
Notification ==> Copy the archive to /private/oracle/OC4J_904/j2ee/home/applications/plsqlgenerator.ear
Notification ==> Unpack plsqlgenerator.ear begins...
Notification ==> Unpack plsqlgenerator.ear ends...
Notification ==> Initialize plsqlgenerator.ear begins...
Notification ==> Initialize plsqlgenerator.ear ends...
Notification ==> Initialize plsqlgenerator begins...
Notification ==> Initialize plsqlgenerator ends...
Notification ==> Application Deployer for plsqlgenerator COMPLETES [ 2004-03-26T10:05:42.454PST ]Bind the PL/SQL Generator to the OC4J server by running the following command:
java -jar admin.jar ormi://<host>:<ormi_OC4J_port> <adminuser> <password> -bindWebApp plsqlgenerator plsqlgenerator http-web-site /plsqlgenerator
- Access the PL/SQL Generator using the following URL:
http://<hostname>:<OC4J_port>/plsqlgenerator/generator.html
Using the Application Server Control
- Logon to the Application Server Control of the OracleAS 10g instance as ias_admin using the following URL:
http://<hostname>:<iAS_instance_admin_port>
- In the System Components section on the OracleAS 10g instance home page, select an OC4J instance to which you would like to deploy the PL/SQL Generator. For example, home.
Note: You can also create a new OC4J instance.
Figure 1. The OracleAS 10g instance home page.- In the OC4J instance home page, select the Applications tab.
Figure 2. The OC4J instance home page.- In the Applications tab of the OC4J instance home page, click the Deploy EAR file button. This starts the Deploy Application wizard.
Figure 3. The Applications tab of the OC4J instance home page.- In the initial page of the Deploy Application wizard, define the location of the plsqlgenerator.ear file in the J2EE Application field and specify the application name for the PL/SQL Generator in the Application Name field. For example, plsqlgenerator. Optionally select the parent application in the Parent Application field or leave it set to the default value. Click the Continue button.
Figure 4. The inital page of the Deploy Application wizard.- In the URL Mappings for Web Module page of the Deploy Application wizard, enter the URL to which you want to map the PL/SQL Generator in the URL Mapping field. The default value is /plsqlgenerator. Click the Finish button.
Figure 5. The URL Mappings for Web Module page of the Deploy Application wizard.- In the Review page of the Deploy Application wizard, review your selections and statistics for the PL/SQL Generator you are deploying. To change any of the wizard settings, use the Back button to navigate to the wizard page to which you want to make changes. When you are ready to deploy the application, click the Deploy button.
Figure 6. The Review page of the Deploy Application wizard.- The Processing: Deploy page is displayed to inform you that the PL/SQL Generator is being deployed to the OC4J instance. Wait until the the process ends and the Confirmation page is displayed.
Figure 7. The Processing: Deploy page.- Click OK in the Confirmation page after successful deployment of the PL/SQL Generator.
Figure 8. The Applications tab of the OC4J instance home page.- Verify that the plsqlgenerator application is listed in the Applications tab on the OC4J instance home page.
![]()
Figure 9. The OracleAS 10g instance home page.
- Access the PL/SQL Generator using the following URL:
http://<hostname>:<iAS_instance_listen_port>/plsqlgenerator/generator.html
- Copy the plsqlgenerator.ear file into the root directory of the OracleAS 10g instance. You will find directories named bin, Apache, lib, jlib etc. under this directory.
- Deploy the PL/SQL Generator by runnig the following command:
$IAS_HOME/dcm/bin/dcmctl deployapplication -file $IAS_HOME/plsqlgenerator.ear
-a plsqlgenerator -co <OC4J_instance_name>Note: $IAS_HOME is the root directory of your OracleAS 10g installation.
You should see output similar to the following upon the successfull deployment:
1 BC4J
2 BC4JManager
3 IsWebCacheWorking
4 plsqlgenerator- Access the PL/SQL Generator using the following URL:
http://<hostname>:<iAS_instance_listen_port>/plsqlgenerator/generator.html
The PL/SQL Generator creates installable PL/SQL code contains provider and portlet packages in the form of a SQL file. To generate the SQL file, perform the following steps in the PL/SQL Generator home page:
Figure 10. The PL/SQL Generator home page.
To install the generated provider and portlet packages into the database in which you have installed OracleAS Portal 10g, perform the following steps:
create user <provider_schema> identified by <provider_schema_password>;
grant resource, connect to <provider_schema>;
@provsyns.sql <provider_schema>
Note: $IAS_HOME is the root directory of your OracleAS 10g installation.
After creating the provider and portlet packages in the database, you must register the provider with OracleAS Portal 10g before adding the PL/SQL portlet to a portal page.
You are now ready to add the generated PL/SQL portlet to an OracleAS Portal 10g page. To add the generated PL/SQL portlet to a portal page:
| <!-- This is a sample provider.xml
file for the PLSQL Generator 1.2 --> <provider> <portlet> <id>1</id> <name>Test_Portlet</name> <title>Test Portlet Title</title> <shortTitle>Short portlet title</shortTitle> <description>This is a Test portlet</description> <timeout>30</timeout> <timeoutMsg>Test Portlet Timed Out</timeoutMsg> <showEdit>true</showEdit> <showEditDefault>true</showEditDefault> <showDetails>true</showDetails> <showPreview>true</showPreview> <hasHelp>true</hasHelp> <hasAbout>true</hasAbout> <language>en</language> <contentType>wwpro_api_provider.CONTENT_TYPE_HTML</contentType> <apiVersion>wwpro_api_provider.API_VERSION_1</apiVersion> <callIsRunnable>true</callIsRunnable> <callGetPortlet>true</callGetPortlet> <acceptContentType>'text/html'</acceptContentType> <hasShowLinkMode>false</hasShowLinkMode> <mobileOnly>false</mobileOnly> <passAllUrlParams>true</passAllUrlParams> <cacheLevel>wwpro_api_provider.CACHE_LEVEL_USER</cacheLevel> <rewriteUrls>true</rewriteUrls> </portlet> </provider> |
Portlet XML tag Description<id> Defines the portlet's unique id. This value must be unique within the provider. <name> Defines the portlet's name. The name should not have any spaces. <title> Defines the portlet's title. <shortTitle> Defines the portlet's short title. Used for mobile portlets. <description> Defines the portlet's description. <timeout> Specifies the portlet's timeout value in seconds. <timeoutMsg> Defines the text of the message that is displayed when the portlet times out. <showEdit> Indicates whether the portlet supports the EDIT show mode that enables the user to customize the portlet's properties. The tag can take a value of either true or false. <showEditDefault> Indicates whether the portlet supports the EDIT DEFAULTS show mode that enables page administrators to customize the default values of the portlet's properties. The tag can take a value of either true or false. <showDetails> Indicates whether the portlet can be viewed in the FULL SCREEN (Detailed) show mode. In this mode the entire browser window is dediatied to the portlet, so that the portlet can show more details that it can show when sharing the page with other portlets. The tag can take a value of either true or false. <showPreview> Indicates whether the portlet can be viewed in the PREVIEW show mode. The tag can take a value of either true or false. <hasHelp> Indicates whether the portlet supports the HELP show mode. The tag can take a value of either true or false. <hasAbout> Indicates whether the portlet supports the ABOUT show mode. The tag can take a value of either true or false. <language> Defines the portlet's default language. <contentType> Indicates the default content type supported by the portlet. The tag can take one of the following values:
wwpro_api_provider.CONTENT_TYPE_HTML, wwpro_api_provider.CONTENT_TYPE_XML, wwpro_api_provider.CONTENT_TYPE_MOBILE.<apiVersion> Specifies the version of the OracleAS Portal PL/SQL API to which the portlet conforms. For OracleAS Portal 9.0.4 and earlier releases, the tag value shoud be wwpro_api_provider.API_VERSION_1. <callIsRunnable> Indicates whether OracleAS Portal must check for the user's credentials before displaying the portlet. It can take a value of either true or false. The default value is true. <callGetPortlet> Indicates whether the portal can use the portlet record data stored in the Portlet Metadata Repository (PMR) instead of contacting the provider for the portlet record. If the portlet record (specified by provider id, portlet id, and language) returned by a provider does not change, then the provider should set the value for call_get_portlet to false. This tells the portal to use the PMR instead of making calls to the provider's get_portlet and get_portlet_list functions. An example of when a provider would not want the portal to use portlet metadata from the PMR, is when the value of the portlet records is different for logged on users. It can take a value of either true or false. The default value for this tag is true. <acceptContentType> Specifies a comma delimited list of content types that the portlet can produce. For example, if a portlet can produce content of both HTML and MOBILEXML type, then the tag value is: text/html,text/vnd.oracle.mobilexml. <hasShowLinkMode> Indicates whether the portlet implements the Show Link show mode. If the value is false, the portlet uses its short or full title to display a link label that references the portlet content in a mobile device. Otherwise, a customized link can be generated in the portlet code. The tag can take a value of either true or false. The default value for this tag is false. <mobileOnly> Indicates whether the portlet is available only to mobile devices. The tag can take a value of either true or false. The default value for this tag is false. <preferenceStorePath> Specifies the base preference store path where the provider has stored the portlet customization information. This path is used when exporting portlets. <createdOn> Defines the portlet creation date. The default value is sysdate. <createdBy> Defines the user who created the portlet record. <lastUpdatedOn> Defines the most recent date when the portlet record was changed. Defaults to sysdate. <lastUpdatedBy> Defines the user who most recently changed the portlet record. <passAllUrlParams> Indicates parameter passing behavior in the portlet. It can take a value of either true or false. If the tag value is true, then OracleAS Portal passes all parameters in the URL to the portlet. If the tag value is false, then the portlet receives only those parameteres that are intended for the portlet. The default value for this tag is true. <cacheLevel> Indicates a portlet's cache level. It can take one of the following values:
wwpro_api_provider.CACHE_LEVEL_SYSTEM,
wwpro_api_provider.CACHE_LEVEL_USER,
wwpro_api_provider.CACHE_LEVEL_PTL_SESSION<rewriteUrls> Indicates whether or not URL rewriting will be performed on the output from a portlet render request. It can take a value of either true or false. The default value for this tag is false.
| 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 |