четверг, 22 мая 2014 г.

Use PUMA API from within WebSphere Portal 7 and WebSphere Application Server 7

There is a moment when you need to create users from within portal or application server. PUMA API allows you to do management work with you users.

The crucial interface for working with PUMA API is PumaHome.

Portal
In portlet you will use instance of com.ibm.portal.um.portletservice.PumaHome which you get from com.ibm.portal.portlet.service.PortletServiceHome like this:

pumaHome = psh.getPortletService(com.ibm.portal.um.portletservice.PumaHome.class);


Instance of com.ibm.portal.portlet.service.PortletServiceHome you can obtain from JNDI lookup by name "portletservice/com.ibm.portal.um.portletservice.PumaHome".

In Spring one can do it like this:    <jee:jndi-lookup id="userManagement" jndi-name="portletservice/com.ibm.portal.um.portletservice.PumaHome" resource-ref="true"></jee:jndi-lookup>

Application Server
If you want to manage users from WebSphere Application Server, then you should use instance of com.ibm.portal.um.PumaHome which you can get from JNDI lookup by name "portal:service/usermanagement/Puma".

Комментариев нет:

Отправить комментарий