<binding.ejb>Tuscany provides the reference-side support for the SCA EJB Session Bean Binding V1.00. It allows SCA components to access existing stateless session beans. The XML configutationTo access a stateless session, the uri attribute of the <binding.ejb> element needs to be be configured with a JNDI name. Code Block |
---|
<binding.ejb uri="corbaname:iiop:1.2@localhost:1050#AddServiceBean" />
|
Depending on which enviroment the SCA components are hosted, various styles of the JNDI names can be supported: - relative JNDI
- java:comp/env/<ejb-ref>
- corbaname JNDI
Some examples Code Block |
---|
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" name="account">
<!-- composite refrence with ejb binding. Modify host and port number in uri attribute based on where you have installed target ResumeBank EJB -->
<component name="CustomerComponent">
<implementation.java class="account.CustomerImpl" />
<reference name="extEJBService">
<!-- To use the CosNaming, use the following URI -->
<!-- <binding.ejb uri="corbaname:iiop:1.2@localhost:1050#AddServiceBean" />-->
<binding.ejb uri="hello-addservice/AddServiceBean/calculator.AddService" />
</reference>
</component>
</composite>
|
|