1. ejb-spec
  2. EJB_SPEC-1

Decoupling the @Schedule annotation from the EJB component model.


    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.2
    • Fix Version/s: Future version
    • Labels:


      Currently the EJB @Schedule annotation can only be used with the EJB component model. With the introduction of managed beans and CDI, there are not many good technical reasons why the @Schedule annotation should not be used in managed beans as well. In fact, many developers that are wary of the EJB component model would opt to use this model instead. In addition, decoupling EJB services such as @Schedule from the component model moves towards removing one-off component models in Java EE in favor of unifying around managed beans/CDI.

      We currently allow this capability in Resin. The code looks like this:

      public class MyScheduledBean {
      public void myScheduledTask()

      { ... }


      It should also be possible to use @Schedule in CDI stereotypes so that developers can compose custom component types to meet the needs of their individual applications (currently the @Schedule annotation can only be applied to methods). The code for this could look like the following:

      public @interface MonthlyTask {}


        reza_rahman created issue -
        marina vatkina made changes -
        Field Original Value New Value
        Fix Version/s Future version [ 15771 ]
        marina vatkina made changes -
        Affects Version/s 3.2 [ 14833 ]
        Assignee marina vatkina [ mvatkina ]


          • Assignee:
            marina vatkina
          • Votes:
            15 Vote for this issue
            4 Start watching this issue


            • Created: