You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Unable to render {include} The included page could not be found.
Unable to render {include} The included page could not be found.

<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 configutation

To access a stateless session, the uri attribute of the <binding.ejb> element needs to be be configured with a JNDI name.

<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

<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>
  • No labels