Versions Compared

Key

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

...

ServiceMix introduces the idea of a JBI POJO which is any Java object which implements the ComponentLifeCycle interface and uses dependency injection to configure itself.

Adding an instance of ComponentLifeCycle to the SpringJBIContainer will automatically wrap the POJO in a JBI ComponentAdaptor so that it faithfully obeys the JBI Component contract.

This means you can write JBI POJOs to be deployed by Spring without deriving from some helper base class like ServiceMix's ComponentSupport so that your POJO has no dependency other than on the JBI APIs and then let ServiceMix take care of more of the plumbing for you.

...

Wiki Markup
{snippet:id=example|lang=xml|url=http://svn.apache.org/repos/asf/incubator/servicemix/trunk/common/servicemix-components/src/test/resources/org/apache/servicemix/components/pojo/example.xml}

...

Wiki Markup
{snippet:id=send|lang=java|url=http://svn.apache.org/repos/asf/incubator/servicemix/trunk/common/servicemix-components/src/test/java/org/apache/servicemix/components/pojo/MySender.java}

...

Wiki Markup
{snippet:id=receive|lang=java|url=http://svn.apache.org/repos/asf/incubator/servicemix/trunk/common/servicemix-components/src/test/java/org/apache/servicemix/components/pojo/MyReceiver.java}

...

Wiki Markup
{snippet:id=send|lang=java|url=http://svn.apache.org/repos/asf/incubator/servicemix/trunk/common/servicemix-components/src/test/java/org/apache/servicemix/components/pojo/PojoSender.java}

...

Wiki Markup
{snippet:id=receive|lang=java|url=http://svn.apache.org/repos/asf/incubator/servicemix/trunk/common/servicemix-components/src/test/java/org/apache/servicemix/components/pojo/PojoReceiver.java}

...