glassfishejb-3.0corbaiiop

exception message getting lost in IIOP between glassfish domains


I'm running two glassfish v2 domains containing stateless session EJBs. In a few cases, an EJB in one domain has to call one in the other.

My problem is that when the called EJB aborts with an exception, the caller does not receive the message of the exception and instead reports an internal error that is not helpful at all in diagnosing the problem. What happens seems to be this:

Is there anything I can do here to preserve information about the actual cause of the problem?


Solution

  • I finally got to the bottom of this: actually, Glassfish transmits exceptions through IIOP quite correctly and everything works as it should... unless you do something idiotic like this:

    try{
        ejb.getFoo();
    }catch (Exception e){
        // try again
        ejb.getFoo();
    }
    

    Yeah, it was our own damn code that swallowed the exception and tried to call a transaction-requiring EJB method within a distributed transaction that's been rolled back due to the exception.