EJB - callback to client


     I have written/gotten eclipse to generate a sessionless EJB. One of the methods allows the clients to add itself to an arraylist on the bean for later callbacks. After googling a bit it seems the client (in this case a test bean) needs to implement the remote interface..? Or are there any other ways?

     While conducting my web searches I came across this helpful page from M$:


    (1238) To Do: EJB callback method not supported 
    <!--Content type: DocStudio. Transform: devdiv2mtps.xslt.-->


    To correct this error

    • Examine your code and determine the solution that is appropriate to your specific case.


    to be fair, it is from the Java Language Conversion Assistant  ...


  • In order to have a remote callback, you need to have a remote class.

    So, no, there aren't any other ways.

    Although, implementing the Remote interface isn't that difficult to do. 

  • Thank you for your help.


     The client class now inherits from RemoteUnicastObject and implements and Interface extending the Remote Interface.

    The bean creates fine but when I get to call a method an NPE is thrown.

     Stubs have been generated for the client.

    As it's possibly a common error in ejb development I thought I'd mention it without posting the code.. 

Log in to reply

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.