Rule Execution Server API

ilog.rules.res.session
Class IlrEJB3SessionFactory

java.lang.Object
  extended by ilog.rules.res.session.impl.IlrSessionFactoryBase
      extended by ilog.rules.res.session.IlrEJB3SessionFactory
All Implemented Interfaces:
IlrSessionFactory

public class IlrEJB3SessionFactory
extends ilog.rules.res.session.impl.IlrSessionFactoryBase

IlrEJB3SessionFactory is a session factory for EJB3 rule sessions. This class provides access to enterprise beans through the common rule session interfaces.

Since:
7.0

Constructor Summary
IlrEJB3SessionFactory()
          Equivalent to IlrEJB3SessionFactory(Hashtable) called with a null parameter value.
IlrEJB3SessionFactory(Hashtable<?,?> jndiProperties)
          Creates an EJB3 rule session factory, saving initial JNDI context creation properties.
 
Method Summary
 IlrManagementSession createManagementSession()
          Management sessions are not available when using the EJB packaging, this method always throws an UnsupportedOperationException.
 IlrStatefulSession createStatefulSession(IlrPath rulesetPath, Serializable userData, Map<String,Object> initParameters, boolean forceUptodate)
          Finds a reference to an initialized stateful EJB3 rule session bean.
 IlrStatefulSession createStatefulSession(IlrPath rulesetPath, Serializable userData, Map<String,Object> initParameters, boolean forceUptodate, boolean enableInterceptor)
          Finds a reference to an initialized stateful EJB3 rule session bean.
 IlrStatelessSession createStatelessSession()
          Finds a reference to a stateless EJB3 rule session Bean.
 String getStatefulLocalJndiName()
          Returns the JNDI name for the local stateful session.
 String getStatefulRemoteJndiName()
          Returns JNDI name for the remote stateful session.
 String getStatelessLocalJndiName()
          Returns the JNDI name for the local stateless session.
 String getStatelessRemoteJndiName()
          Returns the JNDI name for the remote stateless session.
 boolean isRemote()
          Checks if remote EJBs are being used.
 void setRemote(boolean remote)
          Sets the remote flag for this rule session factory.
 void setStatefulLocalJndiName(String statefulLocalJndiName)
          Sets the JNDI name for the local stateful session.
 void setStatefulRemoteJndiName(String statefulRemoteJndiName)
          Sets the JNDI name for the remote stateful session.
 void setStatelessLocalJndiName(String statelessLocalJndiName)
          Sets JNDI name for the local stateless session.
 void setStatelessRemoteJndiName(String statelessRemoteJndiName)
          Sets the JNDI name for the remote stateless session.
 
Methods inherited from class ilog.rules.res.session.impl.IlrSessionFactoryBase
createRequest, createTraceDAOFactory, isInterceptorEnabled, setInterceptorEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlrEJB3SessionFactory

public IlrEJB3SessionFactory(Hashtable<?,?> jndiProperties)
Creates an EJB3 rule session factory, saving initial JNDI context creation properties. These properties are later used by the factory methods to lookup rule session bean references.

Parameters:
jndiProperties - properties used to create the initial JNDI context. If null, no properties will be used.

IlrEJB3SessionFactory

public IlrEJB3SessionFactory()
Equivalent to IlrEJB3SessionFactory(Hashtable) called with a null parameter value.

Method Detail

createStatelessSession

public IlrStatelessSession createStatelessSession()
                                           throws IlrSessionCreationException
Finds a reference to a stateless EJB3 rule session Bean.

Throws:
IlrSessionCreationException - if an error occurred while searching for the Bean.
Returns:
A reference to a stateless EJB3 rule session Bean from the JNDI namespace.

createStatefulSession

public IlrStatefulSession createStatefulSession(IlrPath rulesetPath,
                                                Serializable userData,
                                                Map<String,Object> initParameters,
                                                boolean forceUptodate)
                                         throws IlrSessionCreationException
Finds a reference to an initialized stateful EJB3 rule session bean.

Specified by:
createStatefulSession in interface IlrSessionFactory
Overrides:
createStatefulSession in class ilog.rules.res.session.impl.IlrSessionFactoryBase
Throws:
IlrSessionCreationException - if an error occurred while searching for the Bean.
Parameters:
rulesetPath - The ruleset path for the session.
userData - A serializable object supplied by the user.
initParameters - Initalization parameters used by the interceptors if necessary.
forceUptodate - Set to true to indicate that the latest version of the ruleset must be used.
Returns:
A reference to an initialized stateful EJB3 rule session bean from the JNDI namespace.

createStatefulSession

public IlrStatefulSession createStatefulSession(IlrPath rulesetPath,
                                                Serializable userData,
                                                Map<String,Object> initParameters,
                                                boolean forceUptodate,
                                                boolean enableInterceptor)
                                         throws IlrSessionCreationException
Finds a reference to an initialized stateful EJB3 rule session bean.

Throws:
IlrSessionCreationException - if an error occurred while searching for the Bean.
Parameters:
rulesetPath - The ruleset path for the session.
userData - A serializable object supplied by the user.
initParameters - Initalization 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 reference to an initialized stateful EJB3 rule session bean from the JNDI namespace.

createManagementSession

public IlrManagementSession createManagementSession()
                                             throws IlrSessionCreationException
Management sessions are not available when using the EJB packaging, this method always throws an UnsupportedOperationException.

Throws:
IlrSessionCreationException - is never thrown. This method always throws an UnsupportedOperationException.
Returns:
This method always throws UnsupportedOperationException

isRemote

public boolean isRemote()
Checks if remote EJBs are being used.

Returns:
When remote EJBs are being used, true is returned.

setRemote

public void setRemote(boolean remote)
Sets the remote flag for this rule session factory.

Parameters:
remote - Set to true to use remote beans.

getStatelessLocalJndiName

public String getStatelessLocalJndiName()
Returns the JNDI name for the local stateless session.

Returns:
The JNDI name.

setStatelessLocalJndiName

public void setStatelessLocalJndiName(String statelessLocalJndiName)
Sets JNDI name for the local stateless session.

Parameters:
statelessLocalJndiName - The JNDI name.

getStatelessRemoteJndiName

public String getStatelessRemoteJndiName()
Returns the JNDI name for the remote stateless session.

Returns:
The JNDI name.

setStatelessRemoteJndiName

public void setStatelessRemoteJndiName(String statelessRemoteJndiName)
Sets the JNDI name for the remote stateless session.

Parameters:
statelessRemoteJndiName - The JNDI name.

getStatefulLocalJndiName

public String getStatefulLocalJndiName()
Returns the JNDI name for the local stateful session.

Returns:
The JNDI name.

setStatefulLocalJndiName

public void setStatefulLocalJndiName(String statefulLocalJndiName)
Sets the JNDI name for the local stateful session.

Parameters:
statefulLocalJndiName - The JNDI name.

getStatefulRemoteJndiName

public String getStatefulRemoteJndiName()
Returns JNDI name for the remote stateful session.

Returns:
Tne JNDI name.

setStatefulRemoteJndiName

public void setStatefulRemoteJndiName(String statefulRemoteJndiName)
Sets the JNDI name for the remote stateful session.

Parameters:
statefulRemoteJndiName - The JNDI name.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013