Developing a session bean to have a No-Interface Local View

About this task

A session bean has a No-Interface Local view when:

A couple of code snippets to demonstrate the points previously mentioned:

session bean with No-Interface view because no declared interfaces
@Stateless
public class CartBean
session bean with No-Interface view by using the @LocalBean annotation
@Stateless
@LocalBean
@Remote( Cart.class )
public class CartBean implements Cart

You can also declare metadata for a session bean with No-Interface Local view in the deployment descriptor rather than using annotations:

<?xml version="1.0"?>
<ejb-jar
  xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
  version="3.1">
  <enterprise-beans>
    <session>
      <ejb-name>CartBean</ejb-name>
      <local-bean/>
      <business-remote>com.ibm.example.Cart</business-remote>
      <ejb-class>com.ibm.example.CartBean</ejb-class>
      <session-type>Stateless</session-type>
    </session>
  </enterprise-beans>
</ejb-jar>



In this information ...


Related reference

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 Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Jan 30, 2014 9:17:32 AM CST
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-nd-iseries&topic=tejbdvnoview
File name: tejb_dvnoview.html