users@glassfish.java.net

Re: Using EJB 3.0 session bean from J2EE 1.4 web project

From: Ryan de Laplante <ryan_at_ijws.com>
Date: Tue, 02 Sep 2008 15:57:10 -0400

>
> 1) Please confirm I understand correctly: The LocalHome interface I
> create must extend EJBHome. It needs only a create method and I am
> free to make up the method parameters as long as the EJB implements
> it. It must return the Local interface, and throw CreateException.
>
> public interface TransHistoryLocalHome extends EJBHome {
> public TransHistoryLocal create() throws CreateException;
> }
>
I forgot to ask about the EJB implementation of the create method.
Does it return "this" ? Your RemoteHome examples return void, and use
the @Init annotation. Maybe the LocalHome interface's create method
should also return void. The method body in the EJB would be empty
because @Init intercepts and does whatever it needs to do.

It would be good to have a full example on your websites. There's a lot
left to my imagination the way it is now.


Thanks,
Ryan