8 Using an Exploded Archive during Customization

Learn how to use an exploded archive when customizing Oracle Communications Billing Care.

Topics in this document:

About Using an Exploded Archive

You deploy Billing Care customizations as a customizations shared library to the same Oracle WebLogic Server domain where Billing Care is running. During customization, Oracle recommends using an exploded archive containing your shared library. An exploded archive represents your customizations in a local file system instead of a packaged archive (.war).

Using an exploded archive of your customizations enables you to update them and automatically deploy them to the Billing Care domain without having to package your customizations' shared library after each change. Your Billing Care customizations can be viewed by logging out and back into Billing Care in the web browser.

Use exploded archives during development and testing of your customizations. For production instances of Billing Care, package your customizations as a .war file and deploy this file using WebLogic Server administration tools to your Billing Care domain. See "Packaging and Deploying Customizations" for more information on packaging and deploying production customizations.

Configuring WebLogic Server to Use an Exploded Archive

To use an exploded archive with WebLogic Server, configure your Billing Care domain with the location of your previously created NetBeans IDE project. The project location acts as the exploded archive of the customizations shared library and is used by Billing Care to display your customizations.

Configure WebLogic Server to use your exploded archive shared library by completing the following procedures:

Creating a Manifest for your Shared Library

WebLogic Server requires a manifest file (MANIFEST.mf) for your exploded archive. The manifest includes information about the customizations shared library contained in the exploded archive including the entries listed in Table 8-1.

See the following link for additional information on manifest files:

https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html#JAR_Manifest

Table 8-1 MANIFEST.mf Entries for Billing Care Customization

Entry Description

Manifest-Version

Numerical version of the manifest file

Built-By

Name of library builder

Specification-Title

String that defines the title of the extension specification

Specification-Version

String that defines the version of the extension specification

Implementation-Title

String that defines the title of the extension implementation

Implementation-Version

String that defines the version of the extension implementation

Implementation-Vendor

String that defines the vendor of the extension implementation

Extension-Name

String that defines a unique of the extension

To create a MANIFEST.mf file for your exploded archive:

  1. Start NetBeans IDE.

  2. Select the Files tab.

  3. Expand the project directory to view the myproject/web/META-INF/ directory where myproject is the previously created project directory.

  4. Right-click the META-INF folder and select New.

  5. Select Other.

  6. Under Categories, select Other.

  7. Under File Types, select Empty File.

  8. Click Next.

  9. In the File Name field, enter MANIFEST.MF.

  10. Click Finish.

    The MANIFEST.MF file is shown in the NetBeans IDE text editor.

  11. Create your manifest file with the entries shown in Table 8-1. A sample manifest file is shown in Example 8-1.

    Note:

    Oracle recommends you use Specification-Title and Extension-Name values clearly identifying your shared library as a development version.

  12. Click File, then Save.

Example 8-1 Sample MANIFEST.MF File for Billing Care Customizations

Manifest-Version: 1.0
Built-By: Oracle
Specification-Title: BillingCareSDKDevelopment
Specification-Version: 1.0
Implementation-Title: Custom SDK WAR file for Billing Care
Implementation-Version: 1.0
Implementation-Vendor: Oracle
Extension-Name: BillingCareSDKDevelopment
Rebuilding your Project after Creating the Manifest File

Rebuild your Billing Care customization project in NetBeans IDE after creating and saving your manifest file.

To rebuild your project in NetBeans IDE:

  1. Click the Projects tab.

  2. Right-click your project.

  3. Select Clean and Build.

Creating a New Deployment Plan for Billing Care with your Shared Library

Create a new Billing Care deployment plan that includes your customizations shared library. The deployment plan includes an entry for your customizations shared library referencing the exploded archive NetBeans IDE project. When the Billing Care application starts, the exploded archive contents are also loaded providing access to your customizations.

See "Deployment Plans" in Oracle Fusion Middleware Developing Applications for Oracle WebLogic Server for more information on deployment plans.

To create a new deployment plan:

  1. Start NetBeans IDE.

  2. Select the Files tab.

  3. Right-click the myproject folder and select New.

  4. Select Other.

  5. Under Categories, select Other.

  6. Under File Types, select Empty File.

  7. Click Next.

  8. In the File Name field, enter a name for your deployment plan with an .xml extension. For example:

    billingCareSDKDeploymentPlan.xml

  9. Click Finish.

    The deployment plan is shown in the NetBeans IDE text editor.

  10. Create your deployment plan using the sample shown in Example 8-2.

    Note:

    Use the same string in the Custom-LibraryName element in your deployment plan as the Extension-Name parameter in the MANIFEST.MF file you previously created. For example, the string in the sample files provided is:

    BillingCareSDKDevelopment

  11. Click File, then Save.

Example 8-2 Sample Billing Care Customizations Deployment Plan

<?xml version="1.0" encoding="UTF-8"?>
<deployment-plan xmlns="http://xmlns.oracle.com/weblogic/deployment-plan" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/deployment-plan http://xmlns.oracle.com/weblogic/deployment-plan/1.0/deployment-plan.xsd" global-variables="false">
   <application-name>BillingCare.war</application-name>
   <variable-definition>
      <variable>
         <name>Custom-ImplementationVersion</name>
         <value xsi:nil="false">1.0</value>
      </variable>
      <variable>
         <name>Custom-SpecificationVersion</name>
         <value xsi:nil="false">1.0</value>
      </variable>
      <variable>
         <name>Custom-LibraryName</name>
         <value xsi:nil="false">BillingCareSDKDevelopment</value>
      </variable>
      <variable>
         <name>Custom-ExactMatch</name>
         <value xsi:nil="false">true</value>
      </variable>
      <variable>
         <name>Custom-ContextPath</name>
         <value />
      </variable>
   </variable-definition>
   <module-override>
      <module-name>BillingCare.war</module-name>
      <module-type>war</module-type>
      <module-descriptor external="true">
         <root-element>weblogic-web-app</root-element>
         <uri>WEB-INF/weblogic.xml</uri>
         <variable-assignment>
            <name>Custom-LibraryName</name>
            <xpath>/weblogic-web-app/library-ref/library-name</xpath>
         </variable-assignment>
      </module-descriptor>
   </module-override>
</deployment-plan>

Deploying your Shared Library on your Billing Care Domain

After creating your manifest file and new deployment plan for Billing Care, deploy the exploded archive shared library to your Billing Care domain.

To deploy your shared library to your Billing Care domain:

  1. In your browser, navigate to the Administration Console of your Billing Care domain.

  2. Log in using administrative credentials for the Billing Care domain.

  3. In Domain Structure, click Deployments.

  4. Select the BillingCare deployment and click Stop, then Force Stop Now to stop Billing Care.

  5. In the Control tab, click Install in the Deployments table.

  6. In the Path: field, enter (or browse to) the location of the web directory of your NetBeans IDE project containing your Billing Care project. For example, myproject/web, where myproject is the Billing Care project directory.

    Confirm that the option for web is selected.

  7. Click Next.

  8. In the Choose targeting style screen, select Install this deployment as a library.

  9. Click Next.

  10. In the Optional Settings screen, enter the Name using the same string used in the Custom-LibraryName element in your deployment plan and the Extension-Name parameter in the MANIFEST.MF file you previously created. For example, the string in the sample files provided is:

    BillingCareSDKDevelopment

  11. Click Next.

  12. In the Review your choices and click Finish screen, click Finish.

    Confirm in the Deployments screen that your customizations shared library is deployed to your Billing Care domain as in an Active state.

Redeploying Billing Care to Use your Shared Library

After deploying the exploded archive as a customizations shared library, redeploy Billing Care using the new deployment plan created in "Creating a New Deployment Plan for Billing Care with your Shared Library". Redeploying Billing Care using the new deployment plan configures Billing Care to use the exploded archive customizations shared library in your NetBeans IDE project and restarts Billing Care.

After successful deployment, customize Billing Care by editing the configuration files in the NetBeans IDE project.

To redeploy Billing Care:

  1. In your browser, navigate to the Administration Console of your Billing Care domain.

  2. Log in using administrative credentials for the Billing Care domain.

  3. In Domain Structure, click Deployments.

  4. In the Control tab, select BillingCare in the Deployments table.

  5. Click Update.

  6. In the Update Application Assistant screen, select Redeploy this application using the following deployment files:.

  7. For the Deployment plan path:, click Change Path.

  8. Enter (or browse to) the location where your new deployment plan (for example, the myproject folder) is and select the new deployment plan, then click Next.

  9. In the Review your choices screen, click Finish.

    Confirm in the Deployments screen that Billing Care redeploys successfully and is in an Active state.