• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Mandating one application to load before the other one.

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have two applications(say Cliant.war & Server.war) running in the same JVM.
These two applications communicate through RMI using Spring.
The problem is if my client.war is loaded before server.war, the application doesn't work coz it can't find bean for connection.
Is there any way we can mandate a particular application to load before the other one?
Any pointers will be highly appreciated.

Thanks,
Amol
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Relying on load order means the coupling between the apps is much too tight. The client should be prepared to deal with a server being unavailable at startup, just like it should be prepared to deal with a server that's going down and then comes back up later (which would allow you to restart the server independently of the client). The solution to both would be for the client to check periodically for server availability (say, every X seconds, for some reasonable value of X), and try to reconnect to it in case the connection is broken.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic