You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by ĎURDINA Michal <Mi...@assetsoft.sk> on 2004/09/10 11:17:22 UTC
[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: michal.durdina@assetsoft.sk
http://www.assetsoft.sk
Re: [portal] deprecation of request data store
Posted by Vadim Gritsenko <va...@reverycodes.com>.
ĎURDINA Michal wrote:
> 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.
Have you checked in 2.1.X branch? It might have the fix you are looking for.
http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X/
Vadim
RE: [portal] deprecation of request data store
Posted by Carsten Ziegeler <cz...@apache.org>.
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:Michal.Durdina@assetsoft.sk]
> Sent: Friday, September 10, 2004 11:17 AM
> To: dev@cocoon.apache.org
> 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: michal.durdina@assetsoft.sk
>
> http://www.assetsoft.sk
>