Share client-configurable objects across the Woden implementation
-----------------------------------------------------------------

                 Key: WODEN-177
                 URL: https://issues.apache.org/jira/browse/WODEN-177
             Project: Woden
          Issue Type: Improvement
            Reporter: John Kaputin
            Assignee: John Kaputin
             Fix For: M8


Some objects such as ErrorReporter and ExtensionRegistry can be configured by 
the client, so these  objects should be shared across the Woden implementation 
to ensure consistent behaviour. Currently  in some places references to 
configured objects are not propagated across the implementation, so new objects 
are  instantiated, but these will not contain any prior client config, so 
inconsistent  results may occur.

A WSDLContext object will be introduced to the implementation, which acts as a 
container for  shared objects - currently ErrorReporter and ExtensionRegistry, 
but others may be added later.  This WSDLContext object will be created by the 
WSDLFactory and a reference to it will be passed to  objects created by the 
factory and then on to some objects further 'downstream'. The places in the  
implementation that require a reporter or registry will have access to the 
WSDLContext containing  them.

The 'scope' of the WSDLContext is the WSDLFactory that created it. So any 
objects created by that  WSDLFactory instance (WSDLReaders, Descriptons, etc) 
will share the same WSDLContext and hence the  same ErrorReporter and 
ExtensionRegistry. Any changes made to these shared objects will be  reflected 
across the scope. 

This design can be revisited if a use case is identified that requires a 
finer-grained scope (e.g.  scoped to the WSDLReader).

Initially, the WSDLContext class will be internal-only, not part of the API. If 
a suitable use  case is identified, it could be added to the API.

With this solution, we can reduce the number of setters and getters for 
ErrorReporter and  ExtensionRegistry across the API and impl classes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to