| Author |
Multiple Struts apps: What can you reuse?
|
K Robert
Ranch Hand
Joined: May 16, 2003
Posts: 116
|
|
|
Hi! When running multiple Struts applications, if the same object/functionality can be identified across all of the apps, how do you decouple that from one of the frameworks to share among all of the apps?
|
 |
Sagar Rohankar
Ranch Hand
Joined: Feb 19, 2008
Posts: 2896
|
|
If all the web apps resides on same JVM inside a common server, then we can configure server to load a particular resource/object for all the web apps it host.
If you need to share resources between web application you must let the web container manage them, and put them in JNDI. The web application can then get the resources from a JNDI context very easily.
For Tomcat, This link shows how JNDI can be configured and this link explains the How context loaded by all the web apps.
|
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
|
 |
K Robert
Ranch Hand
Joined: May 16, 2003
Posts: 116
|
|
|
All the apps would be on different servers(physically). So, if the resource/object can be used for all three, where would that reside?
|
 |
Sagar Rohankar
Ranch Hand
Joined: Feb 19, 2008
Posts: 2896
|
|
Hmm, that's tricky and my knowledge about such distributed resource sharing is minimum, still I think RMI can help you
If you want more good answer, asking this question in 'Distribute Java' will help
|
 |
 |
|
|
subject: Multiple Struts apps: What can you reuse?
|
|
|