[baseten-users] Portable Distributed Objects
Tuukka Norri
tuukka.norri at karppinen.fi
Tue Jun 16 07:23:17 EEST 2009
Hi!
Daniel Brajkovic kirjoitti 14.6.2009 kello 23.45:
> ConnectionMonitor (this is interesting and probably related to my
> problem below, when I launch the client before I get the error, It
> says that I a total of 3 connections which means three separate
> instances of PGTSConnection
> I can't figure out WHY it's creating 3 separate connections???)
In manual commit mode, two connections are needed. Also, if you have
SSL mode set to prefer, which is the default, BaseTen sets libpq's SSL
mode to require at first. If that fails, another connection is
attempted, unless the first one failed because of a bad certificate.
> So my client gets hung up (because I have no timeout set) when
> BXPGInterface executes this call in the - (BOOL) validateEntities:
> (NSArray *) entities error: (NSError **) outError method
>
> NSDictionary* classDict = [[mTransactionHandler connection]
> deserializationDictionary];
The classDict maps PostgreSQL types (NSStrings) to Cocoa classes
(Class objects). It's needed outside the database layer to make
BXAttributeDescription able to respond to -attributeValueClassName and
-attributeValueClass. The problem seems to be that classes don't
implement NSCoding, which is needed for DO. I think you could resolve
this by adding a category to NSObject that implements NSCoding;
according to documentation categories of the root class are available
in class objects. I think you shouldn't do this, though, but have a
higher-level object vended instead.
--
Best regards,
Tuukka Norri
MK&C
More information about the baseten-users
mailing list