5 Replies Latest reply on Dec 12, 2006 4:13 AM by Michael Heß

    @Asynchronous / Dispatcher not bound

    Michael Heß Newbie

      Hi,

      just a short question: Is the @Asynchronous Annotation only supposed to be working on JBoss AS ? Or should a deployment on/in Tomcat be working as well?

      bye, Michael

        • 1. Re: @Asynchronous / Dispatcher not bound
          Norman Richards Master

          @Asynchronous requires EJB3 support. Although I haven't tried it outside of AS, it should work fine with the embedded EJB3 on tomcat.

          • 2. Re: @Asynchronous / Dispatcher not bound
            Michael Heß Newbie

            Hmmm.... OK. So maybe anybody else also experienced this errormessage?

            [17:24:37] [admin1] [ERROR] [...erceptors.ExceptionInterceptor:370 ] >> redirecting to debug page
            javax.ejb.EJBTransactionRolledbackException: org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.core.dispatcher
             at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:93)
             at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
             at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
            [...]
            


            Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.core.dispatcher
             at org.jboss.seam.Component.newInstance(Component.java:1724)
             at org.jboss.seam.Component.getInstance(Component.java:1627)
             at org.jboss.seam.Component.getInstance(Component.java:1594)
             at org.jboss.seam.Component.getInstance(Component.java:1573)
             at org.jboss.seam.Component.getInstance(Component.java:1568)
             at org.jboss.seam.core.Dispatcher.instance(Dispatcher.java:237)
             at org.jboss.seam.interceptors.AsynchronousInterceptor.invokeAsynchronouslyIfNecessary(AsynchronousInterceptor.java:24)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
            [...]
            


            Caused by: javax.naming.NameNotFoundException: Dispatcher not bound
             at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
             at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
             at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
             at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
             at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:626)
             at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588)
             at javax.naming.InitialContext.lookup(InitialContext.java:351)
             at org.jboss.seam.Component.instantiateSessionBean(Component.java:1029)
             at org.jboss.seam.Component.instantiate(Component.java:1015)
             at org.jboss.seam.Component.newInstance(Component.java:1720)
             ... 170 more
            [...]
            


            The Dispatcher components gets installed on startup:
            [16:55:06] [] [INFO ] [...org.jboss.seam.Component :245 ] >> Component: org.jboss.seam.core.dispatcher, scope: STATELESS, type: STATELESS_SESSION_BEAN, class: org.jboss.seam.core.Dispatcher, JNDI: Dispatcher/local


            And we do have the local interface annotated (not the implementing classes method).

            Any ideas or insights?

            • 3. Re: @Asynchronous / Dispatcher not bound
              Norman Richards Master

              Interesting. I was able deploy the new seampay example on tomcat. I didn't run into any JNDI issues, but I did run into a problem with the dispatcher session bean not having its TimerService injected properly. It is possible that EEJB does not support the TimerService, but that would not explain your JNDI issues.

              Can you explain what exactly you are doing to encounter that error? The JNDI name looks right to me, so I don't see why it would be failing there.

              • 4. Re: @Asynchronous / Dispatcher not bound
                Norman Richards Master

                Sorry for leading you astray. According to the docs (http://docs.jboss.org/ejb3/embedded/embedded.html), embedded EJB3 does not yet support the timer service. Until then (or until we provide an alternate dispatcher implementation) @Asynchronous will not work outside of a complete EJB3 environment.

                • 5. Re: @Asynchronous / Dispatcher not bound
                  Michael Heß Newbie

                  Thanks for clearing things up, Norman. You probably saved me a few valuable hours. :-)