Solved

data sharing between web application

Posted on 2002-04-18
9
169 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
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
 
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
copyEndy  challenge 15 58
Java array passed to SQL where clause 23 43
Java and GPO 11 47
Problem to start Neon 20 54
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now