2 Setting Up a Development Environment

This chapter helps you get started using JDeveloper to develop assets and extensions to WebCenter Portal, providing guidance and tips on how to structure your development environment.

This chapter includes the following topics:

2.1 Introduction to Setting up a Development Environment

This chapter distinguishes between tasks that are general and tasks that are application-specific. General tasks apply no matter what kind of application you are developing. For instance, installing JDeveloper and the WebCenter Portal extensions are general setup tasks. Other tasks described in this chapter apply only if you are developing specific kinds of applications, like WebCenter Portal server extensions or WebCenter Portlet Producer applications.

2.2 Basic Setup Tasks

This section describes setup tasks that do not depend on the kind of application you are developing.

2.2.1 Installing Oracle JDeveloper

Oracle JDeveloper provides an integrated development environment (IDE) for developing portals and custom portal components. For information on obtaining and installing Oracle JDeveloper, see the Oracle JDeveloper page on OTN at:

http://www.oracle.com/technetwork/developer-tools/jdev/overview/index.html

2.2.2 Installing the WebCenter Portal Extensions for JDeveloper

The WebCenter Portal extensions is an add-in that provides JDeveloper with the complete set of WebCenter Portal capabilities and features. To install the WebCenter Portal extensions:

  1. Start Oracle JDeveloper.
  2. If the Select Default Roles dialog displays, select Default Role to enable all technologies, and click OK.
  3. If a dialog opens asking if you want to migrate settings from an earlier version, click No.
  4. From the Help menu, select Check for Updates.

    Note:

    If you are behind a firewall, you may need to configure a proxy server to access the extensions. From the Updates wizard, a dialog appears in which you can enter your HTTP Proxy Server settings. Click the Help button in any dialog for more information. For detailed information, see the "Proxy Settings and JDeveloper" topic in the Oracle JDeveloper online help.

  5. On the Source page, select Search Update Centers.
  6. Check Oracle Fusion Middleware Products and Official Oracle Extensions and Updates and click Next.
  7. From the generated list, search for the WebCenter Core Design Time and WebCenter Framework and Services Design Time extensions, select them, and then click Finish.
  8. When prompted, restart JDeveloper.

See also Installing and Configuring Oracle WebCenter Portal.

2.2.3 Setting the User Home Directory Environment Variable

Oracle strongly recommends that you set an environment variable for the user home directory that is referenced by JDeveloper. By setting this variable, you can avoid receiving long pathname errors that are known to occur in some circumstances.

For detailed instructions on setting this variable on Windows, Linux, UNIX, and Mac OS X operating systems, see Setting the User Home Directory in Installing Oracle JDeveloper.

2.2.4 Managing the Integrated WebLogic Server

The following topics describe the Integrated WebLogic Server used by JDeveloper, and how to deploy and configure it:

2.2.4.1 What is the Integrated WebLogic Server?

The Integrated WebLogic Server is a runtime service that references an instance of Oracle WebLogic Server and is bundled with JDeveloper. The Integrated WebLogic Server allows developers to run, test, and debug WebCenter Portal portlet producer and consumer applications from within JDeveloper. Note that you will need to publish and test assets within WebCenter Portal to determine their suitability within a particular portal and/or page.

2.2.4.2 Starting and Stopping Integrated WebLogic Server

For detailed information managing the Integrated WebLogic Server, see the topic "Deploying to Integrated WebLogic Server" in the JDeveloper Online Help. Other options, such as running in debug mode and logging into the WebLogic Server Administration Console, are also covered in that section.

2.2.4.3 Configuring the JVM for the Integrated WebLogic Server

Although it is not required, you have the option of changing the default Java Virtual Machine (JVM) settings the Integrated WLS in the setDomainEnv.sh. This file is located in JDEV_SYSTEM_DIRECTORY/DefaultDomain/bin.

The default memory values are:

-Xms512m -Xmx512m

When creating or referring to the JDEV_SYSTEM_DIRECTORY, keep in mind that, on a Windows platform, a WebCenter domain name cannot contain spaces, and the domain cannot be created in a folder that has a space in its path. Therefore, ensure that DOMAIN_HOME and JDEV_SYSTEM_DIRECTORY paths do not contain spaces.

2.2.5 Creating Application Resource Connections

Connections allow applications to access external data and services. For example, to use the Content Presenter task flow to display content from an Oracle WebCenter Content Server repository, you need to configure a connection to the repository. If you intend to consume portlets from a portlet producer, you need to configure the producer connection.

Tip:

A good practice is to create and test your connections once and check them into your source control system. Then, other developers on your team can check out the connections and use them. This technique also allows your team to keep in sync whenever a connection changes.

This section discusses connections and describes the different ways to access the wizards for creating new connections.

2.2.5.1 Where Are Connections Located?

Depending on how you invoke a wizard to create a connection, connections are placed in one of the following locations:

  • Under Application Resources in the Application Navigator

    Connections created here can be used in the current application only. This is the most common way to create a repository connection.

    For certain features, you can drag and drop a connection from Application Resources onto a page to create different types of task flow regions. To learn more, refer to the individual chapters on tools and services for WebCenter Portal.

  • Under IDE Connections in the Resource Palette

    Connections created here can be reused across applications. To use these connections in an application, you just have to drag and drop the connection from the Resource Palette onto the Connections node in that application.

2.2.5.2 How Do I Access the Connection Wizards?

To access a connection wizard from the New Gallery:

  1. From the File menu, choose New.

  2. In the New Gallery dialog, expand Connections, select the type of connection you want to create, and click OK.

    Depending on your selection, the Create <Connection_Type> Connection dialog opens.

  3. The Create Connection in option is set to Application Resources by default.

    You can select IDE Connections to create a connection in the Resource Palette.

To access a connection wizard from the Application Navigator:

  1. Right-click the Connections node under Application Resources and select New Connection, then select the connection type from the context menu.

  2. Depending on your selection, the Create <Connection_Type> Connection dialog or wizard opens.

    The Create Connection in option is set to Application Resources by default.

To access a connection wizard from the Resource Palette:

  1. Click the New icon in the Resource Palette, select New Connection, then select the connection type from the context menu.
  2. Depending on your selection, the Create <Connection_Type> Connection dialog or wizard opens.

    The Create Connection in option is set to IDE Connections by default.

2.3 Setup Tasks Specific to WebCenter Portlet Producer Applications

WebCenter Portal provides a variety of ready-to-use portlets that you can add to your portal pages. This section provides a brief description of the preconfigured producers and the portlets they provide. It contains the following subsections:

For more information about WebCenter Portlet Producer applications, see Introduction to Portlets.

2.3.1 Deploying the Preconfigured Portlet Producers

The preconfigured portlet producers are not deployed by default, you must deploy them manually, as explained in this section.

Note:

These producer applications consume memory and require CPU time during deployment. This contributes to the WebLogic Server startup time and base memory footprint. For these reasons, it makes sense to only deploy the applications you need. For more information about tuning the deployment of internal applications, see On-demand Deployment of Internal Applications in Deploying Applications to Oracle WebLogic Server.

  1. If it is not running, start the Integrated WebLogic Server. The server must be running for this feature to be enabled.
  2. From the Run menu, select WebCenter Portal Deployments.
  3. In the WebCenter Portal Deployments dialog (Figure 2-1), select the producer to deploy (or undeploy) and click OK. Each of the preconfigured producers is described in more detail in the following sections.

    Figure 2-1 WebCenter Portal Deployments Dialog

    Description of Figure 2-1 follows
    Description of "Figure 2-1 WebCenter Portal Deployments Dialog"

2.3.2 Accessing OmniPortlet

The Integrated WLS contains PortalTools, which provides access to the design time at runtime OmniPortlet portlet. Design time at runtime means that users define portlet content after the portlet is placed on an application page and the page is run.

To access the OmniPortlet portlet producer:

  1. Start the Integrated WebLogic Server and open the WebCenter Portal Deployments dialog as described in Deploying the Preconfigured Portlet Producers.

  2. Select Portal Tools Portlet Producers and click OK to deploy them to the Integrated WebLogic Server.

    The Deployment - Log tab in JDeveloper displays a link that opens the PortalTools Welcome page, from where you can open two Portal Tools test pages—one for the OmniPortlet producer and one for the Sample Portlet Producers.

    • The OmniPortlet producer provides OmniPortlet, which is a declarative portlet-building tool that enables you to build portlets against a variety of data sources, including XML files, character-separated value files (for example, spreadsheets), web services, databases, and web pages. OmniPortlet users can also choose a prebuilt layout for the data. Prebuilt layouts include tabular, news, bullet, form, chart, or HTML. For more information about OmniPortlet, see Working with OmniPortlet in Building Portals with Oracle WebCenter Portal.

    • The Sample Portlet Producer includes portlets built with OmniPortlet that are for demonstration purposes only. The portlet samples include a scrolling RSS portlet and a simple RSS portlet. Note that the sample producer is for demonstration and should not be used to create real-use portlet instances.

  3. On the PortalTools Welcome page, copy the OmniPortlet Producer link, or the Sample Portlet Producer link, and use it to register OmniPortlet with your portal. For information about registering a portlet producer, see Registering an Oracle PDK-Java Portlet Producer in Administering Oracle WebCenter Portal.

2.3.3 WSRP Sample Portlet Producers and Portlets

The Integrated WLS includes sample WSRP portlet producers and portlets you can use with your application.

Note:

You can find the source code for the sample portlets is in the following EAR file:

JDEV_HOME/oracle_common/modules/oracle.wccore/wsrp-samples.ear

where JDEV_HOME is the location where JDeveloper is installed on your machine.

To access the WSRP sample portlet producers:

  1. Start the Integrated WebLogic Server and open the WebCenter Portal Deployments dialog as described in Deploying the Preconfigured Portlet Producers.

  2. Select WSRP Sample Portlet Producers and click OK to deploy them to the Integrated WebLogic Server.

    The Deployment - Log tab in JDeveloper displays a link that opens the WSRP Sample Producer Test Page.

  3. Copy the Web Services Description Language (WSDL) URL for a WSRP producer—either WSRP v1 WSDL or WSRP v2 WSDL— and use it to register the producer. For more information about registering portlet producers, see Managing Portlet Producers in Administering Oracle WebCenter Portal.

2.3.4 PDK-Java Sample Portlet Producer and Portlets

The Integrated WLS includes sample PDK-Java portlet producers and portlets you can use to familiarize yourself with the types of functionality that are available through PDK-Java portlets.

To access PDK-Java sample portlet producers:

  1. Start the Integrated WebLogic Server and open the WebCenter Portal Deployments dialog as described in Deploying the Preconfigured Portlet Producers.

  2. Select PDK-Java Sample Portlet Producers and click OK to deploy the PDK-Java Sample Producers Test Page to the Integrated WebLogic Server.

    The Deployment - Log tab in JDeveloper displays a link that opens the provider test page.

  3. Open a test page, copy the link and use it to register the producer.

    For information about registering a portlet producer, see Managing Portlet Producers in Administering Oracle WebCenter Portal.