Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » What is happening here
What is happening here [message #1059015] Thu, 16 May 2013 08:35 Go to next message
mohamed ibrahim mohamed is currently offline mohamed ibrahim mohamedFriend
Messages: 6
Registered: April 2013
Junior Member
Dear Friends ,

I beg your pardon , if anybody knows what is the problem with my design.
the problem is for just a simple select statement to select 8 referral requests , it takes too much time to view them , i have turned the logging feature of eclipselink on to see what is really going on , i saw a huge logging lines appear for just simple retrieve of the referral requests .

i have attached my entities , screenshot of the page that views the retrieved requests and the logging output from eclipselink during running the system on my local host, i am using glassfish 3.1.1 , Spring 3.0 , primefaces and eclipselink as a persistence provider.

  • Attachment: logging.zip
    (Size: 218.55KB, Downloaded 193 times)
  • Attachment: screenshot.png
    (Size: 256.80KB, Downloaded 164 times)
Re: What is happening here [message #1059061 is a reply to message #1059015] Thu, 16 May 2013 13:29 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
The log is too big and you have too many classes to understand what to look for. Can you show what you are doing that causes you issues, and the exact SQL that it generates?
Re: What is happening here [message #1059430 is a reply to message #1059061] Sat, 18 May 2013 10:13 Go to previous messageGo to next message
mohamed ibrahim mohamed is currently offline mohamed ibrahim mohamedFriend
Messages: 6
Registered: April 2013
Junior Member
The problem is as follows , i have an object graph beginning with ReferralRequestEO that has a patient object , List of ReferralSpecialtyEO , Each ReferralSpecialtyEO has a workflowTransition "Active Transition" and history transitions "History of other workflowTransitions" , Now the problem is as follows .

When you select for example 10 requests , the DataTable not only views ReferralRequest details but also some information about the patient itself that is associated with the request. when the DataTable is about to render , for each referralRequest , there is a separate Query that is issued to get the patient just to view his/her information on the data table .

I did not have pagination on the dataTable , I was selecting the entire requests that are already existing in the DB that have specific Criteria , so if you have 400 Requests , you have 400 * 2 = 800 Individual queries to retrieve the results .

Now the glassfish has specific limited HTTP Grizzely Threads associated with it , When you have multiple simultaneous users accessing the system , you end up eating all grizzely threads on the glassfish and become unresponsive .

I think this is N+1 Problem that i am facing.

If you can help me by looking at my Entities Design and see if there is any single recommendation for me to do , i will appreciate that from you .

Thank you in advance.

Yours;
Mohamed Ibrahim
Re: What is happening here [message #1060030 is a reply to message #1059430] Wed, 22 May 2013 15:02 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

See,

http://java-persistence-performance.blogspot.com/2010/08/batch-fetching-optimizing-object-graph.html


James : Wiki : Book : Blog : Twitter
Previous Topic:Retry on closed Connection
Next Topic:TabelDefinition for JPAEntity.class
Goto Forum:
  


Current Time: Fri Mar 29 23:57:33 GMT 2024

Powered by FUDForum. Page generated in 0.02345 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top