6 Replies Latest reply on Sep 6, 2012 8:52 AM by jaikiran

    Is it possible to influence which EJB is called (remote / local)?

    a3aan

      At our project we are successfully using the remote EJB lookup as can be found in https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+server+instance.

      Our setup is the following: we have two instances of JBoss running in domain setup on a remote server. The first one is our webapplication jboss and the second one runs all our backend services (as EARs containing EJBs). The webapplication JBoss 'knows' the backend JBoss so remote EJB calls from the webapplication JBoss to the backend JBoss are working fine.

       

      Locally we also run a JBoss instance for development purposes in standalone mode. This local JBoss also 'knows' the backend JBoss so when developing for instance a webapplication this webapplication can call the remote EJB's as well. This also gives our developers the opertunity to deploy an EAR containing one or more EJBs (which is also running on the backend JBoss) locally. This way the EJBs can easily be debugged and developed. And by just undeploying the EAR the locally running webapplication will call the remote EJB on the backend server again.

       

      But... somehow at the moment we are facing the problem that it is not default behaviour that when the same EJB can be found locally and remote it will prefer the local EJB above the remote one. Is this some configuration option or something that we can influence programmatically?