Support exists for an API that is specific to WebSphere® Application Server that you can use to find and invoke Service Component Architecture (SCA) services over the SCA default binding.
According to the SCA Version 1.0 specification, you can only obtain a reference to an SCA service from another component that is statically wired to the service. However, in the Feature Pack for SCA, you can use a service proxy to invoke the target service. This function requires a WebSphere Application Server base or network deployment topology with at least one server that has the Feature Pack for SCA installed. Also, SCA service must be deployed, running, and accessible over the default binding, <binding.sca>. There is no support for a domain URI, so all requests go to the default domain at the cell level. Using this API enables code that is not an SCA component to use the SCA client programming model.
import com.ibm.websphere.sca.context.CurrentCompositeContext; import com.ibm.websphere.sca.context.CompositeContext; CompositeContext compositeContext = CurrentCompositeContext.getContext(); EchoService echoService = (EchoService) compositeContext .getService(EchoService.class, "SCASimpleEchoService");
In this information ... | IBM Redbooks, demos, education, and more(Index) |