Solved

data sharing between web application

Posted on 2002-04-18
9
170 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
json example 39 134
Java / Linux and Regular Expressions 11 71
print map entry 34 55
diffSum example 4 26
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

867 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

20 Experts available now in Live!

Get 1:1 Help Now