Forum OpenACS Development: Questions on Call Backs / Service Contracts / APM Call Backs

I have a question regarding the new call backs mechanism in OACS 5.2.

A package x defines a call back XCB and several others package yi...yn implement the call back yiCB.

- What is called to run all implementations?

::callback::XCB ?

- How is a single impl. called directly and are there
side effects?

::callback::CallbackName::impl::yiCB ?

- Does this replace service contracts? And if not why?
If I understook correctly with Call Backs all
implementations are called while with SC this is left
to the package that defines the interface, right?

- Does this replace APM call backs?

Some References:
- Service Contracts:
http://cvs.openacs.org/cvs/*checkout*/openacs-4/packages/acs-service-contract/www/doc/index.html
http://web.archive.org/web/20041022092811/http://vrusp.com/intro-to-service-contracts.html
https://openacs.org/forums/message-view?message_id=71799
- Call Backs
/api-doc/proc-view?proc=callback
https://openacs.org/forums/message-view?message_id=274647
- APM Call Backs
/acs-admin/apm/version-callbacks?version_id=xyz
http://rubick.com:8002/openacs/acs_service_contract

I think callbacks can replace service contracts.

You call every callback with the "callback" procedure:

https://openacs.org/forums/message-view?message_id=275712

You don't need to know the full procedure name for an implementation, the callback procedure will find it for you.
You can call a specific implementation with the -impl parameter. If you don't specify an implementation, all will be called.

APM callbacks would probably be best reimplemented using this technique. I believe APM callback information is stored in the database. The new callback mechanism uses the instropection features in Tcl to find the callbacks which means it is much easier to change or add a callback in a running server.