Skip to content

Instantly share code, notes, and snippets.

@estebanroblesluna
Created March 17, 2012 23:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save estebanroblesluna/2066325 to your computer and use it in GitHub Desktop.
Save estebanroblesluna/2066325 to your computer and use it in GitHub Desktop.
hibernateFlow
<spring:bean id="hibernateSessionAdvice" class="org.mule.hibernate.extensions.HibernateSessionAdvice">
<spring:constructor-arg index="0" ref="sessionFactory" />
</spring:bean>
<custom-processor name="openSessionMP" class="org.mule.hibernate.extensions.OpenHibernateSessionMP">
<spring:property name="advice" ref="hibernateSessionAdvice" />
</custom-processor>
<custom-processor name="closeSessionMP" class="org.mule.hibernate.extensions.CloseHibernateSessionMP">
<spring:property name="advice" ref="hibernateSessionAdvice" />
</custom-processor>
<flow name="hibernateFlow">
<http:inbound-endpoint address="${hibernateFlow}" exchange-pattern="request-response">
<http:body-to-parameter-map-transformer/>
<processor ref="openSessionMP"/>
<response>
<processor ref="closeSessionMP"/>
</response>
</http:inbound-endpoint>
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment