ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | architecture List | August 2003 Index

    Date Index  -->     Thread Index  -->

Re: [fractal] Fractalizing (JOTM)


Eric Bruneton wrote:

Hi,

Erik, please, is passing of references somehow forbidden in
Fractal/Julia?

no, absolutely not.

This is to say that all references are automatically treated as bindings in Julia?

via reference passing in method arguments, bindings can be
established dynamically, without needing to stop the components.

I join an example with a factory component, that dynamically creates
new components, and passes the references of these components to a
client component at runtime. The client component establishes and
removes a binding at runtime (see the run method), by using these
interface references.

Thanks for the example. If I understand well, by simple passing a reference, a binding is established dynamically. That's great.

But still, your client code should be different from a non-Julia one, since all the bindings should be reflected in the BindingController implementation. If a client somewhere in the code gets a JDBC connection and this is not reflected in addFcBinding/removeFcBinding, then there can't be any runtime update of such a client.

So, in my opinion, a client can use API such
con = XAConnection.getXAResource();
to get reference/binding without explicitly calling addFcBinding (that's new for me and seems cool), but the client component's Binding Controller should be always aware of all possible con.

Collection interfaces are not used here. They would be necessary only
to put the factory and instance components in a composite component,
or to represent instances as objects (instead of components) inside
the primitive factory component.

Yes, in your example collection interface is used only in the factory. It's true that you do not need true collection interface in your client. However, in your Binding Controller implementation, you should have all the 'external reference' variables that represent bindings. Doesn't matter whether there is a collection interface or several simple interfaces. For any JDBC connection, any transaction, or any DataSource, there should be a reference maintained by the Binding Controller. So, in e.g. FrJOnAS, there should be multiple references to various transactions and JDBC connections maintained, right? This means that these are reflected by multiple interfaces, doesn't it? (I.e., as you explained me, every reference is in fact a binding.)

Thanks,
Marek

--
************************************************
Marek Prochazka
Post-doc Researcher, INRIA Rhone-Alpes
SARDES Project (http://sardes.inrialpes.fr)
************************************************




    Date Index  -->     Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.