Callback from a stateful bean - Weblogic

This is a discussion on Callback from a stateful bean - Weblogic ; Hello, I have a problem performing callback from a session stateful EJB. I have defined an interface with a single unimplemented method onMessage in it, and an abstract class that implements this interface. The abstract class is extended by another ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Callback from a stateful bean

  1. Callback from a stateful bean


    Hello,

    I have a problem performing callback from a session stateful EJB. I have defined
    an interface with a single unimplemented method onMessage in it, and an abstract
    class that implements this interface. The abstract class is extended by another
    class, a broker. In the broker I have fully implemented the method onMessage defined
    in the interface. The broker calls a method in the EJB passing its reference,
    subscribing itself as a listener. When needed, the EJB calls the onMessage method
    of the listener, that in this case is the broker. The method is correctly invoked
    and the code in it is executed, BUT it seems the control is not really passed
    to the broker: the EJB itself seems to be executing the broker code... Note that
    broker and EJB are in differents EAR.
    Infact there are problems of ClassCastException when, in the broker onMessage
    method, are called some other EJBs present in the broker EAR but not present in
    the EJB EAR. It seems the classloader after the callback is the EJB classloader
    and no more the broker classloader!
    I'm only calling a method defined in an interface as a callback method...
    Some hypothesis??

    Thank you!
    Bran


  2. Re: Callback from a stateful bean

    "Bran" wrote in message news:4017c933$1@newsgroups.bea.com...
    > I'm only calling a method defined in an interface as a callback method...
    > Some hypothesis??


    Each EAR receives it's own classloader, so objects are passsed
    always by value to EJBs in different EARs.

    Regards,

    Slava Imeshev



+ Reply to Thread