Skip Headers
Oracle® Fusion Middleware Developer's Guide for Oracle WebCenter Portal (Oracle Fusion Applications Edition)
11g Release 1 (11.1.1.6.3)

Part Number E25595-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

4 Working Productively in Teams

This chapter contains information for a team development environment, where developers are sharing files in Oracle JDeveloper. It includes information about source (or version) control systems, namely Subversion.

Tip:

Typically, one member of the development team creates a new portal application and checks it in to the source code repository. You can create any required connections and check those in as well.

This chapter includes the following sections:

4.1 Enabling Source Control on Framework Applications

You can use source control in a Framework application similar to the way you would use source control in any other development environment.

JDeveloper includes Subversion for source control. Oracle also provides free extensions to other source support systems, such as Concurrent Versions System (CVS), Dimensions, and ClearCase. You can install these extensions directly from inside JDeveloper through the Help - Check for Updates menu option, which is the recommended way install extensions. If you cannot connect to the internet from your JDeveloper instance, then download the extension from Oracle Technology Network (OTN) at http://www.oracle.com/technetwork/index.html. Point the Check for Updates wizard to the local file you download.

Note:

You may need to configure a proxy server to access the extensions. To set up a proxy server:

  1. In Oracle JDeveloper, choose the Tools menu option, then select Preferences.

  2. In the Preferences dialog, scroll down the list and select Web Browser and Proxy.

  3. In the right pane, under Web Browser and Proxy, select Use HTTP Proxy Server and enter the host name and port number of your proxy server, and note any exceptions. Click OK.

There are two ways to use Subversion, or any other installed source control system: In JDeveloper, either click the Versioning menu or use the Versioning Navigator (click View - Team - Versioning Navigator). The Versioning Navigator is shown in Figure 4-1.

Figure 4-1 Versioning Navigator

Description of Figure 4-1 follows
Description of "Figure 4-1 Versioning Navigator"

For detailed information about Subversion, see the Oracle JDeveloper online help system and the "Using a Source Control System" section in the Oracle Application Development Framework Developer's Guide.

4.1.1 Creating a Subversion Repository

To create a Subversion repository:

  1. From the Versioning menu, choose Subversion, and then Create Local Repository. The Create Subversion Repository dialog displays (Figure 4-2).

    Figure 4-2 Create Subversion Repository

    Description of Figure 4-2 follows
    Description of "Figure 4-2 Create Subversion Repository"

  2. In the Create Subversion Connection dialog, enter connection details, and then click OK. (Figure 4-3)

    Note:

    An alternative way to create a connection is to right-click Subversion in the Versioning Navigator and select New Repository Connection.

    Figure 4-3 Create Subversion Connection

    Description of Figure 4-3 follows
    Description of "Figure 4-3 Create Subversion Connection"

  3. Later you can edit these pages on the Edit Subversion Connection page (Figure 4-4).

    Figure 4-4 Edit Subversion Connection

    Description of Figure 4-4 follows
    Description of "Figure 4-4 Edit Subversion Connection"

4.1.2 Understanding Oracle Team Productivity Center

Oracle Team Productivity Center is an Application Lifecycle Management tool that enables software development teams to collaborate and work productively when developing applications using JDeveloper. This also is a free extension to JDeveloper.

Oracle Team Productivity Center integrates task, bug, and defect repositories, such as JIRA, Bugzilla, and its own built-in task repository into the IDE. It provides a chat interface inside JDeveloper and other team working benefits, such as recording details of files checked into the source control system against tasks and developer productivity aids, such as saving the context of your IDE.

For more information, or to download Oracle Team Productivity Center, go to Oracle Technology Network (OTN) at http://www.oracle.com/technetwork/index.html.

4.2 Understanding Framework Application Files Affected by Developers

An important aspect of working with any source control system is understanding which files are affected by any particular action. Without this knowledge, you may inadvertently corrupt the source by checking in or checking out either too few or too many files given the actions you are performing on the project. This section helps you understand what files are needed for the main actions you may perform while building a WebCenter Portal: Framework application.

This section contains the following subsections:

4.2.1 Files Associated With Common Objects

The main objects with which you work in a Framework application are as follows:

  • Pages

  • Portlets

  • Task flows

  • Data controls

Each of these are fairly complex objects, made up of several different metadata files.

For information about page metadata files, see the "Introduction to the ADF Metadata Files" section in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework. For information about portlet and producer metadata files, see Appendix A, "Files for WebCenter Portal: Framework Applications."

4.2.2 Developer Actions Affecting Metadata Files

Table 4-1 lists developer actions and the files that are affected by these actions. Take this information into account while managing your files.

Table 4-1 Developer Actions Affecting Metadata Files

Action Files Affected

Creating or editing the following connection:

  • BPEL

  • Content Repository; for example, Oracle Content Server, Oracle Portal, file system

  • Database

  • Discussions

  • External Application

  • Instant Messaging and Presence

  • Mail

  • Oracle Secure Enterprise Search

  • Oracle PDK-Java Producer

  • WSRP Producer

Adds or updates:

  • app-root/.adf/META-INF/connections.xml with the connection

  • app-root/projectname/projectname.jpr with connection libraries

  • app-root/.adf/META-INF/adf-config.xml with service-level configuration, including the default connection

An external application connection, and all connections that require an external application connection (including Mail, Content Repository, and Instant Messaging and Presence) also add or update the following files:

  • app-root/src/META-INF/jps-config.xml with the credential store provider

  • app-root/src/META-INF/cwallet.sso with the user name and password

Note: All secure data specified for connections is stored in cwallet.sso, referenced in jps-config.xml. For example, the password for a database connection is stored in cwallet.sso.

Creating a WebCenter Portal data control

Adds or updates following data control files under app-root/projectname/adfmsrc:

  • projectpackage/DataControls.dcx with the data control definition

  • projectpackage/dcname.xml with the data control structure

  • projectpackage/dcname/*.xml with data structure definitions used by the data control

  • app-root/projectname/adfmsrc/META-INF/adfm.xml with a pointer to the DCX file

  • app-root/projectname/adfmsrc/return.xml with the definition for default operations used on collections

Updates app-root/projectname/projectname.jpr with content repository libraries

Adding or updating pages in a page hierarchy

  • Adds or updates the parent page's page hierarchy file (/oracle/webenter/portalapp/pagehierarchy/*Pages.xml), and updates pages.xml when the parent is the root page of the hierarchy

  • Updates the original parent pages's page hierarchy file when a page is detached from the parent page (for example, when it is removed from the page hierarchy or when it is reparented)

  • Adds or updates the page definition file (*PageDef.xml) for the pages involved (adding a new pagedef file updates app-root/projectname/adfmsrc/projectpackagename/DataBindings.cpx to add the pagedef and its mapping to the JPSX page)

Adding or updating or removing resources in site resources

Updates mds/oracle/webcenter/siteresources/scopedMD/s8bba98ff_4cbb_40b8_beee_296c916a23ed/generic-site-resources.xml

Registering an Oracle PDK-Java or WSRP portlet producer

Adds or updates app-root/src/META-INF/jps-config.xml with the credential store provider

Adds:

  • Tag library

  • app-root/mds/producer.pxml (pertaining to the registered producer)

  • A number of files pertaining to the registered producer to app-root/mds/directory: producer

Adds or updates app-root/projectname/adfmsrc/projectpackagename/DataBindings.cpx with factory classes to data bindings

Updates:

  • app-root/.adf/META-INF/connections.xml with a connection to the producer and the URL connection associated with it

  • app-root/.adf/META-INF/adf-config.xml with configuration for the metadata repository and the credential store

  • app-root/projectname/src/META-INF/orion-application.xml with the WebCenter Portal shared libraries

  • app-root/projectname/projectname.jpr with the libraries needed for any Framework application including external application libraries

  • app-root/projectname/public_html/WEB-INF/web.xml with the portlet servlets and filters and also external application automated login entries

Copies the keystore file to app-root/.adf/META-INF if the producer is WSRP and supports WS-Security

De-registering an Oracle PDK-Java or WSRP portlet producer

Updates app-root/.adf/META-INF/connections.xml to remove the producer and URL connection

Removes producer-related files from app-root/mds/

Note: Although the producer is removed from the application, you may need to manually remove the metadata files, portlet view tag, and portlet bindings from the application. Everything else should be left alone in case other producers rely on app-root/projectname/public_html/WEB-INF/web.xml or app-root/.adf/META-INF/adf-config.xml. The metadata files are removed by the deregister operation; however, any customizations on the producer side might need to be manually removed if the producer was not available during deregistration.

Adding or removing a portlet from a page

Adding or removing a portlet on a page from a portlet producer connection in the Resource Palette

When adding a portlet from a portlet producer in the Resource Palette, WebCenter Portal first registers the producer with the application (if it is not registered). See the "De-registering an Oracle PDK-Java or WSRP portlet producer" row for files affected. It then adds or removes the portlet from the page, affecting the files described in this row.

Adds or updates:

  • app-root/projectname/adfmsrc/projectpackagename/DataBindings.cpx with a new PageDef mapping (if it does not exist)

  • app-root/projectname/public_html/WEB-INF/faces-config.xml (This happens whenever you add an Oracle ADF component, such as a portlet, to a page.)

  • adf-faces-config.xml (This happens whenever you add an Oracle ADF component to a page.)

  • app-root/projectname/public_html/WEB-INF/oracle-webservices.xml if the portlet is WSRP

Adds:

  • A number of files pertaining to the newly cloned portlet instance to app-root/mds/

  • A number of WSDL and XML files to app-root/projectname/public_html/WEB-INF/wsdl if the portlet is WSRP

Updates:

  • app-root/projectname/public_html/pagename.jspx with the <adfp:portlet> tag (JSF faces tags are replaced with Oracle ADF faces tags.)

  • app-root/projectname/adfmsrc/projectpackagename/pageDefs/pagenamePageDef.xml with the region binding and page variable definitions

  • app-root/projectname/public_html/WEB-INF/web.xml with secure-ref entries if the portlet is WSRP

Dragging a file or folder from a content repository connection to a page

Dragging a content repository data control on a page

Updates:

  • app-root/projectname/public_html/pagename.jspx with appropriate ADF faces tags

  • app-root/projectname/adfmsrc/projectpackagename/pageDefs/pagenamePageDef.xml with the region binding

  • app-root/projectname/adfmsrc/projectpackagename/DataBindings.cpx with a listing of the page definitions

  • app-root/projectname/adfmsrc/META-INF/adfm.xml with a pointer to the data bindings file

  • app-root/.adf/META-INF/adf-config.xml with MDS configuration entries

  • app-root/projectname/projectname.jpr with service libraries, dependent libraries, and JSP tag libraries

  • app-root/projectname/public_html/WEB-INF/web.xml with ADF library, external application, and MDS configuration entries

Adds or updates all connection-related files for any service that requires connections

Copies over any required connection that was not present in the application, which updates app-root/.adf/META-INF/connections.xml and app-root/projectname/projectname.jpr

Note: The Recent Activities, Search, and Tags services add the search extension to adf-config.xml and create the sample service-definition.xml file (if it does not exist). The service-definition.xml file lets developers define QueryManager implementations for their service.

Creating a JSR 286 portlet application or adding a portlet to an existing application that uses JSP file

Adds or updates:

  • app-root/projectname/public_html/WEB-INF/portlet.xml

  • app-root/projectname/public_html/WEB-INF/oracle-portlet.xml

  • app-root/projectname/public_html/WEB-INF/web.xml

Adds Java and JSP source files for the portlet

Creating a JSR 286 portlet application or adding a portlet to an existing application that uses the ADF/JSPX option

A portlet application generated with this option uses the Oracle Portlet Bridge to access a Faces application.

Adds or updates:

  • app-root/projectname/public_html/WEB-INF/portlet.xml with configuration information for the portlet bridge

  • app-root/projectname/public_html/WEB-INF/oracle-portlet.xml with configuration information for the portlet bridge

  • app-root/projectname/public_html/WEB-INF/web.xml with configuration information for a Faces servlet

  • app-root/src/META-INF/orion-application.xml with shared library import statements for adf.oracle.domain and oracle.webcenter.skin

Adds:

  • Java and JSPX source files for the portlet

  • app-root/projectname/public_html/WEB-INF/faces-config.xml

Creating a PDK portlet producer application

Adds or updates:

  • app-root/projectname/public_html/WEB-INF/web.xml with producer servlet definitions and producer deployment details

  • service_id.properties with producer configuration attributes

  • app-root/src/META-INF/orion-application.xml with shared library import statements for oracle.portal

Adds Java and JSP files for the portlet

Registering a secure WSRP producer (WS-Security)

Updates app-root/.adf/META-INF/connections.xml with the secure producer connection definition

Notes: The connections.xml entry for a secure producer looks different in terms of how the security policy is stored. Instead of the whole security policy description, the security policy is just a URI (that is, a "pointer" to the policy in the policy repository).

The secure ref attributes in connections.xml are stored in the credential store (as defined by app-root/src/META-INF/jps-config.xml). The credential store configuration information (as defined by jps-config.xml) is stored in app-root/.adf/META-INF/adf-config.xml. At design time, the credential store is stored in an Oracle Wallet by default; that is, META-INF/cwallet.sso.

Configuring ADF Security for a project

Adds or updates:

  • app-root/projectname/public_html/WEB-INF/web.xml with login configuration, ADF authentication servlet, security constraints, logical roles and mappings

  • app-root/src/META-INF/jps-config.xml with identity store, credential store, policy store, anonymous provider, and login modules

  • app-root/.adf/META-INF/adf-config.xml with ADF identity store and credential store configuration

  • app-root/src/META-INF/jazn-data.xml with an XML identity store

  • app-root/src/META-INF/jazn-data.xml with application permissions

Adding a component or service on a page

Updates:

  • app-root/projectname/public_html/WEB-INF/weblogic.xml with data source (WebCenterDS, ActivitiesDS) configuration and WebCenter Portal shared libraries

  • app-root/src/META-INF/weblogic-application.xml with WebCenter Portal shared libraries and XML parser configuration

  • app-root/projectname/public_html/WEB-INF/web.xml with data source configuration, context parameters and listeners, JSP servlet, resource servlet, adfBindings filter, and photo servlet entries

  • app-root/.adf/META-INF/adf-config.xml with MDS configuration mappings

  • app-root/projectname/projectname.jpr with service-specific libraries

  • app-root/projectname/src/META-INF/jazn-data.xml with task flow security grants (if the application has been configured with ADF security)

  • app-root/projectname/adfmsrc/projectpackagename/pageDefs/pagenamePageDef.xml with the region binding

  • app-root/projectname/adfmsrc/META-INF/adfm.xml with a pointer to the data bindings file

  • app-root/projectname/adfmsrc/projectpackagename/DataBindings.cpx with the task flow binding definition factory and pageDef entries

  • app-root/projectname/public_html/pagename.jspx with appropriate ADF faces tags

Notes: Some services also affect additional files or have a design time dependency on other services. These services are listed in the following rows. The projectname.jpr and web.xml files are updated with service libraries and dependent libraries.

Activity Streaming

Dependent Services: External Application, IMP

Announcements

Updates:

  • weblogic-application.xml with the discussions shared library

  • app-root/.adf/META-INF/adf-config.xml with MDS mappings and service-specific configuration entries

Dependent Services: External Application, IMP, Links, Search

Composer

Updates:

  • app-root/projectname/public_html/WEB-INF/web.xml with context parameters

  • app-root/.adf/META-INF/adf-config.xml with MDS mappings and ADF faces, resource bundle, and catalog configuration entries

Adds $PROJECT_DIR/src/<projectpackagename>/default-catalog.xml

Discussions

Updates:

  • app-root/src/META-INF/weblogic-application.xml with the discussions shared library

  • app-root/.adf/META-INF/adf-config.xml with MDS mappings and service-specific configuration entry

Dependent Services: External Application, IMP, Links, Search

Documents, Wikis and Blogs

Updates:

  • app-root/projectname/public_html/WEB-INF/web.xml with ADF library filter/servlet, GetHandler servlet, and filter mappings

  • app-root/.adf/META-INF/adf-config.xml with MDS mappings

Dependent Services: External Application, IMP, Links, Search, Tags

External Application

Updates app-root/projectname/public_html/WEB-INF/web.xml with the ExtAppLogin servlet and filter mappings

Events

Updates app-root/.adf/META-INF/adf-config.xml with MDS mappings and service-specific configuration entry

Dependent Services: External Application, Links, Search

Instant Messaging and Presence (IMP)

Updates:

  • weblogic-application.xml with the SDP shared library

  • app-root/.adf/META-INF/adf-config.xml with service-specific configuration entry

Dependent Services: External Application

Links

Updates app-root/.adf/META-INF/adf-config.xml with service-specific configuration entry

Lists

Updates app-root/.adf/META-INF/adf-config.xml with MDS mappings

Dependent Services: External Application, IMP, Links, Search

Mail

Updates app-root/.adf/META-INF/adf-config.xml with MDS mappings and service-specific configuration entry

Dependent Services: External Application, IMP

Page

Updates:

  • app-root/projectname/adfmsrc/projectpackagename/DataBindings.cpx with attributes

  • app-root/.adf/META-INF/adf-config.xml with MDS mappings

Dependent Services: Links, Search, Composer

People Connections

Dependent Services: External Application, IMP, Composer, Activity Streaming

Polls

Updates app-root/.adf/META-INF/adf-config.xml with MDS mappings and service-specific configuration entry

Dependent Services: External Application, IMP

Recent Activity

Updates app-root/.adf/META-INF/adf-config.xml with service-specific configuration entry

Dependent Service: Search

RSS

Updates

  • app-root/src/META-INF/weblogic-application.xml with the discussions shared library

  • app-root/.adf/META-INF/adf-config.xml with MDS mappings

Dependent Service: External Application

Search

Updates app-root/.adf/META-INF/adf-config.xml with MDS mappings and service-specific configuration entry

Adds $WORKSPACE_DIR/.adf/META-INF/service-definition.xml

Tags

Updates app-root/.adf/META-INF/adf-config.xml with service-specific configuration entry

Dependent Services: External Application, IMP, Search, Links

Worklist

Updates app-root/src/META-INF/weblogic-application.xml with the SOA shared library

Dependent Services: Search, Links


4.3 Implementing Common Requirements One Time

It is good practice for the project administrator to implement any common developer requirements one time and then check in that version for all to use. By planning ahead and having the administrator take care of these common requirements up front, you can reduce redundancy and error.

For example, suppose two developers must add OmniPortlet on different pages of an application. If the project administrator has registered the OmniPortlet producer, then it is available for both of them to use. If not, then each developer likely registers the OmniPortlet producer separately, leading to unnecessary duplication and confusion.

Another example: suppose many developers need content from the same content repository. One person should set up and check in the needed connection first. Other developers then can simply reuse the same data control.

4.4 Portlet Producer Considerations

When working in a team environment, bear in mind the following considerations pertaining to portlet producers:

4.4.1 Portlet Producer Connections

When building an EAR file for your project, connections are loaded for the entire application rather than individual projects. For example, suppose you have an application with two projects: P1 and P2. P1 has 100 registered producers and P2 has no producers. When you build an EAR file for either project, all 100 of P1's producer connections are loaded into connections.xml. Note, though, that you can also edit connections.xml manually.

When you run the predeployment tool to create a targeted EAR file, all of the connections in connections.xml must be accessible. Hence, in our example, the generation of a targeted EAR file for either project would fail if any of the 100 portlet producer connections for P1 are unavailable for some reason. Given this behavior, you must carefully consider how you plan to subdivide your overall development effort into applications and projects.

4.4.2 Portlet Producer Name Clashes

While Oracle WebCenter Framework lets you register two portlet producers under the same name, it generally is better to avoid this situation. For example, if two developers working on the same application inadvertently register a portlet producer with the same name, then usually it is best to change one name to be unique. If you have two portlet producers registered under the same name, then it becomes very difficult to distinguish between them when debugging errors or performing administrative tasks on the portlet producers.

4.4.3 Combining Portlets from Different Portlet Producers

In some cases, you might have multiple developers building portlets and ultimately you want those portlets to be combined under a single portlet producer. The developers must be conscious of some potential issues.

  • Portlet names and JSP paths could clash. Portlet developers should use prearranged class package names and JSP paths to avoid naming clashes when portlets are combined within one portlet producer in one application.

  • When you create a JPS portlet in the Portlet wizard, the directory for the portlet modes defaults to portletn\html\mode_name, where n is a number that increments for each portlet you create. To avoid directory and file name clashes, portlet developers should change the directory name on the Content Type and Portlet Modes page of the Portlet wizard. Select the portlet mode and then change the directory name in the corresponding field to something unique.

  • When you combine portlets into one portlet producer, you must manually merge the portlet descriptor files, avoiding identifier clashes as you do so as follows:

    • JPS portlet identifiers in the portlet.xml and oracle-portlet.xml files are generated automatically starting from portlet1. When you manually merge multiple portlet descriptor files into one, you must change any portlet identifiers that clash with one another.

    • Similarly, the PDK-Java portlet identifiers in provider.xml are automatically generated starting from 1. When you manually merge multiple provider.xml files, you must change any portlet identifiers that clash with one another.

  • You must manually merge any web descriptor (web.xml) changes; for example, security role information.

  • For PDK-Java portlets, you also might need to manually merge .properties files.

  • When using many different portlets, parts of files might not be checked in properly because they are overwritten by someone else or because JDeveloper does not pick up the changed files correctly. For example, you might deploy an application with many types of portlets and see the following error in two of the three OmniPortlets:

    mdsId
    oracle/adf/portlet/OmniPortlet_1172537210873/ap/Portlet100_0b4156e9_0111_1000_
    8001_82235f273a39.pxml not found
     
    mdsId
    oracle/adf/portlet/OmniPortlet_1172537210873/ap/Portlet100_250498fc_0111_1000_
    8002_a9fe7286a54e.pxml not found
    

    If you receive error messages like these, then ensure that all *.pxml files from the development environment are copied over to the deployed environment.

  • Your portlet customizations might not appear in your deployed environment. Make sure that the content of the oracle\adf\portlet\<portletInstanceName>.pxml file is correct and that it refers to the proper *.pxml files.