Solved

data sharing between web application

Posted on 2002-04-18
9
175 Views
Last Modified: 2010-05-18
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
Comment
Question by:chpchew
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 3

Expert Comment

by:saxaboo
ID: 6952810
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
 

Expert Comment

by:mrowka
ID: 6952849
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
 

Author Comment

by:chpchew
ID: 6952939
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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 1

Expert Comment

by:pepenieto
ID: 6953167
Hi chpchew,

I think that version 4 of tomcat has JNDI. You can share information between applications putting objects in the directory tree.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6956205
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
 

Accepted Solution

by:
mrowka earned 25 total points
ID: 6956364
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
 
LVL 9

Expert Comment

by:Venci75
ID: 7972374
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
 

Expert Comment

by:SpideyMod
ID: 8021339
Answered by mrowka

SpideyMod
Community Support Moderator @Experts Exchange
0
 
LVL 35

Expert Comment

by:girionis
ID: 8682536
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

Independent Software Vendors: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This video teaches viewers about errors in exception handling.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question