The latest code for the 2.1.x branch contains a similar code that doesn't use the RequestDataStore - a simple request.getAttribute(this.key) works.
Carsten > -----Original Message----- > From: DURDINA Michal [mailto:[EMAIL PROTECTED] > Sent: Friday, September 10, 2004 11:17 AM > To: [EMAIL PROTECTED] > Subject: [portal] deprecation of request data store > > This mail refers a bit to my previous thread "Sharing > cocoon.jar between multiple web aplications" > http://marc.theaimsgroup.com/?t=109465121500003&r=1&w=2 > > I have problem with portal engine running in ear bundled with > other portlet webapps when all libraries are on ear level. I > get NPE when portlet is resolving its portlet-url via > > PortletURLProviderImpl.toString() -> > PortalServiceImpl.getComponentManager() -> > PortalServiceInfo.getInfo() -> > PortalInfo.getComponentManager() -> returns null ! > > I am using the cocoon-2.1.5 release and the code in > PortalServiceImpl has changed since then in CVS > > from version 1.10: > > protected PortalServiceInfo getInfo() { > PortalServiceInfo info = (PortalServiceInfo) > this.dataStore.getRequestData(this.key); > if ( info == null ) { > info = new PortalServiceInfo(); > > info.setup(ContextHelper.getObjectModel(this.context), > this.portalComponentManagers); > this.dataStore.setRequestData(this.key, info); > } > return info; > } > > to version 1.12 (CVS comment CZ: "Deprecate request data > store and remove it's use in the portal"): > > protected PortalServiceInfo getInfo() { > final Request request = ContextHelper.getRequest( > this.context ); > PortalServiceInfo info = (PortalServiceInfo) > request.getAttribute(this.key, Request.GLOBAL_SCOPE); > ... > } > > I would like to know what was the reason for this change and > if it would solve the problem I described upper. > > In that case I would like to make a patch that would make > those changes applicable for cocoon 2.1.5 release. But the > change introduced the use of feature new to cocoon-2.2.0-dev > core -> request.getAttribute(this.key, Request.GLOBAL_SCOPE). > Will it be feasable to backport all this functionality back > to cocoon 2.1.5? Or you would advise another solution. > > Thank you, > Michal > > > ----------- > Michal Ďurdina > ASSET Soft, a.s. / eBussiness Solutions > Košická 56, 821 08 Bratislava SLOVAK REPUBLIC > Phone: +421-2-50703-523 > Fax: +421-2-50703-444 > e-mail: [EMAIL PROTECTED] > > http://www.assetsoft.sk >
