ServiceMix Components
  1. ServiceMix Components
  2. SMXCOMP-330

FilePoller should offer configurable targetOperation

    Details

    • Patch Info:
      Patch Available

      Description

      FilePoller currently does not use a target operation when sending a message to a target service. The operation must be set, for example, when sending a file to a Ode SU. If not set, Ode throws sort of NPE complaining operation is not set.

      FilePoller should offer a targetOperation property configurable via XBeans.

      This can be achieved by adding a targetOperation property to the org.apache.servicemix.file.FilePollerEndpoint.java class which will be passed to the exchange object if set. The following code would do (corresponding patch is appended):

      ...
      private QName targetOperation = null;
      ...
      public QName getTargetOperation()

      { return targetOperation; }

      public void setTargetOperation(QName targetOperation)

      { this.targetOperation = targetOperation; }

      ...
      protected void processFile(File aFile) throws Exception

      { ... exchange.setInMessage(message); if (getTargetOperation() != null) exchange.setOperation(getTargetOperation()); // <--- NEW marshaler.readMessage(exchange, message, in, name); ... }

      Then, the SU may be configured properly as follows:

      <f:poller
      service="proj:inbox"
      endpoint="inbox"
      targetService="process:receive"
      targetOperation="process:receive"
      file="file:///box/inbox"
      ...
      </f:poller>

      In case the attribute is not set in the xbean.xml, the current behaviour is not changed.

      1. servicemix-3.1.patch
        1 kB
        Lars Heinemann
      2. ASF.LICENSE.NOT.GRANTED--FilePollerEndpoint.java.txt
        0.4 kB
        Oliver Brusberg

        Activity

        Oliver Brusberg created issue -
        Bruce Snyder made changes -
        Field Original Value New Value
        Assignee Bruce Snyder [ bsnyder ]
        Lars Heinemann made changes -
        Attachment servicemix-3.1.patch [ 16258 ]
        Lars Heinemann made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Won't Fix [ 2 ]
        Bruce Snyder made changes -
        Resolution Won't Fix [ 2 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Bruce Snyder made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Fix Version/s 3.3 [ 11850 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 3.2.2 [ 11861 ]
        Guillaume Nodet made changes -
        Fix Version/s servicemix-file-2008.01 [ 11940 ]
        Gert Vanthienen made changes -
        Project ServiceMix [ 10950 ] ServiceMix Components [ 11080 ]
        Key SM-1115 SMXCOMP-330
        Fix Version/s servicemix-file-2008.01 [ 12036 ]
        Fix Version/s servicemix-file-2008.01 [ 11940 ]
        Component/s servicemix-file [ 11791 ]
        Fix Version/s 3.2.2 [ 11861 ]
        Component/s servicemix-file [ 11591 ]
        Affects Version/s 3.1.2 [ 11824 ]
        Fix Version/s 3.3 [ 12055 ]
        Fix Version/s 3.3 [ 11850 ]
        Fix Version/s 3.2.2 [ 12006 ]
        Jeff Turner made changes -
        Project Import Sat Nov 27 01:42:42 EST 2010 [ 1290840162973 ]

          People

          • Assignee:
            Bruce Snyder
            Reporter:
            Oliver Brusberg
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development