Package org.osoa.sca

Examples of org.osoa.sca.ServiceReference


        System.out.println("CallBackBasicServiceImpl.setCallbackIllegally() message received: " + aString);

        boolean exceptionProduced = false;
        RequestContext requestContext = null;
        ServiceReference serviceRef = null;

        // Context is not working properly so we can't trust that this is
        // working.....
        try {
            requestContext = context.getRequestContext();
            serviceRef = (ServiceReference) requestContext.getServiceReference();
        } catch (Exception ex) {
            System.out.println("CallBackBasicServiceImpl.setCallbackIllegally()  " + ex.toString());
            ex.printStackTrace();
            return;
        }

        // Ok, call setCallback with my own service reference.
        try {
            serviceRef.setCallback(serviceRef);
        } catch (NullPointerException npe) {
            // This is not an appropriate exception.
            System.out.println("Test10 NPE exception during setCallback to own service reference");
            npe.printStackTrace();
            return;
View Full Code Here


        System.out.println("CallBackBasicServiceImpl.setCallbackIllegally() message received: " + aString);

        boolean exceptionProduced = false;
        RequestContext requestContext = null;
        ServiceReference serviceRef = null;

        // Context is not working properly so we can't trust that this is
        // working.....
        try {
            requestContext = context.getRequestContext();
            serviceRef = (ServiceReference) requestContext.getServiceReference();
        } catch (Exception ex) {
            System.out.println("CallBackBasicServiceImpl.setCallbackIllegally()  " + ex.toString());
            ex.printStackTrace();
            return;
        }

        // Ok, call setCallback with my own service reference.
        try {
            serviceRef.setCallback(serviceRef);
        } catch (NullPointerException npe) // This needs to be removed once
                                            // appropriate exception is
                                            // identified.
        {
            // This is not an appropriate exception.
View Full Code Here

        System.out.println("CallBackBasicServiceImpl.setCallbackIllegally() message received: " + aString);

        boolean exceptionProduced = false;
        RequestContext requestContext = null;
        ServiceReference serviceRef = null;

        try {
            requestContext = context.getRequestContext();
            serviceRef = (ServiceReference) requestContext.getServiceReference();
            serviceRef.setCallback(serviceRef);
        } catch (ClassCastException goodEx) {
            exceptionProduced = true;
            System.out.println("Test10 appropriate exception caught during setCallback to own service reference");
        } catch (Exception badEx) {
            System.out.println("CallBackBasicServiceImpl.setCallbackIllegally()  " + badEx.toString());
View Full Code Here

    // from a component that implements a single interface. The client in this test
    // impliments 2 interfaces to test the variant of this that takes interface name as an argumnet.
   
    boolean aBoolean = false;    
   
      ServiceReference myServiceReference = null;

      try
      {
     myServiceReference = context.createSelfReference(ConversationsService.class);
     System.out.println("Laa: Created Service Reference for Session:" + myServiceReference);
View Full Code Here

    //  business methos is called.
   
      Assert.assertNotNull("current composite context",myContext);    

      // This tests creating a conversational session. And that @Init is run prior to business method.   
      ServiceReference aServRef = null;
      //FIXME Port to the 1.0 spec API
      //aServRef = myContext.newSession("ConversationsLifeCycleService");
      Assert.assertNotNull("Conversations - Test2 Service Reference 1 not returned", aServRef);
     
      //FIXME Port to the 1.0 spec API
View Full Code Here

    //
   
   ConversationsLifeCycleService aConversationsLifeCycleService;
   Object aConversationID;
     Assert.assertNotNull("current composite context",myContext);
     ServiceReference aServRef;
     this.removeMarkerFile()
   
    //
    // test3 variation #1 -  Cannot be done annotation not implimented yet. 12/15/2006   
    // 
View Full Code Here

   
    count = 6;
    int returnCount = 0;
    //FIXME Port to the 1.0 spec API
    //ServiceReference myServiceReference = myContext.createServiceReferenceForSession(this,"ConversationsClient2");
                ServiceReference myServiceReference = null;
        Assert.assertNotNull("test5 - createServiceReferenceForSession - myContext.createServiceReferenceForSession(this,ConversationsClient);", myServiceReference);
    returnCount = aService.getCount(myServiceReference);
   
    Assert.assertEquals("test5 - createServiceReferenceForSession(this,ConversationsClient2)",count,returnCount);
    String aRemoteDateTime = aService.getDateTime(myServiceReference);
View Full Code Here

    //
         
        Assert.assertNotNull("current composite context",myContext);    

        // This tests creating a conversational session.  This service has a maxAge="5 seconds".
        ServiceReference aServRef;
              //FIXME Port to the 1.0 spec API
        //aServRef = myContext.newSession("ConversationsLifeCycleService");
              aServRef = null;
        Assert.assertNotNull("Conversations - Test6 Service Reference not returned", aServRef)
       
View Full Code Here

        System.out.println("CallBackBasicServiceImpl.setCallbackIllegally() message received: " + aString);

        boolean exceptionProduced = false;
        RequestContext requestContext = null;
        ServiceReference serviceRef = null;

        try {
            requestContext = context.getRequestContext();
            serviceRef = (ServiceReference) requestContext.getServiceReference();
            serviceRef.setCallback(serviceRef);
        } catch (ClassCastException goodEx) {
            exceptionProduced = true;
            System.out.println("Test10 appropriate exception caught during setCallback to own service reference");
        } catch (Exception badEx) {
            System.out.println("CallBackBasicServiceImpl.setCallbackIllegally()  " + badEx.toString());
View Full Code Here

    //  business methos is called.
   
      Assert.assertNotNull("current composite context",myContext);    

      // This tests creating a conversational session. And that @Init is run prior to business method.   
      ServiceReference aServRef = null;
      //FIXME Port to the 1.0 spec API
      //aServRef = myContext.newSession("ConversationsLifeCycleService");
//      Assert.assertNotNull("Conversations - Test2 Service Reference 1 not returned", aServRef);
     
      //FIXME Port to the 1.0 spec API
View Full Code Here

TOP

Related Classes of org.osoa.sca.ServiceReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.