[seam-issues] [JBoss JIRA] (JBSEAM-5091) SeamInterceptor doesn't work on EJB @Schedule methods

Michail Plushnikov (JIRA) jira-events at lists.jboss.org
Wed May 8 05:45:54 EDT 2013


    [ https://issues.jboss.org/browse/JBSEAM-5091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12772940#comment-12772940 ] 

Michail Plushnikov commented on JBSEAM-5091:
--------------------------------------------

Commit (https://github.com/seam2/jboss-seam/commit/082f3b3459893b1c4200b7bd8ce99556f87f0dd0) for this issue introduced following exception in our project:

java.lang.IllegalArgumentException: no InvocationType
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:78)
	at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:118)
	at org.jboss.seam.intercept.SessionBeanInterceptor.aroundTimeout(SessionBeanInterceptor.java:57)
.....

This code does not handle new event type AROUND TIMEOUT:
switch (eventType)
         {
            case AROUND_INVOKE:
               if ( interceptor.isOptimized() )
               {
                  return ( (OptimizedInterceptor) userInterceptor ).aroundInvoke(this);
               }
               else
               {
                  return interceptor.aroundInvoke(this, userInterceptor);
               }
            case POST_CONSTRUCT: return interceptor.postConstruct(this, userInterceptor);
            case PRE_DESTORY: return interceptor.preDestroy(this, userInterceptor);
            case PRE_PASSIVATE: return interceptor.prePassivate(this, userInterceptor);
            case POST_ACTIVATE: return interceptor.postActivate(this, userInterceptor);
            default: throw new IllegalArgumentException("no InvocationType");
         }
                
> SeamInterceptor doesn't work on EJB @Schedule methods
> -----------------------------------------------------
>
>                 Key: JBSEAM-5091
>                 URL: https://issues.jboss.org/browse/JBSEAM-5091
>             Project: Seam 2
>          Issue Type: Bug
>          Components: EJB3
>    Affects Versions: 2.3.0.Final
>            Reporter: Marek Schmidt
>            Assignee: Marek Novotny
>             Fix For: 2.3.1.CR1
>
>
> Description of problem:
> Having a
> @Scope(ScopeType.APPLICATION)
> @Singleton
> @Name("statistics")
> public class Statistics
> {
>    @In(create=true)
>    Foo foo;
>      
>    @Schedule(hour="*", minute="*", second="*/10", info="every tenth")
>    public void generateReport(Timer timer) {
>       // do stuff with foo 
>    }
> }
> gets NullPointerException accessing "foo". Seam interceptors doesn't seem to work on time-out methods. The problem seems to be that the SessionBeanInterceptor doesn't implement the @AroundTimeout method.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list