• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

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
 
Master Rancher
Posts: 43045
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic