This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of DevSecOps Adventures: A Game-Changing Approach with Chocolate, LEGO, and Coaching Games and have Dana Pylayeva on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Local / Remote / Web Service which one to invoke?

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all:
I posted this message on the J2EE/EJB forum as well:
I am writing a P2P application using JBoss 3.20 (EJB 2.0) with Axis web services.
Every stateless session bean has a local and remote interface, as well as a proxy which can be invoked via a web service.
For performance, I am constantly invoking logic which does the following:
1. If the method required is local, invoke the local interface of the EJB.
2. If the method reqired is remote, invoke the remote interface of the EJB. If for any reason, JNDI port not open in the firewall, RMI call does not work (typically the call will timeout), invoke the method as a web service.
Obviously for performance, the local call is the best, followed by the remote call, and then the web service call. However, I cannot be certain that I can invoke a remote RMI call. However, I can be certain that the web service (over Http) will work.
My questions are as follows:
1. Is there a nice pattern, which incorporates the above stated details; and
2. Is it possible to 'ping' the JNDI or RMI port to see if a Remote call will work without having to rely on a timeout?
Thanks all.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic