cancel
Showing results for 
Search instead for 
Did you mean: 

Does FSR permits concurrent deployment to different targets?

rockycres
Champ in-the-making
Champ in-the-making
Hi all,

This post is regarding  FSR Deployment .

application-context.xml
 <property name="targetData">
      <map>
        <entry key="target1">
          <map>
            <entry key="root"><value>content/data1</value></entry>
            <entry key="prepare">
              <list>
                <ref bean="prepareCallback" />
              </list>
            </entry>
          </map>
        </entry>
     </map>
  </property>

<bean id="prepareCallback" class="com.sample.deployment.PrepareCallback" >
     <property name="fileTarget">
            <ref bean="fileTarget" />
       </property>
      <property name="filePath">
            <ref bean="filePath" />
       </property>
  </bean> 

<bean id="fileTarget" class="com.sample.deployment.FileTarget" />
<bean id="filePath" class="com.sample.deployment.FilePath" />

PrepareCallback.java

public class PrepareCallback implements FSDeploymentRunnable{
        public FileTarget  fileTarget = null;
        public Filepath  filePath = null;   
   public void init(Deployment deployment) {

   }

       public void setFileTarget(FileTarget fileTarget) {
      this.fileTarget = fileTarget;
   }
}
FSR being an spring application,if we use PrepareCallback with default singleton scope in application context, so it will be instantiated once when the server starts or when the  application context is loaded,.

Consider the scenario when two user deploys to the same FSR server but deploys to  two different targets at the same time, does FSR framework permits concurrent deployment at the same time,if it does allow , then the same prepareCallback class & fileTargetinstances  will be shared for both the deployments?…Is it the right way to have instance variables for the PrepareCallback class if concurrent deployment scenario is permitted.?
1 REPLY 1

mrogers
Star Contributor
Star Contributor
You should define different instances of the callback handers for each target.

Each target is be locked against concurrent deployment but you can have concurrent deployment to different targets.