You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Jean-Sebastien Delfino (JIRA)" <tu...@ws.apache.org> on 2007/01/09 19:54:27 UTC
[jira] Updated: (TUSCANY-965) Context Injection is not functioning
[ https://issues.apache.org/jira/browse/TUSCANY-965?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jean-Sebastien Delfino updated TUSCANY-965:
-------------------------------------------
Component/s: Java SCA Integration Tests
> Context Injection is not functioning
> ------------------------------------
>
> Key: TUSCANY-965
> URL: https://issues.apache.org/jira/browse/TUSCANY-965
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Core, Java SCA Integration Tests
> 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: https://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