WebSphere Portal Server - Using the Puma Classes in Websphere Portal

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > August 2005 > Using the Puma Classes in Websphere Portal





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 Using the Puma Classes in Websphere Portal
genqny

2005-08-11, 10:10 pm

All,

I'm rather new to Websphere portal technology so I dont know where to start with this problem i'm having with the Puma classes (PumaHome, PumaLocator, PumaController etc).

My portal version is 5.1.0.1 and the O.S is AIX


I'm trying to get the user and group information from the embedded cloudscape databse that comes along with the portal. So I thought of using the PUMA SPI

I followed this example that I got from IBM's site

http://publib.boulder.ibm.com/infoc...ps/wpspuma.html

I took the following snippet from the above URL

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 ...
}



So according to this example, I built a JSR 168 complaint portlet application with the above code and deployed that onto my portal server.

However when I try to execute the portlet, I throws me a

NameNotFoundException when its trying to do a JNDI lookup.

I tried several different things to get rid of this exception but was not successful.

One of the methods that i did was to register the PUMAHome in the PortletRegistryService properties file. It did not work.

I've been trying with this for several days and would greatly appreciate if someone points me in the proper direction to approach this problem.

Thanks a lot
sai
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com