Skip Headers
Oracle® Fusion Middleware Administrator's Guide for Oracle Service Bus
11g Release 1 (11.1.1.6.3)

Part Number E15867-08
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

8 JARs

This chapter describes how to create, locate, edit, and delete JAR resources using the Oracle Service Bus Administration Console.

A JAR (Java ARchive) is a zipped file that contains a set of Java classes. It is used to store compiled Java classes and associated metadata that can constitute a program. A JAR acts like a callable program library for Java code elements (so that a single compilation link provides access to multiple elements, rather than requiring bindings for each element individually). To learn more about JARs, see http://java.sun.com/docs/books/tutorial/deployment/jar/.

JAR resources in Oracle Service Bus are used in:

8.1 Locating JARs

To locate JARs:

  1. Do either of the following:

    • Select Project Explorer to display the Projects View page or the Project/Folder View page. Then navigate through projects and folders to find the JAR.

    • Select Resource Browser > JARs. The Summary of JARs page displays the information shown in Table 8-1. For a more detailed description of the properties, see Section 8.3, "Editing JARs."

  2. To restrict the number of items in the list or locate a specific JAR, search for a JAR using name and path filters. In the Name and Path fields, enter the name and path of the search target(s), then click Search.

    The path is the project name and the name of the folder in which the JAR resides.

    This search supports wildcard characters. For example, you can enter "j*" in the Name field to get a list of JARs that start with "j".

    Click View All to remove the search filters and display all JARs.

Table 8-1 JAR Details

Property Description

JAR Name

The unique name assigned to the JAR. The name is a link to the View a JAR Resource - JAR Configuration page. See Section 8.3, "Editing JARs."

Path

The path is the project name and the name of the folder in which the JAR resides. It is a link to the project or folder that contains this resource. See Section 4.1.1, "Qualifying Resource Names Using Projects and Folders."

No. of Classes

The number of classes the JAR contains.

Size

The size of the JAR in bytes.

Options

Click the Delete icon to delete a specific JAR. See Section 8.5, "Deleting JARs."


8.2 Adding JARs

To add a JAR:

  1. If you have not already done so, click Create to create a new session or click Edit to enter an existing session. See Section 3.1, "Using the Change Center."

  2. Select Project Explorer, then select a project or folder in which to add the JAR. The Project/Folder View page is displayed.

  3. From the Create Resource list, select JAR from under Utility to display the Create a New JAR Resource page.

  4. In the Resource Name field, enter a unique name for this JAR. This is a required field.

    Follow the Section 2.3, "Resource Naming Restrictions" for naming guidance.

  5. In the Resource Description field, enter a description for the JAR.

  6. In the JAR Source File field, do one of the following:

    • Enter the path to the location of the JAR.

    • Click Browse to locate and import an existing JAR.

    This is a required field.

  7. Click Save. The JAR resource is created and saved in the current session.

    If the JAR loads without problems, the contents of the JAR will be available for viewing. To learn how to view JAR details, see Section 8.3, "Editing JARs."

  8. To end the session and deploy the configuration to the run time, click Activate under Change Center.

8.3 Editing JARs

Use the View a JAR Resource - Configuration page to update JAR files. Updating a JAR file essentially involves pointing the resource to a new version of the JAR, as you cannot edit a JAR using Oracle Service Bus.

  1. If you have not already done so, click Create to create a new session, or click Edit to enter an existing session. See Section 3.1, "Using the Change Center."

  2. Locate the JAR, as described in Section 8.1, "Locating JARs."

  3. Click the JAR name. The View a JAR Resource - JAR Configuration page displays the information shown in Table 8-2.

    Table 8-2 JAR Information

    Property Description

    Last Modified By

    The user who imported this JAR into the configuration.

    Last Modified On

    The date and time that the user imported this JAR into the configuration. Click the date and time link to view the change history of this resource. See Section 4.23, "View Change History Page."

    References

    The number of JARs that this JAR references. If such references exist, click the numeric link to view a list of the JARs. See Section 4.22, "Viewing References to Resources."

    Referenced by

    The number of objects that reference this JAR. If such references exist, click the numeric link to view a list of the objects. See Section 4.22, "Viewing References to Resources."

    Description

    A description of this JAR, if one exists.


    The JAR configuration is displayed by default, which includes the information shown in Table 8-3.

    Table 8-3 JAR Configuration Details

    Property Description

    JAR Configuration

    The list of classes and interfaces in this JAR.

    Click (+) beside the name of a Java class to display a list of methods included in the class.


  4. To make a change to the fields, click Update.

    The only field you can edit is Description. You cannot edit a JAR in Oracle Service Bus. To update the JAR, you must select a new JAR to use. To learn how, see Section 8.2, "Adding JARs."

  5. Click Save to commit the updates in the current session.

  6. To end the session and deploy the configuration to the run time, click Activate under Change Center.

    Note:

    If you change the JAR used by an EJB Business Service (point the JAR resource to a new version of the JAR), you need to redeploy the EJB. You will then have to edit any EJB service that uses this JAR, and reselect the JAR resource, save, and activate. That will repackage the EJB business service to use the new JAR.

    Java callout actions and Tuxedo-based services, however, will automatically pick up the new JAR.

8.4 Editing JAR Dependencies

In Oracle Service Bus, JAR resources can contain classes that depend on other classes in different JARs. Use the Edit JAR Dependencies page to add or remove referenced JAR resources.

  1. If you have not already done so, click Create to create a new session, or click Edit to enter an existing session. See Section 3.1, "Using the Change Center."

  2. Locate the JAR, as described in Section 8.1, "Locating JARs."

  3. Click the JAR name.

    On the View a JAR Resource - JAR Configuration page, a numeric indicator on the Dependencies tab displays the number of referenced JARs configured for this JAR resource, or a zero if there are none.

  4. Select the Dependencies tab to display referenced JARs or to add them.

    The JAR dependencies page includes the information shown in Table 8-4.

    Table 8-4 JAR Dependencies Information

    Property Description

    Name

    The name of the referenced JAR. The name is a link to the View a JAR Resource - JAR Configuration page. See Section 8.3, "Editing JARs."

    Path

    The path is the project name and the name of the folder in which the JAR resides.


  5. To add or remove referenced JARs, click Edit.

    The Edit JAR dependencies page includes the information shown in Table 8-5.

    Table 8-5 JAR Dependencies Details

    Property Description

    Manifest Class Path

    Class-Path entries in the JAR manifest file.

    Name

    The name and path of the referenced JAR resource.

    Options

    • Use the Up and Down arrows to change the referenced JARs order of precedence.

    • Click the Delete icon to remove a referenced JAR.


  6. Click Add JARS.

  7. In the JARs Browser, locate or select referenced JAR resources and click Submit.

    For example, if you are editing JAR A and adding JARs B and C, JAR A references (depends on) JAR B and JAR A references (depends on) JAR C.

    Use the arrows in the Options column to reorder the hierarchy of referenced JARs or the Delete icon to remove them.

  8. Click Save to commit the updates in the current session.

  9. To end the session and deploy the configuration to the run time, click Activate under Change Center.

8.5 Deleting JARs

To delete a JAR:

  1. If you have not already done so, click Create to create a new session or click Edit to enter an existing session. See Section 3.1, "Using the Change Center."

  2. Select Resource Browser > JARs.

  3. Click the Delete icon in the Options field of the JAR you want to delete. The JAR is deleted in the current session. A Deletion Warning icon is displayed when other resources reference this resource. You can delete the resource with a warning confirmation. This might result in conflicts due to unresolved references to the deleted resource.

  4. To end the session and deploy the configuration to the run time, click Activate under Change Center.