HelloIt seems that dbx connection is closed when image is saved save. I have been using OpenDBX before, but haven't noticed this behavior, although I'm using Pharo 1.4 now.Is this some kind of a known feature or should I investigate?
--
Milan Mimica
http://sparklet.sf.net
Hi. Yes, this is *on purpose* and it has been around since the very beginning. The idea was that the devleoper always should close connections. But just in case someone forget, we disconnect the connections when the image is quited, so that not to let opened connections to the database.
For more details check senders of #addObjectToGarbageCollect:
I know about that, but I am not quitting! I am just *saving* and trying to merely continue my work.
mmmm then I guess you found a bug. I think that we should remove:
DBXConnection class >> shutDown
self
allInstancesDo: [:each | each shutDown]
and add:
DBXConnection class >> shutDown: quitting
quitting ifTrue: [ self allInstancesDo: [:each | each shutDown]
can you try it please and let us know? That shuld only disconnect when quitting.
On 7 June 2012 17:20, Mariano Martinez Peck <maria...@gmail.com> wrote:I know about that, but I am not quitting! I am just *saving* and trying to merely continue my work.
mmmm then I guess you found a bug. I think that we should remove:
DBXConnection class >> shutDown
self
allInstancesDo: [:each | each shutDown]
and add:
DBXConnection class >> shutDown: quitting
quitting ifTrue: [ self allInstancesDo: [:each | each shutDown]
can you try it please and let us know? That shuld only disconnect when quitting.That worked, thanks!
Note thatDBXConnection class >>startUp"The OpenDBX current has to be reinitialized just in case the same image is loaded in a different Operating System"OpenDBX current: nil.is still called, but does no harm, I guess because it reinitializes itself later.