There are two JBI components for InOnly and InOut which create dynamic proxies which when methods are invoked they are dispatched into the JBI container.

For input the JBI components attach the reflection method invocation proxy, method name and arguments to the inbound MessageExchange for the JBI container to route. For output, the attached Marshaler is used to turn the response into a POJO.

InOnly

This example shows an InOnly reflection component being configured. This component then creates a dynamic proxy which when a method is invoked it will be passed into the JBI container.

{snippet:id=inOnly|lang=xml|url=servicemix/smx3/trunk/common/servicemix-components/src/test/resources/org/apache/servicemix/components/reflection/example.xml}

 

InOut

This example performs an InOut. So the dynamic proxy will call into the JBI container, block until a response is available and then return the unmarshalled value to the caller of the dynamic proxy's method.

{snippet:id=out|lang=xml|url=servicemix/smx3/trunk/common/servicemix-components/src/test/resources/org/apache/servicemix/components/reflection/example.xml}

 

  • No labels

4 Comments