I mentioned to AN how he had not called
setRows on the "trans" and "walk" constraints when he added the code which called
getRows on all constraint types. He insisted that he had, and so we looked at the CVS logs.
Sure enough, he had put this code in, almost verbatim to my own changes (he used an extra space when casting the constraint). CVS dutifully logged both of our changes, so it was plainly visible that we had both made this modification.
So how was I not able to see AN's code? I had done numerous CVS updates, and even checked in my own modifications (overwriting AN's), all without complaint from the system. There were no conflicts or updates to be seen on this file.
So I'd wasted Monday on a bug that should never have existed, and Friday seems to have been wasted on a similar problem (although the
HybridTuples problem found while trying to print the constraint tree was an important fix). Similarly, I'd witnessed CVS failing for AM a couple of weeks ago. So what is the deal here?
I mentioned this problem to TJ at our morning meeting. Unfortunately, I have no idea why CVS might be behaving this way, nor any reasonable suggestions for an alternative file repository.
I went back to the
RemoteResolver code to see what I needed to do with the
getXAResource method. Looking at the
javax.transaction.xa package just confused me, as I couldn't work out where the
Xid was supposed to come from.
I finally started searching for examples. The most informative I could find was an IBM site. Once I got to see how client code uses this interface I got a much better idea of what was required... and it became clear very quickly that the Resolver interface is not built to be able to handle this API.
The main problem is that the transaction manager needs to associate an
Xid with a session. A session will get associated with a
RemoteResolver instance, so the
Xid will really get mapped to a
RemoteResolver instance (in fact, it will get mapped to a set of resolver instances). So when the
Xid is first used (by calling
XAResource.start(xid,...)) the mapping to the resolver needs to be set up. This would usually be done by creating the resolver in the
start(xid,...) method. However, the
getXAResource() method is currently a non-static member of
Resolver. This means that the
Resolver object had to be created before it could be mapped to an
Xid, which could cause problems if it gets used before a transaction that it will become a part of. A bigger problem is that the
XAResource will be associated with a single resolver session, and yet it is supposed to manage numerous sessions with different
Xid's. Since this last proposition is impossible, it becomes clear that
getXAResource() cannot be attached to the
Resolver class. The appropriate place is probably the
ResolverFactory, though that will still restrict it to a single Resolver type when
XAResource objects are supposed to be able to manage an entire transaction (involving multiple sessions, probably on multiple Resolver types).
The upshot of all of this is that
getXAResource() cannot be implemented on the current interface. Ideally we'd remove it before it got released in the next few days, but the
DummyXAResource objects which are currently being returned are being used for some logging, so there would be significant changes needed, and we don't have the time.
I saw Bob again today, and we discussed OWL a little more. I'd actually done some work this time, so it all went smoothly. :-)
I still need to write up something about the differences (and reasons for those differences) between the OWL species, however I now have some new priorities. The first thing I need to do is to get hold of a copy of the Description Logic handbook. There is a copy in the library, but it is currently out. It is a relatively recent publication, so it is unlikely I will find it online (though I can find the chapters for it easily enough). While discussing this, Bob was able to explain some of the differences between Description Logic and Datalog. I knew some of it (and I still need to learn more), but it has been a little confusing for me as different people have referred to "DL" with some meaning Description Logic, and others meaning Datalog. I understand that DL is supposed to mean Description Logic, but not everyone seems to get that. At least I understand more of the differences now.
The other thing I need to do is start writing my confirmation. Theoretically I don't need to have it done until next September, but I want to do it sooner. Unfortunately, the head of the school will be away for some time, so anyone who wants theirs done before August will need to do it in February. This timetable gets squeezed as everyone (including Bob) will be away for the Southern Hemisphere summer. So if I want any feedback from Bob it needs to be in the next 3 weeks. After that I won't be seeing him again until February... which is just before the confirmation will be due. Consequently, I'm dropping everything else to work on the start of the confirmation over the next couple of weeks.
Fortunately, after working out that I couldn't do anything with the XA API, TJ asked what type of resolver I want to work on, and was more than happy with my suggestion of an OWL resolver to representOWL Abstract Syntax. So while I have to work on my confirmation out of hours, I can continue to work on OWL at work. :-)
I spent the rest of the day (what was left of it) going over OWL documentation. I'll be doing the same tomorrow.
Tuesday, November 16, 2004