Nuxeo IDE bean hot redeploy problem

My OS is Windows XP and I use new installed eclipse Indigo with Nuxeo IDE plugin, nuxeo 5.5 tomcat SDK. I have a plugin with some seam annotated beans, new Nuxeo Document Object named Sculpture is declared in it. When that plugin is build with maven and deployed to nuxeo server everything is ok, but there's a problem when I deploy it using Nuxeo IDE.

First scenario I have emtpy seam.properties in src/main/resources That's my deployment fragment

<require>org.nuxeo.ecm.platform.lang</require>

    <install>
        <unzip from="${bundle.fileName}" to="/">
            <include>nuxeo.war/**</include>
        </unzip>
        <delete path="sampledir.tmp" />
        <mkdir path="sampledir.tmp" />
        <unzip from="${bundle.fileName}" to="sampledir.tmp">
            <include>**/*.properties</include>
        </unzip>
        <append from="sampledir.tmp/OSGI-INF/l10n/messages.properties"
            to="nuxeo.war/WEB-INF/classes/messages.properties" addNewLine="true" />
        <delete path="sampledir.tmp" />

        <unzip from="${bundle.fileName}" to="../webapps">
            <include>css/**</include>
            <include>exhibit/**</include>
            <include>simile/**</include>
            <include>timeline/**</include>
            <include>pics/**</include>
        </unzip>

    </install>

 <!--<seamHotDeploy>
        <include>**/*.class</include>
    </seamHotDeploy>    
  -->

When I deploy my plugin from Nuxeo IDE using that deployment-fragment - all is deployed correctly - beans are deployed, my new Nuxeo Document Object Sculpture is deployed and can be created.When I click reload projects on server xhtml hot redeploy is working but seam beans are not hot redeployed. So I created that ant task. But after I execute it seam beans are not hot redeployed.

<project name="Nuxeo Hot Reload" default="seam">
        <property file="build.properties" />
<target name="seam" depends="clean-seam-hotdeploy-dir">
    <exec dir="." executable="cmd">
            <arg value="/c"/>
            <arg value="${maven.bat}"/>
            <arg line="clean install" />
        </exec>


 <echo message="Deploy Seam components in ${seam.hotdeploy.dir}"/>
 <copy todir="${seam.hotdeploy.dir}" flatten="false">
   <fileset dir="./target/classes">
     <include name="**/*.class"/>
   </fileset>
 </copy>
<get dest="./seam_hotdeploy_result.html"
   src="http://127.0.0.1:8080/nuxeo/restAPI/seamReload"
   username="Administrator" password="Administrator"/>
</target>

<target name="clean-seam-hotdeploy-dir">
 <delete>
   <fileset dir="${seam.hotdeploy.dir}">
     <include name="**/*"/>
   </fileset>
 </delete>
</target>
</project>

Second scenario

I have emtpy seam.properties in src/main/resources I deployed the same plugin but seamHotReload tag in deployment fragment is uncommented. In that situation there's another problem my Sculpture document object is not even deployed. Reload projects on server doesn't deploy seam beans. But when I execute ant task beans are deployed. Now problem is that Sculpture document object is not deployed

Third scenario

I have seam.properties in src/main/resources with delcared bean SaveActions in it com.sirma.itt.rs.save.SaveActions=true

I deployed the same plugin - seamHotReload tag in deployment fragment is commented. My Sculpture document object is not deployed. Reload projects on server doesn't deploy seam beans. I execute ant task - bean is not deployed.

Fourth scenario

I have seam.properties in src/main/resources with delcared bean SaveActions in it com.sirma.itt.rs.save.SaveActions=true

I deployed the same plugin - seamHotReload tag in deployment fragment is uncommented. My Sculpture document object is not deployed. Reload projects on server doesn't deploy seam beans. I execute ant task bean is not deployed.

The problem is that In the one scenario xhtml are hot redeployed, but beans are not, in another one scenario - beans are hot redeployed but other part of the plugin is not even deployed, Sculpture document object is not.


So I think there's some secret in all hot redeploy of Nuxeo.

Any ideas will be help of mine. Thanks in advance.

0 votes

1 answers

2147 views

ANSWER



This looks like a known issue in Microsoft Windows systems, see fix installation of packages on windows. That JIRA issue is talking about marketplace but the reload process follows the same underlying principles in either case.

Since MS Windows locks all the files that are loaded by the server, some files cannot be replaced during a reload. The only currently existing workaround for MS Windows hosts is to restart the system in case some files are not reloaded.

0 votes