How to call dispose when using a stateful session in the Switchyard->Rules integration

Solution Verified - Updated -

Issue

We are trying to embed rules into our Switchyard services. The rules are being referenced from a java bean in switchyard, and we are using a ReferenceInvoker to call the interface.

The problem is, we need to insert multiple complex facts (including iterating around several lists of different object types), and so we're using the INSERT and FIRE_ALL_RULES methods, which implies a StatefulSession. However, we can't find a way to call dispose when we've finished, and thus the next time the service is invoked, the session still contains its state.

How do we dispose of the stateful session if we're calling the rules as a reference from a java component bean?

Environment

  • Red Hat JBoss Fuse Service Works
    • 6.0.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content