ilog.rules.res.session

Class IlrPOJOSessionFactory

  • java.lang.Object
    • ilog.rules.res.session.impl.IlrSessionFactoryBase
      • ilog.rules.res.session.IlrPOJOSessionFactory
  • All Implemented Interfaces:
    IlrSessionFactory


    public class IlrPOJOSessionFactory
    extends ilog.rules.res.session.impl.IlrSessionFactoryBase
    Use the IlrPOJOSessionFactory class to create sessions in Java EE environments. An IlrPOJOSessionFactory object retrieves the Execution Unit (XU) connection factory from JNDI. It uses the application server configured in the XU.

    Code example

    The following code example shows how to set the execution mode to task execution:

       IlrSessionFactory sessionFactory = new IlrPOJOSessionFactory();
       IlrSessionRequest request = sessionFactory.createRequest();
       request.setRulesetPath(IlrPath.parsePath("/myRuleapp/myRuleset");
       request.setTaskName("myTask");
       IlrStatelessSession session = sessionFactory.createStatelessSession();
       IlrSessionResponse response = session.execute(request)
     
    Since:
    7.0
    • Constructor Summary

      Constructors 
      Constructor and Description
      IlrPOJOSessionFactory()
      Creates a new IlrSessionFactory by using a XU deployed as a Java EE resource adapter.
      IlrPOJOSessionFactory(java.lang.String xuConnFactoryJNDIName, java.lang.ClassLoader xomCL)
      Creates a new IlrSessionFactory using a XU deployed as a Java EE resource adapter.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      IlrManagementSession createManagementSession()
      Returns a new management session.
      IlrStatefulSession createStatefulSession(IlrPath rulesetPath, java.io.Serializable userData, java.util.Map<java.lang.String,java.lang.Object> initParameters, boolean forceUptodate, boolean enableInterceptor)
      Returns a stateful rule session.
      IlrStatelessSession createStatelessSession()
      Returns a stateless rule session.
      • Methods inherited from class ilog.rules.res.session.impl.IlrSessionFactoryBase

        createRequest, createStatefulSession, createTraceDAOFactory, getXUInfo, isInterceptorEnabled, setInterceptorEnabled
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IlrPOJOSessionFactory

        public IlrPOJOSessionFactory()
        Creates a new IlrSessionFactory by using a XU deployed as a Java EE resource adapter.
        Since:
        8.6
      • IlrPOJOSessionFactory

        public IlrPOJOSessionFactory(java.lang.String xuConnFactoryJNDIName,
                             java.lang.ClassLoader xomCL)
        Creates a new IlrSessionFactory using a XU deployed as a Java EE resource adapter.
        Since:
        8.6
        Parameters:
        xuConnFactoryJNDIName - The JNDI name of the XU connection factory. null for the default one.
        xomCL - The XOM class loader. null for the default one.
    • Method Detail

      • createStatefulSession

        public IlrStatefulSession createStatefulSession(IlrPath rulesetPath,
                                               java.io.Serializable userData,
                                               java.util.Map<java.lang.String,java.lang.Object> initParameters,
                                               boolean forceUptodate,
                                               boolean enableInterceptor)
                                                 throws IlrSessionCreationException
        Description copied from interface: IlrSessionFactory
        Returns a stateful rule session.
        Throws:
        IlrSessionCreationException - if an error occurred when the stateful session was created.
        Parameters:
        rulesetPath - The ruleset path for the session.
        userData - A serializable object supplied by the user.
        initParameters - Initialization parameters used by the interceptors if necessary.
        forceUptodate - Set to true to indicate that the latest version of the ruleset must be used.
        enableInterceptor - Set to true to indicate that the interceptors should be enabled
        Returns:
        A new stateful session.

© Copyright IBM Corp. 1987, 2017