Re: Why not only one interface for a EJB ??

From: Amardeep Verma (addverma_at_netscape.net)
Date: 11/26/03

  • Next message: Roelof Vuurboom: "Free Automated Software Inspection Tool for Java"
    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)


  • Next message: Roelof Vuurboom: "Free Automated Software Inspection Tool for Java"

    Relevant Pages

    • Re: OLE document modified
      ... The interfaces you show are implemented by the container. ... > type TOleContainer = class(TCustomControl, IUnknown, IOleClientSite, ... > Trying to query the object for IPersistStreamInit or IPersistStream I ...
      (microsoft.public.win32.programmer.ole)
    • Re: Why not only one interface for a EJB ??
      ... I agree there is a sepration of tasks between the ... Container and the Developer, But that is hardly the reason why there ... >> As you know there are two interfaces, ... > logical and usefull seperation. ...
      (comp.lang.java.programmer)
    • Re: Why not only one interface for a EJB ??
      ... I agree there is a sepration of tasks between the ... Container and the Developer, But that is hardly the reason why there ... >> As you know there are two interfaces, ... > logical and usefull seperation. ...
      (comp.lang.java)
    • Re: Reference Counted Class Please :)
      ... And quite frankly I don't like the loss of this "is" operator functionality ... just so that objects are reference counted. ... And make sure that all added objects to the container are not referenced by ... Well that was a short lived venture into interfaces hehehehe. ...
      (alt.comp.lang.borland-delphi)
    • Re: .NET 2.0 to be launched on Nov 8
      ... >> because generics don't require boxing. ... Maybe you need to implement interfaces to make a class a generic ... But the items you put inside that container do not have to implement an ... class method ConsoleApp.Main; ...
      (borland.public.delphi.non-technical)