Access Keys:
Skip to content (Access Key - 0)
community header community tab mule tab ibeans tab muleforge tab

Hibernate Transport

Hibernate transport is very similar to JDBC, but instead of handling a list of maps, it deals with POJOs and it lets Hibernate do all the mapping work.

The transport exists in 2 flavors:

  • 1.X series, to use with Mule 1.X (including EE versions)
  • 2.0 series, to use with Mule 2.0

1.0 series

Endpoint

The endpoint URI looks like this: "hibernate://queryName" where queryName can be anything.

For an inbound endpoint, the endpoint should have a corresponding property which is a valid HQL "select" statement ; whereas for an outbound endpoint, it can either be an "update" statement, or
just "merge" (the message payload is then merged) or "delete" (the message payload is then deleted).

For an inbound endpoint, there are more properties that can be set:

  • ack: an HQL statement used to acknowledge the message just received.
  • singleMessage: a boolean to specify that whether the resultset should be considered as 1 message or multiple
  • singleAck: a boolean to specify whether the "ack" statement applies to each element of the resultset or all of them at once
  • maxResults: the maximum number of rows to return from the "select" statement

Connector

The most interesting properties that can be set on a connector are:

  • sessionFactory: the Hibernate SessionFactory object that allows to connect to a data source.
  • sessionMerge (and sessionDelete): allows to override the default action for "merge" (resp. "delete"). Useful when you can't know the key of an Object (for instance it's auto-generated), but you can determine it (using other "business" constraints).

2.0 series

The connector has been ported to the new API and spring-based configuration, but nothing else was changed (but XA transaction handling which could be simplified).

Adaptavist Theme Builder (3.3.3-conf210) Powered by Atlassian Confluence 2.10, the Enterprise Wiki.
Free theme builder license