posted 19 years ago
Are both the apps running in the same JVM? Is so, you could use a third entity, like a Singleton to hold the variable. If they are running in different JVMs, you have to resort to something that they both can access - like a file.
Here's another thought - instead of applications querying for the "state", why not use a Mediator - something that tells each interested app that the state has changed? Since I don't know the details of your apps, I cannot fathom whether this strategy translates to an over-engineered solution.
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).