4 Replies Latest reply on May 26, 2007 9:01 PM by henrik lindberg

    problem with session timeout and ajax calls

    henrik lindberg Apprentice

      I have problems when a session time out has occurred and the user has been staring at the same form for some time, and then invokes an ajax function on the page. When using links/functions that are normal seam links the user is prompted to login again (as these pages requires login) and the user is then taken back to the page they were on....
      But, with the ajax call however - there seems to be some missing checks - instead of being redirected, there are exceptions that required things can not be injected - like the entity manager...

      Caused by: org.jboss.seam.RequiredException: In attribute requires non-null value: searchService.entityManager
       at org.jboss.seam.Component.getValueToInject(Component.java:1919)
       at org.jboss.seam.Component.injectAttributes(Component.java:1368)
       at org.jboss.seam.Component.inject(Component.java:1195)
       at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.interceptors.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:37)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
       at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
       at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
       at com.cloudsmith.cssite.app.SearchService_$$_javassist_87.getSearchPattern(SearchService_$$_javassist_87.java)

      Anything I can do about it? What should I check?
      Any hints appreciated.
      Can I somehow specify that ajax calls must check that the user is logged in (that a session exists)?