On 4/20/07, Keith Hodges <keith_hodges(a)yahoo.co.uk> wrote:
The Second Chapter
=============
Configuring Pier to work with Magma
Step 1. Add WAMagmaConfiguration to your pier app
- In /seaside/config application, click on the 'configure' link next
to your pier application.
- From the drop down menu named 'Add Ancestor', select
'WAMagmaConfiguration' and click the 'Add' button.
- (optional step) to be tidy, click the '(remove)' link next to
'WARenderLoopConfiguration', since WAMagmaConfiguration includes this
anyway.
Step 2. Set the session class to 'WAMagmaSharedSession'
- In the general config section, in the line entitled 'Session
Class' click the 'overide' link.
- From the drop down menu which appears next to 'Session Class'
select 'WAMagmaSharedSession'.
Step 3. (optionally) Set the location of the magma repository.
- The default is set to use a directory named 'magma' in the image
default directory.
- overriding this setting to choose an alternative directory, or a
remote magma server.
Step 4. Save Changes and Close.
- click the 'Save' button at the bottom of the configuration page.
- click the 'Close' button to return to the dispatcher editor.
Notice the appearance of a link next to the 'pier' application, 'magma'!
Step 5. Create the magma repository for pier.
Enter the control panel for magma using the 'magma' link next to your
pier app.
The top panel should report an error, (i.e. there is no database yet)
* Repository path setting: *magma
* Error: /media/hda1/squeak/pr_gsoc/magma/objects not found.*
At present this magma control panel is application agnostic, it doesnt
know anything about pier, hence you have to explicitly choose what class
of root object the database should be created with. (Some magma-seaside
users e.g. Gjallar, just have the app initialize the database
automatically when it is not found)
- To create a repository for pier in the directory specified, choose the
class of the desired repository, in this case a 'PRMagmaRepository',
click the 'create' button.
On returning you will see something like this.
*Repository Path Setting: *magma
(delete)<http://localhost:8080/seaside/config?_k=NWNtlOJe&_s=lklgPNPlHkbrjqJQ&2>
*Persisted Objects Count: *569
*Session Id: *2
*Cached Object Count: *670
*ReadStrategy: *a WAMagmaReadStrategyDefault
*Root Object: *a PRMagmaRepository
(explore)<http://localhost:8080/seaside/config?_k=NWNtlOJe&_s=lklgPNPlHkbrjqJQ&3>
The 'delete' link will delete the repository and start again.
The 'explore' link, is similar to the seaside 'debug' link, it opens an
explorer in squeak on the root db object.
Step 6.
Returning to the seaside/config app, click the 'pier' link to obtain the
pier persistency manager. There you will find a ui for changing which kernel
is served* and its persistency scheme.
*the 'serve all kernels' option needs the class PRMainAllKernels which is
not loaded
Switching from PRNullPersistency to PRMagmaPersistency is all that is
required.
Then click the 'migrate' button, and later 'commit' the change.
_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Dear Keith,
I followed the steps told by you. I had web -image of Damien Cassao. While
going through the steps told in Chapter 1, I executed from the WorkSpace.
There were a couple of errors, I went with proceed to see where it stops.
In chapter 2, I configured from Config space and the last step is not
working
Step 6.
"Returning to the seaside/config app, click the 'pier' link to obtain the
pier persistency manager. There you will find a ui for changing which kernel
is served* and its persistency scheme.
*the 'serve all kernels' option needs the class PRMainAllKernels which is
not loaded
Switching from PRNullPersistency to PRMagmaPersistency is all that is
required.
Then click the 'migrate' button, and later 'commit' the change."
When I change the Persistency from PRNullPersistency to PRMagmaPersistency,
the following error message is displayed, any clues on where I am going
wrong ??
Internal ErrorMessageNotUnderstood: UndefinedObject>>headerAt:ifAbsent:
WAUrl>>takeServerParametersFromRequest:
WAMagmaSharedSession(WASession)>>actionUrlForKey:
WAMagmaSharedSession(WASession)>>actionUrlForContinuation:
[] in WAMagmaSharedSession(WASession)>>respond: {[:cc | url := self
actionUrlForContinuation: cc. response := responseBlock...]}
ResponseContinuation class(Continuation class)>>currentDo:
WAMagmaSharedSession(WASession)>>respond:
WARender>>render
[] in WARender>>go {[self render]}
BlockContext>>on:do:
WARender>>withRenderNowHandler:
[] in WARender>>go {[self withRenderNowHandler: [self render]. self
shouldRedirect ifTrue: ...]}
BlockContext>>on:do:
WARender>>withPageExpiredHandler:
WARender>>go
[] in WARenderLoop>>run {[(WARender new root: root) go]}
BlockContext>>repeat
WARenderLoop>>run
WARenderLoop>>call:withToolFrame:
WAWalkbackErrorHandler>>handleError:
WAWalkbackErrorHandler class(WAErrorHandler class)>>handleError:
--
Rajeev Lochan
Co-founder,
AR-CAD.com
http://www.ar-cad.com
+91 9212090622 (Gurgaon)
080 65355873 (Bangalore)