Adding custom classes to JDeveloper projects

This recipe describes how to add classes to be used inside JDeveloper projects, especially in SOA projects.

Getting ready

We build this recipe on top of the Adding custom classes to the SOA Suite server recipe. We will add the SOA composite project where we utilize the classes for calculating loan parameters.

How to do it…

To add custom classes to the JDeveloper project, we need to copy the libraries to the SCA-INF/classes directory. That way, the custom classes are included in the build phase and deployment phase of the project.

How it works…

The SOA projects in JDeveloper have a placeholder (SCA-INF/classes) where we put the custom classes. This also ensures that libraries are picked by the build process which packs the libraries into the deployment package.

There's more…

The procedure we described in this recipe can be taken into account when we don't have the same set of custom classes already deployed in the Oracle SOA Suite server. In cases where the custom classes already exist in the Oracle SOA Suite server, the following section describes other options with which to add custom classes to the JDeveloper projects:

Adding custom classes from the JDeveloper project properties

Right-click on the project LibsAndClasses and select Project Properties. From the tree in the dialog, select Libraries and Classpath and then click on the Add JAR/Directory... button. At the opened dialog, search for the directory that holds the custom classes and click on the Select button. We can see how a new custom class directory has appeared under the classpath entries in the project properties dialog:

Adding custom classes from the JDeveloper project properties

See also

The usage of custom classes in a BPEL process is shown in the Invoking third-party libraries from BPEL 2.0 process and Invoking third-party libraries from BPEL 1.1 process recipes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset