Hi,

I think there are two different perspectives here:

1) The pass-by-value semantics copies the SDO to make sure it cannot be mutated.
2) Different classloaders are used for different bundles.

We probably shouldn't mix these two. Let's put SCA on the side for now and think in OSGi. Assuming we have two OSGi bundles (B1 & B2) and Class C1 from B1 is calling Class C2 from B2 to exchange SDO. How would you handle the classloading issue? Would you make sure B1 and B2 have the same dependency on a 3rd bundle which contains the SDO classes? Or do you package the SDO classes in both B1 and B2 and have the user code take care of the cross-classloader data passing? Once we have clear answers for these questions, we'll figure out which part of the code should be responsible for the cross-classloader data mapping.

Thanks,
Raymond
--------------------------------------------------
From: "Rajini Sivaram" <[EMAIL PROTECTED]>
Sent: Sunday, May 11, 2008 1:44 PM
To: <tuscany-dev@ws.apache.org>
Subject: SDO Databinding and classloaders

Hello,

I was looking at a JIRA related to SDO parameters to OSGi services (
https://issues.apache.org/jira/browse/TUSCANY-2307), and was not sure
whether the following scenario is valid for standard Java services in
Tuscany.

Component A and Component B are implemented using <implementation.java/> and
use default SCA binding.
Component A invokes a remotable service from component B. One of the
arguments to the service is an SDO object. But Component A and Component B
use different classloaders for the SDO object. Will the copying of the SDO
object done by databinding-sdo handle copying across multiple classloaders?

I couldn't find any code which handles SDO classes loaded by different
classloaders, so I was wondering whether we expect only one set of SDO
classes to exist in a VM, or if I am just looking in the wrong place.


Thank you...

Regards,

Rajini

Reply via email to