Setting the current CompositeContext

Section 1.6.1 of the 0.95 specification defines a class CurrentCompositeContext with a getContext() method that returns the current composite context. It does not define how the value returned is set.

Proposal

Add a method to allow a runtime implementation to set the value returned:

   /**
    * Sets the current composite context for the calling thread.
    * If a SecurityManager is present then a check is made to determine if the caller has the 
    * "setCurrentContext" RuntimePermission.
    * 
    * @param context the context to be associated with the calling thread; may be null
    * @returns the context currently associated with the thread; may be null
    * @throws SecurityException if the caller does not have permission to change the context 
   public static CompositeContext setContext(CompositeContext context);

This is not intended to be used by application code.

Tuscany/SpecProposals/SetCurrentContext (last edited 2009-09-20 22:48:08 by localhost)