Hi guys, I want my application to automatically create a repository with some basic date if my image is started somewhere that does not have a preexisting database. I was making a few tests, basically to see what happened with Magma if when restarting an image that had an open session, the database directory was not found.
I opened my session with something like this.
magmaServer := MagmaServerConsole new. [ magmaServer open: path ] on: Error do: [ :ex | Transcript show: ex ].
magmaServer processOn: 51001. magmaServer shutdown.
I realized then that in spite of runnring the last #shutdown, if I closed the image and then restarted it it was still reopening the repository.
Then I executed things like:
MagmaRepositoryController initialize. MagmaSession cleanUp. magmaServer controller closeRepository.
Neither could avoid the automatic attempts to reopen the repository after I restarted the image.
Then, I lost the pointer to that magmaServer and every time my image starts it still tries to open that repository and it fails.
What are the commands to execute to reset it all? to stop Magma from trying to open anything at all at start up so I can start from a clean slate again.
Thanks
r.
The first line should have said "some basic *data*" of course.
On Mon, Aug 31, 2009 at 1:18 AM, Ramiro Diaz Trepat ramiro@diaztrepat.namewrote:
Hi guys, I want my application to automatically create a repository with some basic date if my image is started somewhere that does not have a preexisting database. I was making a few tests, basically to see what happened with Magma if when restarting an image that had an open session, the database directory was not found.
I opened my session with something like this.
magmaServer := MagmaServerConsole new. [ magmaServer open: path ] on: Error do: [ :ex | Transcript show: ex ].
magmaServer processOn: 51001. magmaServer shutdown.
I realized then that in spite of runnring the last #shutdown, if I closed the image and then restarted it it was still reopening the repository.
Then I executed things like:
MagmaRepositoryController initialize. MagmaSession cleanUp. magmaServer controller closeRepository.
Neither could avoid the automatic attempts to reopen the repository after I restarted the image.
Then, I lost the pointer to that magmaServer and every time my image starts it still tries to open that repository and it fails.
What are the commands to execute to reset it all? to stop Magma from trying to open anything at all at start up so I can start from a clean slate again.
Thanks
r.
It's the MagmaRepositoryController that keeps the list of #openControllers. When you #shutdown a MagmaServerConsole, it sends #noteServerShutdown which #closes the repository-controller.
You shouldn't be able to lose the pointer to the controller under normal circumstances..
Otherwise, just send #close to #allInstances (or, the appropriate instance you want to close) of MagmaRepositoryController..
- Chris
On Sun, Aug 30, 2009 at 7:18 PM, Ramiro Diaz Trepatramiro@diaztrepat.name wrote:
Hi guys, I want my application to automatically create a repository with some basic date if my image is started somewhere that does not have a preexisting database. I was making a few tests, basically to see what happened with Magma if when restarting an image that had an open session, the database directory was not found.
I opened my session with something like this.
magmaServer := MagmaServerConsole new. [ magmaServer open: path ] on: Error do: [ :ex | Transcript show: ex ].
magmaServer processOn: 51001. magmaServer shutdown.
I realized then that in spite of runnring the last #shutdown, if I closed the image and then restarted it it was still reopening the repository.
Then I executed things like:
MagmaRepositoryController initialize. MagmaSession cleanUp. magmaServer controller closeRepository.
Neither could avoid the automatic attempts to reopen the repository after I restarted the image.
Then, I lost the pointer to that magmaServer and every time my image starts it still tries to open that repository and it fails.
What are the commands to execute to reset it all? to stop Magma from trying to open anything at all at start up so I can start from a clean slate again.
Thanks
r.
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
magma@lists.squeakfoundation.org