Friday, 28 June 2013

Websphere Portal Syndication and Subscribe Process

Syndication is the process to replicate data from a web content library of one server(XXX) to a web content library on another server(YYY).
The relationship between a syndicator and a subscriber can be either a one-way, two-way are Multiple syndication relationships.

Assume : Server(XXX) as Syndicator
                   Server(YYY) as Subscriber

Here we are getting data from Server(XXX) to Server(YYY)

You can syndicate only between servers running the same version. You cannot syndicate between different versions.

You can syndicate between versions 8.0.0.0 and 8.0.0.1.
You cannot syndicate between versions 7.0.0.0 and 8.0.0.0.

To establish relationship between two servers for syndication follow below steps,

Process :

1. Check both servers are running and can establish connection over network.
2. On subscriber machine(ServerYYY), create vault slot.
Goto, Websphere portal Administration->Access->Credential Vault->Add a vault slot
3. Fill the details like Name,Vaultresource and check "Vault slot is shared" and provide credentials of syndicator server
4. Click OK.
5. Now you have to create Subscriber, Goto Websphere portal Administration->Portal Content->Subscribers and click 'SubscribeNow' button
6. Provide the details like,
Syndicator URL: http://<HOST>:<PORT>/wps/wcm
Syndicator Name: Unique name anything
Subscriber Name: Unique name anything
Credential Vault Slot: select credential vault slot just you created
7. Click next and select libraries you want to syndicate and click finish.
8. Now you can see created subscriber.
9. Test connection of this subscriber with syndicator and update/rebuild the subscriber to establish syndication from one server to other.

Note :

To syndicate a library that contains more than 10000 items, update the maximum Java heap size used by the portal application server on the subscriber server:

In the WebSphere® Integrated Solutions Console, navigate to the Java virtual machine settings.
Stand-alone server:
Servers -> Server Types -> WebSphere application servers -> WebSphere_Portal -> Java and Process Management -> Process definition -> Java Virtual Machine

Clustered server:
System administration -> Deployment manager -> Java and Process Management -> Process Definition -> Java Virtual Machine

Update the value in the Maximum Heap Size field. A value of at least 1024 MB is recommended.
Click OK, and then save your changes.


Ref URL :

http://www-10.lotus.com/ldd/portalwiki.nsf/xpDocViewer.xsp?lookupName=IBM+Web+Content+Manager+8+Product+Documentation#action=openDocument&res_title=Administering_syndication_wcm8&content=pdcontent


Monday, 24 June 2013

Extending WebSphere Portal Personalization engine using Application Objects

To my understand,

This custom application object works based on user attributes which are accessable through PUMA.
We call this attributes, in java class user defined methods which return boolean.
Based on method return, pages/portlets shows or hide.

Sample Code
-----------
import java.io.Serializable;
import java.util.*;
import com.ibm.websphere.personalization.RequestContext;
import com.ibm.websphere.personalization.applicationObjects.*;

// class name will be used in application object
public class PersonalizationAppObject implements SelfInitializingApplicationObject, Serializable{

--variable declaration--

// for object intialization
public void init(RequestContext context){
--context--
--user--
--Attributes--
}
--setting session-- // to access environment

public boolean getCountry(){ // method name refers as an attribute
        if(--condition--){
            return true;
        }
        return false;
    }
}

Implementation
--------------
1. Get required jar files(pznauthor.jar, pzncommon.jar, pznquery.jar, pznresources.jar, psnruntime.jar) from "\pzn\prereq.pzn\lib" and add jar files to classpath.
2. Create a java class implementing "SelfInitializingApplicationObject".
3. Initialize this object using init() method.
4. Write a user defined method where we access environment using context path.
5. And based on user attribute this method return true/false.
6. Make a jar file of the generated java class file and copy that into "\pzn\prereq.pzn\collections".
7. Restart the portal server.
8. To add the application object to personalization engine.
9. Create new Application Object providing session attribute(same has specified in class) and class name.
10. Now create Visibility Rule for page/portlet.
11. Click on attribute link and select your Application Object.attribute (here attribute is method name specified in class)
12. If attribute returns true, page shows or else hide.

Ref Url : http://www-10.lotus.com/ldd/portalwiki.nsf/dx/Extending_WebSphere_Portal_Personalization_engine_using_Application_Objects