Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-2136

Incorrect proxy injected for unwired SCA reference

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Java-SCA-1.2
    • Java-SCA-1.2
    • SCA Java Runtime
    • None

    Description

      Discussed on tuscany-dev here: http://marc.info/?l=tuscany-dev&m=120615059020103

      The latest code does not seem to handle the injection of unwired SCA
      references correctly.

      Here's how I set up my code:

      class CustomerInfoServiceImpl {

      @Reference(required = false)
      public CustomerInfo customer;

      ...
      }

      In the .composite I don't wire the customer reference.

      I still end up with a proxy injected into the customer field. I was
      expecting the field to be null.

      Calling a business method on that proxy throws an exception
      <<<
      Service not found for component AtomAggregator reference customer
      (bindingURI=null operation=getCustomerInfo). Ensure that the composite
      containing the service is loaded and started somewhere in the SCA domain
      and that if running in a remote node that the interface of the target
      service marked as @Remotable
      >>>

      and that message is pretty misleading too

      Any idea of what's going wrong with injection?

      Attachments

        Activity

          People

            rfeng Zhaohui Feng
            jsdelfino Jean-Sebastien Delfino
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: