Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 178
  • Last Modified:

data sharing between web application

hi:
 l'm using jsp-tomcat as my engine to create few website. the problem l need to solve now is how to share my data/bean from one website to another website.
 is it possible? or any suggestion to solve it?
0
chpchew
Asked:
chpchew
1 Solution
 
saxabooCommented:
Hi,

well if your web sites are indeed two separate web applications, then you have to think as data sharing pretty much like interprocess communication.

One (or both) of your apps could for instance expose itself as a RMI server called by the other application. Or you could persist your data in a database shared by both apps, or use a flat file, ...

Everything could be so easy if your deployed all your sites in a single web app because you could use the ServletContext to do this. But of course you probably don't want to do that since it would force you to share user sessions between both sites.


HTH,

-S
0
 
mrowkaCommented:
you could also do replication on database server level,
depending on the db server you use. There are
different ways to set it up (more or less transactional),
depending on how accurate you want to sync them.

if you really have the resources to do it you could
consider EJBs (with JBoss for instance) for
data sharing but there is a heavy overhead involved
to get it set up.
0
 
chpchewAuthor Commented:
hi saxaboo:
1) l only know how to perform interprocess communication within the same virtual machine. But now l need to share the data between the webapps in different virtual machine.

2) l'm not familiar with how to implement RMI server. Can you give me some guide?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
pepenietoCommented:
Hi chpchew,

I think that version 4 of tomcat has JNDI. You can share information between applications putting objects in the directory tree.
0
 
MoondancerCommented:
You created this question in duplicate, which can be avoided by using the RELOAD button versus the browser control functions.  I refunded the duplicate item and closed it for you (also 25 points).  Easy questions begin at a value of 50 points, the maximum is 300 points.  More in these regards available from the HELP DESK, the Question/Answer link at the bottom here and the Member Guidelines.

Moondancer - EE Moderator
0
 
mrowkaCommented:
getting started tutorials about RMI can be found here:

http://java.sun.com/j2se/1.4/docs/guide/rmi/index.html

there are also explanations of what you need
for RMI (rmiregistry, remote interfaces, rmic)

the online book "thinking in java" has a brief intro
into RMI too:
http://www.mindview.net/Books/TIJ/

You expose methods of server objects with your
remote interface which is the "contract" for your
clients and can pass serializable objects.

Depending on the direction of your data distribution
you need to define nodes as servers or clients.

How do you persist your data which needs to be shared?
What is the size of the data?




0
 
Venci75Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Answered by: saxaboo
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Venci75
EE Cleanup Volunteer
0
 
SpideyModCommented:
Answered by mrowka

SpideyMod
Community Support Moderator @Experts Exchange
0
 
girionisCommented:
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question is:

- points to mrowka

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

girionis
Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now