cancel
Showing results for 
Search instead for 
Did you mean: 

Prepare callback

gjwilson21
Champ in-the-making
Champ in-the-making
Hi,

We are working on a hook logic to parse files being deployed at the FSR deployment server.  We came across prepare callback feature in FSR.
I tried to implement prepare callback feature in deployment module.

In application-context.xml file, I copied the entry tag for postcommit and changed the key to 'prepare',

<entry key="prepare">
                         <list>
                             <ref bean="sampleprepare"/>
                         </list>
</entry>

We extended the FSDeploymentRunnable interface for implementing it. But its not working.
Do we have any other interface like FSDeploymentRunnable interface(which is for postcommit callback) for prepare callback?

Have anyone of you used  the prepare callback feature? What is the key value for entry tag to implement prepare callback?

Any documentation on implementation of prepare callback will be useful.

Thanks
4 REPLIES 4

mrogers
Star Contributor
Star Contributor
Its a brand new feature that will be in 3D / Enterprise 3.1  What version are you running?

gjwilson21
Champ in-the-making
Champ in-the-making
I am using Alfresco labs 3c. But for deployment module alone, I have checked out Alfresco source from svn(on 6th jan 09) and built the deployment project in root/projects/deployment folder.

gjwilson21
Champ in-the-making
Champ in-the-making
Prepare callback works for me, when I changed the following line in config/Configuration.java
In Line no:152 We need to change


         prepareCallbacks = new ArrayList<FSDeploymentRunnable>();
to

         postCommitCallbacks = new ArrayList<FSDeploymentRunnable>();
And regarding the entry key value for prepare callback in application-context.xml, it was "prepare" (similar to 'postCommit' for postcommit callback).

Thanks

mrogers
Star Contributor
Star Contributor
Smiley Surprisedops:  Thanks for your contribution which has gone onto HEAD, and will be available in 3D.