Business Layer in Pojo

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gawasthi
    New Member
    • May 2007
    • 5

    #1

    Business Layer in Pojo

    Hi,
    This is more of a J2EE question. I am not sure if this is the right forum for it. I couldn't find a more relevant one. If this is not, please inform me.

    I have my business layer implemented in Pojos. There are 2 layers, 1 for the remote interfaces which is located by the service locator for the client to access business methods. And the second is the implementation layer which is actual business methods.
    Can anyone tell me whether it is fine for a class in the implementation layer to talk to another class directly, or should it go via service locator only.

    Please clarify soon.
    Thanks a lot,
    Gaurav
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by gawasthi
    Hi,
    This is more of a J2EE question. I am not sure if this is the right forum for it. I couldn't find a more relevant one. If this is not, please inform me.

    I have my business layer implemented in Pojos. There are 2 layers, 1 for the remote interfaces which is located by the service locator for the client to access business methods. And the second is the implementation layer which is actual business methods.
    Can anyone tell me whether it is fine for a class in the implementation layer to talk to another class directly, or should it go via service locator only.

    Please clarify soon.
    Thanks a lot,
    Gaurav
    Have a look at 'Dependency Injection' or 'Inversion of Control'. It is used by the
    Spring framework (and others too I suppose) and all your business layer
    components can be POJOs then; i.e. no need to communicate with technicalities
    such as EJBs directly.

    kind regards,

    Jos

    Comment

    Working...