[jboss-cvs] jboss-seam/src/main/org/jboss/seam/core ...

Norman Richards norman.richards at jboss.com
Sun Oct 22 12:40:01 EDT 2006


  User: nrichards
  Date: 06/10/22 12:40:01

  Modified:    src/main/org/jboss/seam/core   Dispatcher.java
                        LocalDispatcher.java
  Log:
  timer and timerhandle can not be used outside of the dispatcher
  
  Revision  Changes    Path
  1.7       +7 -1      jboss-seam/src/main/org/jboss/seam/core/Dispatcher.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Dispatcher.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Dispatcher.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- Dispatcher.java	16 Oct 2006 11:36:38 -0000	1.6
  +++ Dispatcher.java	22 Oct 2006 16:40:01 -0000	1.7
  @@ -10,6 +10,7 @@
   import javax.ejb.Stateless;
   import javax.ejb.Timeout;
   import javax.ejb.Timer;
  +import javax.ejb.TimerHandle;
   import javax.ejb.TimerService;
   import javax.interceptor.Interceptors;
   import javax.interceptor.InvocationContext;
  @@ -184,6 +185,7 @@
               }
            }
         }
  +
         AsynchronousInvocation asynchronousInvocation = new AsynchronousInvocation(
               invocation.getMethod(), 
               component.getName(), 
  @@ -217,6 +219,10 @@
         }
      }
   
  +    public TimerHandle getHandle(Timer timer) { return timer.getHandle(); }
  +    public Timer getTimer(TimerHandle timerHandle) { return timerHandle.getTimer(); }
  +    public void cancel(Timer timer) { timer.cancel(); }
  +
      public static LocalDispatcher instance()
      {
         if ( !Contexts.isApplicationContextActive() )
  
  
  
  1.3       +5 -1      jboss-seam/src/main/org/jboss/seam/core/LocalDispatcher.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: LocalDispatcher.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/LocalDispatcher.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- LocalDispatcher.java	10 Oct 2006 02:33:22 -0000	1.2
  +++ LocalDispatcher.java	22 Oct 2006 16:40:01 -0000	1.3
  @@ -4,6 +4,7 @@
   
   import javax.ejb.Local;
   import javax.ejb.Timer;
  +import javax.ejb.TimerHandle;
   import javax.interceptor.InvocationContext;
   
   import org.jboss.seam.Component;
  @@ -14,4 +15,7 @@
      public Timer scheduleInvocation(InvocationContext invocation, Component component);
      public Timer scheduleEvent(String type, Long duration, Date expiration, Long intervalDuration);
      
  +    public TimerHandle getHandle(Timer timer);
  +    public Timer getTimer(TimerHandle timerHandle);
  +    public void cancel(Timer timer);
   }
  
  
  



More information about the jboss-cvs-commits mailing list