1 2 Previous Next 17 Replies Latest reply on Apr 29, 2013 9:53 AM by rzvikas Go to original post
      • 15. Re: Unable to find remote EJB from another node in the same cluster using distinct name
        jaikiran

        Jaikiran, I think I did not make it clear earlier, let me try again : EJB-1 deployed on JBOSS instance 1 is trying to lookup EJB-2 deployed on JBOSS instance 2, so if JBOSS instance 2 goes down for few naon sec so we do not want EJB-1 look up to be failed, we want to retry if it fails and try again.

        Okay, that's much clearer now and the code helped too.

         

        The EJB client API already has support for auto-retrying a failed invocation for reasons like "bean not present on the server after the invocation was routed there". So when a EJB client API identifies node1 as a target server for handling a EJB invocation and routes that invocation to that server and then the deployment is undeployed from node1 before the invocation can be handled by it, then the server will throw a "bean not present" exception. The EJB client API will then trigger a retry logic to see if there are any other nodes which are capable of handling this invocation and if it find one, it lets it handle it.

         

        It's functional in a minimal basic way right now. I was just made aware of a couple of bugs around this yesterday:

         

        https://bugzilla.redhat.com/show_bug.cgi?id=957170

        https://bugzilla.redhat.com/show_bug.cgi?id=957171

         

        Those 2 should be fixed and (most of) what you are trying to do here should work (except for that deadlock thing that you seem to be trying in that retry logic).

        • 16. Re: Unable to find remote EJB from another node in the same cluster using distinct name
          jaikiran

          If you still need some kind of custom retry (for example the deadlock case which you seem to be handling) then don't use a custom invocation handler - it can have a wrong impact in unexpected places, because there are some areas where we expect the invocation handler to be of the type that the EJB client API expects. I think you might be able to use a client interceptor to do some kind of retries - I have to make sure the right kind of APIs are exposed for that.

          • 17. Re: Unable to find remote EJB from another node in the same cluster using distinct name
            rzvikas

            Thanks Jaikiran for looking into it.

             

            Can you please clarify with some example(if possible), what should we do to handle this for now ? Can you also please let us know more about the exposed API you mentiioned, if it is available and if not when can we expect I mean which version of JBOSS ?

             

            Thanks

            1 2 Previous Next