WebSphere Portal Server - Changes in Puma Api for websphere portal server 5.1

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > February 2006 > Changes in Puma Api for websphere portal server 5.1





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Changes in Puma Api for websphere portal server 5.1

2006-02-10, 3:02 am

iam new to websphere portal server.Iam analysing about the changes required for websphere portal server migration from 5.0 to 5.1.I have a doubt.

My servlets and jsp uses PUMA api.

this is the way how servlets uses puma api.

com.ibm.wps.engine.RunData rData = com.ibm.wps.engine.RunData.from(request);
com.ibm.wps.puma.User user = rData.getUser();

List user= pumaUser.getGroups();

Is it necessary for me to change my code to

PortletServiceHome psh;
try{
javax.naming.Context ctx = new javax.naming.InitialContext();
psh = (PortletServiceHome)
ctx.lookup("portletservice/com.ibm.portal.um.portletservice.PumaHome");
if (psh != null){
PumaHome service = (PumaHome) psh.getPortletService(PumaHome.class);
PumaProfile pp = service.getProfile(request);
User user = pp.getCurrentUser();
String user_objid = pp.getIdentifier(user);
}
}
catch (PumaException pe){
// ... error handling ...
} catch(javax.naming.NameNotFoundException ex) {
// ... error handling ...
} catch(javax.naming.NamingException ex) {
// ... error handling ...
}

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com