Using Java Pluggable Components (JPC)in Oracle Forms
Java pluggable components are java bean classes that can integrate to Oracle Forms environment and provide new functionality to the standard Forms build-in functionality. They are used in web-centric application that are deployed through Oracle Internet Application Server.
The JPC are standard components that can be created you, or can be downloaded through the internet.
The following shows how to add JPC component to a form module and how to configure the application server accordingly.
The example explains how to add File Upload component (Note the same can be done using WebUtil)
Using Java Pluggable component
File upload example
This document assumes that the Oracle Developer is installed as the following directory
C:\oracle\product\10.1.0\DevSuite_10g => $ORACLE_HOME
1) Create the following file in directory at the %ORACLE_HOME/forms/server and call it fileupload.env
Add the following to the end of the formsweb.cfg file
pageTitle=OracleAS Forms Services - FileUpload Sample
Important: Please note that it is very important that you set the archive variable and the archive_jini variable correctly.
In our example, the java classes (components) are located inside the demo.jar (which is incorrectly document in the oracle documentation for the upload demo). Also note that the /formsdemo/ is a virtual directory and the actual directory is /forms/demos. This is configured when you deploy the application. Therefore make sure that the file demo.jar exists and located as indicated above
The variable envFile points to a the file fileupload.env, which is the file defined in step 1 above
This file defines the CLASS PATH, the FORMS path and the Oracle path.
Make sure that the form (FMX) file is located within the FORMS PATH. Note that the actual file name to be executed is defined by the variable
Form = Dubai.fmx
===================== CODING ======================================
You need to follow coding as document in the example and the demo
Reusing the FileUpload utility within your own applications requires the following steps.
* Sample Callback trigger for FileUploader
* You should always implement a check on the status
* to make sure that the upload has worked.
* This trigger will only be executed once the upload
* has finished or aborted
if FileUploader.getStatus = FileUploader.FINISHED then
message(FileUploader.getSourceFile || 'was uploaded');
elsif FileUploader.getStatus = FileUploader.FAILED then
message('Upload Failed because: '||FileUploader.getError);
Warning: If you intend to use the FileUpload utility in your own applications, We recommend that you re-sign the UploadClient PJC with your own x509 certificate.
Please follow the documents
the entire document is downloaded from internet