You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Ed Slattery (JIRA)" <tu...@ws.apache.org> on 2006/06/13 15:03:29 UTC

[jira] Created: (TUSCANY-463) Doc on how to use context

Doc on how to use context
-------------------------

         Key: TUSCANY-463
         URL: http://issues.apache.org/jira/browse/TUSCANY-463
     Project: Tuscany
        Type: Task

  Components: C++ SCA  
    Versions: Cpp-current    
    Reporter: Ed Slattery
    Priority: Minor
     Fix For: Cpp-current


The documentation for use of SCA should make it clear that the component context is not available on the constructor of the service, so we must not attempt to store references to other services by locating them in the constructor - it wont work.

We must also not have a lazy initialize which stores the services on first use - that doesnt work because they reference the context, which is destroyed on exit from the lazy initialization. 

Also, you cant store the context as a member variable, as it cant be instantiated by a default constructor.

Bottom line - locate your services in the method in which you use them.  Thats a good idea because of a later need of hot replace of service wiring anyway.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Closed: (TUSCANY-463) Doc on how to use context

Posted by "Pete Robbins (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-463?page=all ]

Pete Robbins closed TUSCANY-463.
--------------------------------

    Resolution: Won't Fix

no longer relevant

> Doc on how to use context
> -------------------------
>
>                 Key: TUSCANY-463
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-463
>             Project: Tuscany
>          Issue Type: Task
>          Components: C++ SCA
>    Affects Versions: Cpp-current
>            Reporter: Ed Slattery
>            Priority: Minor
>             Fix For: Cpp-current
>
>
> The documentation for use of SCA should make it clear that the component context is not available on the constructor of the service, so we must not attempt to store references to other services by locating them in the constructor - it wont work.
> We must also not have a lazy initialize which stores the services on first use - that doesnt work because they reference the context, which is destroyed on exit from the lazy initialization. 
> Also, you cant store the context as a member variable, as it cant be instantiated by a default constructor.
> Bottom line - locate your services in the method in which you use them.  Thats a good idea because of a later need of hot replace of service wiring anyway.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org