Package javax.rules

Examples of javax.rules.StatefulRuleSession.release()


        log( "Called executeRules" );
        // extract the Objects from the statefulRuleSession
        resultList = statefulRuleSession.getObjects( );
        log( "Result of calling getObjects: " + resultList );
        // release the statefulRuleSession so it is reset and repooled
        statefulRuleSession.release( );
        log( "Released Stateful Rule Session." );
    }

    private static void log( String msg )
    {
View Full Code Here


    facts = session.getObjects();

    assertTrue("Facts does not contain Gecko", facts.contains("Gecko"));
    assertTrue("Facts does not contain a:Gecko", facts.contains("a:Gecko"));

    session.release();
  }

}
View Full Code Here

  private void release() throws TransactionException {
    try {
      if (TransactionSynchronizationManager.hasResource(ruleSource)) {
        logger.debug("Releasing session");
        StatefulRuleSession session = (StatefulRuleSession) TransactionSynchronizationManager.getResource(ruleSource);
        session.release();
        logger.debug("Session released");
      }
    }
    catch (InvalidRuleSessionException ex) {
      throw new Jsr94TransactionException(ex);
View Full Code Here

                                                               " amount: " + ((Invoice) obj).getAmount() +
                                                               " status: " + ((Invoice) obj).getStatus());
            }

            // release the statefulRuleSession
            statefulRuleSession.release();
            System.out.println( "Released Stateful Rule Session." );
            System.out.println();

    }
    catch (NoClassDefFoundError e) {
View Full Code Here

        Object obj = en.nextElement();
        System.out.println("Clause Found: "+obj+" "+wm.get(obj));
      }

      // release the statefulRuleSession
      statefulRuleSession.release();
      System.out.println( "Released Stateful Rule Session." );
      System.out.println();

    }
    catch (NoClassDefFoundError e) {
View Full Code Here

              Object obj = itr.next();
              System.out.println("Clause Found: "+obj.toString());
      }

      // release the statefulRuleSession
      statefulRuleSession.release();
      System.out.println( "Released Stateful Rule Session." );
      System.out.println();

    }
    catch (NoClassDefFoundError e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.