Skip Headers
Oracle® Fusion Middleware Administrator's Guide for Oracle Application Development Framework
11g Release 2 (11.1.2.3.0)

Part Number E16179-04
Go to Documentation Home
Home
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
PDF · Mobi · ePub

C Configuring GlassFish Server

This appendix describes how to configure GlassFish Server for Oracle ADF Essentials. It describes how to obtain the Oracle ADF Runtime and how to install these files into the GlassFish Server.

This appendix contains the following sections:

C.1 About Configuring GlassFish

GlassFish Server is an application server that can be configured to run Oracle ADF applications. If you do not have a GlassFish Server installation, you can download GlassFish Server from the GlassFish website. Before you can run ADF applications in a GlassFish Server, you need to configure GlassFish with the Oracle ADF Runtime libraries.

For a list of the supported Oracle ADF features for GlassFish, go to the OTN site at http://content.oracle.com/technetwork/developer-tools/adf/overview/adf-essentials-1719844.html

For instructions on obtaining and installing GlassFish, see http://glassfish.java.net/downloads/3.1.2-final.html

For information about developing ADF applications for GlassFish, see the "Deploying ADF Applications to GlassFish" appendix in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

C.2 Obtaining GlassFish Server and Oracle ADF Runtime

Oracle ADF Essentials supports the Open Source and commercial versions of GlassFish Server. With either version, you will need the Full Platform distribution. The Web Profile distribution is not supported. After you have installed the GlassFish Server, you need to obtain the ADF Essentials adf-essentials.zip file from OTN and follow the instructions in this appendix to install the ADF Runtime libraries.

For information on how to start and stop the server and other application server tasks, see GlassFish documentation at the GlassFish website.

C.2.1 How to Obtain GlassFish Server

You can download the open source version of the GlassFish Server from the GlassFish website:

http://glassfish.java.net/downloads/3.1.2-final.html

Follow the instructions and documentation at the site to install and configure a GlassFish Server.

C.2.2 How to Obtain Oracle ADF Runtime

In order for a GlassFish Server to run Oracle ADF applications, you must install the ADF Runtime library files into the GlassFish installation directory.

You can download the Oracle ADF Essentials adf-essentials.zip file from the Oracle Technology Network at http://www.oracle.com/go/?&Src=7578263&Act=4&pcode=WWMK12022244MPP044.

After you have downloaded the adf-essentials.zip file, you can extract the files to a temporary directory which you can use to copy the required files into the GlassFish installation directories.

C.3 Configuring GlassFish with ADF Runtime Libraries

The ADF Runtime libraries consists of the following:

The ADF Share libraries must be manually installed into the GlassFish installation. You use your operating system command or tools to copy the files. For instructions, see Section C.3.1, "How to Install ADF Share Libraries Manually."

The ADF Model, ADF Controller, and ADF View libraries are loaded into GlassFish with the deployed application and will be included automatically by JDeveloper.

The steps for installing the ADF Runtime libraries are:

  1. Configure ADF Share libraries.

    • Copy the ADF Share libraries from adf-essentials.zip into the GlassFish installation.

  2. Deploy the application as an EAR file.

C.3.1 How to Install ADF Share Libraries Manually

Before you begin:

It may be helpful to have an understanding of the options that are available to you when you are mapping ADF Share for GlassFish. For more information, see Section C.3, "Configuring GlassFish with ADF Runtime Libraries."

You will need to complete these tasks:

  • Install the GlassFish Server

  • Obtain the adf-community.zip file and unzip it to a temporary directory

To install the ADF Share Runtime libraries:

  1. Copy or move the ADF Share library files from the temporary directory to the <glassfish>/domains/domain1/lib folder:

    The ADF Share files should be in the temporary directory where you had unzip the adf-essentials.zip file as described in Section C.2.2, "How to Obtain Oracle ADF Runtime." Typically, this directory is <temp>/oracle_common/modules.

    oracle.adf.share.ca_11.1.1/adf-share-base.jar
    oracle.adf.share.ca_11.1.1/adf-share-ca.jar
    oracle.adf.share_11.1.1/commons-el.jar
    oracle.adf.share_11.1.1/adf-share-support.jar
    oracle.adf.share_11.1.1/adfsharembean.jar
    oracle.adf.share_11.1.1/jsp-el-api.jar
    oracle.adf.share_11.1.1/adflogginghandler.jar
    oracle.adf.share_11.1.1/oracle-el.jar
    oracle.mds_11.1.1/mdsrt.jar
    oracle.bali.share_11.1.1/share.jar
    oracle.xmlef_11.1.1/xmlef.jar
    oracle.javatools_11.1.1/resourcebundle.jar
    oracle.javatools_11.1.1/javamodel-rt.jar
    oracle.javatools_11.1.1/javatools-nodeps.jar
    oracle.adf.security_11.1.1/adf-share-security.jar
    oracle.adf.security_11.1.1/adf-controller-security.jar
    oracle.xdk_11.1.0/xmlparserv2_sans_jaxp_services.jar
    oracle.xdb_11.1.0.jar
    oracle.jrf_11.1.1/jrf-api.jar
    oracle.jdbc_11.1.1/ojdbc6dms.jar
    oracle.dms_11.1.1/dms.jar
    oracle.odl_11.1.1/ojdl.jar
    oracle.odl_11.1.1/ojdl2.jar
    oracle.jmx_11.1.1/jmxframework.jar
    oracle.jmx_11.1.1/jmxspi.jar
    oracle.classloader_11.1.1.jar
    oracle.logging-utils_11.1.1.jar
    oracle.web-common_11.1.1.jar
    oracle.webservices_11.1.1/oc4j-ws-support.jar
    org.apache.bcel_5.1.jar
    oracle.nlsrtl_11.2.0/orai18n-mapping.jar
    
  2. Verify all the libraries have been copied.

C.4 Additional Configuration Tasks

After you have installed the ADF Runtime into the GlassFish Server, you need to perform additional configuration tasks on GlassFish.

The configuration tasks are:

C.4.1 GlassFish Administration Console

You can use the GlassFish Administration Console to configure the GlassFish Server including managing applications, JDBC pools, and other resources.

The GlassFish Administration Console is at:

http://<machine_name>:4848/

C.4.2 How to Create a Datasource for GlassFish

Before you begin:

It may be helpful to have an understanding of the options that are available to you when you are creating a datasource for GlassFish. For more information, see Section C.2, "Obtaining GlassFish Server and Oracle ADF Runtime."

You can use the GlassFish Administration Console or asadmin commands to create the datasource. For more information, see GlassFish documentation.

To create a datasource for GlassFish using asadmin command:

  1. Open a command line window.

  2. Invoke the asadmin command to create a datasource for GlassFish.

    For instance, the following command creates a datasource for an application:

    asadmin> create-jdbc-connection-pool --datasourceclassname
      oracle.jdbc.pool.SampleDataSource
      --restype javax.sql.XADataSource
      --property user=xyz
      :password=xyz:url=jdbc:oracle:thin:@machine.com:1521:machine
      --target=server SampleDSPool
     
    asadmin> ping-connection-pool SampleDSPool
     
    asadmin> create-jdbc-resource --connectionpoolid SampleDSPool jdbc/OracleDS
    

C.4.3 How to Configure the JVM Cache

You need to configure the JVM settings to simple and increase the memory size from 192 Mb to 512 Mb.

Before you begin:

It may be helpful to have an understanding of the options that are available to you when you are configuring JVM for GlassFish. For more information, see Section C.4, "Additional Configuration Tasks."

To configure JVM Cache for MDS:

  1. Start the GlassFish Administration Console.

  2. Choose Configurations > server-config > JVM Settings.

  3. Select JVM Options and specify -Doracle.mds.cache=simple and XX:MaxPermSize=512m.

  4. Click Save.

  5. Or, open the <glassfish>/domains/domain1/config/domain.xml file and edit the following entries:

    <jvm-options>-XX:MaxPermSize=512m</jvm-options>
    <jvm-options>-Doracle.mds.cache=simple</jvm-options>
    

C.5 Deploying an ADF Application to GlassFish

After you have referenced the libraries in the application, you can proceed to deploy the application to GlassFish Server. For more information, see the "Deploying ADF Applications to GlassFish" appendix in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.