tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r1076690 - /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/timer/EjbTimerServiceImpl.java
Date Thu, 03 Mar 2011 17:24:02 GMT
Author: dblevins
Date: Thu Mar  3 17:24:02 2011
New Revision: 1076690

URL: http://svn.apache.org/viewvc?rev=1076690&view=rev
Log:
Tweak code to check for allowed operations to be more compliant
Need to check methods of TimerService, not just TimerImpl

Modified:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/timer/EjbTimerServiceImpl.java

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/timer/EjbTimerServiceImpl.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/timer/EjbTimerServiceImpl.java?rev=1076690&r1=1076689&r2=1076690&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/timer/EjbTimerServiceImpl.java
(original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/timer/EjbTimerServiceImpl.java
Thu Mar  3 17:24:02 2011
@@ -286,9 +286,7 @@ public class EjbTimerServiceImpl impleme
      */
     private void checkState() throws IllegalStateException {
         final BaseContext context = (BaseContext) deployment.get(EJBContext.class);
-        if (!context.isTimerMethodAllowed()) {
-            throw new IllegalStateException("TimerService method not permitted for current
operation " + ThreadContext.getThreadContext().getCurrentOperation().name());
-        }
+        context.check(BaseContext.Call.timerMethod);
     }
 
     /**



Mime
View raw message