Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagehtml/xml
public void class OrderPlacer ... {
 
   @Producer(target="OrderChannel")
   protected OrderChannel channel;
 
   public void placeOrder(Order order) {
      channel.publish(order);
   }
 
} 
Code Block
languagehtml/xml
public void class OrderTaker ... {
 
  @Consumer(source="OrderChannel")
  public void onOrder(Order order) {
      ....
  }
 
} 

...

By default, Fabric3 uses JDK proxies to create producer proxies. JDK proxies are less performant than handwritten code and allocate objects during invocation (for example, an array to create parameter values). Fabric3 provides an optional extension that uses bytecode generation to create proxies. This results in proxies that are as fast as handwritten code and do not allocate objects during invocation. To enable bytecode generation, the fabric3-bytecode-proxy module must be installed in the runtime. Its maven dependency coordinates are org.codehaus.fabric3:fabric3-bytecode-proxy.

...