BEA Systems, Inc.

com.beasys.commerce.axiom.reasoning.rules.service
Class RulesServiceBean

java.lang.Object
  |
  +--com.beasys.commerce.axiom.reasoning.rules.service.RulesServiceBean

public class RulesServiceBean
extends java.lang.Object
implements javax.ejb.SessionBean

Implements a rules service bean

See Also:
Serialized Form

Field Summary
static long CONTEXT_POOL_ACCESS_LIMIT
          The context pool access limit
static java.lang.String CONTEXT_POOL_MAX_SIZE
          The context wrapper pool max size limit
static int CONTEXT_WRAPPER_CACHE_CAPACITY
          The capacity of the context wrapper cache
static java.lang.String EXCEPTION_MSG_DELIMITER
          The exception message delimiter
static java.lang.String MIME_TYPE_HANDLERS_MAP
          The name of the mime type handlers map environment property
static java.lang.String MIME_TYPE_MAP_DELIMITER
          The delimiter used to separate mime type keys from values
static java.lang.String MIME_TYPE_PAIR_DELIMITER
          The delimiter used to separate mime type map entries
static java.lang.String MIME_TYPES_MAP
          The name of the mime types map environment property
static float POOL_REDUCTION_FACTOR
          The size reduction factor used during context wrapper pool maintenance
static java.lang.String RELOAD_RULESETS_NEVER_STRING
          The code string for the "never" rule set reload policy
static java.lang.String RELOAD_RULESETS_PERIODICALLY_STRING
          The code string for the "periodically" rule set reload policy
static java.lang.String RELOAD_RULESETS_WHEN_MODIFIED_STRING
          The code string for the "when modified" rule set reload policy
static java.lang.String ROOT_CONTEXT_NAME
          The name of the root jndi context
static java.lang.String RULE_SET_DATA_HOME_NAME
          The name of the rule set data bean home environment property
static java.lang.String RULE_SET_RELOAD_INTERVAL
          The name of the rule set reload interval environment property
static java.lang.String RULE_SET_RELOAD_POLICY
          The name of the rule set reload policy environment property
static java.lang.String RULE_SHEET_DIRECTORY
          The name of the rule sheet deployment directory environment property
static java.lang.String VENDOR_INDEPENDENT_MIME_TYPE
          The name of the vendor independent mime type environment property
 
Constructor Summary
RulesServiceBean()
          Constructor
 
Method Summary
 java.util.Set applyRules(java.lang.String rulesetURI, java.util.Set inputObjects, java.util.Set outputObjectsTypeFilter, java.util.Set outputObjectsCreatorFilter)
          Applies a named set of rules to the set of objects provided by the caller in order to produce a resultant set of objects.
 void ejbActivate()
          Activates
 void ejbCreate()
          Creates
 void ejbPassivate()
          Passivates
 void ejbRemove()
          Removes TODO: 1.
 void setSessionContext(javax.ejb.SessionContext sessionContext)
          Sets the session context.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTEXT_POOL_ACCESS_LIMIT

public static final long CONTEXT_POOL_ACCESS_LIMIT
The context pool access limit

CONTEXT_POOL_MAX_SIZE

public static final java.lang.String CONTEXT_POOL_MAX_SIZE
The context wrapper pool max size limit

CONTEXT_WRAPPER_CACHE_CAPACITY

public static final int CONTEXT_WRAPPER_CACHE_CAPACITY
The capacity of the context wrapper cache

EXCEPTION_MSG_DELIMITER

public static final java.lang.String EXCEPTION_MSG_DELIMITER
The exception message delimiter

MIME_TYPE_HANDLERS_MAP

public static final java.lang.String MIME_TYPE_HANDLERS_MAP
The name of the mime type handlers map environment property

MIME_TYPES_MAP

public static final java.lang.String MIME_TYPES_MAP
The name of the mime types map environment property

MIME_TYPE_MAP_DELIMITER

public static final java.lang.String MIME_TYPE_MAP_DELIMITER
The delimiter used to separate mime type keys from values

MIME_TYPE_PAIR_DELIMITER

public static final java.lang.String MIME_TYPE_PAIR_DELIMITER
The delimiter used to separate mime type map entries

POOL_REDUCTION_FACTOR

public static final float POOL_REDUCTION_FACTOR
The size reduction factor used during context wrapper pool maintenance

RELOAD_RULESETS_NEVER_STRING

public static final java.lang.String RELOAD_RULESETS_NEVER_STRING
The code string for the "never" rule set reload policy

RELOAD_RULESETS_PERIODICALLY_STRING

public static final java.lang.String RELOAD_RULESETS_PERIODICALLY_STRING
The code string for the "periodically" rule set reload policy

RELOAD_RULESETS_WHEN_MODIFIED_STRING

public static final java.lang.String RELOAD_RULESETS_WHEN_MODIFIED_STRING
The code string for the "when modified" rule set reload policy

ROOT_CONTEXT_NAME

public static final java.lang.String ROOT_CONTEXT_NAME
The name of the root jndi context

RULE_SET_DATA_HOME_NAME

public static final java.lang.String RULE_SET_DATA_HOME_NAME
The name of the rule set data bean home environment property

RULE_SET_RELOAD_INTERVAL

public static final java.lang.String RULE_SET_RELOAD_INTERVAL
The name of the rule set reload interval environment property

RULE_SET_RELOAD_POLICY

public static final java.lang.String RULE_SET_RELOAD_POLICY
The name of the rule set reload policy environment property

RULE_SHEET_DIRECTORY

public static final java.lang.String RULE_SHEET_DIRECTORY
The name of the rule sheet deployment directory environment property

VENDOR_INDEPENDENT_MIME_TYPE

public static final java.lang.String VENDOR_INDEPENDENT_MIME_TYPE
The name of the vendor independent mime type environment property
Constructor Detail

RulesServiceBean

public RulesServiceBean()
Constructor
Method Detail

applyRules

public java.util.Set applyRules(java.lang.String rulesetURI,
                                java.util.Set inputObjects,
                                java.util.Set outputObjectsTypeFilter,
                                java.util.Set outputObjectsCreatorFilter)
                         throws java.lang.IllegalArgumentException,
                                RulesServiceException
Applies a named set of rules to the set of objects provided by the caller in order to produce a resultant set of objects.
Parameters:
rulesetURI - The uri of the rule set which contains the set of rules that is to be applied.
inputObjects - The set of objects to which the rules are to be applied
outputObjectsTypeFilter - A set of class objects used to perform type-based selection of the return objects.
outputObjectsCreatorFilter - A set of output object creator name strings to be used to perform creator-name selection of the return objects after type-based filtering has been performed.
Returns:
A filtered set of objects which resulted from the application of the rules.
Throws:
java.lang.IllegalArgumentException - Thrown if rulesetURI is null or zero-length, or if inputObjects is null or if outputObjectsTypeFilter is null
RulesServiceException - thrown on an error in the rules service

ejbActivate

public void ejbActivate()
Activates
Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
Creates
Throws:
javax.ejb.CreateException - Thrown if unable to create the ejb

ejbPassivate

public void ejbPassivate()
Passivates
Specified by:
ejbPassivate in interface javax.ejb.SessionBean

ejbRemove

public void ejbRemove()
Removes TODO: 1. Add handler for exceptions
Specified by:
ejbRemove in interface javax.ejb.SessionBean

setSessionContext

public void setSessionContext(javax.ejb.SessionContext sessionContext)
Sets the session context.
Specified by:
setSessionContext in interface javax.ejb.SessionBean
Parameters:
sessionContext - The session context

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved