myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Byrne" <den...@dbyrne.net>
Subject Re: initialization of state serialization within a portal environment
Date Wed, 13 Sep 2006 04:59:31 GMT
Hello team, 

I have moved this to the dev list because Boris raises some important questions.  Does anyone
know if there are outstanding JIRA issues for some of these things ?

Boris, you may want to subscribe to the dev list.  Thanks.

Dennis Byrne

>-----Original Message-----
>From: Iordanov, Borislav \(GIC\) [mailto:boris@miamidade.gov]
>Sent: Tuesday, September 12, 2006 05:36 PM
>To: 'MyFaces Discussion'
>Subject: RE: initialization of state serialization within a portal environment
>
>Hi,
>
>Thanks for prompt response. 
>
>MyFaces currently integrates with portlets with a MyFacesGenericPortlet
>which contains faces initialization code. I think this replaces some
>other listener usually declared in web.xml (don't remember anymore). In
>any case, why have is state serialization initialized separately from
>the rest of MyFaces init code at all?
>
>I think the listener is not being called because it's declared in a TLD
>and myfaces-impl.jar is placed as a common, shared library on the
>server, i.e. not attached to a particular web context.
>
>In general, it would be a good idea to place initialization stuff in
>classes that are not bound to a particular execution environment (e.g.
>have the startup listener, or the portlet init method call a
>"MyFacesBootstrap" class or something). It's a small refactoring task,
>but it'll avoid that duplication of the init program.
>
>If I place the initialization code in the portlet (copied over and
>called handleSerialFactory from the startup listener), it works...
>
>Best,
>Bolerio
>
>-----Original Message-----
>From: Dennis Byrne [mailto:dennis@dbyrne.net] 
>Sent: Tuesday, September 12, 2006 4:43 PM
>To: MyFaces Discussion
>Subject: Re: initialization of state serialization within a portal
>environment
>
>Hi Borislav,
>
>I am the author of your problem, but I am not a Portlet developer.
>Perhaps I can help you fix this and you can educate me more on portlets?
>
>Why isn't StartupServletContextListener is called?
>
>What happens if you can fire something like this as your application
>starts ...
>
>if(servletContext.getInitParameter(StateUtils.INIT_SECRET) != null ||
>servletContext.getInitParameter(StateUtils.INIT_SECRET.toLowerCase()) !=
>null)
>            StateUtils.initSecret(servletContext);
>
>Which version of MyFaces are you using?
>
>If anyone has ideas as to how MyFaces can fix this, be heard here.
>
>Dennis Byrne
>
>>-----Original Message-----
>>From: Iordanov, Borislav \(GIC\) [mailto:boris@miamidade.gov]
>>Sent: Tuesday, September 12, 2006 04:21 PM
>>To: users@myfaces.apache.org
>>Subject: initialization of state serialization within a portal
>environment
>>
>>Hi, 
>>
>>I get this in WebSphere Portal:
>>
>>Caused by: java.lang.NullPointerException: serialFactory
>>
>>[9/12/06 16:00:33:839 EDT] 5fd004e0 SystemErr     R       at
>>org.apache.myfaces.shared_impl.util.StateUtils.getAsByteArray(StateUtil
>s
>> 
>>
>>It's because the StartupServletContextListener is not called.
>>Initialization actually happens in the portlet itself (faces-config.xml
>>is parsed there etc.). Any suggestion of how to deal with this issue?
>>Just copy & paste the code from StartupServletContext in my portlet?
>>What would be a fix within myfaces?
>>
>> 
>>
>>Regards,
>>
>>Bolerio
>>
>>
>
>
>



Mime
View raw message