[jboss-dev-forums] [Design of EJB 3.0] - [EJBTHREE-1659] Support for asynchronous calls on EJB3 in JB

jaikiran do-not-reply at jboss.com
Wed Dec 24 09:03:48 EST 2008


Asynchronous invocations on EJB3 beans as explained here http://docs.jboss.org/ejb3/app-server/reference/build/reference/en/html/jboss_extensions.html#d0e427, at present, does not work in JBoss-5.

     [java] Exception in thread "main" java.lang.ClassCastException: $Proxy2
  |      [java] at org.jboss.ejb3.asynchronous.Asynch.getAsynchronousProxy(Asynch.java:38)
  |      [java] at org.jboss.tutorial.asynch.client.Client.main(Client.java:40)
  |      [java] Java Result: 1
  | 

The ClassCastException arises from this line in org.jboss.ejb3.asynchronous.Asynch.getAsynchronousProxy:

JBossProxy proxy = (JBossProxy)ejbRef;


The proxies that we create in EJB3 on JBoss-5.0, no longer implement this JBossProxy interface and hence this exception. The JNDI tree output of the bean:

  | +- SomeJNDIName (class: Proxy for: org.jboss.ejb3.core.asynch.test.SimpleSLSBRemote)

 The same beans when deployed on JBoss-4.2.x do implement this interface:

+- SimpleSLSB (class: org.jnp.interfaces.NamingContext)
  |   |   +- remote (proxy: $Proxy70 implements interface org.jboss.ejb3.core.asynch.test.SimpleSLSBRemote,interface org.jboss.ejb3.JBossProxy)
  | 

Any specific reason why we no longer add this as a default interface for the proxies?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4198459#4198459

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4198459



More information about the jboss-dev-forums mailing list