----- Original Message -----
From: "Bill Burke" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 29, 2001 3:11 PM
Subject: RE: [JBoss-dev] Where is everyone today?


>
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Dain
> > Sundstrom
> > Sent: Friday, June 29, 2001 3:16 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: RE: [JBoss-dev] Where is everyone today?
> >
> >
> > Bill,
> >
> > Thanks for the reply.  I really need other people thinking about this,
> > because I don't understand the rest of the container.
> >
>
> IMHO, you shouldn't have to understand the rest of the container.   If you
> use the HOME interfaces, everything will be abstracted out and taken care
of
> for you.

I agree.  I can't exactly use the home interface. The home interface doesn't
have commands such as 'set you foreign key for this relation ship to 42.'  I
think I need to implement an interceptor to handle special messages.  This
would be simmilar to how entity synchronization works.  I doesn't really
matter at this point, because I have figgured out how to implement it in a
way that adding the interceptor later will be simple.

> > Here's the deal.  I delegate the actual storage of the other updated
> > contexts to the their respective persistence storage managers, so they
get
> > stored by correct data source.  I also get references to the other beans
> > through their container's cache.
> >
>
> Again, why do you talk directly with the Persistent managers?  Entities
> always know when they have to store themselves.  You really don't have to
> worry about it.

I do, if I don't have an interceptor.  Store is only called from the entity
synchronization interceptor, and I'm currently not going through the
interceptor chain.  So, someone has to call store.

> > I think the biggest problem with this implementation is that my
> > persistence
> > store is directly calling store on other persistence stores, thus
> > by passing
> > all of the code that is supposed know the right way to do this.
> >
>
> I just read a little about the CMR stuff in the spec.  Seems pretty nasty
to
> implement and probably effects more things than just the persistent store.
> It seems that Relationships must be first class remote objects that wrap
> access to their underlying entities.  I'd be curious to know how you
handle
> one-to-many relationships i.e.
>
> from the spec:
>
> public void changeTelephoneNumbers()
> {
> Address a = getShippingAddress();
> Address b = getBillingAddress();
> Collection c = b.getTelephoneNumbers();
> a.setTelephoneNumbers(b.getTelephoneNumbers());
> if (c.isEmpty()) { // must be true!
> ...
> }

Wel, I don't handle 1-n relationships yet, but it is not as hard as you
think.  Relationship collections are not allowed to be passed over a remote
interface, and are only valid for the term of the transaction (both of these
would have been a pain). I have most of the design on my white boards, note
pads and my head.  I just need some solid time to finish the implementation.

> > Again, I don't know if I'm doing something wrong.  I could post
> > the section
> > of code that does this, if it will help.
> >
>
> Why don't you check-in the code to your CMP directory structure?  Then
> everybody can see it.  This stuff is a "work in progress" anyways, isn't
it?
>
> Also, I'm interested in helping out with this relationship stuff. Danch
> probably is even more interested, but I can't speak for him.
>
> Regards,
> Bill

I'm not at a good breaking point right now, but I'll commit what I have
early next week.

-dain



_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to