ServiceMix Exec
ServiceMix Exec component is used to invoke commands (executables, shell commands, shell scripts, ...). The command can be static (defined in the component endpoint descriptor) or dynamic (provided in the incoming message, including arguments).
Availability
Note that this component is now only available as snapshot, not yet included in a ServiceMix release.
Installation
Simply drop the servicemix-exec installer zip in an hotdeploy directory monitored by ServiceMix.
How it works
Endpoint
The Exec endpoint can be very simple, waiting for command contained in the in message:
<beans xmlns="http://servicemix.apache.org/exec/1.0" xmlns:test="http://test"> <exec:endpoint service="test:MyService" endpoint="MyExec"/> </beans>
You can define a fallback command if the incoming doesn't provide a command:
<beans xmlns="http://servicemix.apache.org/exec/1.0" xmlns:test="http://test"> <exec:endpoint service="test:MyService" endpoint="MyExec" command="date"/> </beans>
Endpoint attributes
Name |
Type |
Description |
Required |
---|---|---|---|
endpoint |
String |
JBI Endpoint name |
no (will be auto-generated if not specified) |
interfaceName |
QName |
Interface QName implemented by the JBI endpoint |
no (will be auto-generated if not specified) |
service |
QName |
JBI Service name |
no (will be auto-generated if not specified) |
command |
String |
Fallback command |
Command that will be executed if the in message doesn't provide a command. |