public String invoke(String message, int timeoutSeconds)
    throws ProcessException {
        // TODO - implement timeout? Weblogic does not seem to allow API to set timeout,
        // instead it can be set only globally, using JVM attributes
        //    -Dweblogic.iiop.connectTimeout=1000 -Dweblogic.iiop.requestTimeout=1000
        try {
            RMIListener server = (RMIListener)ApplicationContext.getNamingProvider()
                .lookup(destination, RMIListener.JNDI_NAME, RMIListener.class);
            return server.invoke(null, message);
        } catch (Exception e) {
            throw new ProcessException(-1, "Failed to send intra-MDW event", e);
        }
    }
public String invoke ( String message , int timeoutSeconds ) throws ProcessException { try { RMIListener server = ( RMIListener ) ApplicationContext . getNamingProvider ( ) . lookup ( destination , RMIListener . JNDI_NAME , RMIListener . class ) ; return server . invoke ( null , message ) ; } catch ( Exception e ) { throw new ProcessException ( - 1 , "Failed to send intra-MDW event" , e ) ; } }
jndi can be null, in which case send to the same site