Top Banner
Weblogic Portal Interview Questions 1. Difference between a website and a portal? Website is collection web pages, typically it contains information about particular company. A portal is a powerful web site that gives users a single point of access (or gateway) to applications and information in a unified interface. For eg, Yahoo.com(home page) is great example of a portal. 2. What are the features of portal? Portal has got many features. To name a few: Personalization, Authentication(single sign-on) and content aggregation. 3. What are components of weblogic portal? Look and feel components, header & footer(Shell), Menus, layouts, books & pages, portlets. 4. What is the difference between streaming portal and file-based portal? Portals come in two flavors: file-based and streaming. A file-based portal(.portal) also called a “light portal” obtains all of its resources from the user’s file system. Streaming portals, on the other hand, derive their resources from one or more databases. 5. What is backing file? Backing file is java class used to pre-processing before portal object is rendered. The following portal controls support backing files: * Desktops * Books * Pages * Portlets * JspContent controls. 6. How to create streaming portal/desktop? Streaming desktop can be created using portal admin tool. 7. What are the components of look-and-feel? Look & feel determines the appearance portal applications, it can be modified by developers programmatically or administrators using portal admin tool in staging and production environment. The following are components of look and feel: Look & Feel file(.laf) Skins Skeletons Themes Chromosomes and Genes Shells Layouts Menus
34

Weblogic Portal

Apr 21, 2015

Download

Documents

kamran_iws
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Weblogic Portal

Weblogic Portal Interview Questions       1. Difference between a website and a portal?

Website is collection web pages, typically it contains information about particular company. A portal is a powerful web site that gives users a single point of access (or gateway) to applications and information in a unified interface. For eg, Yahoo.com(home page) is great example of a portal.  

      2. What are the features of portal?

 Portal has got many features. To name a few: Personalization,  Authentication(single sign-on) and content aggregation.

     3. What are components of weblogic portal?

Look and feel components, header & footer(Shell), Menus, layouts, books & pages, portlets.    

     4. What is the difference between streaming portal and file-based portal?

Portals come in two flavors: file-based and streaming. A file-based portal(.portal) also called a “light portal” obtains all of its resources from the user’s file system. Streaming portals, on the other hand, derive their  resources from one or more databases.

     5. What is backing file?

Backing file is java class used to pre-processing before portal object is rendered. The following portal controls support backing files:    * Desktops    * Books    * Pages    * Portlets    * JspContent controls.

    6. How to create streaming portal/desktop?

Streaming desktop can be created using portal admin tool.

    7. What are the components of look-and-feel?

     Look & feel determines the appearance portal applications, it can be modified by developers programmatically or administrators using portal admin tool in staging and production environment. The following are components of look and feel:

Look & Feel file(.laf)

Skins

Skeletons

Themes

Chromosomes and Genes

Shells

Layouts

Menus       8. Difference between skin and skeleton?

Skins are collections of images, cascading style sheets (CSS), and JavaScript files that allow changes to be made to the look and feel of a portal without modifying the portal components

Page 2: Weblogic Portal

directly. Skins basically provide the overall colors, graphics, and styles used by all components in a desktop interface.

Skeletons provide the physical boundaries of the portal components and provides references to the images, CSS, and JavaScript functions from the skin needed to render the portal. A portal web project can have multiple skeletons. When you select a Look & Feel for a desktop, a specific skin and skeleton is used. Each type of portal component, from a desktop to a portlet's title bar, has an associated JSP file, called a skeleton file that renders it.

     9. Difference between Genes and chromosomes?

Genes are implemented as simple text strings that are inserted into CSS styles or JavaScript files as variables. You define genes in an XML .chromosome file. In a .chromosomefile, you could define a gene called "bodyColor" and assign it a value of "red," like this:

<gene name="bodyColor"> <value>#FF0000</value></gene>In your CSS file, you could use bodyColor as a variable:

body { border:1px solid ${bodyColor} };When the page is rendered in a browser, the inlined style definition becomes:

body { border:1px solid #FF0000 };When you use this gene in your CSS files, you only need to modify the gene value itself to cascade the change throughout all configured CSS files rather than changing the value manually in each CSS file.

Chromosomes are simply the files that contain one or more genes. You can create multiple chromosome files that contain the same gene names, though with different gene values. By simply referencing a different chromosome in your Look & Feel file, you can simulate a completely different Look & Feel without changing any of your core Look & Feel files. 

     10. What is shell?

Shells define the header and footer regions of a portal. Shells control the content that appears in a desktop's header and footer regions. You can configure a shell to use specific JSPs, page flows, HTMLs to display content in a header or footer. You can place portlets too in a header or footer of a shell.

     11. Difference types of portlets?

JSP and HTML Portlets

JSR 168 portlets

Java Page Flow Portlets

Java Server Faces (JSF) Portlets

Struts Portlets

Remote Portlets

Browser (URL) Portlets 

Page 3: Weblogic Portal

      12. How is IPC (inter-portlet communication) happening?            Watch this page soon for an answer...

      13. What are portlet modes? 

Portlet Modes allow you to affect the end user’s ability to edit the portlet or display Help for the portlet. You add icon buttons to a portlet’s title bar to indicate the availability of a mode. The following pre-defined modes exist for WebLogic Portal:

    * Edit – Lets you specify a custom file that lets users modify the portlet's content when they click the Edit button.    * Help – Lets you specify a custom file that shows users help content for the portlet when they click the Help button.You can also create your own custom portlet modes using WebLogic Portal.

      14. Types of portlet states?

Portlet states determine the end user’s ability to affect the rendering of a portlet. WebLogic Portal supports following portlet states:

    Normal – the typical rendered appearance of the portlet.

    Minimize – Collapses the portlet, leaving only the title bar, when the user clicks the Minimize

button.

    Maximize – Makes the portlet take up the entire desktop area (not including the desktop

header and  footer) when the user clicks the Maximize button.

    Float – Displays the portlet in a popup window when the user clicks the Float button.

    Delete – Removes the portlet from the desktop when the user clicks the Delete button.When

you use the Portlet Wizard to create a portlet, state and mode settings are available on the

Portlet  Details dialog. These settings can also be edited in the portlet’s Properties view.

Weblogic Portal Interview Questions - Latest

1. How do you integrate existing legacy applications, non-portal web applications into portal?2. How can you show/hide portlets in your applications at run time?3. What are the different ways to implement SSO in Weblogic portal?4. What are the different ways to create portlet preferences in weblogic portal?5. Have you used any iframe portlets?6. What are the limitations of IFrame portlets from portal perspective?7. Have you used AJAX in your portal ? What are the limitations?8. Have you used WSRP? What are the limitations of WSRP?9. How session handling is done in WSRP between consumer and producer? what are the different ways?10. Have use used domain templates? How do you create them? What are the advantages of domain templates?11. Different strategies of content propagation in weblogic portal?12. How do you offer books, pages and portlets as remote in weblogic portal 10.3?13. How do you do IPC (inter-portlet communication) between producer and consumer?14. How do you expose Weblogic portlets as a URL?15. How to show different look-and-feel for different users?16. How to create custom layouts in weblogic portal?

Page 4: Weblogic Portal

Weblogic Portal Interview Questions IIIAnswers to follow:..1. What is the difference between JSR 168 and JSR 286 specs?2. What is managed bean?3. What is the difference between managed bean and backing bean?4. If you have two same portlet instances in a single page, what are the things you need to consider in using java script?5. How did you handle security in WSRP?6. What are the performance issues you had in WSRP?

at 5/26/2011 10:03:00 AM 0 comments 

Labels: Interviews, Questions, Weblogic Portal

How to implement breadcrumb in Weblogic PortalBreadcrumbs is one of the cool features of weblogic portal framework for UI navigation. We have successfully implemented this functionality for one our portal applications. The JSP is given below which is based on weblogic portal 10.2 version. I think it should work with weblogic portal 10.3 as well. Let me know if you are running into any issues with this JSP. This jsp should be included as part of page.jsp.

Breadcrumb.jsp:<%@ page language="java" contentType="text/html;charset=UTF-8"%><%@ page import="com.bea.netuix.servlets.controls.window.WindowPresentationContext,                 com.bea.netuix.servlets.controls.window.TitlebarPresentationContext,                 java.util.ArrayList,                 java.util.Iterator,                 com.bea.portlet.PageURL,                 com.bea.netuix.servlets.controls.page.BookPresentationContext,                 com.bea.netuix.servlets.controls.page.PagePresentationContext,                 com.bea.netuix.servlets.controls.window.WindowCapabilities"%><%@ page session="false"%><%@ taglib uri="http://www.bea.com/servers/portal/tags/netuix/render" prefix="render" %>

<%--    This is the JSP for the showing breadcrumbs in XYZ Eagle portal.    It is part of the skeleton file page.jsp.

    Implementation based on WebLogic Portal 10.2.

    Author ::      Ananth Kannan--%>

<%    ArrayList breadcrumbTitles = new ArrayList();     ArrayList breadcrumbURLs = new ArrayList();     boolean isHidden = false;

    BookPresentationContext book = BookPresentationContext.getBookPresentationContext(request);    PagePresentationContext pageCtx = PagePresentationContext.getPagePresentationContext(request);

    if (!(book.getDefaultPage().equals(pageCtx.getDefinitionLabel())))     {         breadcrumbTitles.add(book.getTitle()); 

Page 5: Weblogic Portal

        breadcrumbURLs.add(PageURL.createPageURL(request,response,book.getDefaultPage()).toString());     }             PagePresentationContext parentPage = book.getParentPagePresentationContext();         while (parentPage != null)         {             breadcrumbTitles.add(parentPage.getTitle()); 

            if (parentPage instanceof BookPresentationContext)             {                 BookPresentationContext parentBook = (BookPresentationContext)parentPage;                 breadcrumbURLs.add(PageURL.createPageURL(request, response,  parentBook.getDefaultPage()).toString());             }            else             {                 breadcrumbURLs.add(PageURL.createPageURL(request, response, parentPage.getDefinitionLabel()).toString());             }                 parentPage = parentPage.getParentPagePresentationContext();         }%>          

<%                         //DO NOT SHOW BREADCRUMBS IN MAIN HOME PAGE and also in hidden page            if (pageCtx.isHidden())             {             }             else             {                %>      <ul class="breadcrumbs"><%        for (int i = breadcrumbTitles.size() - 1; i >= 0; i--)         {             if (((String)breadcrumbTitles.get(i)).equalsIgnoreCase("My Main Book")) {                     breadcrumbTitles.set(i, "My Home");             }            %>             <li class="first"><a href="<%=breadcrumbURLs.get(i) %>" ><%=breadcrumbTitles.get(i)%></a></li> <img src="<render:getSkinPath imageName="/arrow_right.gif" />" />&nbsp;  <%        } %> <%     } %>         </ul>

Weblogic Portal Interview Questions - LatestAs the economy getting better day by day so is the job market. I am getting  number of requests from fellow readers and job seekers to put more interview questions in weblogic portal. Let's get

Page 6: Weblogic Portal

into business straightaway. Some are simple, some are tricky and few are, you got it! 

1. How do you integrate existing legacy applications, non-portal web applications into portal?2. How can you show/hide portlets in your applications at run time?3. What are the different ways to implement SSO in Weblogic portal?4. What are the different ways to create portlet preferences in weblogic portal?5. Have you used any iframe portlets?6. What are the limitations of IFrame portlets from portal perspective?7. Have you used AJAX in your portal ? What are the limitations?8. Have you used WSRP? What are the limitations of WSRP?9. How session handling is done in WSRP between consumer and producer? what are the different ways?10. Have use used domain templates? How do you create them? What are the advantages of domain templates?11. Different strategies of content propagation in weblogic portal?12. How do you offer books, pages and portlets as remote in weblogic portal 10.3?13. How do you do IPC (inter-portlet communication) between producer and consumer?14. How do you expose Weblogic portlets as a URL?15. How to show different look-and-feel for different users?16. How to create custom layouts in weblogic portal?

Federated portal Vs local portal

What is a federated portal? A federated portal is a portal that includes remote portlets, books, and pages. These remote resources are collected and brought together at run time to a portal application called a consumer, which presents the federated portal to end users. So in federated portal, portal application and portlets will be running in different containers where as in local portal, both will be running in a single portal container. A federated portal reflects a trueService Oriented Architecture(SOA). These individual remote parts basically called producers of a federated portal that can be maintained, updated, and released independently without redeploying the consumer portal in which they are surfaced. Lets say your organization has depts like sales, marketing, human resources and finance. Every department has its own budget, needs and resources. Sales dept doesn't need to worry about how finance portlets will look like though both portlets will be running under a portal consumer. Instead of building all portlets into a single portal applications, you can develop portlets for each dept separately and deploy portlets as seperate web applications running on remote servers while portal consumes them using WSRP. You can have producer for each department if you want to which will be easy to maintain. Federated portal uses WSRP(Web Services for Remote Portlets (WSRP) for decoupling portlets from portal. 

Local portals are the one where all portlets will be developed, maintained and deployed in a single container. So small changes to the portal, you need to perform whole life cycle - design, development, testing, deployment and propagation to development to staging to production. This may be OK for small sized portal but as the portal grows maintenance becomes very difficult. For many organizations, the cost of such maintenance is significant and can include portal downtime. Federation simplifies portal maintenance.

P.S: All WebLogic Portal applications are, by default, both consumers and producers. This means that every WebLogic Portal application is capable of hosting remote portlets and consuming them. With a federated portal architecture, separate development teams, perhaps in separate business units, operating in different geographical locations, can focus on and develop their respective portlets. These development teams can update, test, and release their portlets independently from one another. You do not need to redeploy a federated portal every time a portlet deployed in aproducer changes. When a remote portlet is updated in a producer, all of the consumers of that portlet receive the change immediately and automatically.

Page 7: Weblogic Portal

How to Integrate web applications into Weblogic PortalIf you are a portal developer or portal architect working at client site for providing portal solutions, you will come across these questions. How will I integrate my existing web applications into portal? Or How do I bring all web applications into single user interface? How to provide a single point of access to existing applications so user just login only once? Well, there are many ways to do that. Lets take the simple approach first.

1. LinksLinks portlets are one of the quickest ways to integrate with existing applications, though providing just links is not actual integration. Trust me, we have developed many links portlets for integration as it is quick to develop and not much coding is needed. But there is some disadvantage too as we are making users to jump into another applications.

2.IFrame portlet   Believe me we have developed iframe portlets as well. This is second most common way to quickly integrate an application into a portal. By using <iframe> html tag in a portlet we can reference the application. When we do so, application will be displayed under portal with portal banner and portal navigation. But there are some downsides to it too. Timesouts can be tricky because either the Iframes or portal can timeout before the other. There could be an issue with look-and-feel as well. The iframe tag can introduce scroll bars.

3. Web clipper portlets:This is another option for integrating any web application with portal. Web Clipping enables the clipping of an entire web page or a portion of it and reusing it as a portlet. Basic and HTML-form-based sites may be clipped. Use web clipping when you want to copy content from an existing web page and expose it in your portal application as a portlet.

4. WSRP portlets:Another approach is using WSRP - Web Services for Remote portlets. These portlets provide both presentation and business logic which is slightly different than standard web service which provides only business logic no presentation so every client had to implement on their own. To understand better, compare with HTTP where user interacts with remote servers by using browser and doing operation like form submitting. He gets his response as HTML in the browser. WSRP is a similar protocol between server and client. In WSRP terminology, the server is called a producer. It hosts services, typically portlets, that clients, or consumers, communicate with. Consumers uses WSRP which defines a common, well defined interface that defines how a portal(consumer) should interact with producer. WSRP is built upon existing Web services standards like SOAP, WSDL, and UDD. WSRP can aggregate portlets from more than one producers into single page and can apply consumer specific look-and-feel to that page.

5. Struts portlets:Lets say you have existing struts application up and running some where obviously outside portal and you would like to host in the portal. Weblogic portal provides struts portlets by which you can integrate with existing struts applications.

Weblogic portal content propagation using Ant tasksContent propagation is the process of moving portal artifacts from from one domain environment to other usually from staging to production. This moving basically involves the contents from database & ldap.

Page 8: Weblogic Portal

Weblogic offers three ways to do this:1. Using Weblogic workshop by creating propagation session.2. Customized Ant scripts3. Import/export utility.

When you use weblogic workshop, it involves a lot of manual tasks. Those manual tasks are error prone. I thought ant scripts are more effective as you have a lot of control and it is automated process. I never tried the third option. This blog will cover how to do propagation using ant scripts.

Pre-requests:Both source & destination admin server should be running and should have same weblogic portal version. Ant environment variable needs to be set up.

How to set up Ant:1. Create environment variabale ANT_HOME in your local machine with value ${BEA_HOME}\modules\org.apache.ant_1.6.5. Eg: if you installed in C drive, value would be C:\bea\modules\org.apache.ant_1.6.52. Create another variable called ANT_OPTS with value of -Xmx500M

Steps for propagation:1. Create a folder called propagation from you planned to run scripts

2. Copy propagation.xml file from below into propagation folder.

propagation.xml:

<?xml version="1.0" ?><!-- ==================================================================== --><!-- Propagation Ant Script --><!-- Author        :        Ananth Kannan --><!-- Date        :        05/30/2008      --><!-- Title:       propagation.xml                                            --><!--                                                                         --><!-- Usage Notes:                                                            --><!--                                                                         --><!-- The normal sequence of using this script is to invoke the targets in    --><!-- the following order:                                                    --><!--                                                                         --><!-- ant pingSrc                                                             --><!-- ant pingDest                                                             --><!-- ant downloadSrc                                                         --><!-- ant validateSrc                                                         --><!-- ant downloadDest                                                        --><!-- ant validateDest                                                        --><!-- ant combine                                                             --><!-- ant commit                                                                 --><!-- ant uploadCombined                                                      --><!--                                                                         --><!-- ======================================================================= -->

Page 9: Weblogic Portal

<project name="Portal Propagation Ant Tasks" basedir="." default="usage">    <property environment="env"/>

    <!-- Environment Settings -->        <!-- Runtime: this variable must point to your install directory. -->    <property name="deploy.dir" value="C:\bea\wlserver_10.0"/>

    <!-- Runtime: this variable must indicate where the files will be read/written. -->    <property name="working.dir" value="C:\propagation"/>

    <!-- Source: -->    <!--         Setup the variables that identify your source environment (staging, for example) -->    <!--         These variables are explained below, or consult the Propagation Ant Task documentation. -->    <property name="source.servlet.url" value="http://{src_admin_server}:7001/EAR_NamePropagation/inventorymanagement"/>    <property name="source.admin.username" value="weblogic"/>    <property name="source.admin.password" value="weblogic"/>    <property name="source.allow.http" value="true"/>

    <!-- Destination: -->    <!--         Setup the variables that identify your destination environment (production, for example) -->    <!--         These variables are explained below, or consult the Propagation Ant Task documentation. -->    <property name="dest.servlet.url" value="http://{dest_admin_server}:7001/EAR_NamePropagation/inventorymanagement"/>    <property name="dest.admin.username" value="weblogic"/>    <property name="dest.admin.password" value="weblogic"/>    <property name="dest.allow.http" value="true"/>        <path id="onlineTask.classpath">        <pathelement location="${deploy.dir}/platform/lib/p13n/p13n_common.jar"/>        <pathelement location="${deploy.dir}/portal/lib/propagation/propagation.jar"/>        <pathelement location="${deploy.dir}/portal/lib/propagation/propagation_ant.jar"/>        <pathelement location="${deploy.dir}/portal/lib/propagation/content_prop.jar"/>        <pathelement location="${deploy.dir}/portal/lib/propagation/netuix_prop.jar"/>    </path>        <path id="offlineTask.classpath">        <pathelement location="${deploy.dir}/platform/lib/p13n/p13n_common.jar"/>        <pathelement location="${deploy.dir}/platform/lib/wlp/wsrp-common.jar"/>        <pathelement location="${deploy.dir}/portal/lib/propagation/propagation.jar"/>        <pathelement location="${deploy.dir}/portal/lib/propagation/propagation_ant.jar"/>        <pathelement location="${deploy.dir}/portal/lib/propagation/content_prop.jar"/>        <pathelement location="${deploy.dir}/portal/lib/propagation/netuix_prop.jar"/>        <pathelement location="${deploy.dir}/server/lib/api.jar"/>        <pathelement location="${deploy.dir}/../modules/com.bea.core.xml.beaxmlbeans_2.2.0.0.jar"/>        <pathelement location="${deploy.dir}/../modules/com.bea.core.weblogic.stax_1.0.1.0.jar"/>        <pathelement location="${deploy.dir}/../modules/com.bea.core.utils_1.0.1.0.jar"/>        </path>    

    <!--         SERVLET.URL:                The online Propagation ant tasks require that the Propagation servlet be deployed in the 

Page 10: Weblogic Portal

        application. By default, Portal applications will include the Propagation application library        module which deploys the Propagation web application. Look for the following in the application's        META-INF/weblogic-application.xml               <library-ref>           <library-name>wlp-propagation-app-lib</library-name>       </library-ref>       <library-context-root-override>           <context-root>propagation</context-root>           <override-value>portalAppPropagation</override-value>       </library-context-root-override>              In this example, the Propagation application module has been included, and the Propagation        web application which is normally at context root "propagation" has been overridden to listen       to context path "portalAppPropagation". Therefore, the servletURL in this case would be:              http://hostname:port/portalAppPropagation/inventorymanagement              The Propagation servlet is deployed by default to map to "inventorymanagement".     -->

    <!-- ==================================================================== -->    <!-- Targets -->    <!-- ==================================================================== -->

    <target name="usage" description="list of commands">        <echo message="Usage Instructions:" />        <echo message="Choose from this list of standard ant targets, or modify the build file to create your own." />        <echo message="1.  pingSrc and pingDest - pings the server and application to make sure it is alive" />        <echo message="2.  checkMutexSrc and checkMutexDest - determines if another user is working with the application" />        <echo message="3.  lockSrc and lockDest - prevents admin changes on the src and dest system." />        <echo message="4.  downloadSrc and downloadDest - creates src.zip and dest.zip files respectively" />        <echo message="5.  validateSrc and validateDest - makes sure the src.zip and dest.zip files are good" />        <echo message="6.  listScopes - lists the scopes in src.zip, for potential scoping of the differencing step" />        <echo message="6a. listPolicies - lists the policies in src.zip, for potential polices for the differencing step" />        <echo message="7.  search - finds nodes with a specific string in their name, to help verify the wanted node was exported" />        <echo message="8.  diff - differences src.zip and dest.zip and writes the results to diff_cm.xml" />        <echo message="9.  combine - combines src.zip and dest.zip into a new inventory, combined.zip" />        <echo message="10. validateCombined - makes sure combined.zip is a good file" />        <echo message="11. extractCombined - extracts the working artifacts out of combined.zip for viewing" />

Page 11: Weblogic Portal

        <echo message="12. insertCombined - inserts updated working artifacts into combined.zip" />        <echo message="13. checkManualElections - Test for the presence of manual elections. Used as condition to determine if continue to upload/commit or quit." />        <echo message="14. uploadCombined - uploads combined.zip to the destination server" />        <echo message="15. commit or commitOpt - commits uploaded inventory on dest, either pessimistically or optimistically" />        <echo message="16. unlockSrc and unlockDest - allows admin changes on the src and dest system again." />        <echo message="17. electionsAdd and electionsSubtract - allows for algebraic operations on two changemanifest files." />    </target>

    <!-- ONLINEPING TASK -->

    <taskdef name="onlinePing" classname="com.bea.propagation.ant.taskdefs.OnlinePingTask">        <classpath refid="onlineTask.classpath"/>    </taskdef>

    <target name="pingSrc" description="ping the server">        <echo message="****** Start: pingSrc ******" />        <onlinePing            servletURL="${source.servlet.url}"             username="${source.admin.username}"            password="${source.admin.password}"            allowHttp="${source.allow.http}"        />        <echo message="****** Finish: pingSrc ******" />    </target>

    <target name="pingDest" description="ping the server">        <echo message="****** Start: pingDest ******" />        <onlinePing            servletURL="${dest.servlet.url}"             username="${dest.admin.username}"            password="${dest.admin.password}"            allowHttp="${dest.allow.http}"        />        <echo message="****** Finish: pingDest ******" />    </target>

    <!-- alternate method of pinging using Condition Ant construct -->    <target name="pingDestC1" description="ping the server">        <echo message="****** Start: pingDestC1 ******" />        <condition property="ping_success">            <onlinePing                servletURL="${dest.servlet.url}"                 username="${dest.admin.username}"                password="${dest.admin.password}"                allowHttp="${dest.allow.http}"            />        </condition>        <antcall target="ping_success" />        <echo message="****** Finish: pingDestC1 ******" />    </target>    <target name="ping_success" if="ping_success"><echo message="The server is available." /></target>

Page 12: Weblogic Portal

    <!-- ONLINEMUTEX TASK -->

    <taskdef name="onlineMutex" classname="com.bea.propagation.ant.taskdefs.OnlineCheckMutexTask">        <classpath refid="onlineTask.classpath"/>    </taskdef>

    <target name="checkMutexSrc" description="checks to see if the mutex is available">        <echo message="****** Start: checkMutexSrc ******" />        <onlineMutex            servletURL="${source.servlet.url}"             username="${source.admin.username}"            password="${source.admin.password}"            allowHttp="${source.allow.http}"            failOnError="false"            retryTimes="3"        />        <echo message="****** Finish: checkMutexSrc ******" />    </target>

    <target name="checkMutexDest"  description="checks to see if the mutex is available">        <echo message="****** Start: checkMutexDest ******" />        <onlineMutex            servletURL="${dest.servlet.url}"             username="${dest.admin.username}"            password="${dest.admin.password}"            allowHttp="${dest.allow.http}"            failOnError="false"            retryTimes="10"        />        <echo message="****** Finish: checkMutexDest ******" />    </target>

    <!-- alternate method of checking the mutex using Condition Ant construct -->    <target name="checkMutexDestC1" description="checks to see if the mutex is available">        <echo message="****** Start: checkMutexDestC1 ******" />        <condition property="mutex_success">            <onlineMutex                servletURL="${dest.servlet.url}"                 username="${dest.admin.username}"                password="${dest.admin.password}"                allowHttp="${dest.allow.http}"                failOnError="false"                retryTimes="10"            />        </condition>        <antcall target="mutex_success" />        <echo message="****** Finish: checkMutexDestC1 ******" />    </target>    <target name="mutex_success" if="mutex_success"><echo message="The mutex is available." /></target>

    <!-- onlineMaintenanceMode TASK -->

    <taskdef name="onlineMaintenanceMode"

Page 13: Weblogic Portal

classname="com.bea.propagation.ant.taskdefs.OnlineMaintenanceModeTask">        <classpath refid="onlineTask.classpath"/>    </taskdef>

    <target name="lockSrc" description="put the server into maintenance mode">        <echo message="****** Start: lockSrc ******" />        <onlineMaintenanceMode            servletURL="${source.servlet.url}"             username="${source.admin.username}"            password="${source.admin.password}"            allowHttp="${source.allow.http}"            enable="true"        />        <echo message="****** Finish: lockSrc ******" />    </target>

    <target name="lockDest" description="put the server into maintenance mode">        <echo message="****** Start: lockDest ******" />        <onlineMaintenanceMode            servletURL="${dest.servlet.url}"             username="${dest.admin.username}"            password="${dest.admin.password}"            allowHttp="${dest.allow.http}"            enable="true"        />        <echo message="****** Finish: lockDest ******" />    </target>

    <!-- alternate method of locking using Condition Ant construct -->    <target name="lockDestC1" description="put the server into maintenance mode">        <condition property="lock_success">            <onlineMaintenanceMode                servletURL="${dest.servlet.url}"                 username="${dest.admin.username}"                password="${dest.admin.password}"                allowHttp="${dest.allow.http}"                enable="true"            />        </condition>        <antcall target="lock_success" />    </target>    <target name="lock_success" if="lock_success"><echo message="Maintenance mode has been toggled." /></target>

    <!-- ONLINEDOWNLOAD TASK -->

    <taskdef name="onlineDownload" classname="com.bea.propagation.ant.taskdefs.OnlineDownloadTask">        <classpath refid="onlineTask.classpath"/>    </taskdef>

    <target name="downloadSrc">        <echo message="****** Start: downloadSrc ******" />        <delete file="${working.dir}/src.zip" quiet="true" />        <delete file="${working.dir}/downloadSrc.log" quiet="true" />        <onlineDownload            servletURL="${source.servlet.url}" 

Page 14: Weblogic Portal

            username="${source.admin.username}"            password="${source.admin.password}"            allowHttp="${source.allow.http}"            failOnError="true"            outputInventoryFile="${working.dir}/src.zip"            logFile="${working.dir}/downloadSrc.log"        >            <modifier name="cm_exportPolicy" value="lastPublished" />            <modifier name="allowMaintenanceModeDisabled" value="true"/>            <modifier name="allowSecurityOutOfSync" value="true"/>         </onlineDownload>        <echo message="****** Finish: downloadSrc ******" />        <echo message="****** Please check :: src.zip is downloaded into ******${working.dir}" />    </target>

    <target name="downloadSrcRemote">        <echo message="****** Start: downloadSrcRemote ******" />        <delete file="${working.dir}/src.zip" quiet="true" />        <delete file="${working.dir}/downloadSrcRemote.log" quiet="true" />        <onlineDownload            servletURL="${source.servlet.url}"             username="${source.admin.username}"            password="${source.admin.password}"            allowHttp="${source.allow.http}"            failOnError="true"            outputToServerFileSystem="true"            outputInventoryFile="D:\TEMP\prop_test\src.zip"            logFile="${working.dir}/downloadSrcRemote.log"        >            <modifier name="allowMaintenanceModeDisabled" value="true"/>        </onlineDownload>        <echo message="****** Finish: downloadSrcRemote ******" />    </target>

    <target name="downloadDest">        <echo message="****** Start: downloadDest ******" />        <delete file="${working.dir}/dest.zip" quiet="true" />        <delete file="${working.dir}/downloadDest.log" quiet="true" />        <onlineDownload            servletURL="${dest.servlet.url}"             username="${dest.admin.username}"            password="${dest.admin.password}"            allowHttp="${dest.allow.http}"            outputInventoryFile="${working.dir}/dest.zip"            logFile="${working.dir}/downloadDest.log"        >            <modifier name="allowMaintenanceModeDisabled" value="true"/>            <modifier name="allowSecurityOutOfSync" value="true"/> 

        </onlineDownload>        <echo message="****** Finish: downloadDest ******" />    </target>

    <!-- OFFLINEVALIDATE TASK -->

    <taskdef name="offlineValidate" classname="com.bea.propagation.ant.taskdefs.OfflineValidateTask">

Page 15: Weblogic Portal

        <classpath refid="offlineTask.classpath"/>    </taskdef>

    <target name="validateSrc" description="valid inventory, with logging">        <echo message="****** Start: validateSrc ******" />        <delete file="${working.dir}/validateSrc_log.txt" quiet="true" />        <delete file="${working.dir}/validateSrc_verboselog.txt" quiet="true" />

        <offlineValidate             sourceFile="${working.dir}/src.zip"             logFile="${working.dir}/validateSrc_log.txt"            verboseLogFile="${working.dir}/validateSrc_verboselog.txt"        />        <echo message="****** Finish: validateSrc ******" />    </target>

    <target name="validateDest" description="validates to see if an inventory file is a valid inventory">        <echo message="****** Start: validateDest ******" />        <delete file="${working.dir}/validateDest_log.txt" quiet="true" />        <delete file="${working.dir}/validateDest_verboselog.txt" quiet="true" />

        <offlineValidate             sourceFile="${working.dir}/dest.zip"             logFile="${working.dir}/validateDest_log.txt"            verboseLogFile="${working.dir}/validateDest_verboselog.txt"        />        <echo message="****** Finish: validateDest ******" />    </target>

    <!-- alternate method of validating using Condition Ant construct -->    <target name="validateDestC1" description="validates to see if an inventory file is a valid inventory">        <echo message="****** Start: validateC1 ******" />        <condition property="validate_success">            <offlineValidate                 sourceFile="${working.dir}/dest.zip"             />        </condition>

        <antcall target="validate_success" />

        <echo message="****** Finish: validateC1 ******" />    </target>    <target name="validate_success" if="validate_success"><echo message="The validation succeeded." /></target>

    <!-- OFFLINELISTSCOPES TASK -->

    <taskdef name="offlineListScopes" classname="com.bea.propagation.ant.taskdefs.OfflineListScopesTask">        <classpath refid="offlineTask.classpath"/>    </taskdef>

    <target name="listScopes" description="lists the scopes found in the source inventory">        <echo message="****** Start: listScopes ******" />        <delete file="${working.dir}/listScopes_scopes.properties" quiet="true" />

Page 16: Weblogic Portal

        <delete file="${working.dir}/listScopes_log.txt" quiet="true" />        <delete file="${working.dir}/listScopes_verboselog.txt" quiet="true" />        <mkdir dir="${working.dir}/scopes"/>

        <offlineListScopes             sourceFile="${working.dir}/src.zip"             scopeFile="${working.dir}/scopes/listScopes_scopes.properties"            logFile="${working.dir}/scopes/listScopes_log.txt"            verboseLogFile="${working.dir}/scopes/listScopes_verboselog.txt"        />        <echo message="****** Finish: listScopes ****** under ${working.dir}/scopes" />    </target>

    <!-- OFFLINELISTPOLICIES TASK -->

    <taskdef name="offlineListPolicies" classname="com.bea.propagation.ant.taskdefs.OfflineListPoliciesTask">        <classpath refid="offlineTask.classpath"/>    </taskdef>

    <target name="listPolicies" description="lists the scopes found in the source inventory">        <echo message="****** Start: listPolicies ******" />        <delete file="${working.dir}/listPolicies_policies.properties" quiet="true" />        <delete file="${working.dir}/listPolicies_log.txt" quiet="true" />        <delete file="${working.dir}/listPolicies_verboselog.txt" quiet="true" />        <mkdir dir="${working.dir}/policies"/>

        <offlineListPolicies             sourceFile="${working.dir}/src.zip"             policyFile="${working.dir}/policies/listPolicies_policies.properties"            globalAddFlag="true"            globalUpdateFlag="false"            globalDeleteFlag="true"            logFile="${working.dir}/policies/listPolicies_log.txt"            verboseLogFile="${working.dir}/policies/listPolicies_verboselog.txt"        />        <echo message="****** Finish: listPolicies ****** under ${working.dir}/policies" />    </target>

    <!-- OFFLINESEARCH TASK -->

    <taskdef name="offlineSearch" classname="com.bea.propagation.ant.taskdefs.OfflineSearchTask">        <classpath refid="offlineTask.classpath"/>    </taskdef>

    <target name="search" description="finds the nodes that contain the search string in the name">        <echo message="****** Start: search ******" />        <delete file="${working.dir}/search.txt" quiet="true" />        <delete file="${working.dir}/search_log.txt" quiet="true" />        <delete file="${working.dir}/search_verboselog.txt" quiet="true" />

        <offlineSearch             searchString="Global"             sourceFile="${working.dir}/src.zip"             listFile="${working.dir}/search.txt"            logFile="${working.dir}/search_log.txt"

Page 17: Weblogic Portal

            verboseLogFile="${working.dir}/search_verboselog.txt"        />        <echo message="****** Finish: search ******" />    </target>

    <!-- alternate method of searching using Condition Ant construct -->    <target name="searchC1" description="finds the nodes that contain the search string in the name">        <echo message="****** Start: searchC1 ******" />        <condition property="search_success">            <offlineSearch                 searchString="Global"                 sourceFile="${working.dir}/src.zip"             />        </condition>

        <antcall target="search_success" />

        <echo message="****** Finish: searchC1 ******" />    </target>    <target name="search_success" if="search_success"><echo message="The search succeeded." /></target>

    <!-- OFFLINEDIFF TASK -->

    <taskdef name="offlineDiff" classname="com.bea.propagation.ant.taskdefs.OfflineDiffTask">        <classpath refid="offlineTask.classpath"/>    </taskdef>

    <target name="diff" description="compare two inventories with logging">        <echo message="****** Start: diff ******" />        <delete file="${working.dir}/diff_cm.xml" quiet="true" />        <delete file="${working.dir}/diff_log.txt" quiet="true" />        <delete file="${working.dir}/diff_verboselog.txt" quiet="true" />

        <offlineDiff             sourceFile="${working.dir}/src.zip"             destFile="${working.dir}/dest.zip"            changeManifestFile="${working.dir}/diff_cm.xml"            logFile="${working.dir}/diff_log.txt"            verboseLogFile="${working.dir}/diff_verboselog.txt"        />        <echo message="****** Finish: diff ******" />    </target>

    <!-- alternate method of diffing using Condition Ant construct -->    <target name="diffC1" description="compare two inventories">        <echo message="****** Start: diffC1 ******" />        <delete file="${working.dir}/diffC1_cm.xml" quiet="true" />        <condition property="diff_success">            <offlineDiff                 sourceFile="${working.dir}/src.zip"                 destFile="${working.dir}/dest.zip"                changeManifestFile="${working.dir}/diffC1_cm.xml"            />        </condition>        <antcall target="diff_success" />

Page 18: Weblogic Portal

        <echo message="****** Finish: diffC1 ******" />    </target>    <target name="diff_success" if="diff_success"><echo message="The two inventories are different." /></target>

    <!-- OFFLINECOMBINE TASK -->

    <taskdef name="offlineCombine" classname="com.bea.propagation.ant.taskdefs.OfflineCombineTask">        <classpath refid="offlineTask.classpath"/>    </taskdef>

    <target name="combine" description="Combine two inventories with logging">        <echo message="****** Start: combine ******" />        <delete file="${working.dir}/combined.zip" quiet="true" />        <delete file="${working.dir}/combine_cm.xml" quiet="true" />        <delete file="${working.dir}/combine_log.txt" quiet="true" />        <delete file="${working.dir}/combine_verboselog.txt" quiet="true" />

        <offlineCombine             sourceFile="${working.dir}/src.zip"             destFile="${working.dir}/dest.zip"            combinedInventoryFile="${working.dir}/combined.zip"            changeManifestFile="${working.dir}/combine_cm.xml"            logFile="${working.dir}/combine_log.txt"            verboseLogFile="${working.dir}/combine_verboselog.txt"        />        <echo message="****** Finish: combine ******" />    </target>        <target name="combineWithPolicy" description="Combine two inventories using policy file">        <echo message="****** Start: combine ******" />        <delete file="${working.dir}/combined.zip" quiet="true" />        <delete file="${working.dir}/combine_cm.xml" quiet="true" />        <delete file="${working.dir}/combine_log.txt" quiet="true" />        <delete file="${working.dir}/combine_verboselog.txt" quiet="true" />

        <offlineCombine             sourceFile="${working.dir}/src.zip"             destFile="${working.dir}/dest.zip"            combinedInventoryFile="${working.dir}/combined.zip"            policiesFile = "${working.dir}/policy.properties"            changeManifestFile="${working.dir}/combine_cm.xml"            logFile="${working.dir}/combine_log.txt"            verboseLogFile="${working.dir}/combine_verboselog.txt"        />        <echo message="****** Finish: combine ******" />    </target>

    <target name="combineWithScope" description="Combine two inventories using scope file">        <echo message="****** Start: combine ******" />        <delete file="${working.dir}/combined.zip" quiet="true" />        <delete file="${working.dir}/combine_cm.xml" quiet="true" />        <delete file="${working.dir}/combine_log.txt" quiet="true" />        <delete file="${working.dir}/combine_verboselog.txt" quiet="true" />

Page 19: Weblogic Portal

        <offlineCombine             sourceFile="${working.dir}/src.zip"             destFile="${working.dir}/dest.zip"            combinedInventoryFile="${working.dir}/combined.zip"            scopeFile = "${working.dir}/singlescope.properties"            changeManifestFile="${working.dir}/combine_cm.xml"            logFile="${working.dir}/combine_log.txt"            verboseLogFile="${working.dir}/combine_verboselog.txt"        />        <echo message="****** Finish: combine ******" />    </target>        <!-- OFFLINEVALIDATE TASK -->

    <target name="validateCombined" description="valid inventory, with no logging">        <echo message="****** Start: validateCombined ******" />        <delete file="${working.dir}/validateCombined_log.txt" quiet="true" />        <delete file="${working.dir}/validateCombined_verboselog.txt" quiet="true" />

        <offlineValidate             sourceFile="${working.dir}/combined.zip"             logFile="${working.dir}/validateCombined_log.txt"            verboseLogFile="${working.dir}/validateCombined_verboselog.txt"        />        <echo message="****** Finish: validateCombined ******" />    </target>

    <!-- OFFLINEEXTRACT TASK -->

    <taskdef name="offlineExtract" classname="com.bea.propagation.ant.taskdefs.OfflineExtractTask">        <classpath refid="offlineTask.classpath"/>    </taskdef>

    <target name="extractCombined" description="gather resources from the combined inventory">        <echo message="****** Start: extractCombined ******" />        <delete file="${working.dir}/extract/extractCombined_export.properties" quiet="true" />        <delete file="${working.dir}/extract/extractCombined_scope.properties" quiet="true" />        <delete file="${working.dir}/extract/extractCombined_policy.properties" quiet="true" />        <delete file="${working.dir}/extract/extractCombined_change.xml" quiet="true" />        <delete file="${working.dir}/extract/extractCombined_log.txt" quiet="true" />        <delete file="${working.dir}/extract/extractCombined_verboselog.txt" quiet="true" />        <mkdir dir="${working.dir}/extract"/>

        <offlineExtract             sourceFile="${working.dir}/combined.zip"             exportFile="${working.dir}/extract/extractCombined_export.properties"            policyFile="${working.dir}/extract/extractCombined_policy.properties"            changeManifestFile="${working.dir}/extract/extractCombined_change.xml"            logFile="${working.dir}/extract/extractCombined_log.txt"            verboseLogFile="${working.dir}/extract/extractCombined_verboselog.txt"        />        <echo message="****** Finish: extractCombined ******" />    </target>

Page 20: Weblogic Portal

    <!-- OFFLINEALGEBRA TASK -->

    <taskdef name="offlineAlgebra" classname="com.bea.propagation.ant.taskdefs.OfflineElectionAlgebraTask">        <classpath refid="offlineTask.classpath"/>    </taskdef>

    <target name="electionsAdd" description="add the two election lists">        <echo message="****** Start: electionsAdd ******" />        <delete file="${working.dir}/addedElections.xml" quiet="true" />

        <offlineAlgebra             electionList1File="${working.dir}/elections1.xml"             electionList2File="${working.dir}/elections2.xml"             operation="add"            outputFile="${working.dir}/addedElections.xml"        />        <echo message="****** Finish: electionsAdd ******" />    </target>

    <target name="electionsSubtract" description="subtract the two election lists">        <echo message="****** Start: electionsSubtract ******" />        <delete file="${working.dir}/subtractedElections.xml" quiet="true" />

        <offlineAlgebra             electionList1File="${working.dir}/elections1.xml"             electionList2File="${working.dir}/elections2.xml"             operation="subtract"            outputFile="${working.dir}/subtractedElections.xml"        />        <echo message="****** Finish: electionsSubtract ******" />    </target>

    <!-- OFFLINEINSERT TASK -->

    <taskdef name="offlineInsert" classname="com.bea.propagation.ant.taskdefs.OfflineInsertTask">        <classpath refid="offlineTask.classpath"/>    </taskdef>

    <target name="insertCombined" description="insert resources into the combined inventory">        <echo message="****** Start: insertCombined ******" />        <delete file="${working.dir}/newCombined.zip" quiet="true" />

        <offlineInsert             sourceFile="${working.dir}/combined.zip"             policyFile="${working.dir}/extractCombined_policy.properties"            changeManifestFile="${working.dir}/extractCombined_change.xml"            outputFile="${working.dir}/newCombined.zip"        />        <echo message="****** Finish: insertCombined ******" />    </target>

    <!-- OFFLINE Check for manual elections -->        <taskdef name="offlineCheckForManualElections" classname="com.bea.propagation.ant.taskdefs.OfflineCheckManualElectionsTask">

Page 21: Weblogic Portal

        <classpath refid="offlineTask.classpath"/>    </taskdef>        <target name="checkManualElections" description="check if there is manual elections in combined inventory or change manifest XML">        <echo message="****** Start: checkManualElections ******" />        <offlineCheckForManualElections                 changeManifestFile="${working.dir}/combine_cm.xml"/>        <echo message="****** Finish: checkManualElections ******" />    </target>        <target name="checkManualElectionsC1" description="check if there is manual elections in combined inventory or change manifest XML">        <echo message="****** Start: checkManualElectionsC1 ******" />        <condition property="hasManualElections">            <offlineCheckForManualElections                 sourceFile="${working.dir}/combined.zip"/>        </condition>        <antcall target="continuePropagation" />        <echo message="****** Finish: checkManualElectionsC1 ******" />    </target>    <target name="continuePropagation" unless="hasManualElections">        <echo message="We could continue propagation" />    </target>

    <!-- ONLINEUPLOAD TASK -->

    <taskdef name="onlineUpload" classname="com.bea.propagation.ant.taskdefs.OnlineUploadTask">        <classpath refid="onlineTask.classpath"/>    </taskdef>

    <target name="uploadCombined">        <echo message="****** Start: upload ******" />        <onlineUpload            servletURL="${dest.servlet.url}"             username="${dest.admin.username}"            password="${dest.admin.password}"            allowHttp="${dest.allow.http}"            sourceFile="${working.dir}/combined.zip"        />        <echo message="****** Finish: upload ******" />    </target>

    <target name="uploadRemote">        <echo message="****** Start: uploadRemote ******" />        <onlineUpload            servletURL="${dest.servlet.url}"             username="${dest.admin.username}"            password="${dest.admin.password}"            allowHttp="${dest.allow.http}"            readFromServerFileSystem="true"            sourceFile="D:\TEMP\prop_test\src.zip"        />        <echo message="****** Finish: uploadRemote ******" />    </target>

    <target name="uploadSrc">

Page 22: Weblogic Portal

        <echo message="****** Start: uploadSrc ******" />        <onlineUpload            servletURL="${dest.servlet.url}"             username="${dest.admin.username}"            password="${dest.admin.password}"            allowHttp="${dest.allow.http}"            sourceFile="${working.dir}/src.zip"        />        <echo message="****** Finish: uploadSrc ******" />    </target>

    <target name="uploadDest">        <echo message="****** Start: uploadDest ******" />        <onlineUpload            servletURL="${dest.servlet.url}"             username="${dest.admin.username}"            password="${dest.admin.password}"            allowHttp="${dest.allow.http}"            sourceFile="${working.dir}/dest.zip"        />        <echo message="****** Finish: uploadDest ******" />    </target>

    <!-- ONLINECOMMIT TASK -->

    <taskdef name="onlineCommit" classname="com.bea.propagation.ant.taskdefs.OnlineCommitTask">        <classpath refid="onlineTask.classpath"/>    </taskdef>

    <target name="commit">        <echo message="****** Start: commit ******" />        <delete file="${working.dir}/commit.log" quiet="true" />        <onlineCommit            servletURL="${dest.servlet.url}"             username="${dest.admin.username}"            password="${dest.admin.password}"            allowHttp="${dest.allow.http}"            logFile="${working.dir}/commit.log"        >            <modifier name="differenceStrategy" value="pessimistic" />            <modifier name="cm_checkinComment" value="My sample checkin comment." />            <modifier name="allowMaintenanceModeDisabled" value="true"/>            <modifier name="allowSecurityOutOfSync" value="true"/>         </onlineCommit>        <echo message="****** Finish: commit ******" />    </target>

    <target name="commitOpt">        <echo message="****** Start: commitOpt ******" />        <delete file="${working.dir}/commitOpt.log" quiet="true" />        <onlineCommit            servletURL="${dest.servlet.url}"             username="${dest.admin.username}"            password="${dest.admin.password}"            allowHttp="${dest.allow.http}"            logFile="${working.dir}/commitOpt.log"        >

Page 23: Weblogic Portal

            <modifier name="differenceStrategy" value="optimistic" />            <modifier name="cm_checkinComment" value="My sample checkin comment." />            <modifier name="allowMaintenanceModeDisabled" value="true"/>        </onlineCommit>        <echo message="****** Finish: commitOpt ******" />    </target>

    <!-- set scope file in commit task -->    <target name="commitWithScope">        <echo message="****** Start: commitScope ******" />        <delete file="${working.dir}/commitScope.log" quiet="true" />        <onlineCommit            servletURL="${dest.servlet.url}"             username="${dest.admin.username}"            password="${dest.admin.password}"            allowHttp="${dest.allow.http}"            scopeFile="${working.dir}/singlescope.properties"            logFile="${working.dir}/commitScope.log"        >            <modifier name="differenceStrategy" value="pessimistic" />            <modifier name="cm_checkinComment" value="My sample checkin comment." />            <modifier name="allowMaintenanceModeDisabled" value="true"/>        </onlineCommit>        <echo message="****** Finish: commitOpt ******" />    </target>        <!-- ONLINEMAINTENANCEMODE TASK -->

    <target name="unlockSrc" description="disable maintenance mode on the src server">        <echo message="****** Start: unlockSrc ******" />        <onlineMaintenanceMode            servletURL="${source.servlet.url}"             username="${source.admin.username}"            password="${source.admin.password}"            allowHttp="${source.allow.http}"            enable="false"        />        <echo message="****** Finish: unlockSrc ******" />    </target>

    <target name="unlockDest" description="disable maintenance mode on the dest server">        <echo message="****** Start: unlockDest ******" />        <onlineMaintenanceMode            servletURL="${dest.servlet.url}"             username="${dest.admin.username}"            password="${dest.admin.password}"            allowHttp="${dest.allow.http}"            enable="false"        />        <echo message="****** Finish: unlockDest ******" />    </target>

    <target name="startProp"         description="Starts the propagation operation.."         depends="pingSrc, pingDest, downloadSrc, validateSrc, downloadDest, validateDest, combine, uploadCombined, commit">

Page 24: Weblogic Portal

        <echo message="****** Start: startProp ******" />        <echo message="****** Start: startProp ******" />

        <echo message="****** Finish: startProp ******" />

    </target>

</project>

3. Create a folder called scopes under propagation.

4. In propagation.xml file. Make sure deploy.dir value is pointing to right BEA installation path on your local drive. For eg, C:\bea\wlserver_10.0"

5. Working.dir should point to propagation dir.

6. source.servlet.url is your source server. Where you copy the data from. For e.g, if you copy from INT box, then it should be http://source_server:7001/portlAppEARPropagation/inventorymanagement

7. Once you have all set up, run the following command from your propagation folder:ant –f propagation.xml pingSrcIf the above command fails, source server is not running. re-start it.

8. Same thing goes with destination as well. try this command: ant –f propagation.xml pingDest

9. Type to generate scopes file by generating sourcezip first: ant -f propagation.xml downloadSrc then run this command: ant -f propagation.xml listScopesThis should create a file listScopes.properties under propagation/scopes folder. To know more about scopes, please visit BEA documentation.

10. Once source and destination server running run the propagation command:ant –f propagation.xml startPropIt should propagate the data from source to destination.

Important links:Propagation Ant Task ReferencePropagation Tips and Best Practices

at 11/22/2009 08:34:00 AM 2 comments 

Labels: Content propagation, Weblogic Portal

What is the difference between streaming portal(desktop) and file based portal?I have come across this question many times while working at client site from co-workers, clients and infrastructure folks - what is the difference between streaming portal and file based portal? Well, during portal development process we create .portal file in workshop. This is basically just a template in which more books, pages, portlets can be added. The .portal file is XML based and rendered as "single file mode". This file is mainly for development purpose and should not be used in the production though you can access it in production as well. You can not apply any entitlements or user customization as no data base involved in .portal template.

The streaming portal(desktop) is created out of .portal template using weblogic portal admin tool. A single portal template can have any number of desktops. A desktop contains all the portlets, content, shells, layouts, and look and feel elements necessary to create individual user views of a

Page 25: Weblogic Portal

portal. For eg, assume I have a requirement from three different clients to show some functionality of a portal. I don't want to create a three .portal template though I could, but I would like to have three different desktops with similar functionality but with different "look-and-feel". So I go to weblogic portal admin tool create a desktop called sample1 for client 1. sample 2 for client 2 with different look-and-feel. sample 3 for client 3 again with different look & f. Oh yes! Look and feel can be applied at run time ie while creating desktop itself. Also I can add/remove portlets if I want to for any desktop. I can also add/remove any book/page at run time as well. So what I have done is created 3 different desktops but with a different look-and-feel per client.

When I create a desktop from a .portal template, the desktop is decoupled from the template, and modifications to the .portal file do not affect the desktop, and vice versa. For example, when you change a desktop's look and feel in the WebLogic Portal Administration Console, the change is made only to the desktop, not to the original.portal file. When you view a desktop with in a browser, the desktop is rendered in "streaming mode"  from data base.

P.S:   If your portal application does not need any entitlements or personalizations and it is simple, static portal then file based portal is the best choice. File based portals give better peformance and propagation to other environments is also easy.

at 11/09/2009 09:15:00 AM 0 comments 

Labels: Weblogic Portal

How to implement breadcrumb in Weblogic PortalBreadcrumbs is one of the cool features of weblogic portal framework for UI navigation. We have successfully implemented this functionality in one our portal applications. That was based on weblogic portal 10.2 version. I think it should work with weblogic portal 10.3 as well. Let me know if you are running into any issues with the code. This jsp should be included as part of page.jsp.

Breadcrumbs.jsp:<%@ page language="java" contentType="text/html;charset=UTF-8"%><%@ page import="com.bea.netuix.servlets.controls.window.WindowPresentationContext,                 com.bea.netuix.servlets.controls.window.TitlebarPresentationContext,                 java.util.ArrayList,                 java.util.Iterator,                 com.bea.portlet.PageURL,                 com.bea.netuix.servlets.controls.page.BookPresentationContext,                 com.bea.netuix.servlets.controls.page.PagePresentationContext,                 com.bea.netuix.servlets.controls.window.WindowCapabilities"%><%@ page session="false"%><%@ taglib uri="http://www.bea.com/servers/portal/tags/netuix/render" prefix="render" %>

<%--    This is the JSP for the showing breadcrumbs in XYZ Eagle portal.    It is part of the skeleton file page.jsp.

    Implementation based on WebLogic Portal 10.2.

    Author ::      Ananth Kannan--%>

<%    ArrayList breadcrumbTitles = new ArrayList();     ArrayList breadcrumbURLs = new ArrayList();     boolean isHidden = false;

Page 26: Weblogic Portal

    BookPresentationContext book = BookPresentationContext.getBookPresentationContext(request);    PagePresentationContext pageCtx = PagePresentationContext.getPagePresentationContext(request);

    if (!(book.getDefaultPage().equals(pageCtx.getDefinitionLabel())))     {         breadcrumbTitles.add(book.getTitle());         breadcrumbURLs.add(PageURL.createPageURL(request,response,book.getDefaultPage()).toString());     }             PagePresentationContext parentPage = book.getParentPagePresentationContext();         while (parentPage != null)         {             breadcrumbTitles.add(parentPage.getTitle()); 

            if (parentPage instanceof BookPresentationContext)             {                 BookPresentationContext parentBook = (BookPresentationContext)parentPage;                 breadcrumbURLs.add(PageURL.createPageURL(request, response,  parentBook.getDefaultPage()).toString());             }            else             {                 breadcrumbURLs.add(PageURL.createPageURL(request, response, parentPage.getDefinitionLabel()).toString());             }                 parentPage = parentPage.getParentPagePresentationContext();         }%>          

<%                         //DO NOT SHOW BREADCRUMBS IN MAIN HOME PAGE and also in hidden page            if (pageCtx.isHidden())             {             }             else             {                %>      <ul class="breadcrumbs"><%        for (int i = breadcrumbTitles.size() - 1; i >= 0; i--)         {             if (((String)breadcrumbTitles.get(i)).equalsIgnoreCase("My Main Book")) {                     breadcrumbTitles.set(i, "My Home");             }            %>             <li class="first"><a href="<%=breadcrumbURLs.get(i) %>" ><%=breadcrumbTitles.get(i)%></a></li> <img src="<render:getSkinPath imageName="/arrow_right.gif" />" />&nbsp;  <%        } %> <% 

Page 27: Weblogic Portal

    } %>         </ul>

Weblogic Portal Interview QuestionsI covered most of the questions asked in portal interviews. I typed what ever I remembers questions  these questions are not in order for answers you can go through the weblogic portal documentation.

1. What is a .portal file?

2. What is the difference between streaming portal and file-based portal?

3. What is backing file?

4. Backing file life cycle?

5. what is a control file and why we use it?

5. What are the different types of portlets?

6. what is page flow?

7. How to create streaming portal/desktop?

8. What are the components of look-and-feel?

9. Difference between skin and skeleton?

10.What is shell?

11.Difference between page and book?

12.Explain the order in portal creation(like books,pages and layout)?

13.Explain the inter-portlet communication and why we use it?

14.What are portlet modes and states?

15.Life cycle of the portlet?

16. What is UUP and give me detailed explanation about UUP.

(Like how to write EJB or Java file to get the data from data base and how write .usr file 

and how to configure it in admin console)

17. Explain me about the content manage system. How to use the contents in JSP file?

18. How to create contents?

19. Explain me the steps to upgrade weblogic portal from 8.1 to 10.2/10.3?

20. Explain about WSRP portlets and security?

Page 28: Weblogic Portal

21. Have you involved in contents propogation ? what are the problems you faced in propogation?

22. Explain the problems faced in portal? how you solved?

23. Have you used AJAX in portal ? how you used?

24. How to improve the portal performance?

25. Steps to deploy the portal application to application server?

A) cretae war file and ear file deploy it.

26. How to create the roles and assigning it to the portlet?

27. What are the problems you faced while creating the desktop?

28. JSR 168 life cycle. Explain detailed about JSR 168?