[
https://jira.jboss.org/jira/browse/JBSEAM-3211?page=com.atlassian.jira.pl...
]
Jay Balunas commented on JBSEAM-3211:
-------------------------------------
Initial thoughts from a quick investigation:
All components execute around the "BijectionInterceptor" which handles the
various injections, executes the interceptor chain, and then removes the @in attributes.
This is done by calling a disinject(Object bean)" method on the component class.
This is only called at the end of the "BijectionInterceptor" and so on each
invocation of a component the @in attributes should be removed after the processing of the
request.
The issue could be that something is eventually calling "session.setAttribute()"
which will trigger a cluster replication (when <distributable /> is set). This
could be in the component itself or another interceptor in the chain.
Serialization of transient fields on converstion scoped components in
clustered enviroment
------------------------------------------------------------------------------------------
Key: JBSEAM-3211
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3211
Project: Seam
Issue Type: Bug
Components: Core, EJB3
Affects Versions: 2.0.3.CR1
Environment: jboss 4.2.2.GA
java 6 x64
windows vista 64bit
Reporter: Tomaz Cerar
I was debuging one of problems that has shown up on our tests when running in cluster.
After adding some debuging code to jbossweb I have finally tracked it down and I am
almost 100% sure it is a bug in Seam.
here is scenario:
I have SFSB that runs in Conversation scope and I have injected lots of various
components.
and some of those components aren't serializable, so I marked them transient so I
wouldnt get any exceptions while serialization.
But when I run this code with <distributable /> enabled I allways get exception Non
Serializable attribute.
But if serialization is done manualy(just to try) everything goes trough fine.
I have modifed jbossweb so I got better exception reporting for this scenarios(as naming
which parameter),
as I found out that seam is trying to put also my transient field in session scope for
needs of conversation:
error message I got was:
{noformat}
12:32:51,903 ERROR [SeamPhaseListener] [] uncaught exception
java.lang.IllegalArgumentException: attribute:
'org.jboss.seam.CONVERSATION#12$podporaProdaji' of value:
'si.banka_koper.ws.ppbackend.PodporaProdajiCaching@5092eb76' is not serializable!
at
org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1293)
at
org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1254)
at
org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:130)
at com.sun.faces.context.SessionMap.put(ExternalContextImpl.java:972)
at
org.jboss.seam.contexts.ServerConversationContext.flush(ServerConversationContext.java:298)
at org.jboss.seam.contexts.Contexts.flushAndDestroyContexts(Contexts.java:371)
at org.jboss.seam.contexts.FacesLifecycle.endRequest(FacesLifecycle.java:112)
at
org.jboss.seam.jsf.SeamPhaseListener.afterRenderResponse(SeamPhaseListener.java:513)
at
org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:245)
at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:192)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.parsek.debug.TimingFilter.doFilter(TimingFilter.java:42)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at
org.jboss.seam.web.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:42)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:154)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:260)
at
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:366)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:493)
at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:674)
{noformat}
as I understand seam trys to put everything that is in converstion scope in session event
even it is not marked with @Out or marked transient.
the compononent is marked only with @In and in that case I don't see why seam sould
put it in session as it can be injected anytime...
sample code:
{code}
Scope(ScopeType.CONVERSATION)
@Local
@Stateful
public class DepozitWizardAction implements DepozitWizard,
Serializable { private transient static final Logger log =
Logger.getLogger(DepozitWizardAction.class);
@In
private transient PodporaProdaji podporaProdaji;
public void someMethod(){
podporaProdaji.callSomeMethod();
}
}
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira