I'm trying out the VFS component and have run into a couple of
issues...First, here's my XML (so that you'll know what I'm doing):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
    "http://www.springframework.org/dtd/spring-beans.dtd";>

<beans>
  <container id="jbi">
    <components>
      <component id="filePoller"
          service="foo:filePoller"
          class="org.servicemix.components.vfs.FilePoller"
          destinationService="foo:fileSender">
        <property name="path" value="file://d:/inbox"/>
        <property name="period" value="1000"/>
        <property name="workManager" ref="workManager"/>
      </component>

      <component id="fileSender"
          service="foo:fileSender"
          class="org.servicemix.components.vfs.FileWriter">
        <property name="path"
value="ftp://wallsc:[EMAIL PROTECTED]/foo/bar/"/>
        <property name="marshaler">
          <bean class="org.servicemix.components.util.DefaultFileMarshaler">
            <property name="fileName">
              <bean class="org.servicemix.expression.ConstantExpression">
                <constructor-arg value="FOOBAR"/>
              </bean>
            </property>
          </bean>
        </property>
      </component>
    </components>
  </container>

  <bean id="workManager" class="org.jencks.factory.WorkManagerFactoryBean">
  </bean>
</beans>


Firstly, if I start up SM, I get an error telling me: 'Could not create
folder "ftp://wallsc:[EMAIL PROTECTED]" because it already exists and is a
file.' Is this not a correct FTP URL, per the Commons VFS documentation?
Why is it trying to create a folder?

Ignoring FTP for awhile, I change the URL to "file://d:/outbox". Now if I
run it, everything seems fine, but if I copy a file into d:/inbox, nothing
happens. If I stop SM, then restart, the file gets partially copied to
outbox but then I get an error (every second) saying that it can't delete
the file in the inbox.

Finally, the example in
\servicemix-1.0\examples\file-binding\servicemix.xml shows a configuration
for org.jencks.factory.WorkManagerFactoryBean that simply will not work.
All of the properties being set are leftovers from the old ActiveMQ
SpringWorkManager and are not valid properties of WorkManagerFactoryBean.
I've not yet looked, but I suspect that some of the other examples will
have the same mistake.

Any help will be greatly appreciated...

Thanks,
Craig




Reply via email to