directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Re: Serialization into LDAP
Date Sat, 11 Dec 2004 16:42:59 GMT
On Sunday 12 December 2004 00:19, Alex Karasulu wrote:

> >* Is JavaLdapSupport supposed to deal with the entire specification?
>
> Eventually yes but for now just storing an object for now as a
> javaSerializedObject is good enough for most ctx.bind(Object obj)
> operations.  This is perhaps 80% of the usage out there.  The other 20%
> can be done as needed over time.

EJB uses JNDI to bind the Home interfaces to known locations. I haven't 
studied the EJB spec exactly to know off-hand whether they bind smart proxy 
(which would be a normally serialized object) or the RemoteStub (which would 
be a serialized marshalled object), and I think it is even in the spec and up 
to the implementations to choose. I suspect that the older servers would bind 
the RemoteStub, and only some (if any) newer servers to use smart proxies.
Generally, people who uses RMI, nowadays use JNDI Naming to bind and locate 
remote objects, as it is more flexible than the old RMI Naming. And smart 
proxies are not that common, since they add a fair amount of coding overhead 
and only occassionally gives the performance boost one is looking for.

In any event, I doubt your 80/20 assessment is accurate, and it is even 
academic. What makes sense is to implement the full spec (it ain't that hard) 
and tick it off the chart. :o)

> >* Where is the line between the caller and the JavaLdapSupport, when it
> > comes to MarshalledObjects, incl any exported and non-exported Remote
> > references?
>
> Have'nt given MarshalledObjects any thought yet at all.

A marshalled object is a serialized object that also contains the information 
needed to reconstruct a classloader, i.e. the location of the codebases. 
Interestingly enough, the serialized MarshalledObject contains the URLs of 
the JARs, but yet the RFC specifies (not sure if it said req or optional) 
that the information is to be stored in separate attributes as well. Funky!

> >If Eve is supposed to work for any application that uses the
> > InitialContext to bind Java stuff to, then I think Eve needs to deal with
> > quite a lot, and the question would then be; What is the relevant call
> > chain (Sequence) for binding a Java object to the context??
>
> Really its great that you're thinking about all this.  I wanted to limit
> the scope for your sake to just lookup(dn) and bind(obj) to store and
> reteive simple java objects that are serialized.  

Ok, it would still be good to know roughly what happens between;
   ctx.bind( obj ) / ctx.lookup( dn )
and
   JavaLdapSupport.serialize() / .deserialize()
inside Eve.

But now, I need to get things building properly again :'(

Cheers
Niclas
-- 
   +------//-------------------+
  / http://www.dpml.net       /
 / http://niclas.hedhman.org / 
+------//-------------------+


Mime
View raw message