Hi ,
In EJB 2.1 and earlier, the lookup of the Home is a distinct step from bean creation. This is being addressed in EJB 3.0. In EJB 3.0, session bean Home interfaces are eliminated.The client deals only with the session bean business interface.Here's an example :
// Declare a dependency on a stateful session bean business interface. At component init time, an instance of a stateful session bean will be created and a reference to it injected into "sfulBean"
@EJB SfulBusiness sfulBean;
sfulBean.foo();
--ken
> thanks
>
> but i was wondering how to do it in EJB 2.1
You can't. In EJB 2.1 and earlier, the Home is a required part of the client programming model. You need to get the home and do an explicit create() call.
> i tried it out by writing some classes overiding the
> classes but it didn't worked