0 Replies Latest reply on Sep 6, 2007 3:42 PM by Tony Mai

    Usage of TimeZone in Seam 2.0

    Tony Mai Apprentice

      I am migrating my apps from Seam 1.2.1GA to Seam 2.0 (last night build) and am running into a few exception. This particular one is about the new class org.jboss.seam.international.TimeZone.

      In my code, I did the following in a component that has th @Startup declaration.

      public class PostSalesManager {
       private java.util.TimeZone timeZone;
       public void init() throws ServiceLocatorException, AuthenticationException, JMSException {
       timeZone = org.jboss.seam.international.TimeZone.instance();

      When the app came up, it threw the following exception:

      12:31:54,109 ERROR [[/postsales]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
      java.lang.IllegalStateException: No active session context
      at org.jboss.seam.international.TimeZoneSelector.instance(TimeZoneSelector.java:107)
      at org.jboss.seam.international.TimeZone.getTimeZone(TimeZone.java:28)

      Can someone help clarifying the usage of this new class?