-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

"Different contexts" isn't necessarily the same as "different JVMs".
I think that tomcat uses a single JVM instance for all of the
webapps. They just use different classloaders to keep things from
"accidentally" interfering with one another. This might be as simple
as explicitly loading the common class through the system
classloader.

- -----Original Message-----
From: Edmund Urbani [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 2:17 PM
To: Turbine Users List
Subject: Re: sharing objects between applications


>>
>> Hi!
>>
>> I wrote a similar question to the Tomcat-Users list, but then
>> I thought,
>> maybe there's a Turbine-way to solve this:
>>
>> I'm working on 2 Turbine webapps, that are both running on
>> the same host
>> (in the same Tomcat 4.0.1). Those 2 webapps would need to access a
>> common object in memory - really the same instance and not
>> just the same
>> class. The way I understand Tomcat those 2 applications run in
>> completely independent contexts... so, is there a way for
>> them to "see"
>> one another and have references to the same objects? Would Turbine
>> somehow support this (a service I do not know yet?)?
>>
>>  Edmund

> I have never used it but I think the XML-RPC service may be one way
> to accomplish this.
>
> hth,
> Scott
>

Could work, but I doubt it would be very efficient (or easy to
implement
in this case). I have never used the XML-RPC service either. I
thought
about using RMI. Both approaches seem to much overhead for the
problem.

The reason I need have access to common objects in memory is
consistency
of cached data. Both application access some common files and a
common
database on the server they are running on. To improve performance I
tried to keep more data in RAM. It works fine in each of the two
applications (one is for intranet and the other for internet access),
however they won't get updates from one another anymore. Accessing
the
same objects would not only solve the problem efficiently, it would
also
help me save some RAM.

I am currently considering the option of merging them into one
application, but I'd rather not. There really should be a way to
have a reference to the same object. The 2 webapps are running in the
same JVM after all, aren't they?

 Edmund


- --
To unsubscribe, e-mail:  
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.2 for non-commercial use <http://www.pgp.com>

iQA/AwUBPP5XCkpqmA4oA4kCEQKLtACePmF5tiSKDx0foTFNHYIrofZ4efAAn0uh
dv//UT7veT7CtgQgxNxdZ358
=7wyj
-----END PGP SIGNATURE-----

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to