This content has been marked as final.
Show 2 replies
-
1. Re: EJB Local Home in EJB 3.0
asookazian Feb 7, 2008 5:43 PM (in response to kancharla_g)We are using Seam 2.0 with JBoss 4.2.1.GA. In EJB3 session beans, you only need a local interface and the SFSB/SLSB implementation class.
There is no need for LocalHome interface with EJB3 as far as I know.
example:@Stateful @Name("orderAction") //@Name is Seam specific annotation public class OrderAction implements OrderActionLocal { ... } @Local public interface OrderActionLocal { ... }
Via JSF EL, we execute public methods that are defined in both the interface and class above:<h:commandButton id="update" value="Update" action="#{orderAction.updateOrder}" />
The EJB3 expert group is planning on eliminated the local interface for session beans in the 3.1 spec. http://bill.burkecentral.com/category/ejb-31/ They have already been eliminated local and remote for entity beans (JPA entities) in EJB3.
JSR220 - EJBCORE:section 3.6.3
This was the only way of providing a local client view in EJB 2.1 and earlier releases. The local client view provided by the business interface in EJB 3.0 as described in Section 3.4 is now to be preferred.
section 3.4
The EJB 3.0 local or remote client of a session bean written to the EJB 3.0 API accesses a session bean through its business interface. The business interface of an EJB 3.0 session bean is an ordinary Java interface, regardless of whether local or remote access is provided for the bean.
Hope that helps! -
2. Re: EJB Local Home in EJB 3.0
alrubinger Feb 14, 2008 5:17 AM (in response to kancharla_g)Yes, the EJB 3.0 specification supports 2.1 Views for interop / backwards-compat, and JBoss EJB3 implements this.
Sounds like you're just not finding the Home in JNDI. Use the JNDI Viewer in the JMX Console:
http://jboss.org/wiki/Wiki.jsp?page=DisplayTheJDNITreeWithTheJMXConsole
If you don't see an object implementing LocalHome defined, we might have to take a look at how you're declaring your 2.1 View. Should just be:@Stateless @LocalHome(MyLocalHome.class) public class MyBean implements MyLocalInterface{...}
public interface MyLocalHome extends EJBLocalHome{...}
S,
ALR