Community
Participate
Working Groups
The following API additions/modifications are required to support multi-tenancy: New API: /** * Return true if a HelperContext corresponding to this identifier or alias * already exists, else false. If identifer is an alias, the corresponding * value in the alias Map will be used as the identifier for the lookup. * * @param identifier the alias or identifier used to lookup a helper context * @return true if an entry exists in the helper context map for identifier (or * the associated identifier value if identifier is an alias), false otherwise. */ public static boolean hasHelperContext(String identifier); /** * Add an alias to identifier pair to the alias Map for the current application. * * @param alias the alias to be associated with identifier * @param identifier assumed to be a key in the helper context Map */ public static void addAlias(String alias, String identifier); Support for 'dirty' flag: /** * Add a name/value pair to the properties Map. * * @param name the name of the property * @param value the value of the property */ public void setProperty(String name, Object value); /** * Return the value stored in the properties Map for a given * name, or null if an entry for name does not exist. * * @param name the name of the property to be returned * @return the value associated with name, or null */ public Object getProperty(String name); Existing API: /** * Return the local helper context associated with the given identifier, or create one if * it does not already exist. If identifier is an alias, the value associated with it in the * alias Map will be used as the identifier value. * * @param identifier the identifier or alias to use for lookup/creation * @return HelperContext associated with identifier, or a new HelperContext * keyed on identifier if none eixsts */ public static HelperContext getHelperContext(String identifier); /** * Replaces the provided helper context in the map of identifiers to * helper contexts for this application. ctx.getIdentifier() will be * used to obtain the identifier value. If identifier is a key in the * the alias Map, i.e. was previously set as an alias, the * corresponding entry will be removed from the alias Map. * * @param ctx the HelperContext to be added to the context Map for * the current application */ public static void putHelperContext(HelperContext ctx);
Created attachment 180172 [details] Contains proposed fix.
Created attachment 180200 [details] Contains proposed fix + supporting test case
Fix checked into the 2.1 stream. Reviewed by: matt.macivor@oracle.com, blaise.doughan@oracle.com Tests: sdo/helper/helpercontext/SDOHelperContextTest; all unit tests pass as expected Revision: 8308
Fix checked into the 2.2 stream (trunk) Reviewed by: matt.macivor@oracle.com, blaise.doughan@oracle.com Tests: sdo/helper/helpercontext/SDOHelperContextTest; all unit tests pass as expected Revision: 8309
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink