users@glassfish.java.net

Re: FetchType.EAGER behaviour

From: <glassfish_at_javadesktop.org>
Date: Mon, 16 Jul 2007 00:05:36 PDT

So how is all this achieved with Toplink Essentials?

We have a tree that is supposed to be modified in a web application. Getting the nodes as the tree is traversed by the user is out of the question, it is to slow according to the users. They want to have the whole tree, traverse it a la javascript, make changes to the tree and then save (post back).

The actual tree we have has five levels and there are ~10-20 nodes per level. However, the first level defines which tree, so the displayed tree has 4 levels. The different levels in the tree are totally different so they cannot be of same entity (except for some usual tree properties like parent, children etc).

Given the maths above, even with fetch join it would take users > 3-4 seconds, which is how long one usually wants to wait for a page. (actually it takes > 3-4 minutes...). A join by id between the levels takes Oracle less than a second to perform and send to the web server. Parsing that super table into objects also takes less than a second. (Tested with hibernate).

$100 question is: How is this solved with Toplink Essentials in less than 3-4 minutes? I'd be glad to hear of any approach less than ~100% slower than hibernate, (i.e. 4 seconds) but no matter how we fetch join level by level / force objects in the cache etc. it takes minutes.

If Toplink Essentials could fetch join multiple times, this issue would not even be an issue...
[Message sent by forum member 'danielcroth' (danielcroth)]

http://forums.java.net/jive/thread.jspa?messageID=226717