One simple way is to shutdown the servlet container and to remove /jetspeed/WEB-INF/search_index/ folder. After restart of the servlet container, the search index would be regenerated.
Woonsan ----- Original Message ---- > From: Frank Otto <[email protected]> > To: Jetspeed Users List <[email protected]> > Sent: Wed, May 12, 2010 1:38:45 PM > Subject: Re: toolbox: duplicate entries > > Ok, it works. But how can I remove old entries (before using > PortletApplicationManagement.unregisterPortletApplication)? Am > 12.05.2010 12:38, schrieb Woonsan Ko: > Hi Frank, > > In your > portlet application, you can add jetspeed-portlet.xml under /WEB-INF/ to use > Jetspeed service components. > You can add 'PAM' like the following xml > fragments in your /WEB-INF/jetspeed-portlet.xml: > > > <js:services> > <!-- ... --> > > <!-- PortletApplicationManagement --> > > <js:service name='PAM' /> > <!-- ... > --> > </js:services> > > And, you can > access the component via the portlet context like the following example > during > initialization: > > private > PortletApplicationManagement pam; > > public void init(PortletConfig > config) throws PortletException { > super.init(config); > > > PortletContext context = getPortletContext(); > > this.pam = > (PortletApplicationManagement) > context.getAttribute(CommonPortletServices.CPS_PORTLET_APPLICATION_MANAGER); > > } > > > Please have a look at the example of > jetspeed-portlet.xml of j2-admin. > Also, please refer to the guide > document on how to use Jetspeed service components in portlets here. > [1] > > [1] > http://portals.apache.org/jetspeed-2/deployguide/guide-services.html > > > > Regards, > > Woonsan > > > > ----- Original > Message ---- > >> From: Frank Otto< > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected]> >> To: > Jetspeed Users List< > href="mailto:[email protected]">[email protected]> >> > Sent: Wed, May 12, 2010 12:26:47 PM >> Subject: Re: toolbox: duplicate > entries >> >> Hi Woonsan, >> > > thanks for your fast answer. > > How can I instantiate > the > >> PortletApplicationManagement? > For >> > PortletRegistry I > > >> use >> > PortletRegistry > portletRegistry = (PortletRegistry) > >> > > > componentManager.getComponent("org.apache.jetspeed.components.portletregistry.PortletRegistry"); > > > > kind > >> regards, >> > > Frank > > Am 12.05.2010 12:18, schrieb Woonsan > Ko: > >> The portlet registry REST service depends > on the search engine to retrieve >> portlet definitions. >> > So, when you invoke >> PortletRegistry.removeApplication() method > manually, it doesn't update the >> search index > automatically. >> >> I'd like to suggest you use >> > org.apache.jetspeed.tools.pamanager.PortletApplicationManagement#unregisterPortletApplication(String >> > paName) instead, which will update the search index as well as > invoking >> > PortletRegistry.removeApplication(). >> >> >> >> > Regards, >> >> > Woonsan >> >> >> >> ----- > Original >> Message ---- >> >> > >>> From: Frank Otto< >>> > >> ymailto="mailto: > href="mailto:[email protected]">[email protected]" >> > href="mailto: > href="mailto:[email protected]">[email protected]"> > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected]> >> > >>> To: >>> > >> Jetspeed Users List< >> href="mailto: > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected]"> > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected]> >> > >>> >> Sent: > Wed, May 12, 2010 11:41:10 AM >> >>> > Subject: toolbox: duplicate >>> > >> entries >> >>> > Hi, >>> >>> >> > I >> remove a portlet with PortletRegistry.removeApplication(). > After >> >> >> >>> > this I redeploy the portlet. In the toolbox the portlet is >>> > >> shown >> > >>> twice. >>> >>> > >> After new >> remove and redeploy, I see three > portlets with the same >> >> >> > >>> name. And so one... >>> >>> > >> Has >> someone an > idea? >> >> >> kind >> >> > >>> >> > regards, >> >>> >>> > >> > Frank >> >> >> >> >> >> > --------------------------------------------------------------------- >> >> > To >> >> >>> unsubscribe, > e-mail: >>> >>> >> > ymailto="mailto: >> href="mailto: > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected]"> > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected]" >> > >>> >> > href="mailto: >> href="mailto: > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected]"> > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected]"> >> > ymailto="mailto: > href="mailto:[email protected]">[email protected]" >> > href="mailto: > href="mailto:[email protected]">[email protected]"> > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected] >> > >>> >>> > >> >> For >> >> > >>> additional >>> > >> commands, e-mail: >> >>> > ymailto="mailto: >>> >> > ymailto="mailto: > href="mailto:[email protected]">[email protected]" >> > href="mailto: > href="mailto:[email protected]">[email protected]"> > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected]" >> > >>> >> > href="mailto: >> href="mailto: > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected]"> > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected]"> >> > ymailto="mailto: > href="mailto:[email protected]">[email protected]" >> > href="mailto: > href="mailto:[email protected]">[email protected]"> > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected] >> > >>> >>> > >> >> >> >> >> >> > --------------------------------------------------------------------- >> > To >> unsubscribe, e-mail: >> ymailto="mailto: > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected]" >> > href="mailto: > href="mailto:[email protected]">[email protected]"> > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected] >> >> > For additional commands, e-mail: >> ymailto="mailto: > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected]" >> > href="mailto: > href="mailto:[email protected]">[email protected]"> > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected] >> >> >> >> >> > > > > --------------------------------------------------------------------- > > To > >> unsubscribe, e-mail: >> > ymailto="mailto: > href="mailto:[email protected]">[email protected]" >> > href="mailto: > href="mailto:[email protected]">[email protected]"> > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected] >> > > For > >> additional > commands, e-mail: >> ymailto="mailto: > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected]" >> > href="mailto: > href="mailto:[email protected]">[email protected]"> > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected] >> > > > > > > --------------------------------------------------------------------- > To > unsubscribe, e-mail: > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected] > > For additional commands, e-mail: > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected] > > > > --------------------------------------------------------------------- To > unsubscribe, e-mail: > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected] For > additional commands, e-mail: > ymailto="mailto:[email protected]" > href="mailto:[email protected]">[email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
