Adding custom classes to the SOA Suite server

This recipe explains how to add custom classes to the Oracle SOA Suite server. Similar to adding the third-party libraries, the Oracle SOA Suite server provides a convenient placeholder for classes.

How to do it…

We will add classes that take care of loan calculation in this recipe. The same recipe can also be used for the addition of other Java class files:

  1. If the server is running, we repeat the step for stopping the Oracle SOA Suite server from the Adding third-party libraries to the SOA Suite server recipe.
  2. After the server has stopped, copy the class structure (in our case, LoanInfo.class and LoanCalc.class) to the extension folder.

    Note

    The extension folder for the Oracle SOA Suite is located at the following location:

    %SOA_Home%soamodulesoracle.soa.ext_11.1.1classes

    The following screenshot shows the tree structure of the extension directory after copying the class files:

    How to do it…
  3. Finally, to start the Oracle SOA Suite, repeat the corresponding command from the Adding third-party libraries to the SOA Suite server recipe.

How it works...

As we saw in this recipe, the simple classes can be copied directly to the extension directory. That way, there is no need to prepare a JAR archive or go through any additional steps. Also, there is no need to copy the complete class structure when one class was changed.

As opposed to adding the JAR files, we can leave out one step. That step is rebuilding the extension repository JAR with ant, because the classes directory is included into the manifest file by default. Remember that we have to rebuild the extension repository JAR (oracle.soa.ext.jar) in the Adding third-party libraries to the SOA Suite server recipe.

Tip

When we have custom classes with multiple dependency JARs, we put the custom classes into the extension directory and the dependency JARs into the %SOA_Home%lib directory. This way, the custom classes will find the dependency classes.

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

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