Re: Why not only one interface for a EJB ??
From: Amardeep Verma (addverma_at_netscape.net)
Date: 11/26/03
- Previous message: Bjorn Abelli: "Re: Do you still choose java????"
- In reply to: Martin Kersten: "Re: Why not only one interface for a EJB ??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 25 Nov 2003 23:02:05 -0800
Hi,
But if the developer had only one interface, would that not make
his/her task easier? I agree there is a sepration of tasks between the
Container and the Developer, But that is hardly the reason why there
should be two interfaces. Why cant one interface handle both the
tasks? What was the need for sepration?
Have a nice day
"Martin Kersten" <Martin.Kersten@student.uni-magdeburg.de> wrote in message news:<bpvb0v$bka$2@graf.cs.uni-magdeburg.de>...
> Hi Amardeep,
>
> > As you know there are two interfaces, home and component interface
> > to a EJB Bean. But why are there two interfaces? Why not have only one
> > interface which will do the work of both? What is the advantage of two
> > interfaces?
> >
> > Anybody can shed light on this topic??
>
> It's like the factory pattern I guess. You can use a Factory to create and
> find instances. It simply seperates the Bean instance/interface and its
> factory/pool instance/interface. Also the interfaces classes are created
> and manipulated by the J2EE container. Therefore I guess its really a
> logical and usefull seperation. I also believe it's a common pattern for
> the good old CORBA programming.
>
> I like it this way ;)
>
>
> Martin (Kersten)
- Previous message: Bjorn Abelli: "Re: Do you still choose java????"
- In reply to: Martin Kersten: "Re: Why not only one interface for a EJB ??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|