Deploy Custom ADF Application to WebCenter Spaces

Requirement- How to deploy custom ADF task flow to Webcenter spaces

Solutions-You can extend or alter the look and feel and functionality of Oracle WebCenter Spaces task flows using the Oracle JDeveloper Customization Developer role. If you want to build custom task flow application to spaces.If you want 100% customization then you can use custom task flow.see this Portal vs Spaces. When you want to deploy 100% task flow, its bit trickt.Please follow the steps

Steps-

ADF application with custom task flow-

-> Create a new deployment profile (“ADF Library JAR file”) for the View Controller project
-> Delete the existing WAR deployment profile from View Controller -> Project Properties
-> Deploy the View Controller to ADF Library JAR (Right Click on ViewController -> Deploy)
-> Note the location of the JAR file

Create a wrapper project which will be deployed as WAR file and will include the taskflow JAR file

-> Create a new Generic Project
-> Create a WAR deployment Profile
-> Add task flow JAR file to WAR deployment.
-> Right click on the new project -> Project Properties
-> Select library and classpath
. Click ‘Add JAR/directory’
. Add the JAR created in step (4)
-> Edit web.xml for the wrapper project and remove all entries
. Note: FAILURE to do this will result in errors
-> Deploy the Wrapper project to Webcenter spaces (Right Click wrapper project -> Deploy)
. Create connection to Server
. Select WC_Spaces Managed Server
. Ensure to select radio button “Deploy as shared library”
. After Deployment, Ensure Library is displayed by logging into the WLS Console (Admin server)
Extend Spaces and reference the library that contains the custom task flow
1. Download and install Oracle JDeveloper WebCenter Framework and Services Design Time Extensions:
. In JDeveloper, select Help > Check for Updates.
. Click Next, and then Next again to display all available updates.
. Use the search field to filter the list, for example, enter ‘webcenter framework’.
. Select WebCenter Framework and Services Design Time.
. Click Finish.
2. Download the WebCenter Spaces development ZIP file (DesignWebCenterSpaces_ps4.zip) from Oracle Technology Network:
http://download.oracle.com/otndocs/tech/webcenter/files/DesignWebCenterSpaces_ps4.zip
3. Copy WebCenter’s WLST (WebLogic Scripting Tool) commands to the Oracle home directory where JDeveloper is installed:
. Navigate to \copy_to_common
. Make a copy of the common directory.
. The common directory is located under \copy_to_common.
. Navigate to: \oracle_common
. Copy the content of the common directory here.
. Copy new version of oracle.webcenter.portal.jar to the Oracle JDeveloper extensions directory:
a. Navigate to \copy_to_jdev_ext
b. Make a copy of oracle.webcenter.portal.jar.
c. The oracle.webcenter.portal.jar file is located under
\copy_to_jdev_ext.
d. Navigate to: \jdeveloper\jdev\extensions\
e. Copy the oracle.webcenter.portal.jar file here.
4. Restart JDeveloper if it is open.
5. Edit weblogic.xml and add your library
6. Modify the config.properties files

Before you can build the shared library list and deploy extend.spaces.webapp.war to the WebCenter Spaces managed server, you must provide some information about your environment and your WebCenter Spaces installation in the configuration file config.properties

. To set build and deployment properties for the extend.spaces.webapp shared library
. Open DesignWebCenterSpaces.jws.
. Expand the WebCenterSpacesExtensionLibrary project.
. Open config.properties.
. Enter information about your JDeveloper environment and WebCenter Spaces installation, as shown in
. The config.properties file describes each property and offers examples. The defaults provided are only samples and must be replaced with your own, installation-specific values.
7. Save your updates to config.properties
8. Select WebCenterSpacesExtensionLibrary project and deploy to WC_Spaces using ANT
. Clean stage
. Deploy-shared-lib
. After Deployment, Ensure Library is displayed in WLS Console

Register the taskflow in Resource Catalog
1. Login to Webcenter spaces
2. Click on ‘Administration’
3. Create a new catalog and copy it from the default catalog
4. Select the newly created catalog and click on ‘Edit’ -> ‘Edit’
5. In the ‘Edit’ popup, select Add -> Add from library
6. In the search box, enter the name of your taskflow
7. Select your taskflow and give it a ‘Name’ and click ‘Add’. This adds the taskflow to the resource catalog
8. Select the newly created catalog and click Edit -> show
9. Click on ‘Configuratiions’ tab
10. Change the ‘Resource Catalog for Home spaces’ to the newly created catalog and click ‘Apply’
11. Now go back to webcenter spaces and to test the newly created taskflow:
. Create a new page
. Click on ‘Add Content’
. Select the taskflow from the catalog and click ‘Add’. The taskflow should
appear on the page
. Click ‘Save’ and ‘Close’

Application Module Pooling in Oracle ADF

An application module pool is a collection of application module instances of the same type, such as an Orders application module or a Human Resources application module. This pool of application module instances is shared by multiple browser clients. The amount of time between submitting Web pages enables a smaller number of application module components to serve a larger number of active users. This reduces memory usage and improves performance.
This facility manages a configurable set of application module instances that grows and shrinks as the end-user load on your application changes during the day.

At any one time, the pool may contain application module instances that are partitioned into
three groups, based on their state. When the processing of a current HTTP request completes, the application module instance is checked back into the pool. If the AM instance has managed state, the pool keeps track that the AM is referenced by that particular session.
For example –
We have pool of 5 Application module instances. After having request from multiple browser , request will go to instance, which is available for time being.We have 3 state defined for appModule instances –
1- Available
2- Partially available- but referenced for preferred reuses by an another active session that would be more efficient due to the managed state of the application module.
3- Unavailable- because it is being used at that very moment by a Web container thread

You can configure application module pool behavior, sizing, and cleanup behavior. For more information about this, refer to the Fusion Developer’s Guide for ADF in online Help.

Note: Pools are created only for root application modules, not for nested ones that users access indirectly through a root application module.

In short –

Application module pooling:

• Enables users to share application modules
• Manages application state
• Provides the same instance or one with an identical state
when requested by an application with managed state

State management –
The PS_TXN and PS_TXN_SEQ are used by ADF to serialize user session state to the database (the state management schema).PS_TXN will only get created when/if an application module needs to be passivated. If your application module pool is big enough, it’s possible that you won’t see it get created.

Happy Learning with Vinay Kumar in techartifact…