[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-2861) 'IllegalStateException: No application context active' when rendering email after application redeployment and action method invoked over WebService

Felipe Albertao (JIRA) jira-events at lists.jboss.org
Mon Jun 23 05:02:28 EDT 2008


    [ http://jira.jboss.com/jira/browse/JBSEAM-2861?page=comments#action_12418413 ] 
            
Felipe Albertao commented on JBSEAM-2861:
-----------------------------------------

I've got exactly this same issue, including the exception and the redeployment behavior described in the forum. I was able to get an ugly workaround to work, by using an asynchronous calls in between the endpoint and the Seam component:

Endpoint:

@Stateless
@WebService(...)
public class Endpoint implements EndpointRemote
{
   SeamAction action;

   void bugWorkaround(...)
   {
      GregorianCalendar oneSecondFromNow = new GregorianCalendar();
      oneSecondFromNow.add(Calendar.SECOND, 1);
      action.bugWorkaround(oneSecondFromNow.getTime(), ...);
   }

   @WebMethod
   public void actualMethod(...)
   {
      bugWorkaround(...);
   }
}


Seam Component:

@Name(...) @Local @AutoCreate
public class SeamAction {

   @In Renderer renderer;

   public void sendEmail(...)
   {
      renderer.render(...);
   }

   @Asynchronous
   public Timer bugWorkaroundForSendPreliminaryRoadmap(@Expiration Date when, ...)
   {
      sendEmail(...);
      return null; // Seam will return a Timer
   }

	
}

> 'IllegalStateException: No application context active' when rendering email after application redeployment and action method invoked over WebService
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBSEAM-2861
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2861
>             Project: Seam
>          Issue Type: Bug
>    Affects Versions: 2.0.0.CR2
>         Environment: WindowsXP; JBoss 4.2.0.GA; JDK1.5.0_10
>            Reporter: Kurt Edegger
>             Fix For: The future
>
>
> I do get an 'IllegalStateException: No application context active'  error, if my Seam application tries to render an email after a WebService call as described in greater detail in the forum thread http://www.seamframework.org/Community/ApplicationContextConfusion.
> The exception only occurs if the application is redeployed, not if the application is deployed at server startup.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list