Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-5091

SeamInterceptor doesn't work on EJB @Schedule methods

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.3.0.Final
    • Fix Version/s: 2.3.1.CR1
    • Component/s: EJB3
    • Labels:
      None
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Workaround is to wrap the method in Lifecycle.beginCall(); and Lifecycle.endCall(); calls and use Component.getInstance instead of injection.

      Show
      Workaround is to wrap the method in Lifecycle.beginCall(); and Lifecycle.endCall(); calls and use Component.getInstance instead of injection.

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                manaRH Marek Novotny
                Reporter:
                maschmid Marek Schmidt
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: