|Inside ADF Model best architecture design & patterns||michel...@gmail.com||3/26/09 7:01 AM|
Why this subject ?
I'm currently auditing a java desktop three tier application that
implements EJB's at business model layer. The application is
encountering some performance issues, this is the reason we are doing
some profiling (JProfiler) when executing performance test use cases
(using HP QTP). We don't have the source code.
One use case was very simple:
2) select an application level menu
3) displaying a tree menu that represent a hierarchy like school /
class / student
4) selecting one school, one class, all the students
5) right clicking to display a context menu a select an action that
display a dialog wizard to select an existing group for the school
(different but similar organization as a class) to attribute all the
selected students in the group
6) store the link between students and the selected group (the only
data that are persisted in the use case)
Analyzing the JEE subsystem call tree shows that developers was using
session beans (great) to manage conversational call between the java
swing application and the business layer. But, we detect also that
they used entity beans and associated finder to get all the data,
including the data that was displayed to navigate an select
occurrences, I mean LOVs or Menus (Jtree mostly in our context).
That has for consequence that running the use case execute a lot of
jdbc subsequent sql call's (due to some relationships in the model
layer and mostly for data that are not used, not displayed nor
updated) and seem to consume a lot of memory to manager the
persistance for all these data and consume a lot of bandwith to move
all these data through the network too.
When searching for best practices and when returning in code samples
too, I didn't find any recommendations about this. Worst most of the
examples I have seen are using entity bean or updateable view objects
direct from tables. The only documentation I found was in top link
developer guide (partial query) that seem to address this problem as
is has to I think.
Theses examples works fine with ten or hundred user's ... we plan to
have some thousands ... and we need optimizing our use cases.
May be I searched at the wrong places and that's the reason I didn't
find the Grail ! When somebody found it I would be very interesting to
know where !
Any advice is welcome.
Really, nobody interested to discuss how to differentiate the model
for data access for navigation (to display) from data access for
manipulation (to persist) ? in the different model layer ADF offer
(adf, ejb, top link, etc).
Nobody interested in Holy Grail ?
|Re: Inside ADF Model best architecture design & patterns||Nathalie Roman||3/28/09 7:34 AM|
We've had the same problems using EJB. We've used lazy loading for
LOV's, dropdowns, etc.
We've defined separate services depending on the needs, so for
presentation purposes you can define lazy loading on your service
layer. In this manner you will invoke different sets of services
depending on the business needs in your application.
Defining another abstraction layer within your application will then
augment the performance aspect because you will only perform cascading
updates, deletes, creates when needed.
On Mar 26, 3:01 pm, "michel.wi...@gmail.com" <michel.wi...@gmail.com>
|Re: Inside ADF Model best architecture design & patterns||michel...@gmail.com||4/1/09 12:38 PM|
Thank you Nathalie
Your comments are very interesting and very useful.
Is that possible to obtain a description of your architecture ?
Did you build your architecture by yourselves or by referring to some
good practices described somewhere ?
|Re: Inside ADF Model best architecture design & patterns||Nathalie Roman||4/8/09 4:17 AM|
We've designed this architecture using best practices, experience and
of course the concepts of the ADF binding framework.
The main decision here is that you have the basic 3 layers, as usual
And between the model and view layer we have the business services
layer which contains data-persistence services and look-up services,
such as needed for drop-down lists, lov's, ...
After we've defined the business services layer (using toplink and
ejb) we've used the data control layer of adf to expose these services
to our view layer.
These are the basic concepts used within ADF concerning the layering
and the concepts regarding lazy loading, cascading CRUD-operations
etc. which can be used in toplink and EJB.
On Apr 1, 9:38 pm, "michel.wi...@gmail.com" <michel.wi...@gmail.com>
> > > Thank you- Hide quoted text -
> - Show quoted text -