Meaningless Drivel is fun!*
The moose likes Struts and the fly likes Multiple Struts apps: What can you reuse? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Multiple Struts apps: What can you reuse?" Watch "Multiple Struts apps: What can you reuse?" New topic
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: 2902
    
    1

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: 2902
    
    1

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
 
Consider Paul's rocket mass heater.
 
subject: Multiple Struts apps: What can you reuse?
 
Similar Threads
StrutsConfig.xml dilemma
Error filterStart
accessing log files of one app for another app
Doubt on Protocol & Port number
To James Holmes: