public class IlrPOJOSessionFactory
extends ilog.rules.res.session.impl.IlrSessionFactoryBase
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.
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)
| 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.
|
| 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.
|
public IlrPOJOSessionFactory()
public IlrPOJOSessionFactory(java.lang.String xuConnFactoryJNDIName,
java.lang.ClassLoader xomCL)
xuConnFactoryJNDIName - The JNDI name of the XU connection
factory. null for the default one.xomCL - The XOM class loader. null for the default one.public IlrStatelessSession createStatelessSession() throws IlrSessionCreationException
IlrSessionFactoryIlrSessionCreationException - if an error occurred when the
stateless session was created: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
IlrSessionFactoryIlrSessionCreationException - if an error occurred when the
stateful session was created.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 enabledpublic IlrManagementSession createManagementSession() throws IlrSessionCreationException
IlrSessionFactoryIlrSessionCreationException - if an error occurs when the
management session is created.© Copyright IBM Corp. 1987, 2017