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
Solved

data sharing between web application

Posted on 2002-04-18
9
172 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to convert String matching to regex in java 4 50
eclipse apache tomcat admin console 52 121
Java exception bubble up 2 21
hibernate example using maven 12 58
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
The viewer will learn how to implement Singleton Design Pattern in Java.

860 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