Book Image

Oracle JDeveloper 11gR2 Cookbook

By : Nick Haralabidis
Book Image

Oracle JDeveloper 11gR2 Cookbook

By: Nick Haralabidis

Overview of this book

Oracle's Application Development Framework (ADF) for Fusion Web Applications leverages Java EE best practices and proven design patterns to simplify constructing complex web solutions with JDeveloper, and this hands-on, task-based cookbook enables you to realize those complex, enterprise-scale applications. With the help of real-world implementations, practical recipes cover everything from design and construction, to deployment, testing, debugging and optimization. This practical, task-based cookbook takes you, the ADF developer, on a practical journey for building Fusion Web Applications. By implementing a range of real world use cases, you will gain invaluable and applicable knowledge for utilizing the ADF framework with JDeveloper 11gR2. "Oracle JDeveloper 11gR2 Cookbook"ù is a task-based guide to the complete lifecycle of Fusion Web Application development using Oracle JDeveloper 11gR2 and ADF.You will get quickly up and running with concepts like setting up Application Workspaces and Projects, before delving into specific Business Components such as Entity Objects, View Objects, Application Modules and more. Along the way you will encounter even more practical recipes about ADF Faces UI components and Backing Beans, and the book rounds off by covering security, session timeouts and exceptions.With "Oracle JDeveloper 11gR2 Cookbook"ù in hand you will be equipped with the practical knowledge of a range of ready to use implementation cases which can be applied to your own Fusion Web ADF Applications.
Table of Contents (19 chapters)
Oracle JDeveloper 11gR2 Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface

Installation of JDeveloper on Linux


Installation of JDeveloper is, in general, a straightforward task. So, "why have a recipe for this?" you might ask. Did you notice the title? It says "on Linux". You will be amazed at the number of questions asked about this topic on a regular basis on the JDeveloper and ADF OTN Forum. Besides, in this recipe, we will also talk about configuration options and the usage of 64-bit JDK along with JDeveloper.

Getting ready

You will need a Linux installation of JDeveloper to use this recipe. For the 64-bit configuration, you will need a 64-bit Linux distribution and a 64-bit version of the Java SDK. We will install the latest version of JDeveloper, which is version 11.1.2.1.0 at the time of this writing.

How to do it...

  1. 1. Download JDeveloper from the Oracle JDeveloper Software download page: http://www.oracle.com/technetwork/developer-tools/jdev/downloads/index.html.

  2. 2. Accept the license agreement, select Linux Install, and click on Download File to begin with the download.

  3. 3. Once the file is downloaded, open a console window and start the installation, by typing the following commands:

    $ chmod u+x ./jdevstudio11121install.bin
    $ ./jdevstudio11121install.bin
    
  4. 4. On the Choose Middleware Home Directory page, select Create a new Middleware Home and enter the Middleware home directory.

  5. 5. On the Choose Install Type page, select Complete to ensure that JDeveloper, ADF and WebLogic Server are installed.

  6. 6. Once you confirm your selections, proceed with the installation.

  7. 7. Upon a successful installation, you will see the Installation Complete page. Uncheck the Run Quickstart checkbox and click Done.

  8. 8. To start JDeveloper, go to the /jdeveloper/jdev/bin directory under the Middleware home directory you specified during the installation and type the following:

    $ ./jdev
    
  9. 9. To make things easier, create an application launcher on your Linux desktop for the specific path indicated in the previous step.

How it works...

As noted earlier, installing JDeveloper on Linux is a straightforward task. You simply have to download the binary executable archive and run it. Ensure that you give execute permissions to the installation archive file and run it as noted. If you are having trouble seeing the Welcome page in graphical mode, ensure that the $DISPLAY environment variable is set correctly. The important thing to know here is the name of the file to execute in order to start JDeveloper. As mentioned, it is called jdev and it is located in the /jdeveloper/jdev/bin directory under the Middleware home directory.

There's more...

Now that you have successfully installed JDeveloper, let's spend some time configuring it for optimal performance. Configuration parameters are added to any of the jdev.conf or ide.conf files located in the /jdeveloper/jdev/bin and /jdeveloper/ide/bin directories respectively, under the Middleware home directory.

The following is a list of the important tuning configuration parameters with some recommendations for their values:

Parameter

Description

AddVMOption -Xmx

This parameter is defined in the ide.conf file and indicates the maximum limit that you will allow the JVM heap size to grow to. In plain words, it is the maximum memory that JDeveloper will consume on your system. When setting this parameter, consider the available memory on your system, the memory needed by the OS, the memory needed by other applications running concurrently with JDeveloper, and so on. On a machine used exclusively for development with JDeveloper, as a general rule of thumb consider setting it to around 50 percent of the available memory.

AddVMOption -Xms

This parameter is also defined in the ide.conf and indicates the initial JVM heap size. This is the amount that will be allocated initially by JDeveloper and it can grow up to the amount specified by the previous -Xmx parameter. When setting this parameter, consider whether you want to give JDeveloper a larger amount in order to minimize frequent adjustments to the JVM heap. Setting this parameter to the same value as the one indicated by the -Xmx parameter will supply a fixed amount of memory to JDeveloper.

AddVMOption -XX:MaxPermSize

This parameter indicates the size of the JVM permanent generation used to store class definitions and associated metadata. Increase this value if needed in order to avoid java.lang.OutOfMemoryError: PermGen space errors. A 256MB setting should suffice.

AddVMOption -DVFS_ENABLE

Set it to true in jdev.conf if your JDeveloper projects consist of a large number of files, especially if you will be enabling a version control system from within JDeveloper.

Configuring JDeveloper with a 64-bit JDK

The JDeveloper installation is bundled by default with a 32-bit version of the Java JDK, which is installed along with JDeveloper. On a 64-bit system, consider running JDeveloper with a 64-bit version of the JDK. First download and install the 64-bit JDK. Then configure JDeveloper via the SetJavaHome configuration parameter in the jdev.conf. This parameter should be changed to point to the location of the 64-bit JDK. Note that the 64-bit JDK is supported by JDeveloper versions 11.1.1.4.0 and higher.

Configuring the JDeveloper user directory

This is the directory used by JDeveloper to identify a default location where files will be stored. JDeveloper also uses this location to create the integrated WebLogic domain and to deploy your web applications when running them or debugging them inside JDeveloper. It is configured via the SetUserHomeVariable parameter in the jdev.conf file. It can be set to a specific directory or to an environment variable usually named JDEV_USER_DIR. Note that when JDeveloper is started with the singleuser command-line argument, the user directory is created inside the /jdeveloper directory under the Middleware home directory.

Note

Before starting your development in JDeveloper, consider setting the XML file encoding for the XML files that you will be creating in JDeveloper. These files among others include, the JSF pages, the business component metadata files, application configuration files, and so on. You set the encoding via the Tools | Preferences… menu. Select the Environment node on the left of the Preferences dialog and the encoding from the Encoding drop-down. The recommended setting is UTF-8 to support multi-lingual applications.

Note

The minimum recommended open file descriptors limit for JDeveloper on a Linux system is 4096. Use the command ulimit n to determine the open file descriptors limit for your installation and change it if needed in the limits.conf file located in /etc/security/ directory.