Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-2290

@Asynchronous is not working

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • api, ejb3_1
    • None
    • Hide

      Create a Bean:
      @Stateless(name="asdf1", mappedName="asdf2")
      @TransactionManagement(TransactionManagementType.BEAN)
      @Interceptors(SomeInterceptor.class)
      @Remote(SomeBeanIF.class)
      @DependsOn("otherBean")

      Name two methods with the same name (of cause different parameters ) and with annotation @Asyncronous. The second one is executed synchronous.

      Show
      Create a Bean: @Stateless(name="asdf1", mappedName="asdf2") @TransactionManagement(TransactionManagementType.BEAN) @Interceptors(SomeInterceptor.class) @Remote(SomeBeanIF.class) @DependsOn("otherBean") Name two methods with the same name (of cause different parameters ) and with annotation @Asyncronous. The second one is executed synchronous.
    • Hide

      Like described above ... name methods with a different name and all methods are executed async.

      Show
      Like described above ... name methods with a different name and all methods are executed async.

    Description

      Hello,
      we are using jboss as 6.1.0 final and found this bug.

      At the following example the second method won't be asynchronous:

      @Asynchronous
      @Override
      public Future<V> invoke(InvocationTarget<V> target, Object[] invokerParams, InvocationMonitor... monitors)

      { ... }

      @Asynchronous
      @Override
      public Future<V> invoke(Callable<V> callable, InvocationMonitor... monitors) { ... }

      Only the first Method is executed async, the second is executed sync. The same behavior, if the @Asynchronous is defined as class annotation.

      If I name the two methods different both methods are executed async. The following method signures work:

      @Asynchronous
      @Override
      public Future<V> invokeIT(InvocationTarget<V> target, Object[] invokerParams, InvocationMonitor... monitors)

      { ... }

      @Asynchronous
      @Override
      public Future<V> invokeC(Callable<V> callable, InvocationMonitor... monitors) { ... }

      I think the way to define async methods are not correct implemented. I hope my description help to fix this problem in future.

      best regards

      nauni

      Attachments

        Activity

          People

            Unassigned Unassigned
            nauni Oliver Wagner (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: