Skip to content
  • Tigran Mkrtchyan's avatar
    src: add Spring integration module · fdc56bad
    Tigran Mkrtchyan authored
    Motivation:
    To use NFSServerV41 with spring a constructor argument injection is
    required. This makes spring configuration more complicated, as some
    arguments are optional and **null** values have to be injected.
    
    Modification:
    Add NfsServerFactory, which implements Spring's FactoryBean and enables
    simpler integration, for instance where device manager must null:
    
    ```
        <bean id="nfs-v41" class="org.dcache.nfs.v4.NFSServerV41Factory">
            <description>NFSv4.1 MDS server</description>
            <property name="operationFactory" ref="mds-factory"/>
            <property name="vfs" ref="vfs"/>
            <property name="exportFile" ref="export"/>
         </bean>
    ```
    
    instead of:
    
    ```
        <bean id="nfs-v41" class="org.dcache.nfs.v4.NFSServerV41">
            <description>NFSv4.1 MDS server</description>
            <constructor-arg ref="mds-factory"/>
            <constructor-arg index="1"><null/></constructor-arg>
            <constructor-arg ref="vfs" />
            <constructor-arg ref="export"/>
         </bean>
    ```
    
    Result:
    Simpler integration with Spring.
    
    Acked-by: Paul Millar
    Target: master
    fdc56bad