Q&A

Q1:What files do I need to write for a stateless session bean?
A1: Like other enterprise beans, stateless session beans consist of a home interface, component interface, enterprise bean class, and deployment descriptor. You must provide a session bean's remote home interface and remote interface, if the session bean provides a remote client view. If the session bean provides a local client view, you must provide a local interface and local home interface. Your session bean may provide both local and remote client views.
Q2:How do I specify the JNDI name for a stateless session bean?
A2: The JNDI name for a stateless session bean is specified in the vendor-specific deployment descriptor, such as weblogic-ejb-jar.xml or jboss.xml.

Get Sams Teach Yourself EJB in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.