Creating a Deployment Profile for Loadjava and Java Stored Procedures

The Loadjava and Java stored procedure deployment profile is very similar to the simple archive profile, except that the selected contents of the profile will be uploaded into the Oracle database via the command-line tool loadjava or in the case of Java stored procedures, they are stored in an Oracle database for general use.

Requirement: Make sure that you have configured a database connection in JDeveloper before you complete this task.

To create a deployment profile for Loadjava or Java stored procedures in JDeveloper:

  1. In the Application Navigator, select the project_icon <projectname>.jpr in which you want to create the deployment profile.
  2. Choose File | New to open the New Gallery.
  3. In the Categories tree, expand General and select Deployment Profiles. In the Items list, double-click Loadjava and Java Stored Procedures.

    If the category or item isn't found, make sure the correct project is selected, and choose All Technologies in the Filter By dropdown list.
  4. In the Create Deployment Profile dialog, specify a location for the deployment profile or accept the defaults.
    The deployment profile is named with a .deploy filename extension.
  5. Click Save. The Loadjava and Java Stored Procedures Deployment Profile Settings panel displays. Configure the settings for each page as appropriate:
    1. Files Page
    2. JAR Options Page
    3. Dependency Analyzer Page
    4. (Advanced) Filters Page: further refinement to the Dependency Analyzer settings
    5. Loadjava Options Page: Also see the Oracle Java Developer's Guide which is provided with your Oracle database documentation library, and also available from the Oracle Technology Network (OTN) at http://www.oracle.com/pls/db92/db92.homepage.
    6. Privileges Subpage
    7. Resolver Subpage
  6. Click OK when you are done.
    The newly created loadjava_stproc_deploy_profile <storedProc>.deploy deployment profile icon appears in the Navigator below the specified project.
  7. Select and right-click loadjava_stproc_deploy_profile <storedProc>Deployin the Navigator. Choose from the available context menu options.
  8. (Optional) If you select Add Stored Procedure Package, choose which methods you want to load as a stored procedure. For each Java method callable from SQL, a call spec is required, which exposes the method's top-level entry point to the database. Typically, only a few call specs are needed. JDeveloper generates the call spec for you from this page.
  1. Select a method and click Settings.
    If a method on the list is dimmed, this indicates a problem with deploying this method as a Java stored procedure. Click Why not? for an explanation.
    Refer to the Oracle Java Stored Procedures Developer's Guide for more information. This is available from the Oracle Technology Network (OTN) at http://www.oracle.com/pls/db92/db92.homepage.
  2. Configure the Method Settings as required. These settings allow you to customize the parts of the CREATE PROCEDURE and CREATE FUNCTION SQL statements that are used to customize the stored procedure.

    See the Oracle Database SQL Reference for more information about the CREATE FUNCTION, CREATE PROCEDURE, CREATE PACKAGE, and CREATE PACKAGE BODY statements which are used by the stored procedure deployment profile.
  3. (Optional) Right-click and choose Preview SQL Statements to display a dialog that shows the SQL statements used to load the the specifically selected item in the Navigator. In the case of top-level procedures or functions and packages, you will see complete SQL statements. In the case of packaged procedures or functions, you will only see fragments of SQL statements which represent the portion of the CREATE PACKAGE BODY statement corresponding to the packaged procedure or function.

Deploying Java Stored Procedures

 

Copyright © 1997, 2004, Oracle. All rights reserved.