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.

For more information on JAR manifests, see the Java documentation at https://docs.oracle.com/en/java/javase/21/docs/specs/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 Serverfor 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. Log in to WebLogic Server Remote Console.

  2. Click Monitoring Tree, then Deployments, and then Application Management.

    A page with a list of installed Java EE applications and standalone application modules appears.

  3. Select the BillingCare deployment.

  4. Click Stop and then Force Stop Now to stop Billing Care.

  5. Click Edit tree, then Deployments, and then Libraries.

  6. Click +New.

  7. Enter the Name using the same string used in the Custom-LibraryName element in the 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

  8. In Targets, select AdminServer and move it to the Chosen section.

  9. In Source field, click the upload option and upload the .war file.

  10. Click +Create.

  11. Once the changes are applied, go to the shopping cart, and then click Commit Changes.

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. Log in to WebLogic Server Remote Console.

  2. Click Monitoring Tree, then Deployments, and then Application Management.

    A page with a list of installed Java EE applications and standalone application modules appears.

  3. In the table, select BillingCare.

  4. Click Update/Redeploy and do one of the following:

    • If your updated deployment plan is located on the server containing WebLogic Server, select Update Deployment Plan on Server and enter the location of the file in the Plan Path field.

    • If your updated deployment plan is located on your local machine, select Update Deployment Plan on Local Machine and click Choose File
      Choose File - Icon
      to browse to the file or enter the file name in the Plan field.

  5. Enter (or browse to) the location of your new deployment plan (for example, the myproject folder), and select the new deployment plan.

  6. Click Done.

  7. Select BillingCare, then click Start, and then select Servicing all requests.

  8. Ensure that BillingCare is set to Active.