[ 
https://issues.apache.org/jira/browse/TUSCANY-966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465795
 ] 

Ignacio Silva-Lepe commented on TUSCANY-966:
--------------------------------------------

Although context injection works now (see TUSCANY-965), its api is still not 
implemented

> getRequestContext() does not return a Context
> ---------------------------------------------
>
>                 Key: TUSCANY-966
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-966
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core, Java SCA Integration Tests
>    Affects Versions: Java-SCA-M3
>            Reporter: Lou Amodeo
>         Assigned To: Jim Marino
>             Fix For: Java-SCA-M3
>
>
> Remote Service hangs obtaining the request context using getRequestContext(). 
>  
> [INFO] [tuscany-itest:start {execution: start}]
> [INFO] Starting Tuscany...
> [INFO] [tuscany-itest:test {execution: test}]
> [INFO] Executing tests...
> CallBackApiServiceImpl message received: Knock Knock
> CallBackApiServiceImpl getting request context
> [INFO] Test results: {skipped=0, completedCount=1, failures=1, errors=0}
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] There were test failures
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 37 seconds
> [INFO] Finished at: Fri Dec 01 08:14:20 EST 2006
> [INFO] Final Memory: 7M/18M
> [INFO] 
> ------------------------------------------------------------------------
> -------------------------------------------------------------------------------
> Test set: org.apache.tuscany.sca.test.CallBackApiITest
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 30.023 sec 
> <<< FAILURE!
> testCallBackBasic(org.apache.tuscany.sca.test.CallBackApiITest)  Time 
> elapsed: 30.023 sec  <<< FAILURE!
> junit.framework.ComparisonFailure: CallBackBasicITest expected:<Who's There> 
> but was:<null>
>       at junit.framework.Assert.assertEquals(Assert.java:81)
>       at 
> org.apache.tuscany.sca.test.CallBackApiClientImpl.test1(CallBackApiClientImpl.java:55)
>       at 
> org.apache.tuscany.sca.test.CallBackApiClientImpl.run(CallBackApiClientImpl.java:21)
>       at 
> org.apache.tuscany.sca.test.CallBackApiITest.testCallBackBasic(CallBackApiITest.java:12)
> package org.apache.tuscany.sca.test;
> import org.osoa.sca.annotations.Service;
> import org.osoa.sca.annotations.Context;
> import org.osoa.sca.CompositeContext;
> import org.osoa.sca.RequestContext;
> @Service(CallBackApiService.class)
> public class CallBackApiServiceImpl implements CallBackApiService {
>       @Context
>       protected CompositeContext compositeContext;    
>       protected CallBackApiCallBack callback;   
>       
>       public void knockKnock(String aString) { 
>                               
>       System.out.println("CallBackApiServiceImpl message received: " + 
> aString);
>       callback = this.getCallBackInterface(); 
>       callback.callBackMessage("Who's There"); 
>       System.out.println("CallBackApiServiceImpl response sent");     
>       return; 
>         
>       }  
>       private CallBackApiCallBack getCallBackInterface()
>       {               
>         System.out.println("CallBackApiServiceImpl getting request context"); 
>         
>         RequestContext rc = compositeContext.getRequestContext();
>         System.out.println("CallBackApiServiceImpl getting callback from 
> request context");   
>         callback =  (CallBackApiCallBack) 
> rc.getServiceReference().getCallback();
>         System.out.println("CallBackApiServiceImpl returning callback");      
>         return callback;
>         
>       }

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to