You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Abiodun Okusolubo <ab...@cwlgroup.com> on 2007/11/16 20:26:25 UTC

How to start Services using MyFaces Bridge / Jetspeed 2

Hello All,
I need assistance in creating User Management Portlet using MyFaces 
Bridge /Jetspeed 2. Unfortunately, following the examples given, the 
Services seems not to start at all. Please
I'll be looking forward to reply on how to get this feat sorted. Thanks 
in advance.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: How to start Services using MyFaces Bridge / Jetspeed 2

Posted by Ate Douma <at...@douma.nu>.
Abiodun Okusolubo wrote:
> Hello All,
> I need assistance in creating User Management Portlet using MyFaces 
> Bridge /Jetspeed 2. Unfortunately, following the examples given, the 
> Services seems not to start at all. Please
> I'll be looking forward to reply on how to get this feat sorted. Thanks 
> in advance.

To make use of the predefined Jetspeed Portal Services like the UserManager (see the available list of services *available* in 
WEB-INF/assembly/jetspeed-services.xml) you need to do two things:

a) provide a jetspeed-portlet.xml in your portlet application under WEB-INF containing something like:

   <portlet-app version="1.0"
     xmlns="http://portals.apache.org/jetspeed"
     xmlns:js="http://portals.apache.org/jetspeed"
     xmlns:dc="http://www.purl.org/dc"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://portals.apache.org/jetspeed http://portals.apache.org/jetspeed-2/2.1/schemas/jetspeed-portlet.xsd">

     <js:services>
       <js:service name='UserManager'/>
     </js:services>

   </portlet-app>

   Only when Jetspeed finds this extended deployment descriptor it will provide access to the referenced services.
   Note: the extended deployment descriptor jetspeed-portlet.xml can be used to provide other type of jetspeed specific meta-data as well.

b) The referenced services are (only) then provided using an attribute in the PortletContext as defined in the jetspeed-api, 
org.apache.jetspeed.CommonPortletServices, like:

   UserManager userManager = (UserManager)portletContext.getAttribute(CommonPortletServices.CPS_USER_MANAGER_COMPONENT);

HTH,

Ate

> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org