You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Ignacio Silva-Lepe (JIRA)" <tu...@ws.apache.org> on 2006/12/14 19:37:22 UTC
[jira] Commented: (TUSCANY-965) Context Injection is not
functioning
[ http://issues.apache.org/jira/browse/TUSCANY-965?page=comments#action_12458570 ]
Ignacio Silva-Lepe commented on TUSCANY-965:
--------------------------------------------
AFAICT, the implementation to support context injection has not been completed yet. There is a ContextProcessor but it curently throws UnsupportedOperationException and it is not included in implementation.scdl. Also, CompositeContextImpl is for the most part stubbed out.
> Context Injection is not functioning
> ------------------------------------
>
> Key: TUSCANY-965
> URL: http://issues.apache.org/jira/browse/TUSCANY-965
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Core
> Reporter: Lou Amodeo
>
> Appears that Contesxt injection when using setters and attributes is not working. In each case the context attribute is null.
> a) setter method
> package org.apache.tuscany.sca.test;
> import org.osoa.sca.CurrentCompositeContext;
> import org.osoa.sca.ServiceReference;
> import org.osoa.sca.annotations.Reference;
> import org.osoa.sca.annotations.Remotable;
> import org.osoa.sca.annotations.Scope;
> import org.osoa.sca.annotations.Service;
> import org.osoa.sca.annotations.Context;
> import org.osoa.sca.CompositeContext;
> import junit.framework.Assert;
> @Service(CallBackSetCallbackClient.class)
> public class CallBackSetCallbackClientImpl implements CallBackSetCallbackClient {
> @Reference
> protected CallBackSetCalbackService aCallBackService;
> @Reference
> protected CallBackSetCallbackCallback callBack;
>
> private CompositeContext context;
>
> @Context
> public void setContext(CompositeContext aContext)
> {
>
> context = aContext;
> }
>
> public void run() {
>
> if (context == null)
> System.out.println("Context is null");
>
> [INFO] [tuscany-itest:start {execution: start}]
> [INFO] Starting Tuscany...
> [INFO] [tuscany-itest:test {execution: test}]
> [INFO] Executing tests...
> Context is null
> b) attribute
> package org.apache.tuscany.sca.test;
> import org.osoa.sca.CurrentCompositeContext;
> import org.osoa.sca.ServiceReference;
> import org.osoa.sca.annotations.Reference;
> import org.osoa.sca.annotations.Remotable;
> import org.osoa.sca.annotations.Scope;
> import org.osoa.sca.annotations.Service;
> import org.osoa.sca.annotations.Context;
> import org.osoa.sca.CompositeContext;
> import junit.framework.Assert;
> @Service(CallBackSetCallbackClient.class)
> public class CallBackSetCallbackClientImpl implements CallBackSetCallbackClient {
> @Reference
> protected CallBackSetCalbackService aCallBackService;
> @Reference
> protected CallBackSetCallbackCallback callBack;
> @Context
> protected CompositeContext context;
>
> public void run() {
>
> if (context == null)
> System.out.println("Context is null");
>
> [WARNING] Unable to get resource from repository central (http://repo1.maven.or
> /maven2)
> [INFO] [tuscany-itest:start {execution: start}]
> [INFO] Starting Tuscany...
> [INFO] [tuscany-itest:test {execution: test}]
> [INFO] Executing tests...
> Context is null
--
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