C
chrismiles
At the moment my system is split into the usual 3 layers -
presentation, business and data.
Presentation layer is composed of JSP and Servlets. My business layer
is session beans, and my data layer is entity beans.
Now take this scenario for example.
I have my servlet which invokes getAccount(accountId) on my session
bean, which in return locates a Account session bean.
It has been advised to me previously that is bad practise to let your
client (my presentation layer) get direct access to the entity beans.
Now how can I pass my information back to the presentation layer
without actually passing a entity bean? Am I best getting all the
information from the entity bean within my session bean and then
encapsulating in another standard class which I will then pass to the
presentation?
I know it is a design/arch issue but its really boiling me.
any help much apreciated. thanks in advance.
presentation, business and data.
Presentation layer is composed of JSP and Servlets. My business layer
is session beans, and my data layer is entity beans.
Now take this scenario for example.
I have my servlet which invokes getAccount(accountId) on my session
bean, which in return locates a Account session bean.
It has been advised to me previously that is bad practise to let your
client (my presentation layer) get direct access to the entity beans.
Now how can I pass my information back to the presentation layer
without actually passing a entity bean? Am I best getting all the
information from the entity bean within my session bean and then
encapsulating in another standard class which I will then pass to the
presentation?
I know it is a design/arch issue but its really boiling me.
any help much apreciated. thanks in advance.