A H M A D G O H A R

Please Wait For Loading

Ahmad Gohar Featured Image 1886_826

Step-by-Step Guide: Deploying ADF Applications on GlassFish Server

September 9, 2013 Ahmad Gohar 0 Comments

How to Deploy Oracle ADF Applications on GlassFish Server

Oracle Application Development Framework (ADF) applications can be deployed on GlassFish Server with the help of ADF Essentials. This guide walks you through the steps to download, configure, and deploy your ADF application.


Prerequisites

  1. Oracle GlassFish Server:
    Download from the Oracle GlassFish Server download page.
  2. ADF Essentials:
    Download the ADF Essentials package from the Oracle ADF Essentials download page.

Step-by-Step Guide

Step 1: Install GlassFish Server

  1. Download the GlassFish Server package.
  2. Install it by running the installer and creating a new domain.
    • Default domain name: domain1.

Step 2: Download and Extract ADF Essentials

  1. Unzip the adf-essentials.zip file into the domain’s directory.
    • Example:
      unzip -j adf-essentials.zip -d <path_to_glassfish>/domains/domain1
      

Step 3: Start the GlassFish Domain

  1. Start the GlassFish domain:
    asadmin start-domain
    
  2. Open the GlassFish Admin Console at:
    http://localhost:4848.

Step 4: Configure GlassFish JVM Options

  1. Navigate to Configurationsserver-configJVM Settings in the GlassFish Admin Console.
  2. Add the following options under JVM Options:
    -Doracle.mds.cache=simple
    -Duser.timezone=Etc/GMT-2  # Replace GMT-2 with your timezone.
    -XX:PermSize=256m
    -XX:MaxPermSize=512m
    

Step 5: Configure JDBC Resources

  1. Create JDBC Connection Pool:
    • Go to ResourcesJDBCJDBC Connection Pools.
    • Add a new connection pool with the following details:
      • Resource Type: javax.sql.XADataSource.
      • Datasource Classname: Specify the datasource class for your database.
  2. Create JDBC Resource:
    • Go to ResourcesJDBCJDBC Resources.
    • Create a new resource (e.g., jdbc/hr) and associate it with the connection pool created earlier.

Step 6: Edit Application Module in ADF Application

  1. Open your ADF application in JDeveloper.
  2. Navigate to Application Module properties:
    • Right-click the application module → EditProperties.
  3. Configure the data source to use the newly created JDBC resource (jdbc/hr).

Step 7: Configure Java EE Application in GlassFish

  1. Edit the web.xml of your ADF application to match the GlassFish environment.
    • Ensure the context-root and paths are set correctly.

Step 8: Deploy and Run ADF Application

  1. Deploy your ADF application as a .war or .ear file.
  2. Deploy the application on GlassFish:
    • Navigate to Applications in the GlassFish Admin Console.
    • Click Deploy, and upload the application file.
  3. Access the deployed application at:
    http://localhost:9090/<context-root>/faces/<yourPage>.jspx
    

Common Configuration Settings

  • PermSize and MaxPermSize: Ensure sufficient memory allocation to avoid memory-related errors during deployment.
  • Timezone: Set the correct timezone for your environment in the JVM settings.

Troubleshooting Tips

  1. JDBC Connection Issues:
    • Verify the database credentials and connection URL in the GlassFish Admin Console.
  2. Deployment Errors:
    • Check the GlassFish server logs for detailed error messages.
  3. Page Not Loading:
    • Ensure the context-root and page paths are correct.

Conclusion

Deploying an ADF application on GlassFish Server is straightforward when using ADF Essentials. Follow these steps to configure GlassFish and deploy your application successfully. For additional customization or troubleshooting, refer to the official Oracle documentation.

Would you like detailed guidance on any specific configuration or deployment step? 😊

author avatar
Ahmad Gohar
With over 18 years of experience in software architecture, Java technologies, and leadership, I specialize in crafting scalable, future-proof solutions for global organizations. Whether it’s transforming legacy systems, building cutting-edge cloud-native applications, or mentoring teams to excel, I’m committed to delivering value-driven results.

Leave A Comment