Reputation: 9348
ServletContext
attributes set on one JVM are not visible on another JVM. Why?
Upvotes: 1
Views: 140
Reputation: 1
I didn't hear about any JVMs shared memory which you can use programatically. Since Java 1.5, there is CDS, which sadly won't help you in this situation as far as I know...
As Michael annouced, you should you another shared construct depending on what information you want to share. Corresponding this is servlet problem, you propably want to share some data by various web applications. If you can satisfy with slighly slower performance using database or simple file, it will work for you. If you have some robust enterprise solution, let's say with EJB or something like that, you can see other techonologies like JMS topics or distributed caches in cluster enviroment.
Upvotes: 0
Reputation: 346300
Why would they be? Separate JVMs have separate address spaces. To share information between them, it has to be explicitly sent via some shared channel like a socket, a file or a database.
Upvotes: 5