Using the SCA default binding to find and locate SCA services

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.

About this task

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.

Procedure

Use the import method in your client code to locate an SCA service.
The following method is supported for client code to locate a service that is deployed onto a cell:
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)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic    

Terms of Use | Feedback

Last updated: Oct 22, 2010 3:02:28 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=v700osgijpa&product=was-nd-mp&topic=tsca_locate_scaserv_api
File name: tsca_locate_scaserv_api.html