<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-29135008</id><updated>2011-08-22T15:37:38.291+02:00</updated><title type='text'>Seaview, a Developers Perspective</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>45</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-29135008.post-1799984124193793267</id><published>2009-08-04T22:58:00.001+02:00</published><updated>2009-08-04T22:58:21.292+02:00</updated><title type='text'>Rigid definition of done considered harmful</title><content type='html'>Most people that has been doing iterative development in general and scrum in particular are probably familiar with the concept of discussing a definition of done. I have more than once been on projects where the concept of done has been defined in one form or another, and where project members have been trying to deliver running parts of a system that is compliant with such a definition. Even more I have witnessed scrum-masters proudly announcing that their definition of done is really done, done, done. The concept of done, done, done will of course be different from appliance to appliance, but it usually ends containing some of these:&lt;br&gt;&lt;ul&gt;&lt;li&gt;Code checked into SCM&lt;/li&gt;&lt;li&gt;Code passed QA&lt;/li&gt;&lt;li&gt;Tests running green in the Continuous build system&lt;/li&gt;&lt;li&gt;Running part of the code in a test system ready to be accessed by functional experts and product-owners&lt;/li&gt;&lt;li&gt;Possible discussed and assessed by product-owner before staged to the demonstration environment&lt;/li&gt;&lt;li&gt;Possibly accompanied by customer driven tests like &lt;a title="fitnesse" href="http://fitnesse.org/" id="o_q1"&gt;fitnesse&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Ready to be put into production&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;My claim goes as follows; forcing your team members to adhere to a definition of done that is to rigid, and using that same definition as a criteria before moving it to the done category on the scrum board (complete in the current iteration), will cause your team to deliver less functionality than they could, and with properties that will make that functionality more difficult to change or even remove. I will try pinpoint why following such a rigid definition along with some indicators on going in the wrong direction.&lt;br&gt;Just to clarify one thing; for me, writing code with accompanying tests that are checked in and runs green in the CI system is all about the same thing. Make no mistake, I do it and I encourage my team-members, and everybody else for that matter, to do the same.&lt;br&gt;&lt;h3&gt;Team-members are reluctant to pushing functionality out&lt;/h3&gt;All those parts that need to be completed to get the "done, done, done" badge might not be necessary or even productive work to deliver the functionality ready for test. Maybe the criteria that says that all functional tests should be supported by a FIT test or some test specified in some BDD-flavor just isn't the way to go if the functionality doesn't lend itself to such a definition easily. Maybe only programmers are going write tests and specifications for that part of the system, in which case JUnit will probably be the best choice for a Java-based system. Not easily being able to comply with the done-criteria will probably cause some developers to go that extra mile to comply even if it is probably not worth the effort for that particular piece of functionality.&lt;br&gt;&lt;br&gt;Consistency is will of course matter here. Using the same techniques for every bit and piece of the system will make it more consistent. But the strive for consistency will also manifest in supporting test-code or a greater number of test artifacts. These bi-products will have to be maintained and refactored together with everything else, and may actually make it more difficult to change the system later on. It takes experience to know when to put emphasis on consistency over throughput.&lt;br&gt;&lt;h3&gt;Somebody is questioning why we need to work further on something that we have moved off the board&lt;/h3&gt;Does this question sound familiar: "I thought you said that this task was done, done, done. We really doesn't have time to take this task back in again". I have heard it quite a few times and although it tends to be accepted, it still surprises me that this is not perceived as the rule, not the exception. If you get all the functionality right most of the time, my claim is that your lead-time to production is probably much longer than it should have been. If you develop build and deploy fast, like in hourly or daily increments, the likelihood of getting it right the first time is probably lower, but the basis for distilling the functional requirement is the running system itself, not some temporary artifact used just for aiding the specification process. Do as much of the specification work as possible in the production code.&amp;nbsp; &lt;br&gt;&lt;br&gt;The irony of all this is that it is the people evangelizing on how to eliminate waste that are most prone to push forward a framework to assist in the specification-process where that framework is not part of the code running in the production system. The observant reader may have understood that I am being intentionally vague here, and I have chosen not to prove my point with an example.&lt;br&gt;&lt;h3&gt;It tends to propagate into rigid definitions of other areas of development&lt;br&gt;&lt;/h3&gt;The work to be put down to comply to a rigid definition of done to sign off on a user story or a task has the tendency to propagate into all areas in development. I think this is partially caused by the fact that you tend to move the some finalization-criteria out of the common-sense and ad-hoc part of decision making and into an (often) static set of rules. We need some statement on what the rules are, if not for anything else, at least to get some transparency related to the development process so that it may be explained to architects, management and other stakeholders and decision makers.&lt;br&gt;I believe that the urge to push rigid definitions of compliance rules forward is partially caused by the strive for consistency. The expectation is as follows; if you have rules that govern the development process, in the case the definition of done to move something off the scrum-board, then you will end up having delivering functionality in a consistent and predictable manner. That may be, but what if the functionality delivered is delivered slower than it could be and, and much more hardened in the source-code in terms of difficult to refactor tests and Fit tables.&lt;br&gt;&lt;br&gt;The same goes for code-qa (pair programming is not always how code comes to light). Way too often this boils down to developers commenting on each-other code that may have been developed another way. Some times it identifies and prevents serious design-flaws, which is great. Developers produce at different levels of quality, use this input in the QA-process as well, it is nothing wrong with checking A's code with a great level of scrutiny while you may browse through B's commit-log in a split second. That's life, learn and educate instead, don't force the same compliance requirements on everyone.&lt;br&gt;&lt;h3&gt;What to do and where to go?&lt;/h3&gt;"There is no sense being exact about something if you don´t even know what you´re talking about." (John von Neumann).&lt;br&gt;&lt;br&gt;It is very important that you observe and take notes of undesired effects of certain rules that your team is using to guide their day-to-day operation. This goes for code and architecture-centric rules as well as for rules that are meant to support the day to day process of harvesting requirements. When undesired effects show up, maybe it is time to remove or adjust the rule accordingly. Maybe this particular web-module wont need the Selenium-harness?, or maybe it does.&lt;br&gt;&lt;br&gt;All in all it is about delivering functionality in the running system, supported by tests so that you may change code when new knowledge and requirement tells you to. A rumor says that Thomas Edison did not hire employees if the person on the interview salted his/her soup without tasting it. Use your ruleset the same way, don't always strive for consistency when applying your rules, it may lead to code manifesting in a way that makes it harder to implement your functionality fast and with less effort. &lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-1799984124193793267?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/1799984124193793267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=1799984124193793267' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/1799984124193793267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/1799984124193793267'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2009/08/rigid-definition-of-done-considered.html' title='Rigid definition of done considered harmful'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-2478561741739388201</id><published>2009-07-31T23:00:00.001+02:00</published><updated>2009-07-31T23:00:11.617+02:00</updated><title type='text'>Laptop retrospective</title><content type='html'>Inspired by ma latest post on &lt;a title="different cell-phones I have had" href="http://devperspective.blogspot.com/2009/07/cellphone-retrospective.html" id="pthh"&gt;different cell-phones I have had&lt;/a&gt;, I thought I would give it a second go, but now replace cellphones with laptops . I have been using laptops on a regular basis since the 80's because my father had a genuine interests for computers in combination with spreadsheets. I have decided to include these as well since it reflects my overall exposure to these kind of devices, even though they not reflect laptops I have owned, but merely laptops that I have used.&lt;br&gt;&lt;br&gt;&lt;h3&gt;IBM Portable 5155&lt;/h3&gt;&lt;div id="iewm" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dcs9tn98_78g9qbx2hk_b" width="424" height="186"&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;To call the first laptop a laptop would be to classify the infamous but very effective German &lt;a title="Tiger tank" href="http://en.wikipedia.org/wiki/Tiger_II" id="fxiz"&gt;Tiger tank&lt;/a&gt; of the WW2 light artillery. &lt;a title="IBM Portable 5155" href="http://oldcomputers.net/ibm5155.html" id="bz8t"&gt;The IBM Portable 5155&lt;/a&gt; was an awesome computer at the time and the model my father had was equipped with 256Kb of memory. I was at the time barely able to lift the computer; in its heavy-duty plastic case it weighed in at almost 15Kgs!! I had access to this computer from 1985-1987, it was my first experience with a computer apart from using the Commodore 64 at some friends, because I newer actually had one myself.&lt;br&gt;&lt;h3&gt;Power Book 150&lt;/h3&gt;&lt;div id="cnr5" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dcs9tn98_79d76vk6gc_b" width="519" height="497"&gt;&lt;/div&gt;&lt;br&gt;The next time I got to use a portable computer on a regular basis after those that my father brought home from work in the late 80's wasn't before 1997 when I had a part time job for SINTEF. The (at the time outdated) laptop was given to me so that I could do some work while doing my military service as a conscript in the Royal Norwegian Airforce. I used the computer to write user manuals and documentation for a system I was working on at the time. I has no connectivity and was offline while doing the work. This was my first experience using a Mac, but I found it quite easy to master.&lt;br&gt;&lt;br&gt;IBM Thinkpad 380&lt;br&gt;&lt;div id="uze3" style="text-align: left;"&gt;&lt;img style="width: 266px; height: 275px;" src="http://docs.google.com/File?id=dcs9tn98_81d2s4s6fg_b"&gt;&lt;/div&gt;&lt;br&gt;I got this laptop while I was stationed as a conscript at Kjeller airfield just outside Oslo. I was lucky enough to part of a project programme that was part of a cooperation between Det Norske Veritas, Aerospatiale Missile and Royal Norwegian Airforce. I used it to program a reporting application in Visual Basic for Applications and MS Access. This was the first really nice laptop that I got to work with and the quality and robustness of the Thinkpad series has appealed to me ever since, even though I never got to own one myself. I also used it for a fair amount of gaming, especially Command and Conquer (one of the earlier versions I believe), excellent game BTW. I think that the keyboard on the Thinkpad models have been in a league of their own. &lt;br&gt;&lt;br&gt;&lt;h3&gt;Compaq (unknown)&lt;/h3&gt;This was the first laptop that was handed to me for my personal use after I started my first full-time job as a consultant in Sybase, Copenhagen Denmark. The laptop was not new at the time that I got it, but had been used by a consultant that had stopped working there. It had an SVGA screen and a 150MHz CPU. Before started working there I had really been looking forward to the unpacking of my work-laptop, and all I got was this second hand Compaq. To all you guys hiring staff working as consultants. Please give them new equipment when they start working there. This way you will retain loyal staff for a much longer time. I guess however that unpacking a brand new laptop is not much of a big deal now as it was in the 90's. &lt;br&gt;&lt;br&gt;I haven't been able to retrieve an image of this laptop, and I dond't have have a picture of myself using it so, sorry...&lt;br&gt;&lt;br&gt;&lt;h3&gt;Compaq Armada 7400&lt;/h3&gt;&lt;div id="wd4v" style="text-align: left;"&gt;&lt;img style="width: 400px; height: 445px;" src="http://docs.google.com/File?id=dcs9tn98_83gkk97whp_b"&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;Fortunately I got my hand on a much better laptop after complaining about my first laptop for almost a year. This time it was equipped with a 300Mhz cpu and a neater casing. I cannot completely recall but I think it was equipped with 128MB RAM. Decent laptop as far as I remeber, but nothing to be remember as special after I turned it in when I left the company that I was working for at the time, that must have been in 1999.&lt;br&gt;&lt;h3&gt;Dell Latitude (unknown model)&lt;/h3&gt;I got my first Dell as my home-office computer while working for Nokia. I did not really need one because I worked so many late hours there that I could not possibly have squeezed in some more office time after I got home from work. It was nothing special with this laptop. I actually didn't use it much as a laptop, it kind of had its home in the docking station at work. It was however good enough to persuade me to get a Dell as my next laptop. I don't remember the exact spec, but I seem to recall that my stationary computer at the time was a 600Mhz, 512Mb something, so I it was along those lines. I really cannot remember how it looked, it was stuck in the docking most of the time. For the same reason I was not able to find a picture.&lt;br&gt;&lt;h3&gt;Dell Inspiron 8100&lt;/h3&gt;&lt;div id="hk7g" style="text-align: left;"&gt;&lt;img style="width: 380px; height: 327px;" src="http://docs.google.com/File?id=dcs9tn98_82ck9nwkhm_b"&gt;&lt;/div&gt;&lt;br&gt;Equipped with a 1,1GhZ processor, 30GB harddisk, 512MB memory, DVD, WIFI and a 15" 1600X1200 screen this laptop is the most expensive piece of equipment that I have ever bought. Bought in 2001, it was a true kick-ass laptop at the time, and I still have it although I don't use it. Staying at the top of the throne is costly, and you don't stay there for very long. I actually kept this laptop for a record-long period of 3,5 years, so it paid itself in the end. The lesson learned was however to use another long-time strategy; buy cheaper equipment and upgrade more often. This was the first laptop I bought after founding Zenior, also the place where I still work. I could choose whatever laptop I wanted, I guess that is one of the reasons it ended up to be a bit too expensive.&lt;br&gt;&lt;br&gt;&lt;h3&gt;Dell Inspiron 8600&lt;/h3&gt;&lt;div id="oq6t" style="text-align: left;"&gt;&lt;img style="width: 314px; height: 314px;" src="http://docs.google.com/File?id=dcs9tn98_85crkrvrd9_b"&gt;&lt;/div&gt;I had been quite happy with my previous Dells so I wouldn't change a winning team. I actually believe that Dell being the only vendor having a decent site allowing for massive customization of the equipment was one of their reasons behind their success. The laptop had a Intel mobile 1,6GHz CPU, 1GB RAM and a 60GB Hdd running at 5400. The display 1600x1200 screen which was good. Apart from the CPU and double up of memory, 2Gb, , it's specifications wasn't that much different from the previous Dell, but the price was about one third. This was to be my last PC, possibly ever.&lt;br&gt;&lt;br&gt;&lt;h3&gt;MacBook Pro&lt;/h3&gt;&lt;br&gt;&lt;div id="tl5f" style="text-align: left;"&gt;&lt;img src="http://docs.google.com/File?id=dcs9tn98_86drcfp2cn_b" width="285" height="178"&gt;&lt;/div&gt;After using PC-based laptops (apart from the brief encounter with a PowerBook in 1997) for more than a decade, I finally decided to give in and get myself a MacBook Pro. I must say, apart for some annoying issues when running Mac-OSX I am very happy with the Mac. My Macbook has a 2,33 GHz CPU, 2Gb RAM and a 15" monitor. I have never regretted to not getting the 17" screen, it is simply too big. I believe that even my graphics-card is the same as in the 17" model so why bother. I got this laptop in 2007, and given my adopted two-year replacement strategy, I am now opting for a new MacBook Pro. I am planning on using that computer as a desktop replacement for my workstation as well. The MacBook is one of the more pleasing products I have ever bought, regardless of category. I am not an Apple-addict, I just find joy working with pleasant technology in an appealing wrapping; the MacBokk fits these attributes nicely.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-2478561741739388201?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/2478561741739388201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=2478561741739388201' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/2478561741739388201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/2478561741739388201'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2009/07/laptop-retrospective.html' title='Laptop retrospective'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-8283962251494782535</id><published>2009-07-27T00:26:00.001+02:00</published><updated>2009-07-27T16:47:10.364+02:00</updated><title type='text'>Cellphone retrospective</title><content type='html'>A couple of days ago when I used my iPhone to post a Twitter kind-of status, I was contemplating on how many different cellphones I've had, some excellent, good, some mediocre and some just very bad. I must say after buying an iPhone and being on a couple of trips this summer, for the first time i didn't regret bringing my laptop. The maps application in combination with Safari on the iPhone did the job just fine. Cellphones has come a long way since I bought my first Ericsson phone back in 1995. Some of the phones have been lost on the way, others has been borrowed (and probably never returned) and given away. The first phone I bought I actually managed to sell for 50Dkr in 1999. I have attempted to rate the phones according to a relative rating-scheme; what did I think of the phone when I had it back in whenever. I actually still have quite a few of these phones in my possession still, but they are scattered in different boxes in the attic or maybe in different storage bins in my home office,....sigh. &lt;br&gt;&lt;br&gt;&lt;h4&gt;Ericsson GA 318&lt;/h4&gt;&lt;br&gt;&lt;div id="p.67" style="text-align: left;"&gt;&lt;img style="width: 139px; height: 184px;" src="http://docs.google.com/File?id=dcs9tn98_66cjrj7ggz_b"&gt;&lt;/div&gt;&lt;br&gt;This is the cellphone I bought back in 1995 when i still went to university. The phone was nice, and leaner than most other models that was on the market at the time. The display a very simple black and white (no color lcds at the time i'm afraid) LCD that barely had enough real-estate for an international phone number. Netcom did not charge for SMS at the time, and they also provided a gateway that enabled you to send sms-messages directly to the cellphone using mail on the form: MSISDN@gw.netcom.no. I actually forwarded alarms from a production system to the phone using this gateway.&lt;br&gt;&lt;br&gt;Verdict: 4.&lt;br&gt;&lt;h4&gt;Nokia 6150&lt;/h4&gt;&lt;div id="e.nw" style="text-align: left;"&gt;&lt;img style="width: 139px; height: 184px;" src="http://docs.google.com/File?id=dcs9tn98_67c8b5ghmj_b"&gt;&lt;/div&gt;I bought this phone when I worked as a consultant in Denmark back in 1998. My needs were really simple. I basically used this phone as a replacement for the fixed line that I terminated back then, and being a consultant, I had to be available. This is one of the most durable phones I have ever had, and I actually got this as a work-phone when I started working for Nokia Networks back in 1999. Later I have used that particular instance as a replacement phone for other phones that have ceased to work. However this was the first time I encountered the "it just shut itself of" syndrome that seems to have been haunting Nokia phones ever since.&lt;br&gt;&lt;br&gt;Verdict: 4&lt;br&gt;&lt;h4&gt;&lt;br /&gt;Nokia 7110&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="wur5" style="text-align: left;"&gt;&lt;img style="width: 139px; height: 184px;" src="http://docs.google.com/File?id=dcs9tn98_695crjsvgn_b"&gt;&lt;/div&gt;&lt;br /&gt;This was a truly amazing phone at the time. It was, I believe, the&lt;br /&gt;first Nokia model to support WAP and T9. It also had this neat little&lt;br /&gt;keyboard-cover that you could release by pressing a small button on the&lt;br /&gt;side of the phone. It made this "wsssh-click" that was very easy&lt;br /&gt;to recognize. This phone was actually engineered and developed at the&lt;br /&gt;research-facility in Copenhagen where I worked at the time. The early&lt;br /&gt;prototypes had some flaws and one of them that I remember particularly&lt;br /&gt;well was the problem with the ejecting spring for the cover being too&lt;br /&gt;strong so that the cover would actually separate from the phone and be&lt;br /&gt;ejected several meters. I more than once had to pick such a cover out&lt;br /&gt;from my lunch (not my cover) being ejected from one of my coworkers&lt;br /&gt;trying to enjoy their lunch while receiving a call, and sitting at my right side.&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;Verdict:5&lt;br&gt;&lt;br&gt;&lt;h4&gt;Nokia 3310&lt;/h4&gt; &lt;div id="p259" style="text-align: left;"&gt;&lt;img style="width: 139px; height: 184px;" src="http://docs.google.com/File?id=dcs9tn98_68cwrvfhcg_b"&gt;&lt;/div&gt;I got this phone as a prototype back in 1999, 4 months before it went into full production. At the &lt;a title="Nokia facilities at Fredrikskaj" href="http://plazes.com/plazes/126026_nokia_office_fre" id="uj:0"&gt;Nokia facilities at Fredrikskaj&lt;/a&gt; they handed out this model to all employees. It was nothing special with this model, and it was ugly. It had, however, a sms-chat function that was pretty neat that I haven't seen on any phone models since this one. This phone was one of the first ones with widely available snap-on covers, i had only one cover, grey.....&lt;br&gt;&lt;br&gt;Verdict:3&lt;br&gt;&lt;h4&gt;Nokia 6210&lt;/h4&gt;&lt;div id="zinp" style="text-align: left;"&gt;&lt;img style="width: 75px; height: 100px;" src="http://docs.google.com/File?id=dcs9tn98_70cspm84dj_b"&gt;&lt;/div&gt;&lt;br&gt;I got this phone as a replacement after my 7110 was lost on a business-trip to Finland. The phone had many of the same features as in the 7110 but had a much better mechanical design and no antennas pointing out. The screen was nice and it had a small lean design so that it would easily fit in to any pocket. It also turned out to be one of the more robust models I have had.&lt;br&gt;&lt;br&gt;Verdict:4&lt;br&gt;&lt;h4&gt;Nokia 9110i&lt;/h4&gt;&lt;div id="o7yy" style="text-align: left;"&gt;&lt;img style="width: 139px; height: 184px;" src="http://docs.google.com/File?id=dcs9tn98_71f9r9fdd2_b"&gt;&lt;/div&gt;Wow, I felt like a kid the first time a got my hands on one of these. I first got it in 2000 and given the functionality it had at the time still amazes me. It is one of the reasons I loved (and still do) Nokia as a company, being truly innovative. When the first Communicator was launched, virtually nobody knew, before the lightning came out of the sky. This was one of the predecessors, only with even more features. I had work-mail using a VPN connection, and I more than once used the built-in telnet terminal to log into test and development-servers to launch new builds, check build-status and so on. The excellent QWERTY&amp;nbsp; keyboard was one of the reasons I really had a hard time to switch back to more regular type phone models.&lt;br&gt;The only problem with this phone was its limited durability. I had to send it away on repair twice before it finally gave in in&amp;nbsp; 2002. The backbone was an AMD 486, I had a Cyrix 486 as a refrigerator magnet several years erlier :-)&lt;br&gt;&lt;br&gt;Despite it's mechanical weaknesses I have to give this phone a verdict:6&lt;br&gt;&lt;br&gt;In the period after the decease of the legendary 9110i but before the 2003 i used my old 6150 and 6210 before finally giving in ans buying my first Sony Ericsson phone with MMS.&lt;br&gt;&lt;h4&gt;Sony Ericsson T610&lt;/h4&gt;&lt;div id="xek1" style="text-align: left;"&gt;&lt;img style="width: 75px; height: 100px;" src="http://docs.google.com/File?id=dcs9tn98_72cfx3q4dh_b"&gt;&lt;/div&gt;&lt;br&gt;I just wanted one of these phones to try something else than Nokia. It also was to my knowledge one of the first Sony Ericsson mobiles to come around apart from the legendary T68i and of course the P800. The phone was my first MMS-phone. A lot of service providers campaigned this as part of their MMS launch. The phone was OK, nothing more.&amp;nbsp; Its dimensions in combination with a lousy keyboard made it very difficult to write sms-messages using only&amp;nbsp; one hand, the bottom part of the keyboard was simply to close to the edge.&lt;br&gt;&lt;br&gt;In fall of 2004, a scratching disturbing background noise made it difficult for the people I was talking to too hear what I was saying. That made an end to a not very exiting relationship.&lt;br&gt;&lt;br&gt;Verdict:3,5&lt;br&gt;&lt;h4&gt;Nokia 9210i&lt;/h4&gt;&lt;div id="hxqy" style="text-align: left;"&gt;&lt;img style="width: 75px; height: 100px;" src="http://docs.google.com/File?id=dcs9tn98_73gm4gj4cw_b"&gt;&lt;/div&gt;My brief encounter with what we referred to as "those other guys" when I worked for Nokia up to February&amp;nbsp; 2001, the Ericsson part of Sony Ericsson, made me want to go back to Nokia. During the last couple of years I hadn't been able to get the Communicator out of my head. I will admit to possibly being a bit nostalgic, but it was no other way, I had to get back to the life I had with the Communicator. So I went down up to Telekiosken at Storo and got myself a 9210i. The form factor of this phone was better than the previous Communicator models, and the foldable antenna was all gone which was about time. The mechanical flaws from the previous models had vanished and it now had a color TFT which today I still remember as one of the best cellphone-displays ever. Even in broad daylight the screen was completely unaffected, as pristine as a piece of paper. Some of the magic feeling I had from the first model was gone, that together with a battery with limited quality made the re-encounter shorter than I hoped for. After the phone shutting down when I was about to agree on a rendezvous point with my off-piste friends in Hemsedal, for doing some serious downhill just before I was able to communicate my location, aided me lin shutting it down. I decided to get a more robust and less amp-hungry friend.&lt;br&gt;&lt;br&gt;Verdict:4,5&lt;br&gt;&lt;h4&gt;Sony Ericsson W950i&lt;/h4&gt;&lt;div id="pi65" style="text-align: left;"&gt;&lt;img style="width: 139px; height: 184px;" src="http://docs.google.com/File?id=dcs9tn98_74dbrgvdc2_b"&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;A good friend of mine (and co-worker) that was much more knowledgeable about cellphones than I was, became all worked up about this new model. It had a decent size, heaps of functionality and a touch screen that was usable together with the pen that accompanied the phone. No fuzz, I got one immediately. This became my first mp3 player as well I am embarrassed to say. The phone was decent and even had a radio which I have missed on most of the other models I have had (and still miss). But it did not take long before I re-discovered the flaw that I had seen on other Sony Ericsson phones as well, a keypad that relly sucks. The keyboard is one of those plastic ones where a thick film of plastic covers a keypad with mechanical devices sensing keypresses underneath. The problem with this model was that they had messed up the placement of those sensors completely so that you actually had to press slightly above the marked digit to get the desired result. I wonder what kind of substance the engineers designing such a piece of ***** had been consuming before they hardened the design....&lt;br&gt;&lt;br&gt;Verdict:3&lt;br&gt;&lt;h4&gt;Nokia 6500 Classic&lt;/h4&gt;&lt;div id="h3tt" style="text-align: left;"&gt;&lt;img style="width: 75px; height: 100px;" src="http://docs.google.com/File?id=dcs9tn98_75hbk3zdf8_b"&gt;&lt;/div&gt;&lt;br&gt;After been doing my fair share of smartphone-hype, carrying around power hungry and feature-bulky phone for almost a decade, I wanted to go for a small, feature stripped phone with an appealing and urban design (!!?).&amp;nbsp; I went for this simple and not very expensive model from Nokia. It had Java as well so together with the small but very nice screen it made a good company for the J2ME version of GMail. All in all I was quite happy with this phone that I got in the summer of 2007.&lt;br&gt;&lt;br&gt;Verdict:5&lt;br&gt;&lt;h4&gt;iPhone 3G&lt;/h4&gt;&lt;div id="dp_g" style="text-align: left;"&gt;&lt;img style="width: 139px; height: 184px;" src="http://docs.google.com/File?id=dcs9tn98_76sc88fqfr_b"&gt;&lt;/div&gt;&lt;br&gt;I finally gave in in in 28'th of march 2009, my wife convinced me to finally get myself an iPhone. I gave in because I was very pleased with my acquisition of an iPod touch a couple of weeks earlier. After the 3.0 upgrade which arrived fashionably late in my opinion i think this is probably the best device with a cellphone I have ever had. Even though it does not matter it kind of pisses me of that it does not run Java.&lt;br&gt;&lt;br&gt;Verdict:6&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-8283962251494782535?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/8283962251494782535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=8283962251494782535' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/8283962251494782535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/8283962251494782535'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2009/07/cellphone-retrospective.html' title='Cellphone retrospective'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-2113778166583314822</id><published>2009-07-24T22:34:00.001+02:00</published><updated>2009-07-24T22:47:43.793+02:00</updated><title type='text'>5 things I wish for in the near and not so near future</title><content type='html'>In no particular order or priority.&lt;br&gt;&lt;br&gt;I am currently on vacation, spending time with family and friends, and approaching things a little bit differently. By doing something else than going to work and not going about the normal routine (which I really enjoy, don´t get me wrong), you get new ideas on how to approach things, which is great. The small deviation in how to approach a problem can get you into new areas of unexplored ground. Here another day, inspired by &lt;a title="Thinkertoys" href="http://www.creativethinkingwith.com/Thinkertoys.html" id="n9-u"&gt;Thinkertoys&lt;/a&gt;, I took another way to work. I drove passed a building I had never seen before with a name on it. I started thinking and it gave me an idea of a company name dealing with a business idea I have been puzzling with for a while. Small change may yield inspiring side-effects.&lt;br&gt;&lt;br&gt;Speaking of business idea, I thought I would like to share the tings that I would like to have, of which some exists, but most don't. Some of the products or solutions are things I want and will probably get in the near future, some are products where the technology is and may never become available. Some of the things may address a small and not very important part of everday life, others may affect the way we live. Some of these things that I suggest may already exist, then excuse me for my incompetence and inadequate investigation of prior art. To avoid stepping on to many toes, I have chosen not to go into areas that may offend groups of people committing to a specific religion or political direction, maybe with the exception of public transportation :-) &lt;br&gt;&lt;br&gt;&lt;h3&gt;Wireless everything&lt;/h3&gt;Everytime I want to install a new piece of equipment in my house, the thing that caused me the most headache is wiring. Coax for television, cat 5e for networking (no, Gigabit WiFi is not available outside laboratories, at least not to my knowledge), wiring for speakers, and of course, the infamous houshold power. And for crying out loud, when are we going to standardize on power transformers for DC devices, and I am not just talking of cellphones here (where they, believe it or not have agreed on a common standard). I think i have at least 50 different transformers in the house, where at least 15 of them are in use regularly, most of them ranging between 5 and 12 volts and 0.1 to 1.2 amps. None of them has a common physical interface. All these transformers make parts of my office space into a mess. By not being constrained by cabling, you can probably mount heating devices, lighting, stereo systems and everything else so that it will be more energy efficient, but also more pleasing from an aesthetic point of view. Giving what I save on my electrical bill I may no spend on buying more television sets, because I may now mount them on the wall without anything else, right? But then, what about the set-top box...well I don't think that there is enough storage space available in the world to actually store a persistent version of that topic, so that will have to wait for later.&lt;br&gt;&amp;nbsp;&lt;br&gt;&lt;h3&gt;Choose my own hardware when working at client site&lt;/h3&gt;Why is it that all businesses standardize on a workstation platform that is supposed to accommodate occasional needs for creating office documents and e-mail running on MS-Windows, often bundled with a 19"-inch monitor, insufficient amounts of RAM and a CPU that was at best mediocre two years ago. This is about as far as you can get from the specification of a decent development platform. In addition to that you usually have to go through the regular process of getting administrative rights, and to disable virus-control. You security people don't really get it, do you. Believe it or not, developers may need privileges to actually install applications on their workstation other than those approved and already installed by support. Why not trying to save some money, and let contractors and consultants use their own equipment instead, most possibly a laptop that they probably have already, but maybe also an external display as well. If networking is properly configured this should not be a problem neither from a maintenance nor a security perspective. And in order to avoid any potential envy or conflict, please provide your employees with the best possible equipment.&lt;br&gt;&lt;br&gt;As for software, I am usually allowed to work with whatever tools that I want to as long as I don't expect my clients to provide them. My primary concern is hardware. &lt;br&gt;&lt;h3&gt;An Amazon Kindle or other e-book device&lt;/h3&gt;&lt;br&gt;I am a regular Amazon customer, I buy mostly science and programming books, but recently I have also been buying my fair share of books on parenting, productivity, entrepreneurship and creative thinking. Books take up physical space and is heavy to carry around. More than once have I needed a book that I have bought without having it where and when I need it. I gudd this is partially caused by the ambulant nature of my work. With a decent e-book device I could possibly bring as many titled that I want in a package about the size of a regular book. Most titles would always be in stock and I would never-ever again be concerned again that the delivery service would deliver the package while I was away. I really need one of these things. The only little hitch about this device that made me quite worried may be found in &lt;a title="this" href="http://www.publishersweekly.com/article/CA6671793.html" id="r..f"&gt;this&lt;/a&gt; article. Words are not sufficient to describe the irony and hopelessness of such an act.&lt;br&gt;&lt;h3&gt;Seamless and effortless public transportation&lt;/h3&gt;&lt;br&gt;If you do not live in Oslo or another provincial Nordic town, parts of this section may not apply to you. I have been using my car for work for years to go now. It is very convenient and has made it possible to cut down transportation-time to around 15 minutes each way. In addition to that, getting groceries or other things on the way home is the easiest of things. After getting my first child some time ago, me and my wife now share the car more and more, so I use the subway for work maybe twice a week. With good timing and no delays, I am able to get to work in around 45 minutes each way. This is from what I hear pretty decent, but still almost the triple of what I use today. I just don't have an extra hour a day to waste. I guess that without having to do a transfer, I could be down to around 20 minutes which is comparable to what I use in a car. Taking transfers out of the equation as long as both home and work is nearby a station for public transportation, or making transfers transparent will make this a competitive alternative for a much larger group of potential commuters.&lt;br&gt;&lt;br&gt;The kind of system I had in mind consists of a network of autonomous small cubicles that may accommodate up to four passengers each. The backbone of the infrastructure is s grid of rails that may transfer a large set of these cubicles at high speeds and to their programmed destination. The grid may be powered by small electric motors or, preferably by magnetic leviation. A google search on "fremtidsrettet kollektivtransport" gave me 101 hits. When I get this few number of hits it is usually because I have mis-spelled something or that it doesn't exist. When it takes +7 years to get a &lt;a title="non-working ticketing system for Ruter" href="http://arkiv.na24.no/Tema/Flexus.html" id="wmn_"&gt;non-working ticketing system for Ruter&lt;/a&gt; to go into production, i don't see this alternative being available anytime soon.&lt;br&gt;&lt;br&gt;&lt;h3&gt;Being able to attribute the electrical consumption down to individual devices&lt;/h3&gt;In Norway, we are fortunate enough to cover most of our electrical needs from hydropower. From an emission perspective this is probably the cleanest, currently available source of energy that exists, but it cannot be exploited without significant consequences for the wildlife and environment that surrounds the power plant and any dams possibly built to provide for sufficient flow of water. The electrical consumption in Norwegian households have been increasing significantly and will continue to do so for the years to come. During periods with limited water supply, we are dependent upon supply from Denmark, that are more than willing to crank up their old coal-based power plants in Jutland to provide frozen Norwegians with stand-by power for their brand new LED tv's. Don't get me wrong, I am not a saint, I use my fair share of stand-by power. My point here is that most of our daily activities are assisted by some kind of device powered by electricity, and the electrical bill being a major part of the household budget, it is just fair that we should be able to have some more transparency utilization down to individual devices.&lt;br&gt;&lt;br&gt;The power meter in my house has no means of even exposing the aggregated consumption of the household, it is one of those arcane, antiquated devices with a rotating disk. I guess that the likelihood of getting one of these equipped with some kind of interface that would enable me to offload some data is close to nothing. If I had one of the more recent meters I could do something like &lt;a title="this" href="http://ondskap.net/stroem/" id="jrwt"&gt;this&lt;/a&gt; but I don't and it will not provide me with all the information that I need.&lt;br&gt;&lt;br&gt;If being able to attribute the power consumption down to individual devices, it would be much easier to convince people how to actually be more conscious on how they use their household devices and implicitly giving them the ability to understand how to reduce or improve their use. I think that getting this level of transparency is the key to get people to really understand how to spend the household-budget in a more environment friendly way. So are there any takers for developing this kind of infrastructure? I guess that the only thing it will take is for each device that consumes power to emit a signal containing an identifier of the device for every miliamp consumed. &lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-2113778166583314822?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/2113778166583314822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=2113778166583314822' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/2113778166583314822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/2113778166583314822'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2009/07/5-things-i-wish-for-in-near-and.html' title='5 things I wish for in the near and not so near future'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-6340343189293387793</id><published>2008-09-18T12:11:00.000+02:00</published><updated>2009-02-16T08:36:46.811+01:00</updated><title type='text'></title><content type='html'>        &lt;BR&gt;&lt;H2&gt;Continuously translating requirements into code in production fulfilling user expectations&lt;BR&gt;&lt;/H2&gt;&lt;BR&gt;This is a long phrase, but that is the term that I use when I refer to what I am doing as a developer through consultancy. Being a Senior Consultant, my workday consists of much more than just writing code. Although I like to refer to myself as a programmer, just coding won't do it. It is all about coding the right stuff. Avoid coding to much of the wrong stuff, and get the code into production as fast as possible. This is my mission, that is what i want to be good at.&lt;BR&gt;&lt;BR&gt;Mary Poppendieck is &lt;A id="kexy" href="http://javazone.no/incogito/session/The+Double+Paradox+of+Lean+Software+Development.html" title="talking about waste"&gt;talking about waste&lt;/A&gt;. Waste is pretty much anything that you do in your production line (aka project :-) that does not provide value for customers either directly or indirectly. I just came from a talk where she was talking about how to maximize throughout and how to reduce utilization. It is funny how many metrics not directly related to providing value for customers we have been measured against. It has been a long time since I have have been measured against how many lines of code I produce. Now we are measured using &lt;A id="hv8g" href="http://en.wikipedia.org/wiki/Story_points" title="Story Points"&gt;Story Points&lt;/A&gt;. This is better but in most cases, far from measuring the right thing. &lt;BR&gt;The right thing is value for end-users delivered in production, this is what we should measure, or, we should at least know when we provide it :-)&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-6340343189293387793?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/6340343189293387793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=6340343189293387793' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/6340343189293387793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/6340343189293387793'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2008/09/continuously-translating-requirements.html' title=''/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-8554861475868152590</id><published>2008-09-17T14:25:00.000+02:00</published><updated>2010-02-23T17:11:21.796+01:00</updated><title type='text'></title><content type='html'>                        &lt;BR&gt;&lt;H2&gt;Nordås on domain-driven design&lt;BR&gt;&lt;/H2&gt;&lt;P&gt;I must say, very nice introduction on Andres Nordås' talk on &lt;A id="f3zq" href="http://javazone.no/incogito/session/Better+Domain+Driven+Design.html" title="Doing Domain driven design better"&gt;Doing Domain driven design better&lt;/A&gt; at JavaZone. He has really raised the bar with respect to getting someones attention to start with. Unfortunately It was no space left in Lab III for me and my co-worker. But now we are chilling out in the Overflow area, with really good audio and video so this is really great. Star Wars, get outa heeee....good work Anders.&lt;/P&gt;&lt;P&gt;&lt;BR&gt;Being able to provide infinite flexibility in the borderline between your domain and your infrastructure and to be more specific, repositories. When you want infinite flexibility, you also need to be sure that your coupling is loose so that you may adjust implementation strategies without afecting your domain, e.g what an order looks like or what it means to place an order.  &lt;BR&gt;Being able to refer to a repository in form of a generic repository interface is a very nice thing. It is even better that use you generically typed interface without knowing if it is an in-memory repository, or a Hibernate reposiory. Dealing with persistent lifecycle is in concept trivial, you store/delete and retrieve objects by query or by id. This is how all interaction with repositories should be stated.&lt;BR&gt;&lt;BR&gt;Anders presens several examples that shows how easy it is to achieve loose coupling using generic types a container and pluggable strategies. You should really take a look to see how our code may be improved. Eirik Maus and myself will touch briefly into the same topics in our talk on Dealing with one to too many relations in Hibernate. I beleive that if you are able to correctly model your repositories as Anders does, all the other bits and pieces will fall into place.&lt;BR&gt;&lt;BR&gt;&lt;/P&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-8554861475868152590?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/8554861475868152590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=8554861475868152590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/8554861475868152590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/8554861475868152590'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2008/09/nordas-on-domain-driven-design-i-must.html' title=''/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-3868502770973800688</id><published>2008-09-17T13:03:00.000+02:00</published><updated>2010-02-23T17:11:21.831+01:00</updated><title type='text'></title><content type='html'>&lt;H2&gt;        Talk about dynamic languages using Glassfish.&lt;BR&gt;&lt;/H2&gt;&lt;BR&gt;Just came from a talk of using &lt;A id="xax2" href="http://javazone.no/incogito/session/Dynamic+languages+and+frameworks+in+an+enterprise+application+server+world+-+an+approach+with+GlassFish+v3.html" title="dynamic languages in Glassfish"&gt;dynamic languages in Glassfish&lt;/A&gt;. I would actually have expected some more in-depth information about practical appliances of dynamic languages, but the examples was pretty basic. I am really fond of the idea being able to pick the language of choice when confronted with a problem. If you are encountering a problem that would call for a functional language, pick Scala. If you want to leverage your existing investments in Rails-development, pick Ruby or Jruby. I don't thing that the strength of actually being able to do this cross-language is something that we are going to see much of. However, being able to use a hug range of languages in the same runtime is a very good thing. &lt;BR&gt;&lt;BR&gt;Bringing web into all this is a problem. The package and deploy-step is a mess, and one of the reasons why I am looking into actually moving away from java for web. War-files is a mess, deployment is a mess and app-servers and standards (and deviations of them) is a mess. Why cant we just get some mod_java stuff for Apache and just use apt-get to install it so we can get faster into production. This is where I want to go.&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-3868502770973800688?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/3868502770973800688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=3868502770973800688' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/3868502770973800688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/3868502770973800688'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2008/09/talk-about-dynamic-languages-using.html' title=''/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-7765203631506911349</id><published>2008-09-17T10:28:00.000+02:00</published><updated>2010-02-23T17:11:21.834+01:00</updated><title type='text'></title><content type='html'>&lt;H2&gt;        Javazone 2008.&lt;BR&gt;&lt;/H2&gt;&lt;BR&gt;It is finally time for doing JavaZone 2008 which I have been looking forward to quite some time. This year, I will try to go to as many hardcore presentations as possible. The reasons for that are pretty simple. Usually when I read articles and watch conference videos online, it is usually late in the evening after a long days work. My ability to dig into hardcore stuff is limited. Whereas, when I attend conferences, which I really enjoy, it something I can do fully rested, therefore I want to dive into technical stuff, closely related to what I do the most, programming.&lt;BR&gt;&lt;BR&gt;The program this year looks OK, a good mix of technical and non-technical sessions. I think you will find something to  your taste. What kind of sessions to you prefer yourself?.&lt;BR&gt;&lt;BR&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-7765203631506911349?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/7765203631506911349/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=7765203631506911349' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/7765203631506911349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/7765203631506911349'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2008/09/javazone-2008.html' title=''/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-318550958564733407</id><published>2008-08-29T23:12:00.000+02:00</published><updated>2010-02-23T17:11:21.838+01:00</updated><title type='text'></title><content type='html'>       &lt;h1 id="d:bl"&gt;Testing code or testing requirements?&lt;/h1&gt;I have been in several projects where multiple attempts to classify tests into different categories has been attempted. Unit-tests, Web-tests, Behaviour-tests, Fitnesse-tests, Requirement-tests, Integration-tests, all of them written in Java in some ways or another. As you will see, the typical categories refers to different properties of a test. In some cases related to which layers of the code it touches. A typical unit test typically tests the contract of a given class, but will often test intentionally or unintentionally also test adjacent classes unless the rule is strictly enforced. A typical Web test could possibly be Selenium test that verifies various steps of a wizard with or without the back-end systems or databases to drive the data in place. &lt;br id="iiio"&gt;Some definitions of tests refers to the layer of code it refers to and how many interconnected classes they may include such as a unit-test or an integration test. Others may be more technology specific like Fitnesse-tests or Seleniums test that refers to the technology being used when implementing the test. &lt;br id="c_-q"&gt;&lt;br id="c_-q0"&gt;I believe that the core property of any test should be to capture and verify the expectation you  have related to how the class, module, layer or application should work. That is in most cases why you actually write a test to start with. This is a very code-centric endpoint of the spectrum of continuously transforming user expectations and needs into a running system that provides value. Actually verifying the user-requirements and expectations is in the other end of this spectrum. There are other (possibly subordinate) properties of the process of writing tests also. If you use the same language for both tests and running code or supportive libraries, you will also verify if a class, interface or module is easy to use, and as part of the process you  may actually improve it while writing the test. That makes that process of writing the test itself into something that validates more subtle and less quantifiable properties of the code. If doing TDD, writing a test is a starting point for writing code.&lt;br id="n9um"&gt;&lt;br id="n9um0"&gt;There are some bits and pieces missing in this picture. Very often I read about or hear about developers doing various kinds of testing in their project while applying some kind of label to what they are doing. The label may vary but terms like Requirement driven tests are becoming more and more widespread. I believe that this is good, because verification of requirements is probably the most difficult and important thing we are dealing with as system developers. But I have also seen this urge to classify everything as requirement test lead us in the wrong direction. Requirements means different things depending on who you are talking to.&lt;br id="s1db"&gt;&lt;br id="ae2n"&gt;I will try to address that using a brief description taken from a User Story document in one of my previous engagements:&lt;br id="ae2n0"&gt;&lt;br id="ae2n1"&gt;&lt;div id="kci:" style="margin-left: 40px;"&gt;&lt;i id="kci:0"&gt;"It should be possible to search for customers by first-name, last-name and birth-date. If multiple customers are returned a list of customers with the current address of residence should be presented along with the result"&lt;br id="kci:1"&gt;&lt;/i&gt;&lt;/div&gt;&lt;br id="kci:3"&gt;We can discuss if this is a good definition of a requirement or not. This is not the point here. The point is, it captures a fragment of a user-expectation, a &lt;i id="or4i"&gt;requirement&lt;/i&gt;. We may think of multiple tests in many of the categories above. But when does a written test really capture a requirement? I will say that depends, because requirement means different things depending on who you talk to. For me, as a coder, currently developing a jsp-based solution, one requirement applicable to the actual code I am writing may be that the web-controller returns the customer from a search as an array-type rather than a Collection based type (even though we have generics) simply because there is no way to refer to such a type using the useBean directive in JSP 2.0. This will therefore be a non-functional requirement in my code. It does not mean that I will be writing a test for that requirement in particular, but the unit test of my controller will most definitely be aware of this property. &lt;br id="q7pz"&gt;The part of the code I am writing may also need a utility that merges two arrays into one. The SDK does not provide a utility that does that for us, but if a create one myself, i will most certainly update ArrayUtilsTest to provide a test for the new merge method in ArayUtills. It this a test of a requirement? most definitely, if verifies my expectation. Is it a requirement of the application itself that the system provides such a function? not necessarily, the primary property of the system is to provide customer search by the means necessary as defined by lead-developers and programmers on the project.&lt;br id="kci:5"&gt; &lt;div id="kci:6"&gt;&lt;br id="hwe-"&gt;The primary conclusion put forward is that tests addresses the expectation of a whole spectrum of what we refer to as requirements. Quite a few of these requirements manifested as code in tests may not be easily translated into functional requirements owned and understood by the customers. Trying to be dogmatic about what kind of tests we write and to say that every line of code should be directly translated into a customer requirements may turn out to be a side-track. Very often when writing tests, the limitations of the test-framework and intrinsic properties of the interfaces or libraries you are using will force you to simplify and limit the number of assertions you apply to you test harness. It is important to understand that the requirement coverage provided by such tools will never be perfect. Strict tests will almost always end up being to brittle. &lt;br id="yf:b"&gt;&lt;br id="yf:b0"&gt;Getting your automated builds running the right set of tests is difficult. In my experience it ends up with a mix of unit tests, integration tests, web-tests and some flavor of requirement tests like fitnesse. These tests will test customer requirements and quite a bit of other properties. These tests tends to be something owned and maintained by developers more than by domain experts and customers, those that actually understand the problem domain.&lt;br id="p:1i"&gt;&lt;br id="p:1i0"&gt;What are your experiences?&lt;br id="yf:b1"&gt;&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-318550958564733407?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/318550958564733407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=318550958564733407' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/318550958564733407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/318550958564733407'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2008/08/testing-code-or-testing-requirements-i.html' title=''/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-441220298215608607</id><published>2008-01-05T18:13:00.000+01:00</published><updated>2008-05-01T19:38:46.209+02:00</updated><title type='text'></title><content type='html'>      &lt;h2&gt;Using Macintosh keyboard in Ubuntu&lt;/h2&gt;I use various computers during a normal working day. I use a Macbook-pro as my laptop, a windows workstation running XP at the client-site where I am currently contracting, and at home I use (probably my favorite computer) an AMD workstation running Ubuntu Gutsy. Since I am primarily a Java developer, I use IntelliJ as my primary workspace, which is of course available on all platforms, the same goes with firefox and quite a few of the other applications I work with as well. One thing that has been annoying me lately, though is that I have not been able to find a really nice keyboard. The key bindings for shortcut keys in some of my favorite applications also varies slightly when using the different platforms. One thing i do know is that it is quite unlikely that I will change the keyboard on my Macbook, which i quite good anyway. I like way the keys both sounds and works.&lt;br&gt;&lt;br&gt;Some years ago I used to really enjoy typing with those old IBM-style PC-keyboards when using OS/2 workstations at the university. They had really hard keys and made this really load "click" sound. Awfully noisy of course, but I really liked both the way they sounded and behaved. These are anyway not possible to get a hold of anymore. &lt;br&gt;&lt;br&gt;I really like the looks of the new mac 105-keys keyboards in aluminum, so I got one ow those. The cool ting about this is that it will be much easier for me to switch between the macbook and my buntu workstation. I had a little trouble making the keyboard working  as it is supposed to, but after some tweaking, I got it working.&lt;br&gt;&lt;br&gt;&lt;h3&gt;What I had to do&lt;/h3&gt;Selecting the correct keyboard layout in Ubuntu is really simple. Just open the "Keyboard" application and you are all set to go. Select the appropriate keyboard layout, which in my case a PC-keyboard with the Norway Macintosh as the variant as shown in the figure.&lt;br&gt;&lt;div id="imto" style="padding: 1em 0pt; text-align: left;"&gt;&lt;img style="width: 450px; height: 430px;" src="http://docs.google.com/File?id=dcs9tn98_42fcw2pjgt"&gt;&lt;/div&gt;The next thing you will have to do is enabling the Command-key as a third level chooser (this is usually the windows key on a regular PC-keyboard). Just set it like this:&lt;br&gt;&lt;br&gt;&lt;div id="d3d3" style="padding: 1em 0pt; text-align: left;"&gt;&lt;img style="width: 495px; height: 572px;" src="http://docs.google.com/File?id=dcs9tn98_43gtzfnzc6"&gt;&lt;/div&gt;&lt;br&gt;Now I thought I was almost set to go, having the ()[]{} thing working for me, which is pretty damned important since I am a programmer, and I use these  braces all the time. The only thing I discovered was that the keycode=49 was not mapped according to my keyboard. According to my layout it was supposed to be apostrophe bu it was bar. This does not correspond with my current layout, fortunately there are simple ways around this. I didn't know that the keykode was 49 for this key, so then I used &lt;font face="Arial"&gt;"xev" to find it. &lt;br&gt;After finding the correct keykode, I just launched:&lt;br&gt;&lt;br&gt;&lt;span style="font-family: Courier New;"&gt;&lt;span style="font-family: Courier New;"&gt; sudo xmodmap -e "keycode 49=apostrophe bar"&lt;/span&gt;&lt;br&gt;&lt;br&gt;to change the mapping to get the apostrophe in the right place. Now I am all set to go. I am probably  going to buy myself one of these keyboards for the windows-workstation I am using at the client-site as well. &lt;br style="font-family: Courier New;"&gt;&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;br&gt;      &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-441220298215608607?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/441220298215608607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=441220298215608607' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/441220298215608607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/441220298215608607'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2008/01/using-macintosh-keyboard-in-ubuntu-i.html' title=''/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-3322667756750644589</id><published>2007-09-13T17:20:00.000+02:00</published><updated>2010-02-23T17:11:21.844+01:00</updated><title type='text'></title><content type='html'>  &lt;h1&gt;My tracks for the second day&lt;/h1&gt;&lt;br&gt;It is only two sessions left for day one at JavaZone and I have to make planning arrangements for day III lready. Hopefully, I will also be able to update my first blog entry with comments on my previous encounters at JavaZone 2007 as well.&lt;br&gt;&lt;br&gt;Ok, we have a lot of nice sessions tomorrow as well, actually we are doing BOFS' until 21PM on Thursday, not bad!!&lt;br&gt;This is my schedule for September 13.&lt;br&gt;&lt;br&gt;&lt;div&gt;&lt;table id="xfa." border="0" cellpadding="3" cellspacing="0" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="33%"&gt;&lt;b&gt;&lt;i&gt;Time&lt;br&gt;&lt;/i&gt;&lt;/b&gt;&lt;/td&gt;&lt;td width="33%"&gt;&lt;b&gt;&lt;i&gt;Talk &lt;br&gt;&lt;/i&gt;&lt;/b&gt;&lt;/td&gt;&lt;td width="33%"&gt;&lt;b&gt;&lt;i&gt;Comment &lt;br&gt;&lt;/i&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="33%"&gt;9.00-10:00&lt;br&gt;&lt;/td&gt;&lt;td width="33%"&gt;&lt;a href="http://www4.java.no/web/show.do?page=92&amp;amp;articleid=5425"&gt; Java Persistence 2.0 - What's New&lt;/a&gt;, Linda DeMichiel&lt;/td&gt;&lt;td width="33%"&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="33%"&gt;10:15-11.15&lt;br&gt;&lt;/td&gt;&lt;td width="33%"&gt;&lt;a href="http://www4.java.no/web/show.do?page=92&amp;amp;articleid=5251"&gt; Open source Enterprise Integration with Mule&lt;/a&gt;, &lt;a href="http://www4.java.no/web/show.do?page=65&amp;amp;articleid=5252"&gt;Tijs Rademakers&lt;/a&gt;                      og              &lt;a href="http://www4.java.no/web/show.do?page=65&amp;amp;articleid=5253"&gt;Jos Dirksen&lt;/a&gt;&lt;/td&gt;&lt;td width="33%"&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="33%"&gt;11:45-12:45&lt;br&gt;&lt;/td&gt;&lt;td width="33%"&gt;&lt;a href="http://www4.java.no/web/show.do?page=92&amp;amp;articleid=5265"&gt; Deploying Maven in the Enterprise&lt;/a&gt;, Kristoffer Moum&lt;/td&gt;&lt;td width="33%"&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="33%"&gt;13:00-14:00&lt;br&gt;&lt;/td&gt;&lt;td width="33%"&gt;None&lt;br&gt;&lt;/td&gt;&lt;td width="33%"&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="33%"&gt;14:15-15:15&lt;br&gt;&lt;/td&gt;&lt;td width="33%"&gt;&lt;a title="How Do I Invoke a Method, and Yes I Am A Senior Developer, Ole Andre Ranvik, Bjørn Bjerkeli" href="http://www4.java.no/web/show.do?page=92&amp;amp;articleid=5473" id="hax7"&gt;How Do I Invoke a Method, and Yes I Am A Senior Developer, Ole Andre Ranvik, Bjørn Bjerkeli&lt;/a&gt; &lt;/td&gt;&lt;td width="33%"&gt;This is my own talk actually, I really recommend it, puts some things in perspective (I might be biased here :-)&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="33%"&gt;15:45-16:45&lt;br&gt;&lt;/td&gt;&lt;td width="33%"&gt;Teaching computers How to Drive, Mary Poppendieck&lt;br&gt;&lt;/td&gt;&lt;td width="33%"&gt;Mind blowing&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="33%"&gt;17:00-18:00&lt;br&gt;&lt;/td&gt;&lt;td width="33%"&gt;WS Duck Typing, Arjen Poutsma&lt;br&gt;&lt;/td&gt;&lt;td width="33%"&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="33%"&gt;&lt;br&gt;&lt;/td&gt;&lt;td width="33%"&gt;&lt;br&gt;&lt;/td&gt;&lt;td width="33%"&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="33%"&gt;&lt;br&gt;&lt;/td&gt;&lt;td width="33%"&gt;&lt;br&gt;&lt;/td&gt;&lt;td width="33%"&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-3322667756750644589?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/3322667756750644589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=3322667756750644589' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/3322667756750644589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/3322667756750644589'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2007/09/my-tracks-for-second-day-it-is-only-two.html' title=''/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-3967562223599453271</id><published>2007-09-12T15:18:00.000+02:00</published><updated>2007-10-19T14:29:30.314+02:00</updated><title type='text'></title><content type='html'>&lt;h2&gt;Jim Coplien talking about "Agile Stuff"&lt;/h2&gt;&lt;br&gt;The Agile track is covered pretty well at JavaZone 2007, we have a lot of good speakers doing agile-talks. This is very much thanks to Jessica Hildrum that seems to be very well connected. Jim has been looking into agile issues for the past 12 years and works for a Danish company called Nordija.&lt;br&gt;Most of the projects that I have been working on lately has been organized in an Agile matter, Jim goes into the some details on explaining some common myths on agile processes and what works and whatnot. The five Myths discussed are:&lt;br&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;On-Site customer&lt;/li&gt;&lt;li&gt;User Stories&lt;/li&gt;&lt;li&gt;TDD&lt;/li&gt;&lt;li&gt;YAGNI&lt;/li&gt;&lt;li&gt;DLS's&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;Before Jim starts to talk out, I will poin out the ones that I wold tend to focus on, from a developers perspective will be YAGNI and TDD. Jim tells us that it doesn't work, he's go me curious.&lt;br&gt;Jim clains that TDD will destroy your system, which is a pretty bald claim, nonetheless interesting. He claims that you will end-up building an unmaintainable and procedural architecture, which does not lend itself to refactoring. Well, he is getting my attention. I simply do not agree. I think what Jim thinks about here is that Unit testing at the JUnit level is not really testing of customer requirements, and he is perfectly right. It is tests testing parts of the system implemented using classes to build an object oriented system. This means requirements translated into something computionally feasible. Maybe I am not using TDD properly, but I do not expect that my JUnit tests maps one-to-one to functional-requirements. &lt;br&gt;&lt;br&gt;What Jim misses out on here, especially with respect to saying that YAGNI will kill you is what Mary Poppendieck states about eliminating waste. I am a strong believer in up-front design, but I am not a strong beleiver in building anticipated structures, especially without tests. I think you should really eliminate waste. &lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-3967562223599453271?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/3967562223599453271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=3967562223599453271' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/3967562223599453271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/3967562223599453271'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2007/09/jim-coplien-talking-about-agile-stuff.html' title=''/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-6337425429122733947</id><published>2007-09-12T12:46:00.000+02:00</published><updated>2010-02-23T17:11:21.850+01:00</updated><title type='text'></title><content type='html'>&lt;h2&gt;My track for the first day at JavaZone 2007&lt;/h2&gt;I have just came home from speakers dinner after talking to a lot of different people that are giving talks at javazone.no. I really didn't have time to figure out what tracks I will visit tomorrow, there are a lot of options, but I am trying to prepare i bit now. I finally was able to meet Tor Nordbye, Carl Quinn and Dick Wall from the JavaPosse, I am really looking forward to be present at the live podcast tomorrow evening.&lt;br&gt;&lt;br&gt;Here are the shortlist of talks (selected from 7 parallell tracks) that I will probably attend the first day:&lt;br&gt;&lt;br&gt;&lt;div&gt;&lt;table id="m9wi" border="0" cellpadding="3" cellspacing="0" height="265"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="50%"&gt;&lt;b&gt;&lt;i&gt;Time&lt;/i&gt;&lt;/b&gt;&lt;br&gt;&lt;/td&gt;&lt;td width="50%"&gt;&lt;b&gt;&lt;i&gt;Talk&lt;/i&gt;&lt;/b&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="50%"&gt;9.00-10.0&lt;br&gt;&lt;/td&gt;&lt;td width="50%"&gt;&lt;a title="Web 2.5 development with Java" href="http://www4.java.no/web/show.do?page=92&amp;amp;articleid=5337" id="v36p"&gt;Web 2.5 development with Java&lt;/a&gt;, Stephan Janssen&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="50%"&gt;10.15-11.15&lt;br&gt;&lt;/td&gt;&lt;td width="50%"&gt;&lt;a title="The State of Ajax, Dion Almaer and Ben Galbraith" href="http://www4.java.no/web/show.do?page=92&amp;amp;articleid=5492" id="debm"&gt;The State of Ajax, Dion Almaer and Ben Galbraith&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="50%"&gt;13.00-14-00&lt;br&gt;&lt;/td&gt;&lt;td width="50%"&gt;&lt;a title="Five practical solutions to Agile myths" href="http://www4.java.no/web/show.do?page=92&amp;amp;articleid=5397" id="twxt"&gt;Five practical solutions to Agile myths&lt;/a&gt;, James Coplien&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="50%"&gt;14.15-15.15&lt;br&gt;&lt;/td&gt;&lt;td width="50%"&gt;&lt;a title="Latest in Java Technology From Sun Microsystems  , Simon Ritter  og Angela M. Caicedo" href="http://www4.java.no/web/show.do?page=92&amp;amp;articleid=5524" id="zh1e"&gt;Latest in Java Technology From Sun Microsystems  , Simon Ritter  og Angela M. Caicedo&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="50%"&gt;15.45-16.45&lt;br&gt;&lt;/td&gt;&lt;td width="50%"&gt;Have to think about this one not sure actually&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="50%"&gt;17.00-18.00&lt;br&gt;&lt;/td&gt;&lt;td width="50%"&gt;&lt;a title="Scripting in Java 6  , Per Mengshoel  og Thomas Heiberg" href="http://www4.java.no/web/show.do?page=92&amp;amp;articleid=5263" id="lcye"&gt;Scripting in Java 6  , Per Mengshoel  og Thomas Heiberg&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="50%"&gt;18.15-19.15&lt;br&gt;&lt;/td&gt;&lt;td width="50%"&gt;JavaPosse RoundUp, Live podcasting from Oslo (You would not want to miss this one)&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="50%"&gt;&lt;br&gt;&lt;/td&gt;&lt;td width="50%"&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="50%"&gt;&lt;br&gt;&lt;/td&gt;&lt;td width="50%"&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-6337425429122733947?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/6337425429122733947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=6337425429122733947' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/6337425429122733947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/6337425429122733947'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2007/09/my-track-for-first-day-at-javazone-2007.html' title=''/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-5409288115614820149</id><published>2007-09-12T12:26:00.000+02:00</published><updated>2010-02-23T17:11:21.855+01:00</updated><title type='text'></title><content type='html'>&lt;h2&gt;   Kicking of JavaZone 2007 &lt;/h2&gt; Finaly it has launched, JavaZone 2007 is running with more than 120 speakers from all over the world, and more than 2200 attendants, make this a pretty large conference, at least according to Scandinavian standards. I have been participating the program-commitee myself and it is very fun to see everything come to a start. The program this year is pretty well balanced, Enterprise, Web , Agile and Hard-Core Java speakers from all over the world is here in large numbers.&lt;br&gt;&lt;br&gt;There are definitely a lot of focus on Agile this year. On other conferences I have been attending during the last couple of years, there is always one or two subjects that stands out, but I don't find it to be as clear this year. There are definitely bias do use less heavyweight infrastructure in web-like deployment-scenarios that it used to be. There is also a lot of focus on Maven. We actually had to reject as much as five talks on Maven, because it was already so well-covered. &lt;br&gt;&lt;br&gt;I spoke with the &lt;a title="Javaposse" href="http://javaosse.com" id="i1uk"&gt;Javaposse&lt;/a&gt; crew-members yesterday, and my impression is that Maven has a strong position in Scandinavia, and Less in the US. &lt;br&gt;&lt;br&gt;Regardless if you are interested in Maven or Ajax there should definitely be something for every taste in this years program, hope you will enjoy it, we enjoyed putting it together!&lt;br&gt;&lt;br&gt;&lt;br&gt; &lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-5409288115614820149?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/5409288115614820149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=5409288115614820149' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/5409288115614820149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/5409288115614820149'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2007/09/kicking-of-javazone-2007-finaly-it-has.html' title=''/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-6135957839981084447</id><published>2007-06-25T01:30:00.000+02:00</published><updated>2007-07-15T22:05:26.704+02:00</updated><title type='text'></title><content type='html'>  &lt;h1&gt;Continuous integration infrastructure, which OS to use&lt;br&gt;&lt;/h1&gt;I have been on several projects lately where we have been using continuous integration-servers like &lt;a title="CruiseControl" href="http://cruisecontrol.sourceforge.net/"&gt;CruiseControl&lt;/a&gt; and &lt;a title="Continuum" href="http://maven.apache.org/continuum/"&gt;Continuum&lt;/a&gt;. This part of the development infrastructure is crucial, unless you are all by yourself (unlikely) you will need some server that will continuously integrate, build and deploy your code. This has been pretty much been a de-facto standard for quite a while now, and is not what I am trying to address here. What I am trying to address is, does the OS used for continuous integration-servers (CI servers) really matter? Yes it does and it should not run on Windows for reasons that should become obvious after reading this article.&lt;br&gt;&lt;br&gt;It really matters, it is really not the question of which operating-system to use, but which operation system not to use. For some reason, it is not uncommon to configure and set-up CI-servers on Windows early in early development stages. I know several companies that only supports W2K/XP as part of their central operations, or Unix of course. But in case of Unix, the servers are often quite costly, cannot be dedicated for running CI, needs to be ordered and configured centrally and so on. Lately more and more companies are also supporting Linux as part of their infrastructure base, but it is not as widely supported as W2K/XP (I don't know anyone running Vista yet). &lt;br&gt;&lt;br&gt;It is also quite common to use Windows as development desktop, even in environments that does not rely on windows-specific features. I am primarily developing in Java and for the most I use Windows desktops for development at client sites, not because I want to, but becose this is the company standard at most of my clients where I do contracting. At my home office I run Linux (Ubuntu) and Laptop runs Mac OSX. Given the fact that you will most likely end-up developing code using a Windows box when you are at work, it is also quite possible that it is easier to get access to a spare box for running one or several instances of your preferred CI-server if you go for Windows. &lt;br&gt;&lt;br&gt;Well, so you go about and install CruiseControl, Continuum or whatever other software that you want to use, on Windows. Well, I have tried the same quite a few times now, and I can tell you, it simply doesn't work on Windows. Windows cannot and should not be used ever to run CI-server, because you will most certainly end up in a situation that some file is locked and that the CI server cannot run its goal because it cannot delete a file locked by some other process.&lt;br&gt;Another thing is long pathnames. Windows doesn't support pathnames that are longer than 255 characters, and I guarantee you, if you have a deep project structure you will almost certainly run into this problem. A third issue that may become a problem is access. When accessing a windows-box, people has this mental image that they will need to use explorer to actually view and edit contents of directories and files, which is just stupid. People will need to access the box when the test fails on the CI-sever and not locally, which is a quite common case (hard coded paths, locale-issues and network access in integration tests are common things). This means that developers will need to use RemoteDesktop to access the server. Well, only a limited amount on connections are available, and it is heavy on the server to support many simultaneous connections so this will quickly bring you into trouble as well. All these issues makes Windows an no-go for CI servers, it is simply not possible to maintain  stable CI servers without file-locking, pathname-problems and locking because of simultaneous access. You will need a full time employee to do the maintenance or go with Unix or Linux.&lt;br&gt;&lt;br&gt;&lt;h2&gt;What should I do?&lt;/h2&gt;Well, an option is to take any Unix/Linux box available and use that for continuous integration instead. It will make all the problems mentioned in the previous paragraph go away. File locking is not a problem, pathnames can be as long as you  want (almost true) and since everyone is using ssh, you could support a high number of simultaneous users viewing the build-log files using terminal access (which is very lightweight) instead of RemoteDesktop. The short answer is go with Unix based system. But what if that is not possible?&lt;br&gt;That was the case at previous engagement. Going for Linux was a no-op. And if we wanted to go for Unix, Solaris was the way to go. But we would never get root-access to that box and they have to order it first....*sigh*. Well, first of all. &lt;br&gt;&lt;br&gt;My experience is that configuring  CI-servers are generally best left as a task to the development team, preferably someone that has done this a couple of times before. I don't think it is possible to put these kind of things on order at your system-administration department, those responsible for test and production environments. It is probably outsourced anyway, so you will have to fill out a form before you are even allowed to all them. So much for agile. &lt;br&gt;Well, so what did we do. We went for Virtualization using &lt;a title="VMWare" href="http://maven.apache.org/continuum/"&gt;VMWare&lt;/a&gt;. VMWare gives you the ability to run any number for operating systems, called the guest OS, by using a player. The OS running the player is referred to as the the host OS. Here we were able to use a Windows-box running Ubuntu-Linux (my choice of course :-) as a guest operating system. After the guest operating system has been started it behaves looks an performs like a full-blown standalone OS without all the quirks mentioned earlier. The Virtual image was created with &lt;a title="VMWare Workstation" href="http://www.vmware.com/products/ws/"&gt;VMWare Workstation&lt;/a&gt; and may be executed with either VMWare Workstation or &lt;a title="VMWare Player" href="http://www.vmware.com/products/player/"&gt;VMWare Player&lt;/a&gt; which is free. The process of installing the operation system (Ubuntu Feisty) is identical to what you would do when you install it from scratch. I will not cover the installation details here, but briefly reflect on some additional benefit that may be provided when using VMware when running CI-servers (these issues may also apply to running appliances in general). Note that this also makes Windows boxes a viable alternative as a host OS.&lt;br&gt;&lt;br&gt;&lt;h2&gt;Benefits of running a virtualized CI-server&lt;/h2&gt;In my experience, CI servers are not treated as production-goods my most organizations, although they should, This often results in decisions like, hey we need to use that box we gave you last week, can't you just use this one instead? The point is, it should be really easy to change hardware. In VMWare your entire installation is basically just a couple of files in a directory. If you copy and transfer those files to a new box, you can start the guest-OS using the player there instead. The only thing you will have to install on the new box is the VMWare Player.&lt;br&gt;&lt;br&gt;Staging or upgrading such environments are often also problematic. This is actually production software for your development team. If you want to upgrade the CI server with lets' say a new version of Continuum, you can do so my taking a snapshot of your current image. Copy that image and start it up on your desktop. Here you can do whatever changes that you want to the guest operating system, including upgrading to the newest version of Maven and Continuum. You can even dry test the build on your local machine. If it work, you are all set to offload an updated snapshot to the CI-production server. By using VMWare in this way, it really gives the term "staging" true meaning.&lt;br&gt;Based upon experience for several years running large projects with CI servers, this is really the best approach. Having a build CI-server going to a stop caused by reasons not related to code or test uncovering actual problems over and over a again will quickly render your CI infrastructure useless, people will stop to trust it, and this is not what you want. &lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-6135957839981084447?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/6135957839981084447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=6135957839981084447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/6135957839981084447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/6135957839981084447'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2007/06/continuous-integration-infrastructure.html' title=''/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-755611630791945213</id><published>2007-05-04T23:51:00.000+02:00</published><updated>2010-02-23T17:11:21.861+01:00</updated><title type='text'></title><content type='html'>  &lt;h1&gt;Upgrading Ubuntu from Edgy to Feisty&lt;/h1&gt;&lt;br&gt;Last week I upgraded my my Ubuntu installation from Edgy to Feisty. I had been playing around quite a bit to get &lt;a title="Compiz" href="http://compiz.org/"&gt;Compiz&lt;/a&gt; and &lt;a title="Beryl" href="http://www.beryl-project.org/"&gt;Beryl&lt;/a&gt; to work whithout much luck on Edgy. Some time ago I also tried to install the beta of Feisty, but i could not get my Radeon X1800 card working properly, the desktop was a mess. Anyways, I am occasionally using the Synaptic package manager, and not to long ago it asked me if I wanted to upgrade from Edgy Eft, which is 6.10 to Feisty running on 7.0.4.  Apart from  a few new tools, more adequate support for restricted drivers, like my ATI -card and build-in support for Compiz and Beryl, I was tempted to give it a go.&lt;br&gt;&lt;br&gt;I have had my Dual screen desktop running 2 x 22" screen monitors running with pristine colors for some time, but withould 3D effects. After upgrading however, I could just see that it was not working properly. It did not render fonts properly in the dual heda mode, but as working fine when using just one monitor. Disappointing, I was really looking forward to getting Compiz and Beryl up and running, instead I was actuallu set back to start. Now I am waiting for the system to download all updates after I reinstalled the entire system from scratch. &lt;br&gt;&lt;br&gt;So if you are using an ATI Radon X1800/1900 card, do not upgrade to Feisty if you are using a dual-head configuration on you displays. Now I have been wise enough to configure a separate partition where I can engage myself in a feasibility study before I actually see if it is working.&lt;br&gt;&lt;br&gt;Anyways, after switching from XP 64, which did not work at all!! I am very satisfied with my Ubuntu distro, I really want to recommend it.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-755611630791945213?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/755611630791945213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=755611630791945213' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/755611630791945213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/755611630791945213'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2007/05/upgrading-ubuntu-from-edgy-to-feisty.html' title=''/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-6825213821613775006</id><published>2007-03-19T00:20:00.000+01:00</published><updated>2007-04-14T00:21:58.548+02:00</updated><title type='text'></title><content type='html'>  &lt;h2&gt;Unit testing, a lot of developers don't get it&lt;/h2&gt;&lt;br&gt;As a developer I quite often stumble across code that I would like to rewrite. The reasons why I want to rewrite the piece of code, may differ from case to case, reduce coupling and remove duplication are well known reasons. Lately I have been doing a lot of refactoring and one thing that stands out is how much terrible test code it is out there. It seems as if developers think that if they just have written a test for it, and the code coverage if good, then everything is good. This is dead wrong. I have seen people backing away from changing bad code just because they were backed by brittle and hard to understand tests.&lt;br&gt;&lt;br&gt;Doing refactoring requires that tests are present. In systems using code written less than two or maybe three years ago, it seems to be quite rare that the code is not been backed by tests to some extension. But the way tests are written varies greatly. Having tests is a necessary but not sufficient prerequisite to do effective refactoring. In the latter cases where I have been doing requirements it strikes me as if a lot of developers do not understand that the same principles that they apply when writing system-code, should also be applied when writing test-code. It is all code, and should be treated as such. I have seen by far too much duplication, lengthy pieces of code iterating over collections just to add a conditional and assert for the particular element they where looking for, and by far to much cut-copy paste, ecpecialy in test-fixtures.&lt;br&gt;&lt;br&gt;I am am doing a &lt;a title="Lightening Talk" href="http://events.ccc.de/congress/2006/Lightning_Talks"&gt;Lightening Talk&lt;/a&gt; on how to simplify unit testing on &lt;a title="Oslo XP Meetup" href="http://xp.meetup.com/13/calendar/5515448/"&gt;Oslo XP Meetup&lt;/a&gt; on 26 March. I will discuss small things you can use to write more &lt;span style="font-style: italic;"&gt;fluent &lt;/span&gt;tests, tests that are easier to read and that requires less code. When I was reading up on different aspects on Unit testing, I came over &lt;a title="this great article" href="http://www.cwi.nl/%7Eleon/papers/xp2001/xp2001.pdf"&gt;this great article&lt;/a&gt; that was linked from unit.org. It really explains in sufficient details code smells in test-code and how to refactor them. Read it and distribute it to your peer developers.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-6825213821613775006?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/6825213821613775006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=6825213821613775006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/6825213821613775006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/6825213821613775006'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2007/03/unit-testing-lot-of-developers-dont-get.html' title=''/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-6891589036228289102</id><published>2007-03-04T19:53:00.000+01:00</published><updated>2008-09-07T13:31:11.116+02:00</updated><title type='text'></title><content type='html'>          &lt;H1 id="j7pp"&gt;   Effective pagination using Hibernate &lt;/H1&gt;&lt;P id="yh4q"&gt; This article presents with an solution on how to page through large amounts of data effectively without taking down your database and without keeping it all in memory.&lt;BR id="j7pp0"&gt;&lt;/P&gt;&lt;H2 id="qdnf"&gt;Last major update 07.09.2008&lt;/H2&gt;&lt;P id="qdnf0"&gt;I have now added references that describes how to retrieve the source-code for the examples. All source-code is released under the Creative Commons License as can be seen from the Licensing details, the source code can be retrieved from http://svitjod.rymdweb.com/repository/com/zenior/sandbox/ which contains the source-code in maven form. To include a dependency to the source code just include:&lt;/P&gt;&lt;P id="i5jj"&gt;&lt;/P&gt;&lt;P id="i5jj1"&gt;&amp;lt;repository&amp;gt;&lt;BR id="jo4m"&gt;&lt;/P&gt;  &lt;FONT face="Courier New" id="i5jj2"&gt;  &amp;lt;id&amp;gt;internal&amp;lt;/id&amp;gt;&lt;BR id="jo4m0"&gt;    &amp;lt;name&amp;gt;Svitjod&amp;lt;/name&amp;gt;&lt;BR id="jo4m1"&gt;    &amp;lt;layout&amp;gt;default&amp;lt;/layout&amp;gt;&lt;BR id="jo4m2"&gt;    &amp;lt;url&amp;gt;http://svitjod.rymdweb.com/repository&amp;lt;/url&amp;gt;&lt;BR id="jo4m3"&gt;    &amp;lt;snapshots&amp;gt;&lt;BR id="jo4m4"&gt;      &amp;lt;enabled&amp;gt;false&amp;lt;/enabled&amp;gt;&lt;BR id="jo4m5"&gt;    &amp;lt;/snapshots&amp;gt;&lt;BR id="jo4m6"&gt;&lt;/FONT&gt;&lt;P id="i5jj3"&gt;&lt;FONT face="Courier New" id="i5jj4"&gt;  &amp;lt;/repository&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P id="i5jj5"&gt;&lt;/P&gt;&lt;P id="i5jj7"&gt;&lt;FONT face="Courier New" id="i5jj8"&gt;and &lt;/FONT&gt;&lt;BR id="jo4m7"&gt;&lt;/P&gt;&lt;P id="i5jj9"&gt;&lt;/P&gt;&lt;P id="i5jj11"&gt;&lt;FONT face="Courier New" id="i5jj12"&gt; &amp;lt;dependency&amp;gt;&lt;BR id="sxkc"&gt;                &amp;lt;groupId&amp;gt;com.zenior.sandbox&amp;lt;/groupId&amp;gt;&lt;BR id="sxkc0"&gt;                &amp;lt;artifactId&amp;gt;example-domain&amp;lt;/artifactId&amp;gt;&lt;BR id="sxkc1"&gt;                &amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&amp;gt;&lt;BR id="sxkc2"&gt;                &amp;lt;scope&amp;gt;compile&amp;lt;/scope&amp;gt;&lt;BR id="sxkc3"&gt;            &amp;lt;/dependency&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P id="sxkc4"&gt;&lt;/P&gt;&lt;P id="sxkc6"&gt;&lt;/P&gt;&lt;P id="sxkc8"&gt;&lt;FONT face="Courier New" id="sxkc9"&gt; &amp;lt;dependency&amp;gt;&lt;BR id="sxkc10"&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" id="sxkc11"&gt;                &amp;lt;groupId&amp;gt;com.zenior.sandbox&amp;lt;/groupId&amp;gt;&lt;BR id="sxkc12"&gt;                &amp;lt;artifactId&amp;gt;hibernate-sandbox&amp;lt;/artifactId&amp;gt;&lt;BR id="sxkc13"&gt;                &amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&amp;gt;&lt;BR id="sxkc14"&gt;                &amp;lt;scope&amp;gt;compile&amp;lt;/scope&amp;gt;&lt;BR id="sxkc15"&gt;            &amp;lt;/dependency&amp;gt;&lt;BR id="sxkc16"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P id="md.a"&gt;&lt;/P&gt;&lt;P id="md.a0"&gt;To your project pom.xml. &lt;BR id="jo4m8"&gt;&lt;/P&gt;&lt;P id="ndif"&gt;&lt;/P&gt;&lt;P id="ndif0"&gt;If do not use maven, you may just download the source code by looking for files ending with -sources in the maven repository mentioned above.&lt;/P&gt;&lt;H1 id="j7pp1"&gt;   Abstract &lt;/H1&gt; Dealing effectively with large resultsets is important. Batch applications may require to process millions of rows as part of a transaction.  The brute force approach would be read everything up in memory before iterating over theelements. This approach will effectively kill performance and use far to much memory. One common approach when using Hibernate is to use options in the &lt;SPAN style='font-family: "Courier New"' id="j7pp2"&gt;Criteria &lt;/SPAN&gt;interface called &lt;SPAN style='font-family: "Courier New"' id="j7pp3"&gt;setFirstResult&lt;/SPAN&gt;/&lt;SPAN style='font-family: "Courier New"' id="j7pp4"&gt;setMaxResult&lt;/SPAN&gt;. This will generate SQL (at least for Oracle) where the database will actually have to read and throw away data before returning them to the client. Another approach is to use &lt;SPAN style='font-family: "Courier New"' id="j7pp5"&gt;ScrollableResult&lt;/SPAN&gt;s, but here you will have to keep the connection open during the entire pagination process. By retrieving a collection of all the primary keys for the matching object, you will need to perform an extra query before actually retrieving the data, but it is very easy to generate effective SQL to retrieve using this approach. This is by far the best solution in terms of database-load and memory footprint, and it is easy to implement in a portable manner.&lt;BR id="j7pp6"&gt;&lt;BR id="j7pp7"&gt;&lt;H1 id="j7pp8"&gt;   The problem &lt;/H1&gt; In order to have a rich domain model, we want relationships between domain objects to be implemented as relationships between the Java classes. If we are going to be able to do that without killing performance, we have be smart in how we deal with relationships having high cardinality.&lt;BR id="j7pp9"&gt;&lt;BR id="j7pp10"&gt; Most importantly we must iterate through a large resultset without keeping all data in memory. We also want the approach to generate simple SQL, and avoid using esoteric options that make the SQL difficult to optimize or difficult to port. We might also need adjustments to the mapping strategy and relationships to retrieve data effectively.&lt;BR id="j7pp11"&gt;&lt;BR id="j7pp12"&gt; It is assumed that the reader is familiar with Hibernate and with common ORM issues like n+1 selects.&lt;BR id="j7pp13"&gt;&lt;BR id="j7pp14"&gt;&lt;H1 id="j7pp15"&gt;   The example &lt;/H1&gt; An order application processing an order with more than 100.000 order lines.We will see how different solutions differ with respect to memory consumption, resource usage in general, effectiveness in terms of execution and differences in how the SQL is generated. The solution will be using Java 6, Hibernate3.2.0GA with annotations, the Spring framework and Oracle XE.&lt;BR id="j7pp16"&gt;&lt;BR style="background-color: #ff0000" id="j7pp17"&gt; I will test three different approaches that don't use custom code and for each approach say something about execution time, memory consumption and explain the inner details.&lt;BR id="j7pp18"&gt; As a domain model for the test I have been using a domain-model representing a generic order-domain as shown in figure 1.&lt;BR id="j7pp19"&gt;&lt;IMG src="http://docs.google.com/File?id=dcs9tn98_11db4c97" style="height: 161px; width: 204px" title="Order Domain" id="j7pp20"&gt;&lt;BR id="j7pp21"&gt;&lt;B id="j7pp22"&gt;Figure 1&lt;/B&gt;&lt;BR id="j7pp23"&gt; The model is simplified but representative.&lt;BR id="j7pp24"&gt;&lt;H3 id="j7pp25"&gt;   Test fixture &lt;/H3&gt; I have used Hibernate and Springs &lt;SPAN style='font-family: "Courier New"' id="j7pp26"&gt;AbstractTransactionalSpringContextTests&lt;/SPAN&gt;topopulate the test fixture that has been inserted into the database. Idon't want the unit test to include timing for actually setting up the data.Therefore I have executed the fixture-setup by adjusting the test-case slightly so that the fixture is actually committed, by using the following approach:&lt;BR id="j7pp28"&gt;&lt;PRE style="padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; line-height: 100%; font-family: monospace; background-color: #ffffff" id="j7pp29"&gt;&lt;SPAN style="color: #800000" id="j7pp30"&gt;  1 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp31"&gt;&lt;B id="j7pp32"&gt;protected&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp33"&gt;&lt;B id="j7pp34"&gt;void&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp35"&gt; onSetUpInTransaction() &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp36"&gt;&lt;B id="j7pp37"&gt;throws&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp38"&gt; Exception {&lt;BR id="j7pp39"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp40"&gt;  2 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp41"&gt;&lt;B id="j7pp42"&gt;if&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp43"&gt; (!isTestDataPresent()) {&lt;BR id="j7pp44"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp45"&gt;  3 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp46"&gt;            createOrderWithOrderLines(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp47"&gt;1000&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp48"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp49"&gt;1000&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp50"&gt;);&lt;BR id="j7pp51"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp52"&gt;  4 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp53"&gt;            setComplete();&lt;BR id="j7pp54"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp55"&gt;  5 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp56"&gt;            endTransaction();&lt;BR id="j7pp57"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp58"&gt;  6 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp59"&gt;        }&lt;BR id="j7pp60"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp61"&gt;  7 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp62"&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;B id="j7pp63"&gt;Listing 1&lt;/B&gt;&lt;BR id="j7pp64"&gt; By using the&lt;SPAN style='font-family: "Courier New"' id="j7pp65"&gt; AbstractTransactionalSpringContextTests&lt;/SPAN&gt; I can actually force the test itself to commit the data, which may sometimes be useful when inspecting persistent side-effects to data when executing tests. The methods&lt;SPAN style='font-family: "Courier New"' id="j7pp66"&gt; setComplete() &lt;/SPAN&gt;and &lt;SPAN style='font-family: "Courier New"' id="j7pp67"&gt;endTransaction()&lt;/SPAN&gt; will force the execution to commit after the test is finished. To make it idempotent, I have added a method that checks f the test-data is already there.&lt;BR id="j7pp68"&gt;&lt;BR id="j7pp69"&gt;&lt;P style="background-color: #ffffff" id="j7pp70"&gt;   The brute-force approach yields the following test-results on my workstation,   which is a custom built AMD Athlon 64 X2 4600, 4GB Ram, Dual Raptor 150GB SATA   in a Raid 0 setup. The tests have been launched from IntelliJ 6.0.4 and with   the Oracle XE instance running on the same machine. The test runner is   launched in a spawned process using a maximum of 1 GB RAM (-Xmx1G). &lt;/P&gt;&lt;BR id="j7pp71"&gt;&lt;H3 id="j7pp72"&gt;   Brute force &lt;/H3&gt; In the first approach, we process the entire order without thinking about memory consumption when we retrieve OrderLine instances from Hibernate.&lt;BR id="j7pp73"&gt; This solution basically uses the one-to-many relational mapping and leaves it up to Hibernate to retrieve the data.&lt;BR id="j7pp74"&gt;&lt;BR id="j7pp75"&gt; The mapping is defined as follows:&lt;BR id="j7pp76"&gt;&lt;PRE style="padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; line-height: 100%; font-family: monospace; background-color: #ffffff" id="j7pp77"&gt;&lt;SPAN style="color: #800000" id="j7pp78"&gt;  1 &lt;/SPAN&gt;  &lt;SPAN style="color: #808000; background-color: #ffffff" id="j7pp79"&gt;@OneToMany(&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp80"&gt;mappedBy = &lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff" id="j7pp81"&gt;&lt;B id="j7pp82"&gt;"order"&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp83"&gt;, cascade = CascadeType.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp84"&gt;&lt;B id="j7pp85"&gt;&lt;I id="j7pp86"&gt;ALL,&lt;/I&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp87"&gt; fetch = FetchType.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp88"&gt;&lt;B id="j7pp89"&gt;&lt;I id="j7pp90"&gt;LAZY)&lt;BR id="j7pp91"&gt;&lt;/I&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp92"&gt;  2 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp93"&gt;&lt;B id="j7pp94"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp95"&gt; Set getOrderLines() {&lt;BR id="j7pp96"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp97"&gt;  3 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp98"&gt;&lt;B id="j7pp99"&gt;return&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp100"&gt;&lt;B id="j7pp101"&gt;orderLines;&lt;BR id="j7pp102"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp103"&gt;  4 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp104"&gt;    }&lt;/SPAN&gt; &lt;/PRE&gt;&lt;B id="j7pp105"&gt;Listing 2&lt;/B&gt;&lt;BR id="j7pp106"&gt;And on the OrderLine side of the bi-directional relationship, we have:&lt;BR id="j7pp108"&gt;&lt;PRE style="padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; line-height: 100%; font-family: monospace; background-color: #ffffff" id="j7pp109"&gt;&lt;SPAN style="color: #800000" id="j7pp110"&gt;  1 &lt;/SPAN&gt; &lt;SPAN style="color: #808000; background-color: #ffffff" id="j7pp111"&gt;@ManyToOne(&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp112"&gt;fetch = FetchType.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp113"&gt;&lt;B id="j7pp114"&gt;&lt;I id="j7pp115"&gt;EAGER)&lt;BR id="j7pp116"&gt;&lt;/I&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp117"&gt;  2 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp118"&gt;&lt;B id="j7pp119"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp120"&gt; Order getOrder() {&lt;BR id="j7pp121"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp122"&gt;  3 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp123"&gt;&lt;B id="j7pp124"&gt;return&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp125"&gt;&lt;B id="j7pp126"&gt;order;&lt;BR id="j7pp127"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp128"&gt;  4 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp129"&gt;    }&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P id="j7pp130"&gt;&lt;B id="j7pp131"&gt;Listing 3&lt;/B&gt;&lt;BR id="j7pp132"&gt;&lt;/P&gt;&lt;P id="j7pp133"&gt;   The test that gathers timing and resource consumption information is a simple   JUnit-test method: &lt;/P&gt;&lt;P id="j7pp134"&gt;     &lt;/P&gt;&lt;PRE style="line-height: 100%; font-family: monospace; background-color: #ffffff" id="j7pp135"&gt;&lt;SPAN style="color: #800000" id="j7pp136"&gt;  1 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp137"&gt;&lt;B id="j7pp138"&gt;public&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp139"&gt;&lt;B id="j7pp140"&gt;void&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp141"&gt; testRetrieveOrderBruteForce() {&lt;BR id="j7pp142"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp143"&gt;  2 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp144"&gt;        Order order = (Order) &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp145"&gt;&lt;B id="j7pp146"&gt;hibernateTemplate.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp147"&gt;get(Order.&lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp148"&gt;&lt;B id="j7pp149"&gt;class&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp150"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp151"&gt;&lt;B id="j7pp152"&gt;orderId)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp153"&gt;;&lt;BR id="j7pp154"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp155"&gt;  3 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp156"&gt;        ResourceMonitor monitor = &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp157"&gt;&lt;B id="j7pp158"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp159"&gt; ResourceMonitor(&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff" id="j7pp160"&gt;&lt;B id="j7pp161"&gt;"order.getOrderLines()"&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp162"&gt;);&lt;BR id="j7pp163"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp164"&gt;  4 &lt;/SPAN&gt;        &lt;SPAN style="background-color: #ffffff" id="j7pp165"&gt;&lt;I id="j7pp166"&gt;assertEquals(&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp167"&gt;1000&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp168"&gt;*&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp169"&gt;1000&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp170"&gt;,order.getOrderLines().size());&lt;BR id="j7pp171"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp172"&gt;  5 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp173"&gt;        System.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp174"&gt;&lt;B id="j7pp175"&gt;&lt;I id="j7pp176"&gt;out.&lt;/I&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp177"&gt;println(monitor.stop());&lt;BR id="j7pp178"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp179"&gt;  6 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp180"&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P id="j7pp181"&gt;&lt;B id="j7pp182"&gt;Listing 4&lt;/B&gt;&lt;BR id="j7pp183"&gt;&lt;/P&gt;&lt;BR id="j7pp184"&gt;&lt;DIV id="j7pp185"&gt;&lt;TABLE style="width: 325px; height: 66px" border="1" cellpadding="3" cellspacing="0" id="j7pp186"&gt;&lt;TBODY id="j7pp187"&gt;&lt;TR id="j7pp188"&gt;&lt;TD width="50%" id="j7pp189"&gt;&lt;B id="j7pp190"&gt;         Time elapsed&lt;BR id="j7pp191"&gt;&lt;/B&gt;&lt;/TD&gt;&lt;TD width="50%" id="j7pp192"&gt;&lt;B id="j7pp193"&gt;Memory usage delta&lt;/B&gt;&lt;BR id="j7pp194"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR id="j7pp195"&gt;&lt;TD width="50%" id="j7pp196"&gt;         79,5s&lt;BR id="j7pp197"&gt;&lt;/TD&gt;&lt;TD width="50%" id="j7pp198"&gt;         501000kb&lt;BR id="j7pp199"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;B id="j7pp200"&gt;Table 1 &lt;/B&gt;Test results brute-force   approach&lt;BR id="j7pp201"&gt;&lt;BR id="j7pp202"&gt;   As we can see, it is quite fast to retrieve all the data in just a single   select. We have retrieved 1000000   &lt;SPAN style='font-family: "Courier New"' id="j7pp203"&gt;OrderLine&lt;/SPAN&gt; instances in close to   80-seconds. The problem with this approach is that it is memory intensive. On   most 32-bit systems, there is a practical upper limit of around 2GB heap,   which will make it difficult to have more than three such queries running   simultaneously   &lt;A href="View?docid=dcs9tn98_8hpc5kc#memory" title="java -heap limitations in 32 bit systems" id="j7pp204"&gt;[1]&lt;/A&gt;.&lt;BR id="j7pp205"&gt;   In addition to this, when using a   &lt;SPAN style='font-family: "Courier New"' id="j7pp206"&gt;StatefulSession &lt;/SPAN&gt;in Hibernate to   keep track of updated fields, keeping this much data in memory at the same   time will eventually halt your system or make it very slow   &lt;A href="View?docid=dcs9tn98_8hpc5kc#hibernate_batch" title="Hibernate batch processing" id="j7pp207"&gt;[2]&lt;/A&gt;.   Note that making the relationship lazy (which is the default behavior in   Hibernate) will not change that fact that everything is fetched using one   single select.&lt;BR id="j7pp208"&gt;&lt;/DIV&gt;&lt;H3 id="j7pp209"&gt;   Using Criteria search limited by firstResult and maxResult &lt;/H3&gt; In order to retrieve the &lt;SPAN style='font-family: "Courier New"' id="j7pp210"&gt;OrderLine&lt;/SPAN&gt; side of the relationship using a Criteria query, we clearly cannot have a Hibernate-managed relationship between &lt;SPAN style='font-family: "Courier New"' id="j7pp211"&gt;Order &lt;/SPAN&gt;and&lt;SPAN style='font-family: "Courier New"' id="j7pp212"&gt; OrderLine&lt;/SPAN&gt;, we will have to manage this relationship ourselves. The most visible consequence of this will be that the &lt;SPAN style='font-family: "Courier New"' id="j7pp213"&gt;Set&amp;lt;OrderLine&amp;gt;&lt;/SPAN&gt; property of &lt;SPAN style='font-family: "Courier New"' id="j7pp214"&gt;Order &lt;/SPAN&gt;will have to be removed.This is unfortunate because it removes an important aspect of the domain-model, which is the explicit composition that constitutes the relationship.&lt;BR id="j7pp215"&gt;&lt;P id="j7pp216"&gt;&lt;BR id="j7pp217"&gt;&lt;/P&gt; When dealing with cases like this, I would like to be explicit about the relationship also in the domain of the Order-class, so other than removing the&lt;SPAN style='font-family: "Courier New"' id="j7pp218"&gt; getOrderLines()&lt;/SPAN&gt;method from the Order class, I would prefer changing it to something like this shown in listing 5.&lt;BR id="j7pp219"&gt;&lt;PRE style="padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; line-height: 100%; font-family: monospace; background-color: #ffffff" id="j7pp220"&gt;&lt;SPAN style="color: #800000" id="j7pp221"&gt;  1 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp222"&gt;&lt;B id="j7pp223"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp224"&gt; Set&amp;lt;OrderLine&amp;gt; getOrderLines(HibernateTemplate template) {&lt;BR id="j7pp225"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp226"&gt;  2 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp227"&gt;        ....&lt;BR id="j7pp228"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp229"&gt;  3 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp230"&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;B id="j7pp231"&gt;Listing 5&lt;/B&gt;&lt;BR id="j7pp232"&gt;&lt;BR id="j7pp233"&gt; Here it is still quite clear that &lt;SPAN style='font-family: "Courier New"' id="j7pp234"&gt;Order&lt;/SPAN&gt; has a relationship to&lt;SPAN style='font-family: "Courier New"' id="j7pp235"&gt; OrderLine&lt;/SPAN&gt;. Still, however, we will have to implement the paging mechanism using a Colllection-implementation, which preserves a pretty decent domain-model with respect to an explicit relationship between &lt;SPAN style='font-family: "Courier New"' id="j7pp236"&gt;Order &lt;/SPAN&gt;and&lt;SPAN style='font-family: "Courier New"' id="j7pp237"&gt; OrderLine&lt;/SPAN&gt;. This might turn out to be a good thing, because it will probably easier to refactor the&lt;SPAN style='font-family: "Courier New"' id="j7pp238"&gt; getOrderLines &lt;/SPAN&gt;method to be extended to take a &lt;SPAN style='font-family: "Courier New"' id="j7pp239"&gt;HibernateTemplate&lt;/SPAN&gt; as an argument instead of in lining some other implementation whenever we need to retrieve &lt;SPAN style='font-family: "Courier New"' id="j7pp240"&gt;OrderLine&lt;/SPAN&gt; instances belonging to an&lt;SPAN style='font-family: "Courier New"' id="j7pp241"&gt; Order&lt;/SPAN&gt;.&lt;BR id="j7pp242"&gt; An even better approach here would be to de-couple the dependency to Hibernate completely.&lt;BR id="j7pp243"&gt;&lt;BR id="j7pp244"&gt;I discovered this after implementing the&lt;SPAN style='font-family: "Courier New"' id="j7pp245"&gt; getOrderLines()&lt;/SPAN&gt; - method, taking hibernateTemplate as a parameter. The example-domain module that contains the order-domain related classes, did not have a dependency to Hibernate, which I did not want to introduce because I wanted the example-domain to be as lean as possible. In order to compare multiple strategies for paging using the same domain-classes I had to introduce an interface that made plugging different strategies as in listing 6.&lt;BR id="j7pp246"&gt;&lt;PRE style="line-height: 100%; font-family: monospace; background-color: #ffffff" id="j7pp247"&gt;&lt;SPAN style="color: #800000" id="j7pp248"&gt; 1 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp249"&gt;&lt;B id="j7pp250"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp251"&gt; Collection getOrderLines(CollectionBuilder collectionBuilder) {&lt;BR id="j7pp252"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp253"&gt; 2 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp254"&gt;&lt;B id="j7pp255"&gt;return&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp256"&gt; collectionBuilder.build(&lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp257"&gt;&lt;B id="j7pp258"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp259"&gt;);&lt;BR id="j7pp260"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp261"&gt; 3 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp262"&gt;}&lt;BR id="j7pp263"&gt;&lt;BR id="j7pp264"&gt;&lt;/SPAN&gt;&lt;BR id="j7pp265"&gt;&lt;SPAN style="color: #800000" id="j7pp266"&gt; 1 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp267"&gt;&lt;B id="j7pp268"&gt;public&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp269"&gt;&lt;B id="j7pp270"&gt;interface&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp271"&gt; CollectionBuilder {&lt;BR id="j7pp272"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp273"&gt; 2 &lt;/SPAN&gt;    &lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp274"&gt;&lt;I id="j7pp275"&gt;/**&lt;BR id="j7pp276"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp277"&gt; 3 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp278"&gt;&lt;I id="j7pp279"&gt;     * Build the collection using information from the given instance.&lt;BR id="j7pp280"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp281"&gt; 4 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp282"&gt;&lt;I id="j7pp283"&gt;     * &lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080" id="j7pp284"&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp285"&gt;&lt;B id="j7pp286"&gt;&lt;I id="j7pp287"&gt;&lt;U id="j7pp288"&gt;@param&lt;/U&gt;&lt;/I&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp289"&gt;&lt;I id="j7pp290"&gt; instance&lt;BR id="j7pp291"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp292"&gt; 5 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp293"&gt;&lt;I id="j7pp294"&gt;     * &lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080" id="j7pp295"&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp296"&gt;&lt;B id="j7pp297"&gt;&lt;I id="j7pp298"&gt;&lt;U id="j7pp299"&gt;@return&lt;BR id="j7pp300"&gt;&lt;/U&gt;&lt;/I&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp301"&gt; 6 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp302"&gt;&lt;I id="j7pp303"&gt;     */&lt;BR id="j7pp304"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp305"&gt; 7 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp306"&gt;    Collection build(Object owner);&lt;BR id="j7pp307"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp308"&gt; 8 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp309"&gt;}&lt;/SPAN&gt; &lt;BR id="j7pp310"&gt;&lt;BR id="j7pp312"&gt;&lt;/PRE&gt;&lt;B id="j7pp313"&gt;Listing 6&lt;BR id="j7pp314"&gt;&lt;BR id="j7pp315"&gt;&lt;/B&gt; Using the Collection-builder interface, I could easily provide a Hibernate based implementation of the different strategies without introducing a Hibernate dependency into the domain-classes. Here it would be even more visible that the one-to-many collection is owned by an order instance, signified by the owner parameter of the build-method.&lt;BR id="j7pp316"&gt;&lt;BR id="j7pp317"&gt; To support paging by restricting the underlying resultset Hibernate uses a mechanism by using the Dialect interface. This mechanism varies greatly between different RDBMS'es. The Orcale9Dialect uses a construct in oracle called rownum restrictions, which may be found in the &lt;SPAN style='font-family: "Courier New"' id="j7pp318"&gt;getLimitString&lt;/SPAN&gt;-method of the Dialect implementation given in listing 7 (listed only in part).&lt;BR id="j7pp319"&gt;&lt;PRE style="padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; line-height: 100%; font-family: monospace; background-color: #ffffff" id="j7pp320"&gt;&lt;SPAN style="color: #800000" id="j7pp321"&gt;  1 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp322"&gt;&lt;B id="j7pp323"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp324"&gt; String getLimitString(String sql, &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp325"&gt;&lt;B id="j7pp326"&gt;boolean&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp327"&gt; hasOffset) {&lt;BR id="j7pp328"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp329"&gt;  2 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp330"&gt;....&lt;BR id="j7pp331"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp332"&gt; 10 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp333"&gt;		StringBuffer pagingSelect = &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp334"&gt;&lt;B id="j7pp335"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp336"&gt; StringBuffer( sql.length()+&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp337"&gt;100&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp338"&gt; );&lt;BR id="j7pp339"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp340"&gt; 11 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp341"&gt;&lt;B id="j7pp342"&gt;if&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp343"&gt; (hasOffset) {&lt;BR id="j7pp344"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp345"&gt; 12 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp346"&gt;			pagingSelect.append(&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff" id="j7pp347"&gt;&lt;B id="j7pp348"&gt;"select * from ( select row_.*, rownum rownum_ from ( "&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp349"&gt;);&lt;BR id="j7pp350"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp351"&gt; 13 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp352"&gt;		}&lt;BR id="j7pp353"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp354"&gt; 14 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp355"&gt;&lt;B id="j7pp356"&gt;else&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp357"&gt; {&lt;BR id="j7pp358"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp359"&gt; 15 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp360"&gt;			pagingSelect.append(&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff" id="j7pp361"&gt;&lt;B id="j7pp362"&gt;"select * from ( "&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp363"&gt;);&lt;BR id="j7pp364"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp365"&gt; 16 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp366"&gt;		}&lt;BR id="j7pp367"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp368"&gt; 17 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp369"&gt;		pagingSelect.append(sql);&lt;BR id="j7pp370"&gt;         ........&lt;BR id="j7pp371"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp372"&gt; 30 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp373"&gt;}&lt;BR id="j7pp374"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp375"&gt; 31 &lt;/SPAN&gt;&lt;/PRE&gt;&lt;B id="j7pp376"&gt;Listing 7&lt;BR id="j7pp377"&gt;&lt;BR id="j7pp378"&gt;&lt;/B&gt; Without careful indexing and dependent upon the underlying RDBMS you might end up with a situation that may force the RDBMS to scan all the data for the entire set of &lt;SPAN style='font-family: "Courier New"' id="j7pp379"&gt;OrderLine &lt;/SPAN&gt;items each time in order to return the subset limited by&lt;SPAN style='font-family: "Courier New"' id="j7pp380"&gt; setFirstResult &lt;/SPAN&gt;and&lt;SPAN style='font-family: "Courier New"' id="j7pp381"&gt; setMaxResult&lt;/SPAN&gt;.&lt;BR id="j7pp382"&gt; Here is an implementation of a&lt;SPAN style='font-family: "Courier New"' id="j7pp383"&gt; Collection &lt;/SPAN&gt;implementation that may page the underlying data  based upon limiting the page size in the way mentioned above:&lt;BR id="j7pp384"&gt;&lt;BR id="j7pp385"&gt;&lt;PRE style="padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; line-height: 100%; font-family: monospace; background-color: #ffffff" id="j7pp386"&gt;&lt;SPAN style="color: #800000" id="j7pp387"&gt;  1 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp388"&gt;&lt;B id="j7pp389"&gt;public&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp390"&gt;&lt;B id="j7pp391"&gt;class&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp392"&gt; PagingCollection &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp393"&gt;&lt;B id="j7pp394"&gt;extends&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp395"&gt; AbstractCollection {&lt;BR id="j7pp396"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp397"&gt;  2 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp398"&gt;&lt;B id="j7pp399"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp400"&gt; HibernateTemplate &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp401"&gt;&lt;B id="j7pp402"&gt;hibernateTemplate;&lt;BR id="j7pp403"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp404"&gt;  3 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp405"&gt;&lt;B id="j7pp406"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp407"&gt; HibernateCriteriaSpecification &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp408"&gt;&lt;B id="j7pp409"&gt;specificationCriteria;&lt;BR id="j7pp410"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp411"&gt;  4 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp412"&gt;&lt;B id="j7pp413"&gt;private&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp414"&gt;&lt;B id="j7pp415"&gt;int&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp416"&gt;&lt;B id="j7pp417"&gt;pageSize &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp418"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp419"&gt;2000&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp420"&gt;;&lt;BR id="j7pp421"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp422"&gt;  5 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp423"&gt;&lt;B id="j7pp424"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp425"&gt; Integer &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp426"&gt;&lt;B id="j7pp427"&gt;collectionSize;&lt;BR id="j7pp428"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp429"&gt;  6 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp430"&gt;&lt;B id="j7pp431"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp432"&gt; Criteria &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp433"&gt;&lt;B id="j7pp434"&gt;queryCriteria;&lt;BR id="j7pp435"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp436"&gt;  7 &lt;BR id="j7pp437"&gt;  8 &lt;BR id="j7pp438"&gt;  9 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp439"&gt;&lt;B id="j7pp440"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp441"&gt; PagingCollection(HibernateTemplate hibernateTemplate, HibernateCriteriaSpecifiaa criteria, &lt;/SPAN&gt;&lt;SPAN style="color: #000080" id="j7pp442"&gt;&lt;B id="j7pp443"&gt;int&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp444"&gt; pageSize)&lt;BR id="j7pp445"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp446"&gt; 10 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp447"&gt;&lt;B id="j7pp448"&gt;        this&lt;/B&gt;&lt;/SPAN&gt;.&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp449"&gt;&lt;B id="j7pp450"&gt;specificationCriteria &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp451"&gt;= criteria;&lt;BR id="j7pp452"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp453"&gt; 11 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp454"&gt;&lt;B id="j7pp455"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp456"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp457"&gt;&lt;B id="j7pp458"&gt;hibernateTemplate &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp459"&gt;= hibernateTemplate;&lt;BR id="j7pp460"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp461"&gt; 12 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp462"&gt;&lt;B id="j7pp463"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp464"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp465"&gt;&lt;B id="j7pp466"&gt;pageSize &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp467"&gt;= pageSize;&lt;BR id="j7pp468"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp469"&gt; 13 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp470"&gt;&lt;B id="j7pp471"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp472"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp473"&gt;&lt;B id="j7pp474"&gt;queryCriteria &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp475"&gt;= criteria.populate(createCriteria());&lt;BR id="j7pp476"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp477"&gt; 14 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp478"&gt;    }&lt;BR id="j7pp479"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp480"&gt; 15 &lt;BR id="j7pp481"&gt; 16 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp482"&gt;&lt;B id="j7pp483"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp484"&gt; Iterator iterator() {&lt;BR id="j7pp485"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp486"&gt; 17 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp487"&gt;&lt;B id="j7pp488"&gt;return&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp489"&gt;&lt;B id="j7pp490"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp491"&gt; PagedIterator(size());&lt;BR id="j7pp492"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp493"&gt; 18 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp494"&gt;    }&lt;BR id="j7pp495"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp496"&gt; 19 &lt;BR id="j7pp497"&gt; 20 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp498"&gt;&lt;B id="j7pp499"&gt;public&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp500"&gt;&lt;B id="j7pp501"&gt;int&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp502"&gt; size() {&lt;BR id="j7pp503"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp504"&gt; 21 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp505"&gt;&lt;B id="j7pp506"&gt;if&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp507"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp508"&gt;&lt;B id="j7pp509"&gt;collectionSize &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp510"&gt;== &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp511"&gt;&lt;B id="j7pp512"&gt;null&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp513"&gt;) {&lt;BR id="j7pp514"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp515"&gt; 22 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp516"&gt;            Criteria criteria = &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp517"&gt;&lt;B id="j7pp518"&gt;specificationCriteria.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp519"&gt;populate(createCriteria());&lt;BR id="j7pp520"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp521"&gt; 23 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp522"&gt;            criteria.setProjection(Projections.&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp523"&gt;&lt;I id="j7pp524"&gt;countDistinct(&lt;/I&gt;&lt;/SPAN&gt;"id"&lt;SPAN style="background-color: #ffffff" id="j7pp525"&gt;));&lt;BR id="j7pp526"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp527"&gt; 24 &lt;/SPAN&gt;            &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp528"&gt;&lt;B id="j7pp529"&gt;collectionSize &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp530"&gt;= (Integer) criteria.uniqueResult();&lt;BR id="j7pp531"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp532"&gt; 25 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp533"&gt;        }&lt;BR id="j7pp534"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp535"&gt; 26 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp536"&gt;&lt;B id="j7pp537"&gt;return&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp538"&gt;&lt;B id="j7pp539"&gt;collectionSize;&lt;BR id="j7pp540"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp541"&gt; 27 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp542"&gt;    }&lt;BR id="j7pp543"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp544"&gt; 28 &lt;BR id="j7pp545"&gt; 29 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp546"&gt;&lt;B id="j7pp547"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp548"&gt; Criteria createCriteria() {&lt;BR id="j7pp549"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp550"&gt; 30 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp551"&gt;        Criteria criteria = (Criteria) &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp552"&gt;&lt;B id="j7pp553"&gt;hibernateTemplate.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp554"&gt;execute(&lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp555"&gt;&lt;B id="j7pp556"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp557"&gt; HibernateCallback() {&lt;BR id="j7pp558"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp559"&gt; 31 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp560"&gt;&lt;B id="j7pp561"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp562"&gt; Object doInHibernate(Session session) &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp563"&gt;&lt;B id="j7pp564"&gt;throws&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp565"&gt; HibernateException, SQLException {&lt;BR id="j7pp566"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp567"&gt; 32 &lt;/SPAN&gt;                &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp568"&gt;&lt;B id="j7pp569"&gt;return&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp570"&gt; session.createCriteria(&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp571"&gt;&lt;B id="j7pp572"&gt;specificationCriteria.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp573"&gt;getPersistentClass());&lt;BR id="j7pp574"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp575"&gt; 33 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp576"&gt;            }&lt;BR id="j7pp577"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp578"&gt; 34 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp579"&gt;        });&lt;BR id="j7pp580"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp581"&gt; 35 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp582"&gt;&lt;B id="j7pp583"&gt;return&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp584"&gt; criteria;&lt;BR id="j7pp585"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp586"&gt; 36 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp587"&gt;    }&lt;BR id="j7pp588"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp589"&gt; 37 &lt;BR id="j7pp590"&gt; 38 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp591"&gt;&lt;B id="j7pp592"&gt;private&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp593"&gt;&lt;B id="j7pp594"&gt;class&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp595"&gt; PagedIterator &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp596"&gt;&lt;B id="j7pp597"&gt;implements&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp598"&gt; Iterator {&lt;BR id="j7pp599"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp600"&gt; 39 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp601"&gt;&lt;B id="j7pp602"&gt;public&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp603"&gt;&lt;B id="j7pp604"&gt;boolean&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp605"&gt;&lt;B id="j7pp606"&gt;lastPage &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp607"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp608"&gt;&lt;B id="j7pp609"&gt;false&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp610"&gt;;&lt;BR id="j7pp611"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp612"&gt; 40 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp613"&gt;&lt;B id="j7pp614"&gt;private&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp615"&gt;&lt;B id="j7pp616"&gt;int&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp617"&gt;&lt;B id="j7pp618"&gt;offset;&lt;BR id="j7pp619"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp620"&gt; 41 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp621"&gt;&lt;B id="j7pp622"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp623"&gt; List &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp624"&gt;&lt;B id="j7pp625"&gt;currentCollection;&lt;BR id="j7pp626"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp627"&gt; 42 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp628"&gt;&lt;B id="j7pp629"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp630"&gt; Iterator &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp631"&gt;&lt;B id="j7pp632"&gt;currentIterator;&lt;BR id="j7pp633"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp634"&gt; 43 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp635"&gt;&lt;B id="j7pp636"&gt;private&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp637"&gt;&lt;B id="j7pp638"&gt;int&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp639"&gt;&lt;B id="j7pp640"&gt;size;&lt;BR id="j7pp641"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp642"&gt; 44 &lt;BR id="j7pp643"&gt; 45 &lt;BR id="j7pp644"&gt; 46 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp645"&gt;&lt;B id="j7pp646"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp647"&gt; PagedIterator(&lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp648"&gt;&lt;B id="j7pp649"&gt;int&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp650"&gt; size) {&lt;BR id="j7pp651"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp652"&gt; 47 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp653"&gt;&lt;B id="j7pp654"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp655"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp656"&gt;&lt;B id="j7pp657"&gt;size &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp658"&gt;= size;&lt;BR id="j7pp659"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp660"&gt; 48 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp661"&gt;&lt;B id="j7pp662"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp663"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp664"&gt;&lt;B id="j7pp665"&gt;currentCollection &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp666"&gt;= loadPage(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp667"&gt;0&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp668"&gt;);&lt;BR id="j7pp669"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp670"&gt; 49 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp671"&gt;&lt;B id="j7pp672"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp673"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp674"&gt;&lt;B id="j7pp675"&gt;currentIterator &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp676"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp677"&gt;&lt;B id="j7pp678"&gt;currentCollection.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp679"&gt;iterator();&lt;BR id="j7pp680"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp681"&gt; 50 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp682"&gt;        }&lt;BR id="j7pp683"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp684"&gt; 51 &lt;BR id="j7pp685"&gt; 52 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp686"&gt;&lt;B id="j7pp687"&gt;protected&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp688"&gt; List loadPage(&lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp689"&gt;&lt;B id="j7pp690"&gt;int&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp691"&gt; offset) {&lt;BR id="j7pp692"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp693"&gt; 53 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp694"&gt;&lt;B id="j7pp695"&gt;if&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp696"&gt; (offset &amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp697"&gt;&lt;B id="j7pp698"&gt;size)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp699"&gt; {&lt;BR id="j7pp700"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp701"&gt; 54 &lt;/SPAN&gt;                &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp702"&gt;&lt;B id="j7pp703"&gt;throw&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp704"&gt;&lt;B id="j7pp705"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp706"&gt; NoSuchElementException();&lt;BR id="j7pp707"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp708"&gt; 55 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp709"&gt;            }&lt;BR id="j7pp710"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp711"&gt; 56 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp712"&gt;&lt;B id="j7pp713"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp714"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp715"&gt;&lt;B id="j7pp716"&gt;offset &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp717"&gt;= offset;&lt;BR id="j7pp718"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp719"&gt; 57 &lt;/SPAN&gt;            &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp720"&gt;&lt;B id="j7pp721"&gt;queryCriteria.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp722"&gt;setFirstResult(offset);&lt;BR id="j7pp723"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp724"&gt; 58 &lt;/SPAN&gt;            &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp725"&gt;&lt;B id="j7pp726"&gt;queryCriteria.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp727"&gt;setMaxResults(&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp728"&gt;&lt;B id="j7pp729"&gt;pageSize)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp730"&gt;;&lt;BR id="j7pp731"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp732"&gt; 59 &lt;/SPAN&gt;            &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp733"&gt;&lt;B id="j7pp734"&gt;currentCollection &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp735"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp736"&gt;&lt;B id="j7pp737"&gt;queryCriteria.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp738"&gt;list();&lt;BR id="j7pp739"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp740"&gt; 60 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp741"&gt;&lt;B id="j7pp742"&gt;if&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp743"&gt; ( (&lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp744"&gt;&lt;B id="j7pp745"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp746"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp747"&gt;&lt;B id="j7pp748"&gt;offset &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp749"&gt;+ &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp750"&gt;&lt;B id="j7pp751"&gt;pageSize &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp752"&gt;)&amp;gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp753"&gt;&lt;B id="j7pp754"&gt;size)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp755"&gt; {&lt;BR id="j7pp756"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp757"&gt; 61 &lt;/SPAN&gt;                &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp758"&gt;&lt;B id="j7pp759"&gt;lastPage &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp760"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp761"&gt;&lt;B id="j7pp762"&gt;true&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp763"&gt;;&lt;BR id="j7pp764"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp765"&gt; 62 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp766"&gt;            }&lt;BR id="j7pp767"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp768"&gt; 63 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp769"&gt;&lt;B id="j7pp770"&gt;return&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp771"&gt;&lt;B id="j7pp772"&gt;currentCollection;&lt;BR id="j7pp773"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp774"&gt; 64 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp775"&gt;        }&lt;BR id="j7pp776"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp777"&gt; 65 &lt;BR id="j7pp778"&gt; 66 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp779"&gt;&lt;B id="j7pp780"&gt;public&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp781"&gt;&lt;B id="j7pp782"&gt;boolean&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp783"&gt; hasNext() {&lt;BR id="j7pp784"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp785"&gt; 67 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp786"&gt;&lt;B id="j7pp787"&gt;return&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp788"&gt; size() &amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp789"&gt;0&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp790"&gt; &amp;amp;&amp;amp; (&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp791"&gt;&lt;B id="j7pp792"&gt;currentIterator.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp793"&gt;hasNext() || !&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp794"&gt;&lt;B id="j7pp795"&gt;lastPage)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp796"&gt;;&lt;BR id="j7pp797"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp798"&gt; 68 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp799"&gt;        }&lt;BR id="j7pp800"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp801"&gt; 69 &lt;BR id="j7pp802"&gt; 70 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp803"&gt;&lt;B id="j7pp804"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp805"&gt; Object next() {&lt;BR id="j7pp806"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp807"&gt; 71 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp808"&gt;&lt;B id="j7pp809"&gt;if&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp810"&gt; (!&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp811"&gt;&lt;B id="j7pp812"&gt;currentIterator.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp813"&gt;hasNext()) {&lt;BR id="j7pp814"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp815"&gt; 72 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp816"&gt;                unloadPage(&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp817"&gt;&lt;B id="j7pp818"&gt;currentCollection)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp819"&gt;;&lt;BR id="j7pp820"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp821"&gt; 73 &lt;/SPAN&gt;                &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp822"&gt;&lt;B id="j7pp823"&gt;currentCollection &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp824"&gt;= loadPage(&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp825"&gt;&lt;B id="j7pp826"&gt;offset &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp827"&gt;+ &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp828"&gt;&lt;B id="j7pp829"&gt;pageSize)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp830"&gt;;&lt;BR id="j7pp831"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp832"&gt; 74 &lt;/SPAN&gt;                &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp833"&gt;&lt;B id="j7pp834"&gt;currentIterator &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp835"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp836"&gt;&lt;B id="j7pp837"&gt;currentCollection.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp838"&gt;iterator();&lt;BR id="j7pp839"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp840"&gt; 75 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp841"&gt;            }&lt;BR id="j7pp842"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp843"&gt; 76 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp844"&gt;&lt;B id="j7pp845"&gt;return&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp846"&gt;&lt;B id="j7pp847"&gt;currentIterator.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp848"&gt;next();&lt;BR id="j7pp849"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp850"&gt; 77 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp851"&gt;        }&lt;BR id="j7pp852"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp853"&gt; 78 &lt;BR id="j7pp854"&gt; 79 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp855"&gt;&lt;B id="j7pp856"&gt;protected&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp857"&gt;&lt;B id="j7pp858"&gt;void&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp859"&gt; unloadPage(List currentCollection) {&lt;BR id="j7pp860"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp861"&gt; 80 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp862"&gt;&lt;B id="j7pp863"&gt;for&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp864"&gt; (Object o : currentCollection) {&lt;BR id="j7pp865"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp866"&gt; 81 &lt;/SPAN&gt;                &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp867"&gt;&lt;B id="j7pp868"&gt;hibernateTemplate.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp869"&gt;evict(o);&lt;BR id="j7pp870"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp871"&gt; 82 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp872"&gt;            }&lt;BR id="j7pp873"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp874"&gt; 83 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp875"&gt;        }&lt;BR id="j7pp876"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp877"&gt; 84 &lt;BR id="j7pp878"&gt; 85 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp879"&gt;&lt;B id="j7pp880"&gt;public&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp881"&gt;&lt;B id="j7pp882"&gt;void&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp883"&gt; remove() {&lt;BR id="j7pp884"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp885"&gt; 86 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp886"&gt;&lt;B id="j7pp887"&gt;throw&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp888"&gt;&lt;B id="j7pp889"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp890"&gt; UnsupportedOperationException();&lt;BR id="j7pp891"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp892"&gt; 87 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp893"&gt;        }&lt;BR id="j7pp894"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp895"&gt; 88 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp896"&gt;    }&lt;BR id="j7pp897"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp898"&gt; 89 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp899"&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;B id="j7pp900"&gt;Listing 8&lt;BR id="j7pp901"&gt;&lt;BR id="j7pp902"&gt;&lt;/B&gt; The test case looks as follows, note that we have to iterate the entire set if we want to poll everything out from the database. The&lt;SPAN style='font-family: "Courier New"' id="j7pp903"&gt; size() &lt;/SPAN&gt;method just returns an aggregated value by issuing a count.&lt;BR id="j7pp904"&gt;&lt;PRE style="padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; line-height: 100%; font-family: monospace; background-color: #ffffff" id="j7pp905"&gt;&lt;SPAN style="color: #800000" id="j7pp906"&gt;  1 &lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp907"&gt;&lt;B id="j7pp908"&gt;public&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp909"&gt;&lt;B id="j7pp910"&gt;void&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp911"&gt; testRetrieveOrderLinesUsingPaging() {&lt;BR id="j7pp912"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp913"&gt;  2 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp914"&gt;        Order order = (Order) &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp915"&gt;&lt;B id="j7pp916"&gt;hibernateTemplate.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp917"&gt;get(Order.&lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp918"&gt;&lt;B id="j7pp919"&gt;class&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp920"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp921"&gt;&lt;B id="j7pp922"&gt;orderId)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp923"&gt;;&lt;BR id="j7pp924"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp925"&gt;  3 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp926"&gt;        Collection orderLines = order.getOrderLines(&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp927"&gt;&lt;B id="j7pp928"&gt;hibernateTemplate,&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp929"&gt;50000&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp930"&gt;);&lt;BR id="j7pp931"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp932"&gt;  4 &lt;BR id="j7pp933"&gt;  5 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp934"&gt;        ResourceMonitor monitor = &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp935"&gt;&lt;B id="j7pp936"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp937"&gt; ResourceMonitor(&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff" id="j7pp938"&gt;&lt;B id="j7pp939"&gt;"order.getOrderLines()"&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp940"&gt;);&lt;BR id="j7pp941"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp942"&gt;  6 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp943"&gt;&lt;B id="j7pp944"&gt;for&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp945"&gt; (Object orderLine : orderLines) {&lt;BR id="j7pp946"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp947"&gt;  7 &lt;/SPAN&gt;            &lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp948"&gt;&lt;I id="j7pp949"&gt;//&lt;BR id="j7pp950"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp951"&gt;  8 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp952"&gt;            OrderLine line = (OrderLine) orderLine;&lt;BR id="j7pp953"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp954"&gt;  9 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp955"&gt;        }&lt;BR id="j7pp956"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp957"&gt; 10 &lt;/SPAN&gt;        &lt;SPAN style="background-color: #ffffff" id="j7pp958"&gt;&lt;I id="j7pp959"&gt;assertEquals(&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp960"&gt;1000&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp961"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp962"&gt;1000&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp963"&gt;, orderLines.size());&lt;BR id="j7pp964"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp965"&gt; 11 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp966"&gt;        monitor.stop();&lt;BR id="j7pp967"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp968"&gt; 12 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp969"&gt;        System.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp970"&gt;&lt;B id="j7pp971"&gt;&lt;I id="j7pp972"&gt;out.&lt;/I&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp973"&gt;println(monitor);&lt;BR id="j7pp974"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp975"&gt; 13 &lt;BR id="j7pp976"&gt; 14 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp977"&gt; }&lt;/SPAN&gt;&lt;/PRE&gt;&lt;B id="j7pp978"&gt;Listing 9&lt;BR id="j7pp979"&gt;&lt;BR id="j7pp980"&gt;&lt;/B&gt; Without tuning the underlying database with respect to query optimization, the test result looks like this:&lt;BR id="j7pp981"&gt;&lt;DIV id="j7pp982"&gt;&lt;TABLE border="2" cellpadding="3" cellspacing="0" id="j7pp983"&gt;&lt;TBODY id="j7pp984"&gt;&lt;TR id="j7pp985"&gt;&lt;TD width="50%" id="j7pp986"&gt;&lt;B id="j7pp987"&gt;Time elapsed&lt;/B&gt;&lt;BR id="j7pp988"&gt;&lt;/TD&gt;&lt;TD width="50%" id="j7pp989"&gt;&lt;B id="j7pp990"&gt;Memory usage delta&lt;/B&gt;&lt;BR id="j7pp991"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR id="j7pp992"&gt;&lt;TD width="50%" id="j7pp993"&gt;         381s&lt;BR id="j7pp994"&gt;&lt;/TD&gt;&lt;TD width="50%" id="j7pp995"&gt;         29791kb&lt;BR id="j7pp996"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;B id="j7pp997"&gt;Table 2 Test result using   setFirstResult/setMaxResult&lt;BR id="j7pp998"&gt;&lt;BR id="j7pp999"&gt;&lt;/B&gt;Note that the footprint is reduced to below one tenth, but the   response-time is not satisfactory. In this case a new query will be issued   across each page boundary, in this case each page being 50.000 elements. It   turns out that executing the SQL to retrieve one single page is almost as   expensive as retrieving all rows in a single select. To understand why, we   have to examine the SQL.&lt;BR id="j7pp1000"&gt;&lt;PRE style="padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; line-height: 100%; font-family: monospace; background-color: #ffffff" id="j7pp1001"&gt;&lt;SPAN style="color: #800000" id="j7pp1002"&gt; 1 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1003"&gt;SELECT *&lt;BR id="j7pp1004"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1005"&gt; 2 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1006"&gt;FROM&lt;BR id="j7pp1007"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1008"&gt; 3 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1009"&gt;  (SELECT row_.*&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff" id="j7pp1010"&gt;,&lt;BR id="j7pp1011"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1012"&gt; 4 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1013"&gt;     rownum rownum_&lt;BR id="j7pp1014"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1015"&gt; 5 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1016"&gt;   FROM&lt;BR id="j7pp1017"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1018"&gt; 6 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1019"&gt;    (SELECT * &lt;BR id="j7pp1020"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1021"&gt; 7 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1022"&gt;       FROM orderline o&lt;BR id="j7pp1023"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1024"&gt; 8 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1025"&gt;       WHERE o.order_id = order2_.id)&lt;BR id="j7pp1026"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1027"&gt; 9 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1028"&gt;     FROM orderline this_ LEFT&lt;BR id="j7pp1029"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1030"&gt;10 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1031"&gt;     OUTER JOIN customer_order order2_ ON this_.order_id = order2_.id LEFT&lt;BR id="j7pp1032"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1033"&gt;11 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1034"&gt;     WHERE this_.order_id = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp1035"&gt;10&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1036"&gt;)&lt;BR id="j7pp1037"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1038"&gt;12 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1039"&gt;  row_&lt;BR id="j7pp1040"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1041"&gt;13 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1042"&gt;   WHERE rownum &amp;lt;= &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp1043"&gt;100000&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1044"&gt;)&lt;BR id="j7pp1045"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1046"&gt;14 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1047"&gt;WHERE rownum_ &amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp1048"&gt;50000&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff" id="j7pp1049"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;B id="j7pp1050"&gt;Listing 10&lt;BR id="j7pp1051"&gt;&lt;/B&gt;&lt;BR id="j7pp1052"&gt;   The SQL in listing 10 has   been simplified from what Hibernate generates, but the most important   attribute is the nested select with the rownum-restriction, which is shown.   The query above will retrieve the second page in the select, the rows ranging   from 50000 to 100000. Note the nested query where the first (innermost) select   will return all rows with a rownum less than 100000. This is followed by a   filter on the inner result, returning only the rows counting from 50000 and   above. This means that the RDBMS will actually read and throw away most of the   rows for each query. For this to be implemented consistently, we also need to   make sure that the same select will return the same rows repeatedly. This can   only be done if we add an order by clause to the select above (which is not   included in this case). See   &lt;A href="View?docid=dcs9tn98_8hpc5kc#rownum" title="[3]" id="j7pp1053"&gt;[3]&lt;/A&gt;   for a discussion on how rownum works in Oracle.&lt;BR id="j7pp1054"&gt;&lt;BR id="j7pp1055"&gt;   Using this approach for large results will effectively use up all your   database   resources.&lt;BR id="j7pp1056"&gt;&lt;/DIV&gt;&lt;H2 id="j7pp1057"&gt;   Using ScrollableResults &lt;/H2&gt; The approach that uses &lt;SPAN style='font-family: "Courier New"' id="j7pp1058"&gt;ScrollableReults&lt;/SPAN&gt; relies on the underlying JDBC-driver providing support for some kind of cursor that may allow you to retrieve data in an incremental manner without keeping everything in memory. A&lt;SPAN style='font-family: "Courier New"' id="j7pp1059"&gt; ScrollableResults &lt;/SPAN&gt;can beretrieved from a Criteria implementation by using one of the &lt;SPAN style='font-family: "Courier New"' id="j7pp1060"&gt;Criteria.scroll&lt;/SPAN&gt;(..) methods.Support for this may vary. Old versions of the JDBC-drivers in Oracle has implemented this as a client side cache that keeps everything in memory.Whereas newer-versions implements this using server-side cursors.&lt;BR id="j7pp1061"&gt;&lt;BR id="j7pp1062"&gt; The implementation that uses the&lt;SPAN style='font-family: "Courier New"' id="j7pp1063"&gt; ScrollableResult &lt;/SPAN&gt;is straightforward. The &lt;SPAN style='font-family: "Courier New"' id="j7pp1064"&gt;CollectionBuilder &lt;/SPAN&gt;implementation is shown in Listing 11 and the actual Collection implementation in Listing 12.&lt;BR id="j7pp1065"&gt;&lt;PRE style="padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; line-height: 100%; font-family: monospace; background-color: #ffffff" id="j7pp1066"&gt;&lt;SPAN style="color: #800000" id="j7pp1067"&gt; 1 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1068"&gt;&lt;B id="j7pp1069"&gt;public&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1070"&gt;&lt;B id="j7pp1071"&gt;class&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1072"&gt; OrderLineScrolleableResultSetCollectionBuilder &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1073"&gt;&lt;B id="j7pp1074"&gt;implements&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1075"&gt; CollectionBuilder {&lt;BR id="j7pp1076"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1077"&gt; 2 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1078"&gt;&lt;B id="j7pp1079"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1080"&gt; HibernateTemplate &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1081"&gt;&lt;B id="j7pp1082"&gt;hibernateTemplate;&lt;BR id="j7pp1083"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1084"&gt; 3 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1085"&gt;&lt;B id="j7pp1086"&gt;private&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1087"&gt;&lt;B id="j7pp1088"&gt;int&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1089"&gt;&lt;B id="j7pp1090"&gt;pageSize;&lt;BR id="j7pp1091"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1092"&gt; 4 &lt;BR id="j7pp1093"&gt; 5 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1094"&gt;&lt;B id="j7pp1095"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1096"&gt; OrderLineScrolleableResultSetCollectionBuilder(HibernateTemplate hibernateTemplate, &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1097"&gt;&lt;B id="j7pp1098"&gt;int&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1099"&gt; pageSize) {&lt;BR id="j7pp1100"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1101"&gt; 6 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1102"&gt;&lt;B id="j7pp1103"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1104"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1105"&gt;&lt;B id="j7pp1106"&gt;hibernateTemplate &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1107"&gt;= hibernateTemplate;&lt;BR id="j7pp1108"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1109"&gt; 7 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1110"&gt;&lt;B id="j7pp1111"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1112"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1113"&gt;&lt;B id="j7pp1114"&gt;pageSize &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1115"&gt;= pageSize;&lt;BR id="j7pp1116"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1117"&gt; 8 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1118"&gt;    }&lt;BR id="j7pp1119"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1120"&gt; 9 &lt;BR id="j7pp1121"&gt;10 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1122"&gt;&lt;B id="j7pp1123"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1124"&gt; Collection build(Object instance) {&lt;BR id="j7pp1125"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1126"&gt;11 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1127"&gt;        Order order = (Order) instance;&lt;BR id="j7pp1128"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1129"&gt;12 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1130"&gt;&lt;B id="j7pp1131"&gt;return&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1132"&gt;&lt;B id="j7pp1133"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1134"&gt; ScrollableResultsCollection(&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1135"&gt;&lt;B id="j7pp1136"&gt;hibernateTemplate,&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1137"&gt;&lt;B id="j7pp1138"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1139"&gt; HibernateCriteriaSpecification(OrderLine.&lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1140"&gt;&lt;B id="j7pp1141"&gt;class&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1142"&gt;, order, &lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff" id="j7pp1143"&gt;&lt;B id="j7pp1144"&gt;"order"&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1145"&gt;), &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1146"&gt;&lt;B id="j7pp1147"&gt;pageSize)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1148"&gt;;&lt;BR id="j7pp1149"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1150"&gt;13 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1151"&gt;    }&lt;BR id="j7pp1152"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1153"&gt;14 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1154"&gt;}&lt;BR id="j7pp1155"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1156"&gt;15 &lt;/SPAN&gt;&lt;/PRE&gt;&lt;B id="j7pp1157"&gt;Listing 11&lt;BR id="j7pp1158"&gt;&lt;/B&gt;&lt;PRE style="padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; line-height: 100%; font-family: monospace; background-color: #ffffff" id="j7pp1159"&gt;&lt;SPAN style="color: #800000" id="j7pp1160"&gt;  1 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1161"&gt;&lt;B id="j7pp1162"&gt;public&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1163"&gt;&lt;B id="j7pp1164"&gt;class&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1165"&gt; ScrollableResultsCollection &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1166"&gt;&lt;B id="j7pp1167"&gt;extends&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1168"&gt; AbstractCollection {&lt;BR id="j7pp1169"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1170"&gt;  2 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1171"&gt;&lt;B id="j7pp1172"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1173"&gt; HibernateTemplate &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1174"&gt;&lt;B id="j7pp1175"&gt;hibernateTemplate;&lt;BR id="j7pp1176"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1177"&gt;  3 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1178"&gt;&lt;B id="j7pp1179"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1180"&gt; HibernateCriteriaSpecification &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1181"&gt;&lt;B id="j7pp1182"&gt;specificationCriteria;&lt;BR id="j7pp1183"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1184"&gt;  4 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1185"&gt;&lt;B id="j7pp1186"&gt;private&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1187"&gt;&lt;B id="j7pp1188"&gt;int&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1189"&gt;&lt;B id="j7pp1190"&gt;pageSize &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1191"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp1192"&gt;2000&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1193"&gt;;&lt;BR id="j7pp1194"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1195"&gt;  5 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1196"&gt;&lt;B id="j7pp1197"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1198"&gt; Integer &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1199"&gt;&lt;B id="j7pp1200"&gt;collectionSize &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1201"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1202"&gt;&lt;B id="j7pp1203"&gt;null&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1204"&gt;;&lt;BR id="j7pp1205"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1206"&gt;  6 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1207"&gt;&lt;B id="j7pp1208"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1209"&gt; Criteria &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1210"&gt;&lt;B id="j7pp1211"&gt;queryCriteria;&lt;BR id="j7pp1212"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1213"&gt;  7 &lt;BR id="j7pp1214"&gt;  8 &lt;BR id="j7pp1215"&gt;  9 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1216"&gt;&lt;B id="j7pp1217"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1218"&gt; ScrollableResultsCollection(HibernateTemplate hibernateTemplate, HibernateCriteriaSpecification criteria, &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1219"&gt;&lt;B id="j7pp1220"&gt;int&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1221"&gt; pageSize) {&lt;BR id="j7pp1222"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1223"&gt; 10 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1224"&gt;&lt;B id="j7pp1225"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1226"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1227"&gt;&lt;B id="j7pp1228"&gt;specificationCriteria &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1229"&gt;= criteria;&lt;BR id="j7pp1230"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1231"&gt; 11 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1232"&gt;&lt;B id="j7pp1233"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1234"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1235"&gt;&lt;B id="j7pp1236"&gt;hibernateTemplate &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1237"&gt;= hibernateTemplate;&lt;BR id="j7pp1238"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1239"&gt; 12 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1240"&gt;&lt;B id="j7pp1241"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1242"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1243"&gt;&lt;B id="j7pp1244"&gt;pageSize &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1245"&gt;= pageSize;&lt;BR id="j7pp1246"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1247"&gt; 13 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1248"&gt;&lt;B id="j7pp1249"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1250"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1251"&gt;&lt;B id="j7pp1252"&gt;queryCriteria &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1253"&gt;= criteria.populate(createCriteria());&lt;BR id="j7pp1254"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1255"&gt; 14 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1256"&gt;    }&lt;BR id="j7pp1257"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1258"&gt; 15 &lt;BR id="j7pp1259"&gt; 16 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1260"&gt;&lt;B id="j7pp1261"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1262"&gt; Iterator iterator() {&lt;BR id="j7pp1263"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1264"&gt; 17 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1265"&gt;&lt;B id="j7pp1266"&gt;return&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1267"&gt;&lt;B id="j7pp1268"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1269"&gt; PagedIterator(size());&lt;BR id="j7pp1270"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1271"&gt; 18 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1272"&gt;    }&lt;BR id="j7pp1273"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1274"&gt; 19 &lt;BR id="j7pp1275"&gt; 20 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1276"&gt;&lt;B id="j7pp1277"&gt;public&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1278"&gt;&lt;B id="j7pp1279"&gt;synchronized&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1280"&gt;&lt;B id="j7pp1281"&gt;int&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1282"&gt; size() {&lt;BR id="j7pp1283"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1284"&gt; 21 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1285"&gt;&lt;B id="j7pp1286"&gt;if&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1287"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1288"&gt;&lt;B id="j7pp1289"&gt;collectionSize &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1290"&gt;== &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1291"&gt;&lt;B id="j7pp1292"&gt;null&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1293"&gt;) {&lt;BR id="j7pp1294"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1295"&gt; 22 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1296"&gt;            Criteria criteria = &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1297"&gt;&lt;B id="j7pp1298"&gt;specificationCriteria.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1299"&gt;populate(createCriteria());&lt;BR id="j7pp1300"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1301"&gt; 23 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1302"&gt;            criteria.setProjection(Projections.&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1303"&gt;&lt;I id="j7pp1304"&gt;countDistinct(&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff" id="j7pp1305"&gt;&lt;B id="j7pp1306"&gt;"id"&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1307"&gt;));&lt;BR id="j7pp1308"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1309"&gt; 24 &lt;/SPAN&gt;            &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1310"&gt;&lt;B id="j7pp1311"&gt;collectionSize &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1312"&gt;= (Integer) criteria.uniqueResult();&lt;BR id="j7pp1313"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1314"&gt; 25 &lt;BR id="j7pp1315"&gt; 26 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1316"&gt;        }&lt;BR id="j7pp1317"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1318"&gt; 27 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1319"&gt;&lt;B id="j7pp1320"&gt;return&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1321"&gt;&lt;B id="j7pp1322"&gt;collectionSize;&lt;BR id="j7pp1323"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1324"&gt; 28 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1325"&gt;    }&lt;BR id="j7pp1326"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1327"&gt; 29 &lt;BR id="j7pp1328"&gt; 30 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1329"&gt;&lt;B id="j7pp1330"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1331"&gt; Criteria createCriteria() {&lt;BR id="j7pp1332"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1333"&gt; 31 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1334"&gt;        Criteria criteria = (Criteria) &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1335"&gt;&lt;B id="j7pp1336"&gt;hibernateTemplate.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1337"&gt;execute(&lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1338"&gt;&lt;B id="j7pp1339"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1340"&gt; HibernateCallback() {&lt;BR id="j7pp1341"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1342"&gt; 32 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1343"&gt;&lt;B id="j7pp1344"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1345"&gt; Object doInHibernate(Session session) &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1346"&gt;&lt;B id="j7pp1347"&gt;throws&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1348"&gt; HibernateException, SQLException {&lt;BR id="j7pp1349"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1350"&gt; 33 &lt;/SPAN&gt;                &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1351"&gt;&lt;B id="j7pp1352"&gt;return&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1353"&gt; session.createCriteria(&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1354"&gt;&lt;B id="j7pp1355"&gt;specificationCriteria.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1356"&gt;getPersistentClass());&lt;BR id="j7pp1357"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1358"&gt; 34 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1359"&gt;            }&lt;BR id="j7pp1360"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1361"&gt; 35 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1362"&gt;        });&lt;BR id="j7pp1363"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1364"&gt; 36 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1365"&gt;&lt;B id="j7pp1366"&gt;return&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1367"&gt; criteria;&lt;BR id="j7pp1368"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1369"&gt; 37 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1370"&gt;    }&lt;BR id="j7pp1371"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1372"&gt; 38 &lt;BR id="j7pp1373"&gt; 39 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1374"&gt;&lt;B id="j7pp1375"&gt;private&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1376"&gt;&lt;B id="j7pp1377"&gt;class&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1378"&gt; PagedIterator &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1379"&gt;&lt;B id="j7pp1380"&gt;implements&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1381"&gt; Iterator {&lt;BR id="j7pp1382"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1383"&gt; 40 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1384"&gt;&lt;B id="j7pp1385"&gt;public&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1386"&gt;&lt;B id="j7pp1387"&gt;boolean&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1388"&gt;&lt;B id="j7pp1389"&gt;lastPage &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1390"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1391"&gt;&lt;B id="j7pp1392"&gt;false&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1393"&gt;;&lt;BR id="j7pp1394"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1395"&gt; 41 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1396"&gt;&lt;B id="j7pp1397"&gt;private&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1398"&gt;&lt;B id="j7pp1399"&gt;int&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1400"&gt;&lt;B id="j7pp1401"&gt;offset;&lt;BR id="j7pp1402"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1403"&gt; 42 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1404"&gt;&lt;B id="j7pp1405"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1406"&gt; List &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1407"&gt;&lt;B id="j7pp1408"&gt;currentCollection;&lt;BR id="j7pp1409"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1410"&gt; 43 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1411"&gt;&lt;B id="j7pp1412"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1413"&gt; Iterator &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1414"&gt;&lt;B id="j7pp1415"&gt;currentIterator;&lt;BR id="j7pp1416"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1417"&gt; 44 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1418"&gt;&lt;B id="j7pp1419"&gt;private&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1420"&gt;&lt;B id="j7pp1421"&gt;int&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1422"&gt;&lt;B id="j7pp1423"&gt;size;&lt;BR id="j7pp1424"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1425"&gt; 45 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1426"&gt;&lt;B id="j7pp1427"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1428"&gt; ScrollableResults &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1429"&gt;&lt;B id="j7pp1430"&gt;scrollebleResults;&lt;BR id="j7pp1431"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1432"&gt; 46 &lt;BR id="j7pp1433"&gt; 47 &lt;BR id="j7pp1434"&gt; 48 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1435"&gt;&lt;B id="j7pp1436"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1437"&gt; PagedIterator(&lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1438"&gt;&lt;B id="j7pp1439"&gt;int&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1440"&gt; size) {&lt;BR id="j7pp1441"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1442"&gt; 49 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1443"&gt;&lt;B id="j7pp1444"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1445"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1446"&gt;&lt;B id="j7pp1447"&gt;size &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1448"&gt;= size;&lt;BR id="j7pp1449"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1450"&gt; 50 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1451"&gt;&lt;B id="j7pp1452"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1453"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1454"&gt;&lt;B id="j7pp1455"&gt;scrollebleResults &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1456"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1457"&gt;&lt;B id="j7pp1458"&gt;queryCriteria.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1459"&gt;scroll(ScrollMode.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1460"&gt;&lt;B id="j7pp1461"&gt;&lt;I id="j7pp1462"&gt;FORWARD_ONLY)&lt;/I&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1463"&gt;;&lt;BR id="j7pp1464"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1465"&gt; 51 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1466"&gt;&lt;B id="j7pp1467"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1468"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1469"&gt;&lt;B id="j7pp1470"&gt;currentCollection &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1471"&gt;= loadPage(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp1472"&gt;0&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1473"&gt;);&lt;BR id="j7pp1474"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1475"&gt; 52 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1476"&gt;&lt;B id="j7pp1477"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1478"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1479"&gt;&lt;B id="j7pp1480"&gt;currentIterator &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1481"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1482"&gt;&lt;B id="j7pp1483"&gt;currentCollection.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1484"&gt;iterator();&lt;BR id="j7pp1485"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1486"&gt; 53 &lt;BR id="j7pp1487"&gt; 54 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1488"&gt;        }&lt;BR id="j7pp1489"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1490"&gt; 55 &lt;BR id="j7pp1491"&gt; 56 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1492"&gt;&lt;B id="j7pp1493"&gt;protected&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1494"&gt; List loadPage(&lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1495"&gt;&lt;B id="j7pp1496"&gt;int&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1497"&gt; offset) {&lt;BR id="j7pp1498"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1499"&gt; 57 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1500"&gt;&lt;B id="j7pp1501"&gt;if&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1502"&gt; (offset &amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1503"&gt;&lt;B id="j7pp1504"&gt;size)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1505"&gt; {&lt;BR id="j7pp1506"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1507"&gt; 58 &lt;/SPAN&gt;                &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1508"&gt;&lt;B id="j7pp1509"&gt;throw&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1510"&gt;&lt;B id="j7pp1511"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1512"&gt; NoSuchElementException();&lt;BR id="j7pp1513"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1514"&gt; 59 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1515"&gt;            }&lt;BR id="j7pp1516"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1517"&gt; 60 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1518"&gt;&lt;B id="j7pp1519"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1520"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1521"&gt;&lt;B id="j7pp1522"&gt;offset &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1523"&gt;= offset;&lt;BR id="j7pp1524"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1525"&gt; 61 &lt;/SPAN&gt;            &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1526"&gt;&lt;B id="j7pp1527"&gt;currentCollection &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1528"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1529"&gt;&lt;B id="j7pp1530"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1531"&gt; ArrayList(&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1532"&gt;&lt;B id="j7pp1533"&gt;pageSize)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1534"&gt;;&lt;BR id="j7pp1535"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1536"&gt; 62 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1537"&gt;            System.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1538"&gt;&lt;B id="j7pp1539"&gt;&lt;I id="j7pp1540"&gt;out.&lt;/I&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1541"&gt;println(&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff" id="j7pp1542"&gt;&lt;B id="j7pp1543"&gt;"Loading offset ["&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1544"&gt;+offset+&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff" id="j7pp1545"&gt;&lt;B id="j7pp1546"&gt;"]"&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1547"&gt;);&lt;BR id="j7pp1548"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1549"&gt; 63 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1550"&gt;&lt;B id="j7pp1551"&gt;if&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1552"&gt; ((&lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1553"&gt;&lt;B id="j7pp1554"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1555"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1556"&gt;&lt;B id="j7pp1557"&gt;offset &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1558"&gt;+ &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1559"&gt;&lt;B id="j7pp1560"&gt;pageSize)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1561"&gt; &amp;gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1562"&gt;&lt;B id="j7pp1563"&gt;size)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1564"&gt; {&lt;BR id="j7pp1565"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1566"&gt; 64 &lt;/SPAN&gt;                &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1567"&gt;&lt;B id="j7pp1568"&gt;lastPage &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1569"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1570"&gt;&lt;B id="j7pp1571"&gt;true&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1572"&gt;;&lt;BR id="j7pp1573"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1574"&gt; 65 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1575"&gt;            }&lt;BR id="j7pp1576"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1577"&gt; 66 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1578"&gt;&lt;B id="j7pp1579"&gt;int&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1580"&gt; scrollSize = &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1581"&gt;&lt;B id="j7pp1582"&gt;lastPage &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1583"&gt;? &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1584"&gt;&lt;B id="j7pp1585"&gt;size &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1586"&gt;- offset: &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1587"&gt;&lt;B id="j7pp1588"&gt;pageSize;&lt;BR id="j7pp1589"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1590"&gt; 67 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1591"&gt;&lt;B id="j7pp1592"&gt;for&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1593"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1594"&gt;&lt;B id="j7pp1595"&gt;int&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1596"&gt; i = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp1597"&gt;0&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1598"&gt;; i &amp;lt; scrollSize; i++) {&lt;BR id="j7pp1599"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1600"&gt; 68 &lt;/SPAN&gt;                &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1601"&gt;&lt;B id="j7pp1602"&gt;if&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1603"&gt; (!&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1604"&gt;&lt;B id="j7pp1605"&gt;scrollebleResults.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1606"&gt;next()) {&lt;BR id="j7pp1607"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1608"&gt; 69 &lt;/SPAN&gt;                    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1609"&gt;&lt;B id="j7pp1610"&gt;throw&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1611"&gt;&lt;B id="j7pp1612"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1613"&gt; NoSuchElementException();&lt;BR id="j7pp1614"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1615"&gt; 70 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1616"&gt;                }&lt;BR id="j7pp1617"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1618"&gt; 71 &lt;/SPAN&gt;                &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1619"&gt;&lt;B id="j7pp1620"&gt;currentCollection.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1621"&gt;add(&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1622"&gt;&lt;B id="j7pp1623"&gt;scrollebleResults.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1624"&gt;get(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp1625"&gt;0&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1626"&gt;));&lt;BR id="j7pp1627"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1628"&gt; 72 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1629"&gt;            }&lt;BR id="j7pp1630"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1631"&gt; 73 &lt;BR id="j7pp1632"&gt; 74 &lt;/SPAN&gt;            &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1633"&gt;&lt;B id="j7pp1634"&gt;currentIterator &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1635"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1636"&gt;&lt;B id="j7pp1637"&gt;currentCollection.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1638"&gt;iterator();&lt;BR id="j7pp1639"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1640"&gt; 75 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1641"&gt;&lt;B id="j7pp1642"&gt;return&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1643"&gt;&lt;B id="j7pp1644"&gt;currentCollection;&lt;BR id="j7pp1645"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1646"&gt; 76 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1647"&gt;        }&lt;BR id="j7pp1648"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1649"&gt; 77 &lt;BR id="j7pp1650"&gt; 78 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1651"&gt;&lt;B id="j7pp1652"&gt;public&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1653"&gt;&lt;B id="j7pp1654"&gt;boolean&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1655"&gt; hasNext() {&lt;BR id="j7pp1656"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1657"&gt; 79 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1658"&gt;&lt;B id="j7pp1659"&gt;return&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1660"&gt; size() &amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp1661"&gt;0&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1662"&gt; &amp;amp;&amp;amp; (&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1663"&gt;&lt;B id="j7pp1664"&gt;currentIterator.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1665"&gt;hasNext() || !&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1666"&gt;&lt;B id="j7pp1667"&gt;lastPage)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1668"&gt;;&lt;BR id="j7pp1669"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1670"&gt; 80 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1671"&gt;        }&lt;BR id="j7pp1672"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1673"&gt; 81 &lt;BR id="j7pp1674"&gt; 82 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1675"&gt;&lt;B id="j7pp1676"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1677"&gt; Object next() {&lt;BR id="j7pp1678"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1679"&gt; 83 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1680"&gt;&lt;B id="j7pp1681"&gt;if&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1682"&gt; (!&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1683"&gt;&lt;B id="j7pp1684"&gt;currentIterator.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1685"&gt;hasNext()) {&lt;BR id="j7pp1686"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1687"&gt; 84 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1688"&gt;                unloadPage(&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1689"&gt;&lt;B id="j7pp1690"&gt;currentCollection)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1691"&gt;;&lt;BR id="j7pp1692"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1693"&gt; 85 &lt;/SPAN&gt;                &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1694"&gt;&lt;B id="j7pp1695"&gt;currentCollection &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1696"&gt;= loadPage(&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1697"&gt;&lt;B id="j7pp1698"&gt;offset &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1699"&gt;+ &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1700"&gt;&lt;B id="j7pp1701"&gt;pageSize)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1702"&gt;;&lt;BR id="j7pp1703"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1704"&gt; 86 &lt;/SPAN&gt;                &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1705"&gt;&lt;B id="j7pp1706"&gt;currentIterator &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1707"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1708"&gt;&lt;B id="j7pp1709"&gt;currentCollection.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1710"&gt;iterator();&lt;BR id="j7pp1711"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1712"&gt; 87 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1713"&gt;            }&lt;BR id="j7pp1714"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1715"&gt; 88 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1716"&gt;&lt;B id="j7pp1717"&gt;return&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1718"&gt;&lt;B id="j7pp1719"&gt;currentIterator.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1720"&gt;next();&lt;BR id="j7pp1721"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1722"&gt; 89 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1723"&gt;        }&lt;BR id="j7pp1724"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1725"&gt; 90 &lt;BR id="j7pp1726"&gt; 91 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1727"&gt;&lt;B id="j7pp1728"&gt;protected&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1729"&gt;&lt;B id="j7pp1730"&gt;void&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1731"&gt; unloadPage(List currentCollection) {&lt;BR id="j7pp1732"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1733"&gt; 92 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1734"&gt;&lt;B id="j7pp1735"&gt;for&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1736"&gt; (Object o : currentCollection) {&lt;BR id="j7pp1737"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1738"&gt; 93 &lt;/SPAN&gt;                &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1739"&gt;&lt;B id="j7pp1740"&gt;hibernateTemplate.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1741"&gt;evict(o);&lt;BR id="j7pp1742"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1743"&gt; 94 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1744"&gt;            }&lt;BR id="j7pp1745"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1746"&gt; 95 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1747"&gt;        }&lt;BR id="j7pp1748"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1749"&gt; 96 &lt;BR id="j7pp1750"&gt; 97 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1751"&gt;&lt;B id="j7pp1752"&gt;public&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1753"&gt;&lt;B id="j7pp1754"&gt;void&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1755"&gt; remove() {&lt;BR id="j7pp1756"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1757"&gt; 98 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1758"&gt;&lt;B id="j7pp1759"&gt;throw&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1760"&gt;&lt;B id="j7pp1761"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1762"&gt; UnsupportedOperationException();&lt;BR id="j7pp1763"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1764"&gt; 99 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1765"&gt;        }&lt;BR id="j7pp1766"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1767"&gt;100 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1768"&gt;    }&lt;BR id="j7pp1769"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1770"&gt;101 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1771"&gt;}&lt;BR id="j7pp1772"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1773"&gt;102 &lt;/SPAN&gt;&lt;/PRE&gt;&lt;B id="j7pp1774"&gt;Listing 12&lt;BR id="j7pp1775"&gt;&lt;/B&gt;The &lt;SPAN style='font-family: "Courier New"' id="j7pp1776"&gt;ScrollableResults &lt;/SPAN&gt;-interface is basically just a low-level approach in mapping row-based data into domain-objects. The instantiated and mapped objects are retrieved using the &lt;SPAN style='font-family: "Courier New"' id="j7pp1777"&gt;ScrollableResult.get&lt;/SPAN&gt;(..)method. The get-method retrieves objects index from 0. It may be possible to retrieve several objects from a result-set, because hibernate generates queries that provides data for several objects when using outer-join fetching to avoid multiple roundtrips to the database.&lt;BR id="j7pp1778"&gt;&lt;BR id="j7pp1779"&gt; Let us say that we extend the model presented in Figure 1 with a one-to-many relation relation to &lt;SPAN style='font-family: "Courier New"' id="j7pp1780"&gt;OrderLineDetail&lt;/SPAN&gt; as shown in Figure 2.&lt;BR id="j7pp1781"&gt;&lt;IMG src="http://docs.google.com/File?id=dcs9tn98_12g6f8vb" style="height: 197px; width: 378px" id="j7pp1782"&gt;&lt;BR id="j7pp1783"&gt;&lt;B id="j7pp1784"&gt;Figure 2&lt;BR id="j7pp1785"&gt;&lt;BR id="j7pp1786"&gt;&lt;/B&gt;In tis case, to get all the data from OrderDetail using one select and outer-join fetching, will make the returned select return four rows in total with the data for OrderLine repeated once for each instance caused by the outer-join with OrderDetail. This means that we lack a layer of abstraction here. We cannot implement this in a generic manner. We will actually have to alter the implementation of the strategy implemented to retrieve &lt;SPAN style='font-family: "Courier New"' id="j7pp1787"&gt;OrderLine&lt;SPAN style="font-family: Arial" id="j7pp1788"&gt; instances just because we did a small change to the domain-model, adding the&lt;SPAN style='font-family: "Courier New"' id="j7pp1789"&gt; OrderDetail&lt;/SPAN&gt; -relation.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR id="j7pp1790"&gt;&lt;BR id="j7pp1791"&gt; The &lt;SPAN style='font-family: "Courier New"' id="j7pp1792"&gt;ScrollableResults&lt;/SPAN&gt; is backed by a ResultSet and needs the connection to be open during the iteration of the query. This will pose some challenges when implementing paging spanning multiple web-requests, typically paging in a web-page, because the ScrollableResult will need to be valid and usable across requests.&lt;BR id="j7pp1793"&gt;&lt;BR id="j7pp1794"&gt; Even though the approach is fast and lean on memory as can be seen by looking at the test-results in table 3, these limitations will probably get you in to problems except from in the simplest cases.&lt;BR id="j7pp1795"&gt;&lt;BR id="j7pp1796"&gt;&lt;DIV id="j7pp1797"&gt;&lt;TABLE style="width: 329px; height: 66px" border="1" cellpadding="3" cellspacing="0" id="j7pp1798"&gt;&lt;TBODY id="j7pp1799"&gt;&lt;TR id="j7pp1800"&gt;&lt;TD width="50%" id="j7pp1801"&gt;&lt;B id="j7pp1802"&gt;Time elapsed&lt;/B&gt;&lt;BR id="j7pp1803"&gt;&lt;/TD&gt;&lt;TD width="50%" id="j7pp1804"&gt;&lt;B id="j7pp1805"&gt;Memory usage delta&lt;/B&gt;&lt;BR id="j7pp1806"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR id="j7pp1807"&gt;&lt;TD width="50%" id="j7pp1808"&gt;         89s&lt;BR id="j7pp1809"&gt;&lt;/TD&gt;&lt;TD width="50%" id="j7pp1810"&gt;         26009&lt;BR id="j7pp1811"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;BR id="j7pp1812"&gt;&lt;B id="j7pp1813"&gt;Table 3&lt;/B&gt;&lt;BR id="j7pp1814"&gt;&lt;BR id="j7pp1815"&gt;&lt;BR id="j7pp1816"&gt;&lt;H2 id="j7pp1817"&gt;   The solution &lt;/H2&gt; The most effective solution is to use the primary key as a paging criterion.This enables us to rely of first class constructs like a&lt;I id="j7pp1818"&gt; between&lt;/I&gt; range query which is simple for the RDBMS to optimize, the primary key of the queried entity will most likely be indexed already.&lt;BR id="j7pp1819"&gt; Retrieving data using a range query on the primary key is a two-step process. First one have to retrieve the collection of primary-keys, followed by a step to generate the intervals to properly identify a proper subset of the data,followed by the actual queries against the data.&lt;BR id="j7pp1820"&gt;&lt;PRE style="padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; line-height: 100%; font-family: monospace; background-color: #ffffff" id="j7pp1821"&gt;&lt;SPAN style="color: #800000" id="j7pp1822"&gt;  1 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1823"&gt;&lt;B id="j7pp1824"&gt;package&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1825"&gt; com.zenior.sandbox.hibernate.pagination;&lt;BR id="j7pp1826"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1827"&gt;  2 &lt;BR id="j7pp1828"&gt;  3 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1829"&gt;&lt;B id="j7pp1830"&gt;import&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1831"&gt; no.zenior.domain.HibernateCriteriaSpecification;&lt;BR id="j7pp1832"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1833"&gt;  4 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1834"&gt;&lt;B id="j7pp1835"&gt;import&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1836"&gt; org.springframework.orm.hibernate3.HibernateTemplate;&lt;BR id="j7pp1837"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1838"&gt;  5 &lt;BR id="j7pp1839"&gt;  6 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1840"&gt;&lt;B id="j7pp1841"&gt;import&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1842"&gt; java.util.AbstractCollection;&lt;BR id="j7pp1843"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1844"&gt;  7 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1845"&gt;&lt;B id="j7pp1846"&gt;import&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1847"&gt; java.util.ArrayList;&lt;BR id="j7pp1848"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1849"&gt;  8 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1850"&gt;&lt;B id="j7pp1851"&gt;import&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1852"&gt; java.util.Collection;&lt;BR id="j7pp1853"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1854"&gt;  9 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1855"&gt;&lt;B id="j7pp1856"&gt;import&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1857"&gt; java.util.Iterator;&lt;BR id="j7pp1858"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1859"&gt; 10 &lt;BR id="j7pp1860"&gt; 11 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp1861"&gt;&lt;I id="j7pp1862"&gt;/**&lt;BR id="j7pp1863"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1864"&gt; 12 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp1865"&gt;&lt;I id="j7pp1866"&gt; * Collection implementation that iterates using a range query for available identifiers&lt;BR id="j7pp1867"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1868"&gt; 13 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp1869"&gt;&lt;I id="j7pp1870"&gt; * for the queried collection.&lt;BR id="j7pp1871"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1872"&gt; 14 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp1873"&gt;&lt;I id="j7pp1874"&gt; * &lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #e2ffe2" id="j7pp1875"&gt;&lt;I id="j7pp1876"&gt;&amp;lt;/br&amp;gt;&lt;BR id="j7pp1877"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1878"&gt; 15 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp1879"&gt;&lt;I id="j7pp1880"&gt; *&lt;BR id="j7pp1881"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1882"&gt; 16 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp1883"&gt;&lt;I id="j7pp1884"&gt; * &lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080" id="j7pp1885"&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp1886"&gt;&lt;B id="j7pp1887"&gt;&lt;I id="j7pp1888"&gt;&lt;U id="j7pp1889"&gt;@author&lt;/U&gt;&lt;/I&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp1890"&gt;&lt;I id="j7pp1891"&gt; Bjørn Bjerkeli&lt;BR id="j7pp1892"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1893"&gt; 17 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp1894"&gt;&lt;I id="j7pp1895"&gt; */&lt;BR id="j7pp1896"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1897"&gt; 18 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1898"&gt;&lt;B id="j7pp1899"&gt;public&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1900"&gt;&lt;B id="j7pp1901"&gt;class&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1902"&gt; IdIntervalCollection &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1903"&gt;&lt;B id="j7pp1904"&gt;extends&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1905"&gt; AbstractCollection {&lt;BR id="j7pp1906"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1907"&gt; 19 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1908"&gt;&lt;B id="j7pp1909"&gt;private&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1910"&gt;&lt;B id="j7pp1911"&gt;static&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1912"&gt;&lt;B id="j7pp1913"&gt;final&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1914"&gt;&lt;B id="j7pp1915"&gt;int&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1916"&gt;&lt;B id="j7pp1917"&gt;&lt;I id="j7pp1918"&gt;DEFAULT_PAGESIZE &lt;/I&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1919"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp1920"&gt;2000&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1921"&gt;;&lt;BR id="j7pp1922"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1923"&gt; 20 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1924"&gt;&lt;B id="j7pp1925"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1926"&gt; HibernateTemplate &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1927"&gt;&lt;B id="j7pp1928"&gt;hibernateTemplate;&lt;BR id="j7pp1929"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1930"&gt; 21 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1931"&gt;&lt;B id="j7pp1932"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1933"&gt; HibernateCriteriaSpecification &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1934"&gt;&lt;B id="j7pp1935"&gt;finderSpecification;&lt;BR id="j7pp1936"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1937"&gt; 22 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1938"&gt;&lt;B id="j7pp1939"&gt;private&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1940"&gt;&lt;B id="j7pp1941"&gt;int&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1942"&gt;&lt;B id="j7pp1943"&gt;pageSize &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1944"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1945"&gt;&lt;B id="j7pp1946"&gt;&lt;I id="j7pp1947"&gt;DEFAULT_PAGESIZE;&lt;BR id="j7pp1948"&gt;&lt;/I&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1949"&gt; 23 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1950"&gt;&lt;B id="j7pp1951"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1952"&gt; IdIntervalCollectionBuilder &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1953"&gt;&lt;B id="j7pp1954"&gt;pager;&lt;BR id="j7pp1955"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1956"&gt; 24 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1957"&gt;&lt;B id="j7pp1958"&gt;private&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1959"&gt;&lt;B id="j7pp1960"&gt;int&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp1961"&gt;&lt;B id="j7pp1962"&gt;size;&lt;BR id="j7pp1963"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1964"&gt; 25 &lt;BR id="j7pp1965"&gt; 26 &lt;/SPAN&gt;    &lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp1966"&gt;&lt;I id="j7pp1967"&gt;/**&lt;BR id="j7pp1968"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1969"&gt; 27 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp1970"&gt;&lt;I id="j7pp1971"&gt;     * &lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080" id="j7pp1972"&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp1973"&gt;&lt;B id="j7pp1974"&gt;&lt;I id="j7pp1975"&gt;&lt;U id="j7pp1976"&gt;@param&lt;/U&gt;&lt;/I&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp1977"&gt;&lt;I id="j7pp1978"&gt; hibernateTemplate&lt;BR id="j7pp1979"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1980"&gt; 28 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp1981"&gt;&lt;I id="j7pp1982"&gt;     * &lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080" id="j7pp1983"&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp1984"&gt;&lt;B id="j7pp1985"&gt;&lt;I id="j7pp1986"&gt;&lt;U id="j7pp1987"&gt;@param&lt;/U&gt;&lt;/I&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp1988"&gt;&lt;I id="j7pp1989"&gt; finderSpecification&lt;BR id="j7pp1990"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1991"&gt; 29 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp1992"&gt;&lt;I id="j7pp1993"&gt;     */&lt;BR id="j7pp1994"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp1995"&gt; 30 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp1996"&gt;&lt;B id="j7pp1997"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp1998"&gt; IdIntervalCollection(HibernateTemplate hibernateTemplate,&lt;BR id="j7pp1999"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2000"&gt; 31 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2001"&gt;                                HibernateCriteriaSpecification finderSpecification) {&lt;BR id="j7pp2002"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2003"&gt; 32 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2004"&gt;&lt;B id="j7pp2005"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2006"&gt;(hibernateTemplate, finderSpecification, &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2007"&gt;&lt;B id="j7pp2008"&gt;&lt;I id="j7pp2009"&gt;DEFAULT_PAGESIZE)&lt;/I&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2010"&gt;;&lt;BR id="j7pp2011"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2012"&gt; 33 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2013"&gt;    }&lt;BR id="j7pp2014"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2015"&gt; 34 &lt;BR id="j7pp2016"&gt; 35 &lt;/SPAN&gt;    &lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp2017"&gt;&lt;I id="j7pp2018"&gt;/**&lt;BR id="j7pp2019"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2020"&gt; 36 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp2021"&gt;&lt;I id="j7pp2022"&gt;     * &lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080" id="j7pp2023"&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp2024"&gt;&lt;B id="j7pp2025"&gt;&lt;I id="j7pp2026"&gt;&lt;U id="j7pp2027"&gt;@param&lt;/U&gt;&lt;/I&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp2028"&gt;&lt;I id="j7pp2029"&gt; hibernateTemplate&lt;BR id="j7pp2030"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2031"&gt; 37 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp2032"&gt;&lt;I id="j7pp2033"&gt;     * &lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080" id="j7pp2034"&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp2035"&gt;&lt;B id="j7pp2036"&gt;&lt;I id="j7pp2037"&gt;&lt;U id="j7pp2038"&gt;@param&lt;/U&gt;&lt;/I&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp2039"&gt;&lt;I id="j7pp2040"&gt; finderSpecification&lt;BR id="j7pp2041"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2042"&gt; 38 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp2043"&gt;&lt;I id="j7pp2044"&gt;     * &lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080" id="j7pp2045"&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp2046"&gt;&lt;B id="j7pp2047"&gt;&lt;I id="j7pp2048"&gt;&lt;U id="j7pp2049"&gt;@param&lt;/U&gt;&lt;/I&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp2050"&gt;&lt;I id="j7pp2051"&gt; pageSize&lt;BR id="j7pp2052"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2053"&gt; 39 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp2054"&gt;&lt;I id="j7pp2055"&gt;     */&lt;BR id="j7pp2056"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2057"&gt; 40 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2058"&gt;&lt;B id="j7pp2059"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2060"&gt; IdIntervalCollection(HibernateTemplate hibernateTemplate,&lt;BR id="j7pp2061"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2062"&gt; 41 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2063"&gt;                                HibernateCriteriaSpecification finderSpecification, &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2064"&gt;&lt;B id="j7pp2065"&gt;int&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2066"&gt; pageSize) {&lt;BR id="j7pp2067"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2068"&gt; 42 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2069"&gt;&lt;B id="j7pp2070"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2071"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2072"&gt;&lt;B id="j7pp2073"&gt;hibernateTemplate &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2074"&gt;= hibernateTemplate;&lt;BR id="j7pp2075"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2076"&gt; 43 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2077"&gt;&lt;B id="j7pp2078"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2079"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2080"&gt;&lt;B id="j7pp2081"&gt;finderSpecification &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2082"&gt;= finderSpecification;&lt;BR id="j7pp2083"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2084"&gt; 44 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2085"&gt;&lt;B id="j7pp2086"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2087"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2088"&gt;&lt;B id="j7pp2089"&gt;pageSize &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2090"&gt;= pageSize;&lt;BR id="j7pp2091"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2092"&gt; 45 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2093"&gt;        initialize();&lt;BR id="j7pp2094"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2095"&gt; 46 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2096"&gt;    }&lt;BR id="j7pp2097"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2098"&gt; 47 &lt;BR id="j7pp2099"&gt; 48 &lt;/SPAN&gt;    &lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp2100"&gt;&lt;I id="j7pp2101"&gt;/**&lt;BR id="j7pp2102"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2103"&gt; 49 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp2104"&gt;&lt;I id="j7pp2105"&gt;     * Initialize the instance of BucketIdIntervalPager.&lt;BR id="j7pp2106"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2107"&gt; 50 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp2108"&gt;&lt;I id="j7pp2109"&gt;     */&lt;BR id="j7pp2110"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2111"&gt; 51 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2112"&gt;&lt;B id="j7pp2113"&gt;private&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2114"&gt;&lt;B id="j7pp2115"&gt;void&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2116"&gt; initialize() {&lt;BR id="j7pp2117"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2118"&gt; 52 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2119"&gt;        Collection identifiers = HibernateRepositoryTool.&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2120"&gt;&lt;I id="j7pp2121"&gt;idProjection(&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2122"&gt;&lt;B id="j7pp2123"&gt;hibernateTemplate,&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2124"&gt;&lt;B id="j7pp2125"&gt;finderSpecification)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2126"&gt;;&lt;BR id="j7pp2127"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2128"&gt; 53 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2129"&gt;&lt;B id="j7pp2130"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2131"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2132"&gt;&lt;B id="j7pp2133"&gt;pager &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2134"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2135"&gt;&lt;B id="j7pp2136"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2137"&gt; IdIntervalCollectionBuilder(&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2138"&gt;&lt;B id="j7pp2139"&gt;pageSize)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2140"&gt;;&lt;BR id="j7pp2141"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2142"&gt; 54 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2143"&gt;&lt;B id="j7pp2144"&gt;for&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2145"&gt; (Object identifier : identifiers) {&lt;BR id="j7pp2146"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2147"&gt; 55 &lt;/SPAN&gt;            &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2148"&gt;&lt;B id="j7pp2149"&gt;pager.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2150"&gt;add((Long) identifier);&lt;BR id="j7pp2151"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2152"&gt; 56 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2153"&gt;        }&lt;BR id="j7pp2154"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2155"&gt; 57 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2156"&gt;&lt;B id="j7pp2157"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2158"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2159"&gt;&lt;B id="j7pp2160"&gt;size &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2161"&gt;= identifiers.size();&lt;BR id="j7pp2162"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2163"&gt; 58 &lt;/SPAN&gt;        &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2164"&gt;&lt;B id="j7pp2165"&gt;hibernateTemplate.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2166"&gt;clear();&lt;BR id="j7pp2167"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2168"&gt; 59 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2169"&gt;    }&lt;BR id="j7pp2170"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2171"&gt; 60 &lt;BR id="j7pp2172"&gt; 61 &lt;BR id="j7pp2173"&gt; 62 &lt;BR id="j7pp2174"&gt; 63 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2175"&gt;&lt;B id="j7pp2176"&gt;public&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2177"&gt;&lt;B id="j7pp2178"&gt;int&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2179"&gt; size() {&lt;BR id="j7pp2180"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2181"&gt; 64 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2182"&gt;&lt;B id="j7pp2183"&gt;return&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2184"&gt;&lt;B id="j7pp2185"&gt;size;&lt;BR id="j7pp2186"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2187"&gt; 65 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2188"&gt;    }&lt;BR id="j7pp2189"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2190"&gt; 66 &lt;BR id="j7pp2191"&gt; 67 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2192"&gt;&lt;B id="j7pp2193"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2194"&gt; Iterator iterator() {&lt;BR id="j7pp2195"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2196"&gt; 68 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2197"&gt;&lt;B id="j7pp2198"&gt;return&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2199"&gt;&lt;B id="j7pp2200"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2201"&gt; Iterator() {&lt;BR id="j7pp2202"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2203"&gt; 69 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2204"&gt;&lt;B id="j7pp2205"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2206"&gt; Collection &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2207"&gt;&lt;B id="j7pp2208"&gt;currentPage &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2209"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2210"&gt;&lt;B id="j7pp2211"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2212"&gt; ArrayList();&lt;BR id="j7pp2213"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2214"&gt; 70 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2215"&gt;&lt;B id="j7pp2216"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2217"&gt; Iterator &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2218"&gt;&lt;B id="j7pp2219"&gt;currentIterator &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2220"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2221"&gt;&lt;B id="j7pp2222"&gt;currentPage.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2223"&gt;iterator();&lt;BR id="j7pp2224"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2225"&gt; 71 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2226"&gt;&lt;B id="j7pp2227"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2228"&gt; Iterator &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2229"&gt;&lt;B id="j7pp2230"&gt;currentIdIntervalIterator &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2231"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2232"&gt;&lt;B id="j7pp2233"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2234"&gt; ArrayList(&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2235"&gt;&lt;B id="j7pp2236"&gt;pager.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2237"&gt;buildIdIntervals()).iterator();&lt;BR id="j7pp2238"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2239"&gt; 72 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2240"&gt;&lt;B id="j7pp2241"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2242"&gt; IdInterval &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2243"&gt;&lt;B id="j7pp2244"&gt;currentIdInterval;&lt;BR id="j7pp2245"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2246"&gt; 73 &lt;BR id="j7pp2247"&gt; 74 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2248"&gt;&lt;B id="j7pp2249"&gt;public&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2250"&gt;&lt;B id="j7pp2251"&gt;void&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2252"&gt; remove() {&lt;BR id="j7pp2253"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2254"&gt; 75 &lt;/SPAN&gt;                &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2255"&gt;&lt;B id="j7pp2256"&gt;throw&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2257"&gt;&lt;B id="j7pp2258"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2259"&gt; UnsupportedOperationException();&lt;BR id="j7pp2260"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2261"&gt; 76 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2262"&gt;            }&lt;BR id="j7pp2263"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2264"&gt; 77 &lt;BR id="j7pp2265"&gt; 78 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2266"&gt;&lt;B id="j7pp2267"&gt;public&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2268"&gt;&lt;B id="j7pp2269"&gt;boolean&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2270"&gt; hasNext() {&lt;BR id="j7pp2271"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2272"&gt; 79 &lt;/SPAN&gt;                &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2273"&gt;&lt;B id="j7pp2274"&gt;return&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2275"&gt; ((&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2276"&gt;&lt;B id="j7pp2277"&gt;size &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2278"&gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp2279"&gt;0&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2280"&gt;) &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2281"&gt;&lt;B id="j7pp2282"&gt;currentIdIntervalIterator.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2283"&gt;hasNext())&lt;BR id="j7pp2284"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2285"&gt; 80 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2286"&gt;                        || &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2287"&gt;&lt;B id="j7pp2288"&gt;currentIterator.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2289"&gt;hasNext();&lt;BR id="j7pp2290"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2291"&gt; 81 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2292"&gt;            }&lt;BR id="j7pp2293"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2294"&gt; 82 &lt;BR id="j7pp2295"&gt; 83 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2296"&gt;&lt;B id="j7pp2297"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2298"&gt; Object next() {&lt;BR id="j7pp2299"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2300"&gt; 84 &lt;/SPAN&gt;                &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2301"&gt;&lt;B id="j7pp2302"&gt;if&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2303"&gt; (!&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2304"&gt;&lt;B id="j7pp2305"&gt;currentIterator.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2306"&gt;hasNext()) {&lt;BR id="j7pp2307"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2308"&gt; 85 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2309"&gt;                    unloadPage(&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2310"&gt;&lt;B id="j7pp2311"&gt;currentPage)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2312"&gt;;&lt;BR id="j7pp2313"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2314"&gt; 86 &lt;/SPAN&gt;                    &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2315"&gt;&lt;B id="j7pp2316"&gt;currentIdInterval &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2317"&gt;= (IdInterval) &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2318"&gt;&lt;B id="j7pp2319"&gt;currentIdIntervalIterator.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2320"&gt;next();&lt;BR id="j7pp2321"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2322"&gt; 87 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2323"&gt;                    loadPage(&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2324"&gt;&lt;B id="j7pp2325"&gt;currentIdInterval)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2326"&gt;;&lt;BR id="j7pp2327"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2328"&gt; 88 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2329"&gt;                }&lt;BR id="j7pp2330"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2331"&gt; 89 &lt;BR id="j7pp2332"&gt; 90 &lt;/SPAN&gt;                &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2333"&gt;&lt;B id="j7pp2334"&gt;return&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2335"&gt;&lt;B id="j7pp2336"&gt;currentIterator.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2337"&gt;next();&lt;BR id="j7pp2338"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2339"&gt; 91 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2340"&gt;            }&lt;BR id="j7pp2341"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2342"&gt; 92 &lt;BR id="j7pp2343"&gt; 93 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2344"&gt;&lt;B id="j7pp2345"&gt;protected&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2346"&gt;&lt;B id="j7pp2347"&gt;void&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2348"&gt; unloadPage(Collection currentPage) {&lt;BR id="j7pp2349"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2350"&gt; 94 &lt;/SPAN&gt;                &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2351"&gt;&lt;B id="j7pp2352"&gt;for&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2353"&gt; (Object o : currentPage) {&lt;BR id="j7pp2354"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2355"&gt; 95 &lt;/SPAN&gt;                    &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2356"&gt;&lt;B id="j7pp2357"&gt;hibernateTemplate.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2358"&gt;evict(o);&lt;BR id="j7pp2359"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2360"&gt; 96 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2361"&gt;                }&lt;BR id="j7pp2362"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2363"&gt; 97 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2364"&gt;            }&lt;BR id="j7pp2365"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2366"&gt; 98 &lt;BR id="j7pp2367"&gt; 99 &lt;/SPAN&gt;            &lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp2368"&gt;&lt;I id="j7pp2369"&gt;/**&lt;BR id="j7pp2370"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2371"&gt;100 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp2372"&gt;&lt;I id="j7pp2373"&gt;             * Load the data corresponding to the idInterval.&lt;BR id="j7pp2374"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2375"&gt;101 &lt;/SPAN&gt;&lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp2376"&gt;&lt;I id="j7pp2377"&gt;             */&lt;BR id="j7pp2378"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2379"&gt;102 &lt;/SPAN&gt;            &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2380"&gt;&lt;B id="j7pp2381"&gt;protected&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2382"&gt;&lt;B id="j7pp2383"&gt;void&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2384"&gt; loadPage(IdInterval currentIdInterval) {&lt;BR id="j7pp2385"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2386"&gt;103 &lt;/SPAN&gt;                &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2387"&gt;&lt;B id="j7pp2388"&gt;finderSpecification.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2389"&gt;setIdInterval(currentIdInterval);&lt;BR id="j7pp2390"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2391"&gt;104 &lt;/SPAN&gt;                &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2392"&gt;&lt;B id="j7pp2393"&gt;currentPage &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2394"&gt;= HibernateRepositoryTool.&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2395"&gt;&lt;I id="j7pp2396"&gt;find(&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2397"&gt;&lt;B id="j7pp2398"&gt;hibernateTemplate,&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2399"&gt;&lt;B id="j7pp2400"&gt;finderSpecification)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2401"&gt;;&lt;BR id="j7pp2402"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2403"&gt;105 &lt;/SPAN&gt;                &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2404"&gt;&lt;B id="j7pp2405"&gt;currentIterator &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2406"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2407"&gt;&lt;B id="j7pp2408"&gt;currentPage.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2409"&gt;iterator();&lt;BR id="j7pp2410"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2411"&gt;106 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2412"&gt;            }&lt;BR id="j7pp2413"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2414"&gt;107 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2415"&gt;        };&lt;BR id="j7pp2416"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2417"&gt;108 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2418"&gt;    }&lt;BR id="j7pp2419"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2420"&gt;109 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2421"&gt;}&lt;BR id="j7pp2422"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2423"&gt;110 &lt;BR id="j7pp2424"&gt;111 &lt;/SPAN&gt;&lt;/PRE&gt;&lt;B id="j7pp2425"&gt;Listing 13&lt;BR id="j7pp2426"&gt;&lt;BR id="j7pp2427"&gt;&lt;/B&gt; The key here is basically to implement the iteration process in two steps, one to retrieve identifiers, and one to actually provide the iterator with an &lt;I id="j7pp2428"&gt;id-interval &lt;/I&gt;that is used tospecify a &lt;I id="j7pp2429"&gt;between &lt;/I&gt;range-query. Retrieving the set of identifiers is easy, the&lt;SPAN style='font-family: "Courier New"' id="j7pp2430"&gt; HibernateCriteriaSpecification&lt;/SPAN&gt; that uses Criteria for search has a &lt;SPAN style='font-family: "Courier New"' id="j7pp2431"&gt;Projections.id()&lt;/SPAN&gt;factory that returns all identifiers for a given Criteria-query. Basedupon the entire set of identifiers we are able to construct buckets of identifiers each representing a logical and proper page of data.&lt;BR id="j7pp2432"&gt;&lt;PRE style="padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; line-height: 100%; font-family: monospace; background-color: #ffffff" id="j7pp2433"&gt;&lt;SPAN style="color: #800000" id="j7pp2434"&gt;  1 &lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2435"&gt;&lt;B id="j7pp2436"&gt;public&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2437"&gt;&lt;B id="j7pp2438"&gt;void&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2439"&gt; testRetrieveOrderLinesUsingPagingIdInterval() {&lt;BR id="j7pp2440"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2441"&gt;  2 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2442"&gt;&lt;B id="j7pp2443"&gt;final&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2444"&gt; Order order = (Order) &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2445"&gt;&lt;B id="j7pp2446"&gt;hibernateTemplate.&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2447"&gt;get(Order.&lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2448"&gt;&lt;B id="j7pp2449"&gt;class&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2450"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2451"&gt;&lt;B id="j7pp2452"&gt;orderId)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2453"&gt;;&lt;BR id="j7pp2454"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2455"&gt;  3 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2456"&gt;        Collection orderLines = order.getOrderLines(&lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2457"&gt;&lt;B id="j7pp2458"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2459"&gt; IdIntervalPagedCollectionBuilder(&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2460"&gt;&lt;B id="j7pp2461"&gt;hibernateTemplate,&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp2462"&gt;50000&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2463"&gt;));&lt;BR id="j7pp2464"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2465"&gt;  4 &lt;BR id="j7pp2466"&gt;  5 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2467"&gt;        ResourceMonitor monitor = &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2468"&gt;&lt;B id="j7pp2469"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2470"&gt; ResourceMonitor(&lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff" id="j7pp2471"&gt;&lt;B id="j7pp2472"&gt;"order.getOrderLines()"&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2473"&gt;);&lt;BR id="j7pp2474"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2475"&gt;  6 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2476"&gt;&lt;B id="j7pp2477"&gt;for&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2478"&gt; (Object orderLine : orderLines) {&lt;BR id="j7pp2479"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2480"&gt;  7 &lt;/SPAN&gt;            &lt;SPAN style="color: #808080; background-color: #ffffff" id="j7pp2481"&gt;&lt;I id="j7pp2482"&gt;//&lt;BR id="j7pp2483"&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2484"&gt;  8 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2485"&gt;            OrderLine line = (OrderLine) orderLine;&lt;BR id="j7pp2486"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2487"&gt;  9 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2488"&gt;        }&lt;BR id="j7pp2489"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2490"&gt; 10 &lt;/SPAN&gt;        &lt;SPAN style="background-color: #ffffff" id="j7pp2491"&gt;&lt;I id="j7pp2492"&gt;assertEquals(&lt;/I&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp2493"&gt;1000&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2494"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff" id="j7pp2495"&gt;1000&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2496"&gt;, orderLines.size());&lt;BR id="j7pp2497"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2498"&gt; 11 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2499"&gt;        monitor.stop();&lt;BR id="j7pp2500"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2501"&gt; 12 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2502"&gt;        System.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2503"&gt;&lt;B id="j7pp2504"&gt;&lt;I id="j7pp2505"&gt;out.&lt;/I&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2506"&gt;println(monitor);&lt;BR id="j7pp2507"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2508"&gt; 13 &lt;/SPAN&gt;        &lt;BR id="j7pp2510"&gt;&lt;SPAN style="color: #800000" id="j7pp2511"&gt; 14 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2512"&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;B id="j7pp2513"&gt;Listing 14&lt;BR id="j7pp2514"&gt;&lt;BR id="j7pp2515"&gt;&lt;/B&gt; The&lt;SPAN style='font-family: "Courier New"' id="j7pp2516"&gt; IdIntervalPagedCollectionBuilder&lt;/SPAN&gt; is the pluggable implementation of the&lt;SPAN style='font-family: "Courier New"' id="j7pp2517"&gt; CollectionBuilder &lt;/SPAN&gt;interface described in listing 6.&lt;BR id="j7pp2518"&gt;&lt;PRE style="padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; line-height: 100%; font-family: monospace; background-color: #ffffff" id="j7pp2519"&gt;&lt;SPAN style="color: #800000" id="j7pp2520"&gt; 1 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2521"&gt;&lt;B id="j7pp2522"&gt;public&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2523"&gt;&lt;B id="j7pp2524"&gt;class&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2525"&gt; IdIntervalPagedCollectionBuilder &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2526"&gt;&lt;B id="j7pp2527"&gt;implements&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2528"&gt; CollectionBuilder {&lt;BR id="j7pp2529"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2530"&gt; 2 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2531"&gt;&lt;B id="j7pp2532"&gt;private&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2533"&gt; HibernateTemplate &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2534"&gt;&lt;B id="j7pp2535"&gt;hibernateTemplate;&lt;BR id="j7pp2536"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2537"&gt; 3 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2538"&gt;&lt;B id="j7pp2539"&gt;private&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2540"&gt;&lt;B id="j7pp2541"&gt;int&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2542"&gt;&lt;B id="j7pp2543"&gt;pageSize;&lt;BR id="j7pp2544"&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2545"&gt; 4 &lt;BR id="j7pp2546"&gt; 5 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2547"&gt;&lt;B id="j7pp2548"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2549"&gt; IdIntervalPagedCollectionBuilder(HibernateTemplate hibernateTemplate, &lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2550"&gt;&lt;B id="j7pp2551"&gt;int&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2552"&gt; pageSize) {&lt;BR id="j7pp2553"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2554"&gt; 6 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2555"&gt;&lt;B id="j7pp2556"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2557"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2558"&gt;&lt;B id="j7pp2559"&gt;hibernateTemplate &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2560"&gt;= hibernateTemplate;&lt;BR id="j7pp2561"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2562"&gt; 7 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2563"&gt;&lt;B id="j7pp2564"&gt;this&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2565"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2566"&gt;&lt;B id="j7pp2567"&gt;pageSize &lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2568"&gt;= pageSize;&lt;BR id="j7pp2569"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2570"&gt; 8 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2571"&gt;    }&lt;BR id="j7pp2572"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2573"&gt; 9 &lt;BR id="j7pp2574"&gt;10 &lt;/SPAN&gt;    &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2575"&gt;&lt;B id="j7pp2576"&gt;public&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2577"&gt; Collection build(Object instance) {&lt;BR id="j7pp2578"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2579"&gt;11 &lt;/SPAN&gt;        &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2580"&gt;&lt;B id="j7pp2581"&gt;return&lt;/B&gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2582"&gt;&lt;B id="j7pp2583"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2584"&gt; IdIntervalCollection(&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2585"&gt;&lt;B id="j7pp2586"&gt;hibernateTemplate,&lt;/B&gt;&lt;/SPAN&gt; &lt;BR id="j7pp2588"&gt;&lt;SPAN style="color: #800000" id="j7pp2589"&gt;12 &lt;/SPAN&gt;                &lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2590"&gt;&lt;B id="j7pp2591"&gt;new&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2592"&gt; HibernateCriteriaSpecification(OrderLine.&lt;/SPAN&gt;&lt;SPAN style="color: #000080; background-color: #ffffff" id="j7pp2593"&gt;&lt;B id="j7pp2594"&gt;class&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2595"&gt;, instance, &lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff" id="j7pp2596"&gt;&lt;B id="j7pp2597"&gt;"order"&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2598"&gt;), &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; background-color: #ffffff" id="j7pp2599"&gt;&lt;B id="j7pp2600"&gt;pageSize)&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2601"&gt;;&lt;BR id="j7pp2602"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2603"&gt;13 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2604"&gt;    }&lt;BR id="j7pp2605"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000" id="j7pp2606"&gt;14 &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff" id="j7pp2607"&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;BR id="j7pp2608"&gt;&lt;BR id="j7pp2610"&gt;&lt;B id="j7pp2611"&gt;Listing 15&lt;BR id="j7pp2612"&gt;&lt;BR id="j7pp2613"&gt;&lt;/B&gt; The three examples have almost the same amount of code, but rely onquite different approaches. The test-result for the last test is remarkable.&lt;BR id="j7pp2614"&gt;&lt;DIV id="j7pp2615"&gt;&lt;TABLE style="width: 327px; height: 66px" border="2" cellpadding="3" cellspacing="0" id="j7pp2616"&gt;&lt;TBODY id="j7pp2617"&gt;&lt;TR id="j7pp2618"&gt;&lt;TD width="50%" id="j7pp2619"&gt;&lt;B id="j7pp2620"&gt;Time elapsed&lt;/B&gt;&lt;BR id="j7pp2621"&gt;&lt;/TD&gt;&lt;TD width="50%" id="j7pp2622"&gt;&lt;B id="j7pp2623"&gt;         Memory Usage Delta&lt;BR id="j7pp2624"&gt;&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR id="j7pp2625"&gt;&lt;TD width="50%" id="j7pp2626"&gt;&lt;B id="j7pp2627"&gt;         99,5s&lt;BR id="j7pp2628"&gt;&lt;/B&gt;&lt;/TD&gt;&lt;TD width="50%" id="j7pp2629"&gt;&lt;B id="j7pp2630"&gt;         29402&lt;BR id="j7pp2631"&gt;&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt; This approach is almost as fast as the brute-force version. The memory consumption is about one tenth. By selecting the appropriate page-size for this implementation, you may alter the ratio between execution time and memory consumption. This version is also stateless, it does not keep references to resources like the ScrollableResult version does, nor does it strain the database like the version using setFirstResult/setMaxResult.&lt;BR id="j7pp2632"&gt;&lt;H2 id="j7pp2633"&gt;   Limitations &lt;/H2&gt; We need a primary key, preferably a surrogate key, that has a natural ordering so that we can implement the paging concept by using a between search for the identifiers. Another limitation is the need to actually retrieve all the identifiers before performing the search, which means two select-statements instead of possibly only one.&lt;BR id="j7pp2634"&gt;&lt;BR id="j7pp2635"&gt;&lt;H1 style="background-color: #ffffff; color: #000000" id="j7pp2636"&gt;   The Author &lt;/H1&gt;&lt;P id="qdnf1"&gt;&lt;SPAN style="background-color: #ffffff; color: #000000" id="j7pp2637"&gt; The Author is working as a senior consultant in a Norwegian consulting company, Zenior AS, and is an active member of the Norwegian JUG, javaBin.&lt;/SPAN&gt;&lt;BR id="j7pp2638"&gt;&lt;/P&gt;&lt;H1 id="hpgp"&gt;&lt;SPAN style="background-color: #ffffff; color: #000000" id="qdnf5"&gt;Licensing&lt;/SPAN&gt;&lt;/H1&gt;&lt;P id="hpgp0"&gt; &lt;A rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/no/" id="adlk"&gt;&lt;IMG alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/no/88x31.png" id="adlk0"&gt;&lt;/A&gt;&lt;BR id="adlk1"&gt; Hibernate paging using id-intervals by &lt;A href="http://devperspective.blogspot.com/" rel="cc:attributionURL" id="adlk3"&gt;Bjørn Bjerkeli&lt;/A&gt; is licensed under a &lt;A rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/no/" id="adlk4"&gt;Creative Commons Attribution-Share Alike 3.0 Norway License&lt;/A&gt;.&lt;BR id="adlk5"&gt; Based on a work at &lt;A href="http://svitjod.rymdweb.com/repository/com/zenior/sandbox/" rel="dc:source" id="adlk6"&gt;svitjod.rymdweb.com&lt;/A&gt;.  &lt;/P&gt;&lt;H2 id="j7pp2639"&gt;   References &lt;/H2&gt;&lt;A name="memory" id="j7pp2640"&gt;[1] Memory limitation on 32 bit systems&lt;/A&gt;, http://www.theserverside.com/discussions/thread.tss?thread_id=19442&lt;BR id="j7pp2641"&gt;&lt;A name="hibernate_batch" id="j7pp2642"&gt;[2] Hibernate batch processing&lt;/A&gt; http://www.hibernate.org/hib_docs/v3/reference/en/html/batch.html&lt;BR id="j7pp2643"&gt;&lt;A name="rownum" id="j7pp2644"&gt;[3] Oracle rownum&lt;/A&gt; http://www.oracle.com/technology/oramag/oracle/06-sep/o56asktom.html&lt;BR id="j7pp2645"&gt;&lt;A name="rownum" id="j7pp2646"&gt;&lt;BR id="j7pp2647"&gt;&lt;/A&gt;&lt;BR id="ty_-"&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-6891589036228289102?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/6891589036228289102/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=6891589036228289102' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/6891589036228289102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/6891589036228289102'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2007/03/effective-pagination-using-hibernate.html' title=''/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-1585136237061276655</id><published>2006-10-22T13:00:00.000+02:00</published><updated>2006-10-22T13:10:14.869+02:00</updated><title type='text'>Sourceforge download problems</title><content type='html'>Just wanted to download the updated version of &lt;a href="http://tortoisesvn.tigris.org/"&gt;TortoiseSVN&lt;/a&gt; which I like a lot better than the command-.line svn tool when importing projects from different folders. The only problem was that for some reason, the only available download site was a server in kent, that for some reason was down.&lt;br /&gt;I inspected the download url, that is on the form http://prdownloads.sourceforge.net/tortoisesvn/TortoiseSVN-1.4.0.7501-x64-svn-1.4.0.msi?use_mirror=kent&lt;br /&gt;Well i assumed that the request parameter use_mirror =&lt;alias&gt; could probably be replaced by something else. I tried google to see if I could get at list of all these alternate servers, without luck. I  saw that the download-server had a dns-name on the form http://kent.dl.sourceforge.net/, then i turned to netcraft.com and entered *.dl.sourceforge.net and it immediately gave me back a list of servers matching the dns-query. Voila, i replaced use_mirror=kent with use_mirror=belnet and there my binary dumped down on disk :-)&lt;br /&gt;&lt;/alias&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-1585136237061276655?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/1585136237061276655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=1585136237061276655' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/1585136237061276655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/1585136237061276655'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/10/sourceforge-download-problems.html' title='Sourceforge download problems'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-6172172946540605569</id><published>2006-10-21T13:42:00.000+02:00</published><updated>2006-10-22T13:00:25.273+02:00</updated><title type='text'>Saturday night in</title><content type='html'>It's Saturday night and I think I will spend most of it at home together with my computer.&lt;br /&gt;&lt;a href="http://blogger.com/"&gt;blogger.com&lt;/a&gt; has gone live with a new version of blogging software, so I have just downloaded the new &lt;a href="http://www.mozilla.com/en-US/firefox/2.0/releasenotes/"&gt;Firefox 2.0 RC3&lt;/a&gt; bowser and will give both the face lifted browser and the new blogger a try.&lt;br /&gt;&lt;br /&gt;The first thing I noticed was that my &lt;a href="http://del.icio.us/"&gt;del.icio.us&lt;/a&gt; plugin doesn't work anymore. I have really been used to adding sites and bookmarks to del.icio.us using the extension, especially since I am using multiple computers, and being able to centralize the management of my bookmarks is really a good thing.  Fortunately, I found a replacement, &lt;a href="https://addons.mozilla.org/firefox/527/"&gt;del.icio.us post&lt;/a&gt; that works fine with 2.0.&lt;br /&gt;The 2.0 browser now comes with a built-in spell-checker, which is nice. Text that you enter in form field can be validated on the client side, and does not rely on external services. I have used it already.&lt;br /&gt;&lt;br /&gt;Other things that I have been using and spending my time on lately is:&lt;br /&gt;* &lt;a href="http://www.jetbrains.com/idea/"&gt;IDEA IntelliJ 6.0&lt;/a&gt; that was released last week&lt;br /&gt;* &lt;a href="http://code.google.com/webtoolkit/"&gt;Google Web Toolkit, GWT&lt;/a&gt;&lt;br /&gt;* &lt;a href="http://www.gpsoft.com.au/Intro.html"&gt;Directory Opus&lt;/a&gt; a commercial alternative to Total Commander&lt;br /&gt;&lt;br /&gt;And if you haven't moved to the new beta-version on blogger.com, do it, its better than before, I guess that the Google-guys has been busy lately.&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-6172172946540605569?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/6172172946540605569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=6172172946540605569' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/6172172946540605569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/6172172946540605569'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/10/saturday-night-in.html' title='Saturday night in'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115827219214484767</id><published>2006-09-14T23:58:00.000+02:00</published><updated>2006-10-21T13:55:14.097+02:00</updated><title type='text'>JavaZone closeup and end-comments</title><content type='html'>The last day of JavaZone has been just as exiting as the first one. I tried to add a nice mix of high level process-oriented stuff with hard-core technical sessions to keep me from falling asleep today. Didn't have much sleep tonight, huh.&lt;br /&gt;Mary Poppendieck had a great session on Lean SW-development. I am a great fan of the Poppendiecks and  especially their first book on &lt;a href="http://www.amazon.com/gp/explorer/0321150783/2/ref=pd_lpo_ase/102-4122036-6556943?ie=UTF8"&gt;Lean Software Development:An Agile Toolkit. &lt;/a&gt;&lt;br /&gt;Conventiently she announced that her &lt;a href="http://www.amazon.com/gp/explorer/0321437381/2/ref=pd_lpo_ase/102-4122036-6556943?ie=UTF8"&gt;new book&lt;/a&gt; is shipping as we speak. I am also in the process of entering my credit card number on amazon to get a copy.&lt;br /&gt;Thereafter I dived into a session on &lt;a href="http://www.sun.com/bigadmin/content/dtrace/"&gt;DTrace&lt;/a&gt;, a feature of Solaris systems that enables full tracing of the entire software stack from a thread in the java-vm and down to system calls in the kernel. This approach to tracing will make searching for bottlenecks in the system much easier. The speach was accompanied with some nice live demos.&lt;br /&gt;Simon Ritter another speaker that made JavaZone 2006 worth visiting. He has been experimenting with &lt;a href="http://research.sun.com/projects/dashboard.php?id=145"&gt;SPOT&lt;/a&gt; and robots, talking about &lt;a href="https://rtsj.dev.java.net/"&gt;RTSJ&lt;/a&gt; and esoteric VM-options on the Solaris VM. Did you know that there are more than 400 different -XXoptions available in the Solaris VM as from java 6? Well , now you do. A I am currently back to work (in the middle of the night) because we are going in to production with a system for a client. Suddenly I realized that it is actually a year until next time I can spend two great days@JavaZone.&lt;br /&gt;&lt;br /&gt;Have something on your mind? post-it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115827219214484767?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115827219214484767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115827219214484767' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115827219214484767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115827219214484767'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/09/javazone-closeup-and-end-comments.html' title='JavaZone closeup and end-comments'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115822343688517939</id><published>2006-09-14T10:35:00.000+02:00</published><updated>2006-10-21T13:41:05.835+02:00</updated><title type='text'>What is new at JavaZone  2006</title><content type='html'>I am currently attending a session at JavaZone 2006 called Are you a plumber? &lt;a href="http://www2.java.no/web/show.do?page=92&amp;amp;articleid=4583"&gt;How to avoid plumbing for business-enriched remote clients.&lt;/a&gt; It is a co-talk by Ole Andre Ranvik which is a co-worker of mine and Bjlørn Nordmoen from Western Gecko. The are basically speaking about a project they have been doing together for the last year and of they solved some of the issues they encountered.&lt;br /&gt;&lt;br /&gt;The thing about the program this year as far as I can tell is that we do not have to much stunning news, new technology, new releases and all new  specs. Much more of the material this year is based upon how we actually use our technology in day-to day work. Agile tracks and and technology driven tracks share a common property with respect to this, they cover what developers have been working with, not what someone think they should work with. With some exceptions, EJB 3.0 being one of them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115822343688517939?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115822343688517939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115822343688517939' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115822343688517939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115822343688517939'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/09/what-is-new-at-javazone-2006.html' title='What is new at JavaZone  2006'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115816401284587341</id><published>2006-09-13T18:08:00.000+02:00</published><updated>2006-10-21T13:41:05.769+02:00</updated><title type='text'>Backwards compatibility, why?</title><content type='html'>This is quite an interesting topic. I am currently attending a session on EJB 3.0 and JPA given by Patrick Linskey which has been participating in the spec work. An issue related  to backwards compatibility related to some things introduced in JPA (global named queries). And I asked if Patrick sees it as much of a problem to break backwards compatibility. And he said, "we did it with EJB 3.0 and we do not want to do it again". Well I have never ever heard of anyone actually complain about this compatibility break. In my opinion in many cases the effort spent not to break backwards compatibility is just a waste. We would be much better of getting new specs and implementations that improves faster as opposed to versions that does not break backwards compatibility.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115816401284587341?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115816401284587341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115816401284587341' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115816401284587341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115816401284587341'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/09/backwards-compatibility-why.html' title='Backwards compatibility, why?'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115815599456800701</id><published>2006-09-13T15:54:00.000+02:00</published><updated>2006-10-21T13:41:05.706+02:00</updated><title type='text'>Meeting the speakers and authors</title><content type='html'>I am currently staffing the javaBin stand at &lt;a href="http://javazone.no"&gt;JavaZone 2006&lt;/a&gt; so I cannot attend any sessions as of now. However staffing the stand gives me a perfect oppurtunuty to talk to attendees, partners and speakers. Seems like if everybody is having a good time. Some of the sessions has been so popular that we had to schedule them twice, like Patrick Linskeys &lt;a href="http://www2.java.no/web/show.do?page=92&amp;amp;articleid=4573"&gt;EJB3 Java Persistence API: The Good, The Bad, and The Ugly.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So far the conference has been running smoothly. I am soon of the the next one when releaved off duty. Think I will head along to a REST vs. Soap smackdown to see what all the fuzz is about :-).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115815599456800701?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115815599456800701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115815599456800701' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115815599456800701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115815599456800701'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/09/meeting-speakers-and-authors.html' title='Meeting the speakers and authors'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115813596520773443</id><published>2006-09-13T10:21:00.000+02:00</published><updated>2006-10-21T13:41:05.641+02:00</updated><title type='text'>Second Session at JavaZone at 2006</title><content type='html'>The first session I attended to was the &lt;a href="http://www2.java.no/web/show.do?page=92&amp;articleid=4571"&gt;Java Effective Reloaded&lt;/a&gt; with Joshua Block. It was packed, so I had to stay in the back. Anyways, I got a picture of what it was all about.&lt;br /&gt;&lt;br /&gt;I have allays been fond of GUI development, both web and standalone, although I have never done to much work on GUI's during projects, mostly on my spare time.&lt;br /&gt;&lt;br /&gt;I am currently attending the &lt;a href="http://www2.java.no/web/show.do?page=92&amp;amp;articleid=4494"&gt;First Aid for Swing&lt;/a&gt; by  the founder of JGoodies, Karsten Lentzcsh. Karsten is guiding us through the process of doing a project where you have inexperienced developers, no time for usability design and the customer want pay for anything. Cool what a pragmatic attitude, this is how it works in most cases :-)&lt;br /&gt;&lt;br /&gt;There are a lot of dos and dont's in developing swing applications. One if to use consistent colors and allays to use native fonts, simply because the render better. Karsten often does a test on applications with excessive use of borders by imagining that the GUI is a physical three dimensional artifact and by drawing the fingernails over this artifact, does it make any sound? "Rattcchhhhhhhhh"   not good, to many borders, good tip? :-)&lt;br /&gt;&lt;br /&gt;Are your GUI application symmetric? It should be, use gradients and weights to achieve symmetry across the interface, subtle but effective!. Use to  three, maybe five fonts at a maximum as a guideline. I guess a lot of this concepts applies to GUI's in general, not only to swing applications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115813596520773443?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115813596520773443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115813596520773443' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115813596520773443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115813596520773443'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/09/second-session-at-javazone-at-2006.html' title='Second Session at JavaZone at 2006'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115812706910227535</id><published>2006-09-13T07:53:00.000+02:00</published><updated>2006-10-21T13:41:05.567+02:00</updated><title type='text'>Depot Lineup at JavaZone</title><content type='html'>At the javaBin boardroom we are currently in the process of getting the last small details in place for the conference. Yesterday we had the speakers dinner with almost all the speakers for this years venue. I finally got to meet Mary Poppendieck whom I had been emailing for the last six months regarding her speach on the conference, at the Table was also Tom Poppendieck and Gregor Hophe. We all had a nice chat and vere looking forward to a couple of hectic and nice days at javaZone in Oslo.&lt;br /&gt;&lt;br /&gt;I will try to get out up to date new published along the way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115812706910227535?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115812706910227535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115812706910227535' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115812706910227535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115812706910227535'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/09/depot-lineup-at-javazone.html' title='Depot Lineup at JavaZone'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115801045667414621</id><published>2006-09-11T23:26:00.000+02:00</published><updated>2006-10-21T13:41:05.459+02:00</updated><title type='text'>Heading to JavaZone 2006</title><content type='html'>Currently planning the various sessions to attend at &lt;a href="http://javazone.no"&gt;JavaZone 2006&lt;/a&gt; in Oslo 13-14 September. The lineup and two-day agenda is impressive I must say.&lt;br /&gt;I have myself been part of the program committee have been working for almost a year now to get the program in place. Hope all of you developers out there look forward to joining up at JavaZone 2006 as much as I do. A mighty combination of Well known names like Rod Johnson and Mary Poppendieck and local heroes like Eirik Torske and Ole Andre Ranvik are some of the speakers this year.&lt;br /&gt;&lt;br /&gt;Please also spend some time looking through the agenda and don't join the crowd. Maybe you are in for a surprise when attending the not so well-known speakers?&lt;br /&gt;&lt;br /&gt;See you there!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115801045667414621?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115801045667414621/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115801045667414621' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115801045667414621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115801045667414621'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/09/heading-to-javazone-2006.html' title='Heading to JavaZone 2006'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115111677016468116</id><published>2006-06-24T04:36:00.000+02:00</published><updated>2006-10-21T13:41:05.376+02:00</updated><title type='text'>TSSJs Barcelona closeup</title><content type='html'>Well, all good things come to an end, including this conference. I will use the spare time tomorrow to reflect upon what I liked and what could be improved about the sessions in TSSJS in Barcelona, which all in all was a pleasant experience, hola!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115111677016468116?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115111677016468116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115111677016468116' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115111677016468116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115111677016468116'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/06/tssjs-barcelona-closeup.html' title='TSSJs Barcelona closeup'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115106961836530863</id><published>2006-06-23T14:49:00.000+02:00</published><updated>2006-10-21T13:41:05.295+02:00</updated><title type='text'>Model generation and visualization</title><content type='html'>With MDA being totally out of the picture, Gregor Hophe (energetic and excellent speaker) and Erik Doemenburg is getting down to the point of what is really important point when it comes to modeling, not do create pictures that you can generate code from, but to generate a graphical presentation from an existing system and an existing codebase.&lt;br /&gt;&lt;br /&gt;I write a blog entry called  "Feeding the architect" that dealt with this topic. In that case using maven, dotuml and GrapViz to generate diagrams (static and dynamic) from an existing codebase. The main problem is to combine data from static code analysis and from a running system, exactly what Gregor and Erik is going into presenting.&lt;br /&gt;Three different models are suggested:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;DAGS&lt;/li&gt;&lt;li&gt;Metrcics&lt;/li&gt;&lt;li&gt;Petri nets&lt;/li&gt;&lt;li&gt;Trees&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Try to extract data from static and dynamic analysis in a simple form, preferably in a text file and then extract data from the text files and map into whatever model you seem fit for the given analysis. A good example of this may be to get a representation of message flow through a workflow system.&lt;br /&gt;&lt;br /&gt;The first example being using a 95 line XSLT to generate a dot file put into graphviz to generate a dependency diagram from a spring config file. Well, since I am lazy, I would rather just use &lt;a href="http://opensource.atlassian.com/confluence/spring/display/BDOC/Home;jsessionid=a1YIga2p2a7clKKbbW"&gt;BeanDoc.&lt;/a&gt; Remember that lazy is good here, do more with less kind of thing :-) But I think the audience get the point here.&lt;br /&gt;&lt;br /&gt;The next demo is much more interesting. By doing some modification of the jar packaging and adding some  metainformation, the build step create metainformation in text files that makes us able to create a graphical presentation of dependencies between jar - files, components and to create clickable images drilling down to classes and source code. This may be a very effective means to get an overview of the system and to see how well it really aligns with the architecture that you anticipated. This is good stuff, and it should be added to the tool portfolio of every architect and developer.&lt;br /&gt;&lt;br /&gt;Gregor now gives a presentation of how he has generated an svg from a running messaging system by instrumenting his own messaging library.&lt;br /&gt;&lt;br /&gt;Process mining is interesting in the sense that we do not only present a model that can be generated from a simple dynamic and static analysis, but a heuristic approach to get a picture of what kind of processes that executes and in what order. Gregor presents a really nice example with using &lt;a href="http://is.tm.tue.nl/research/processmining/tools.htm"&gt;ProM&lt;/a&gt; to &lt;a href="http://is.tm.tue.nl/research/processmining/"&gt;visualize processes&lt;/a&gt; using petrinets. This is a tools that accepts XML files as an example that may be nicely represented in a swing gui, really cool.&lt;br /&gt;&lt;br /&gt;References:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.graphviz.org/"&gt;http://www.graphviz.org/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.inf.unisi.ch/faculty/lanza/"&gt;http://www.inf.unisi.ch/faculty/lanza/&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115106961836530863?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115106961836530863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115106961836530863' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115106961836530863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115106961836530863'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/06/model-generation-and-visualization.html' title='Model generation and visualization'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115106590555679213</id><published>2006-06-23T14:05:00.000+02:00</published><updated>2006-10-21T13:41:05.221+02:00</updated><title type='text'>JCP Panel discussion</title><content type='html'>&lt;a href="http://www.jroller.com/page/OnnoKluyt"&gt;OnnoKluyt&lt;/a&gt;  is leading the panel with the following guys:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Jon BostrÃ¸m&lt;/li&gt;&lt;li&gt;Tom Baeyens&lt;/li&gt;&lt;li&gt;Mike Keith&lt;/li&gt;&lt;li&gt;Cameron Purdy&lt;/li&gt;&lt;li&gt;Gavin King&lt;/li&gt;&lt;/ul&gt;With such a lineup where most (all?) of the representatives on the panel is also either a JSR member or spec lead. Makes it little bit difficult to get some interesting and heated arguments but anyway. Having the experts in the field or at least someone profiles within the community lead the work is to start with a good thing. This is not sufficient to get the right technology out to the people, bit it might be a start.&lt;br /&gt;&lt;br /&gt;The time to market problem, especially with the Java Platform releases is beeing discussed piched up with a comment from Gavin.&lt;br /&gt;&lt;br /&gt;Companies like Microsoft probably implements similar processes internallyalthoughh they are most definitely not public!&lt;br /&gt;Kirk Pepperdine claims that you pretty much need a lawyer to get through the initial process of signing up and getting up to speed. This is something quite different from entering an Open Source community where you are judged on what you have (or are) achieving other that being able to signoff legal documents.&lt;br /&gt;&lt;br /&gt;Cameronencouragess the members of the audience to participate andcontributee instead of, as Gavin King says, just complain instead of just complaining about stuff thatdoesn'tt work. Some (around 4) of the JSR's currently running are led by individual members, with Groovy (scripting for java) and Concurrency as good examples. Surprisingly enough more that 50% of the members of the JCP are actually individual members.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115106590555679213?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115106590555679213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115106590555679213' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115106590555679213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115106590555679213'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/06/jcp-panel-discussion.html' title='JCP Panel discussion'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115105995127187077</id><published>2006-06-23T12:07:00.000+02:00</published><updated>2006-10-21T13:41:05.153+02:00</updated><title type='text'>Grid based banking</title><content type='html'>John Davies from &lt;a href="http://www.c24.biz/index.htm"&gt;C24&lt;/a&gt; has been of of the profiles at this convention. I missed the keynote so I wanted to drop in at the &lt;a href="http://javasymposium-europe.techtarget.com/html/det_descriptions.htm#BankingCaseStudy"&gt;banking and grid&lt;/a&gt; session to see what the fuzz was all about.&lt;br /&gt;A lot of cases where we deal with applications we don't really need databases as we know them John claims. More than viewing the database as the central repository of all information you can view the grid as the repository of the information.&lt;br /&gt;&lt;br /&gt;Typical cost is 1$ per CPU per hour. Interestingly when several of the banks that John is working for has as many as 10K CPUS. Utilizing these effectively is important with respect to ROI.&lt;br /&gt;&lt;br /&gt;C24 want to avoid using XML though the wire when transferring information is not to use XML because it is not efficient enough, but use java databinding and efficient object serialization instead. They do this through something they call &lt;a href="http://www.c24.biz/technology.htm"&gt;Integration Objects.&lt;/a&gt;  The fact that John discourages the use of XML in the grid computing space is that is not efficient enough. This is also an important moment in the SOA space discussions.&lt;br /&gt;&lt;br /&gt;How do you do this when you don't have any data stored in a central repository only in a grid where you don't have a query language.&lt;br /&gt;John is referring to a case study where everything is stored and manipulated in a grid space in two different grid spaces, one that receives the feeds and organize them and one replicated feed that is optimized and used solely for querying.&lt;br /&gt;&lt;br /&gt;The technology is based upon JavaSpaces and has some quite interesting attributes. One of them being that querying is done in javaspaces based on what kind of interface(s) that are implemented. Then some matching logic. The thing here is that the searching seems to be quite procedurally oriented, like searching for some course grained items and then doing a new query on that subset. I would prefer this to be more declaratively oriented, don't tell the system how to do it tell it what to get!.  This is what has been working well with RDBMS'es for the last 15 (maybe even more) years. Maybe it just because I didn't understand the example?&lt;br /&gt;&lt;br /&gt;Richard Ãberg in the audience asks what are the maingoctchass. One of the gotchas with JavaSpaces and the way that C24 applies the technology is classloading, understanding the nature of the distribution and multithreading issues in grid environments.&lt;br /&gt;&lt;br /&gt;What kind of knowledge will you need to implement this technology effectively. Knowledge of grid computing and products technologies that may have been around for a while without having to much momentum is definitely an issue. This might be a major challenge in implementing grid computing effectively.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115105995127187077?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115105995127187077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115105995127187077' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115105995127187077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115105995127187077'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/06/grid-based-banking.html' title='Grid based banking'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115105201849482943</id><published>2006-06-23T10:27:00.000+02:00</published><updated>2006-10-21T13:41:05.068+02:00</updated><title type='text'>Productive coding</title><content type='html'>&lt;a name="HKabutz"&gt;&lt;/a&gt;&lt;span class="subheading"&gt;Dr. Heinz Kabutz, &lt;/span&gt;author of the &lt;a href="http://www.javaspecialists.co.za/"&gt;Java Specialist Newsletter&lt;/a&gt; is  talking to us about coding productivity and about using the IDE ad your tools effectively. This is also something I have been thinking a lot about since I am often in a position where I do pair programming and coaching. Then you tend to notice how other people work, if they use keyboard shortcuts, how they navigate and so on.&lt;br /&gt;&lt;br /&gt;being able to use the IDE effectively, especially using keyboard shortcuts is really a differentiating factor in productivity. How fast you type, and if you use touch or not may also be a factor, because we still think faster than we type.&lt;br /&gt;&lt;br /&gt;Important to actually make sure that you know what code you actually need, which code gets executed in production. Important, since most money goes into maintenance and you don't want to maintain unused code.&lt;br /&gt;&lt;br /&gt;Heinz also talks about how he has mate this doclet that finds this and that like unused methods fields and so on. I use IDEA to locate stuff like this intead of running a doclet.&lt;br /&gt;More discussions on exception handling, increasing tghe use of private/protected scoping and so on. Many developers should read up about this, resonable scoping will make your class easier to use and less confusing and actually reduce the chance of anything being duplicated if the api uses a reasonable naming strategy and relevant javadoc where needed. Still Heninz has not told me anything that I am not allready aware of, except for for a couple of funny comments in the J2SE core awt code and how the actual enforcements access to final fields as changed back and forth from 1.1 to 1.6.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115105201849482943?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115105201849482943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115105201849482943' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115105201849482943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115105201849482943'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/06/productive-coding.html' title='Productive coding'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115104669771845980</id><published>2006-06-23T08:51:00.000+02:00</published><updated>2006-10-21T13:41:04.985+02:00</updated><title type='text'>Development environment of the future</title><content type='html'>This is a really interesting topic, the topic of the discussion is development environments. IDEs has been one of the most important factors related to developer productivity and is often the starting points for religious debates amongst developers.&lt;br /&gt;&lt;br /&gt;Panelists&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Wayne Beaton (eclipse community)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Erik Dornenburg (Thoughtworks)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Bruce Tate&lt;/li&gt;&lt;li&gt;Cedric Beust (Google)&lt;/li&gt;&lt;/ul&gt;Cameron Purdy is currently mediating the Panel and he is collecting questions from the audience in writing.  I think the fact that he collects questions in writing prevents some effective dialog. People want to talk, not to write so that someone else can talk :-)&lt;br /&gt;Johannes Brodwall (sitting next to me) took up a question related to refactoring and if we are going to see continuing support for refactoring. The panel is not in consensus, Erik claims that we will not see to many new refactorings being developed whereas Bruce points out the fact that the diversity of languages that we are actually using, especially in the AJAX space will require IDE support and continuous effort refactoring support.&lt;br /&gt;&lt;br /&gt;Large team support and tools support though collaboration is a very important aspect. Improved integration with communication tools and XP planning tools might me something that can keep us focused in what we do. This a major problem on projects I have been working on. Unfocused developers that are align with fine grained priorities is something that puzzles me. Continuous effort in coaching development teams are something that might be facilitated through the use of an IDE integrated with planning tools (I am not sure if I want a project manager in my IDE .....).&lt;br /&gt;&lt;br /&gt;AOP support and support for auxilliary functionality that is not represented as java classfiles like scripting languages, navigation, debugging and profiling is missing. Getting first class support for multiple languages been integrated more easily would be a neat feature.&lt;br /&gt;&lt;br /&gt;Cedric points out how neat it is to use a debugger now and then. He urges people that are not using debuggers in java to start doing that instead of using system out printlines. Not much has happened in the debugging space for the last 10 years.&lt;br /&gt;&lt;br /&gt;As it seems now, the Java community with IDEA and eclipse is now by far ahead of MS Devstudio while this was quite different only a few years back. This seems to be swinging back and forth, MS DevStudio now getting refactoring support and so on. Myself I am a strong believer of competition and I really think that this will only improve the quality of the tools we are working with.&lt;br /&gt;&lt;br /&gt;One reason why Java has been successful is because backwards compatibility has been supported to great length. This means that leveraging existing systems, migrating from one JDK is easier that it might have been. There are a lot of language issues that need to be fixed if we should be able to support stuff like continuations. Thus JVM support for running new languages might be a nice feature.&lt;br /&gt;&lt;br /&gt;For those of you that didnt know Cameron is using (as myself) IDEA.&lt;br /&gt;&lt;br /&gt;Erik Doernenburg from Thoughtworks answers a question related to BPEL support and workflow support in IDE's  by saying that SQL was supposed to be the language that would enable business analysts to write code. Now not even developers use SQL anymore (a pity in my optinion, because the declarative approch in SQL adresses problems, especially in batch applications, that cannot be solved in middleware), so to beleive that enhanced support for business modelling language approaches is a dead end, at least according to Erik.&lt;br /&gt;&lt;br /&gt;Closing up the panel, the ultimate question is thrown out, in which direction are we heading:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;java is still going to stand strong&lt;/li&gt;&lt;li&gt;tools that enable us to work with multiple languages in an integrated manner&lt;/li&gt;&lt;li&gt;quick feedback related to catching error-situations to reduce roundtrip time&lt;/li&gt;&lt;li&gt;higher abstractions like AOP and annotation, maybe also metaporgramming (like GWT) will be even more widely supported&lt;/li&gt;&lt;li&gt;domain specific languages&lt;/li&gt;&lt;li&gt;lessen the need for code that has to be written, which means less code, even less generated code because generated code will also have to be managed&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115104669771845980?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115104669771845980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115104669771845980' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115104669771845980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115104669771845980'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/06/development-environment-of-future.html' title='Development environment of the future'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115098595034474660</id><published>2006-06-22T16:14:00.000+02:00</published><updated>2006-10-21T13:41:04.905+02:00</updated><title type='text'>Quest for effective Web frameworks</title><content type='html'>We had a discussion during lunch here related to web frameworks, how many there are, how they compare and how web development in the Java space is actually quite difficult. Creating a nice looking web interface with good interaction capabilities with dynamic content is difficult and costly, and I am not particularly happy with what I have seen so far. I have done some work using spring MVC and JSP 2.0 and JSTL lately, and it works fairly well, but for the presentation part there is still a lot missing. Spring 2.0 will have a new set of tags that will make life easier, but anyway. &lt;a href="http://wicket.sourceforge.net/"&gt;Wicket&lt;/a&gt; seems appealing.&lt;br /&gt;&lt;br /&gt;The underlying component model and the fact that you may are able to work with the page itself as a first class object, and being able to have a simple databinding approach.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115098595034474660?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115098595034474660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115098595034474660' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115098595034474660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115098595034474660'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/06/quest-for-effective-web-frameworks.html' title='Quest for effective Web frameworks'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115098218988806271</id><published>2006-06-22T15:07:00.000+02:00</published><updated>2006-10-21T13:41:04.839+02:00</updated><title type='text'>JPA and caveats</title><content type='html'>&lt;a href="http://javasymposium-europe.techtarget.com/html/det_speakers.htm#PLinskey"&gt;Patrick Lindksey&lt;/a&gt; is giving his talk "The good bad and the ugly" related to EJB 3.0 persistence. Interesting to get a more detailed picture of the JPA specification. I really find it more interesting today compared to last year. One of the reasons is that we have more or less nothing else but runtime dependencies and some wrapper code around a generic repository implementation in my current project. This may make it feasible to actually swich persistence providers as long as we have several good open source ones available already. The only thing that will require some work is getting rid of the implementations we have related to searching that uses the Hibernate Criteria API. Maybe JQL will do the job? I don't know I have never been using this part of the API.&lt;br /&gt;&lt;br /&gt;One thing Patrick went into depths explaining related to POJO based persistence is really interesting. It really hides some subtleties related to designing API's and access to fields and properties. This applies to most mapping frameworks including Hibernate and is relevant when it comes to discussing domain models and where to put the actual business logic.&lt;br /&gt;&lt;br /&gt;Consider the following code fragment representing the setter  for the &lt;i&gt;age&lt;/i&gt; property in the Customer class:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;public void setAge(int age) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (age &amp;lt; 18) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; throw new JuvenileException("We dont accept young customers");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.age = age;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This might seem like a business rule to implement in the Customer class, why? Because principles of cohesion should be the rule and the business logic should for reasons of clarity be placed in the Customer class implementation. But what if this is a new Rule that did not previously exist? You have provided this rule such that the API will prevent you from entering Illegal data. But that also means that the persistence framework that will use the setter for populating objects from a search will get the same ,exception as a side effect on data that was valid last year. Hence using setters as a mechanism for managing state in persistent entities is dead wrong. It is a good way to enforce integrity for new (transient entities) but not for dealing with persistence lifecycle. After all APIS and business rules tend to evolve, but historic data tends to stay the same!&lt;br /&gt;The Irony is that you will probably be pretty happy with the first release of the system but after the system is going into maintenance errors will start coming in after the first upgrade. Consultants will probably not even notice, they are on the way implementing setX and setY with heaps of business logic in new domain objects for new customers and by habit use property (instead of field) based access in entities :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115098218988806271?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115098218988806271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115098218988806271' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115098218988806271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115098218988806271'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/06/jpa-and-caveats.html' title='JPA and caveats'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115097710346122045</id><published>2006-06-22T13:41:00.000+02:00</published><updated>2006-10-21T13:41:04.777+02:00</updated><title type='text'>Geronimo lineup</title><content type='html'>Who is interested in Geronimo? Obviously a lot of people, I don't know too many people actually using it apart from using it as maven dependencies for the J2EE API's.&lt;br /&gt;&lt;br /&gt;I attended Bruce Snyders presentation on &lt;a href="http://servicemix.codehaus.org/"&gt;ServiceMix&lt;/a&gt; and found that one interesting because I have been reading up on &lt;a href="http://mule.codehaus.org/"&gt;Mule&lt;/a&gt; a little bit so I attended to get a comparison. I am currently also working on a project where we are on a good way to actually implement small parts of an ESB so the topic is really interesting. With that said, I am not necessarily an advocate of adding a dependency to a third party library just because it contains an out of the box implementation of something I can do with 10 lines of javacode.&lt;br /&gt;Managing 100 different and possible incompatibilities might be just much of a nightmare as writing the 1000 lines of code that those frameworks help me to replace.&lt;br /&gt;&lt;br /&gt;The panel lineup of the Geronimo Panel Discussion are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Bruce Snyder&lt;/li&gt;&lt;li&gt;Matt Hogstrom&lt;/li&gt;&lt;li&gt;James Strachan&lt;/li&gt;&lt;li&gt;Aaron Mulder&lt;/li&gt;&lt;li&gt;David Jencks&lt;/li&gt;&lt;/ul&gt;panel is moderated by Ted Neward, a great speaker in my opinion. First thing discussed is the role of &lt;a href="http://www.osgi.org/"&gt;OSGI&lt;/a&gt; and XBean and how Geronimo is may be used to complement each other.&lt;br /&gt;although OSGI is not supported in Geronimo, one of the reasons is complexity the panel claims.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Why should we select a commercial vendor instead of going for an Open Source alternative, and actually end up paying for a J2EE server, here are some of the points from the panel:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Commercial vendors often provides entire suites of products that may complement the J2EE server&lt;/li&gt;&lt;li&gt;Support and product roadmaps&lt;/li&gt;&lt;li&gt;Performance and scalability&lt;/li&gt;&lt;li&gt;Wheter the product has ben subject to rigorous testing (is this a way of saying that the testsuite accompanying Geronimo could be improved?)&lt;/li&gt;&lt;li&gt;Service pack/fixpack approach, most commercial vendors provide support for incremental updates&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;There are a couple fo guys from IBM up on the panel, and they are currently debating how developing and embracing Geronimo may affect Websphere and vice versa. An IBM representative says that they will try to get to a point where changes are merged and updated bidirecionally. Nothing is said related to if they want to estabilsh a common codebase for Geronimo and Webshere.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115097710346122045?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115097710346122045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115097710346122045' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115097710346122045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115097710346122045'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/06/geronimo-lineup.html' title='Geronimo lineup'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115096676813866295</id><published>2006-06-22T10:48:00.000+02:00</published><updated>2006-10-21T13:41:04.721+02:00</updated><title type='text'>Spring 2.0 Highlights</title><content type='html'>Rod starts the presentation with saying that the final 2.0 release will probably be scheduled at the 5'th of July this year. This is good because enable a lot of projects, during the summer to conclude the upgrade to Spring 2.0. A lot of development environments enforces summer freeze periods which makes the summer an attractive period for experimenting with such things. Currently I am busy with getting thins production ready for a big client so I will have to do this on my spare time when I am not hanging out with the guys at &lt;a href="http://phatmc.com"&gt;PhatMC.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There are a lot of nice new features  that are of particular interest to me as we are using spring at the project I am currently working on. Especially the support for Asynch Messaging without MDBS's with is really good. By trying to replace the message activation infrastructure we are currently using by POJO based messaging we will probably be able to&lt;br /&gt;&lt;ol&gt;&lt;li&gt;simplify packaging and deployment, no longer any need to package EJB's (we only use MDBS)&lt;/li&gt;&lt;li&gt;Move some of the testing in  from the container based integration environments into the continues testing environment and JUnit tests&lt;/li&gt;&lt;/ol&gt;Also simplified configuration, and XML-schema support will probably enable us to reduce the amount of spring config we are using. The support for dynamic languages will probably also enable us to experiment with new ways of handling spring configuration  and the proliferation of configuration files. And yeah, its fully backwards compatible.&lt;br /&gt;&lt;br /&gt;One of the reasons why Spring 2.0 has been delayed has been the support for JPA, which seems to gain momentum and supported by Toplink, Hibernate and Kodo.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115096676813866295?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115096676813866295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115096676813866295' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115096676813866295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115096676813866295'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/06/spring-20-highlights.html' title='Spring 2.0 Highlights'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115095994327753694</id><published>2006-06-22T08:50:00.000+02:00</published><updated>2006-10-21T13:41:04.664+02:00</updated><title type='text'>Understanding open source</title><content type='html'>A guy from Sun responsible for Suns managing &lt;a href="http://www.sunsource.net/"&gt;http://www.sunsource.net/&lt;/a&gt; and participating in developing Suns Open Source strategy is here to explain to us different strategies and approaches for dealing with open source.  He starts explaining to us the shift from to the consumer age to the participation age. The key is to understand that certain events changes the way we think about stuff. I think the point he is getting to is the way that Open Source has changed the way we think about software. Various patent models and how large corporations think regarding licensing and patents is also interesting.&lt;br /&gt;&lt;br /&gt;&lt;span class="subheading"&gt;Simon Phipps also believes that we will stop paying for using software in advance, and shift towards paying when it adds value. It would be interesting to see how such policies might be enforced. As a consultant I play a role in providing business value through adapting and creating software, not through the software itself, so this is an interesting thing.&lt;br /&gt;&lt;br /&gt;Open source communities is based on a casual allignment of interests Phipps concludes.&lt;br /&gt;&lt;br /&gt;Would be interesting to discuss further how it is possible to actually charge for software when it adds value and beyond simple scenarios like the number of customers or the number of employees in the company that bought the software. Neither of these marketing models are sufficient to define market value.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115095994327753694?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115095994327753694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115095994327753694' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115095994327753694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115095994327753694'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/06/understanding-open-source.html' title='Understanding open source'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115095903514550400</id><published>2006-06-22T08:44:00.000+02:00</published><updated>2006-10-21T13:41:04.603+02:00</updated><title type='text'>Day II TSSJS</title><content type='html'>Looking through the agenda briefly, regarding Web Application frameworks, there are only two presentations on webframeworks this year,  &lt;a href="http://wicket.sourceforge.net/"&gt;Wicket&lt;/a&gt; and &lt;a href="http://rifers.org/"&gt;RIFE&lt;/a&gt;. Not to many people had even heard of those last year. The proliferation of frameworks in the web space really says something about the maturity or lack of such in this space. Rife has continuations which enables a really interesting programming model the reaches far beyond being able to support using the back button in the browser.&lt;br /&gt;&lt;br /&gt;Enabling productivity, effective development environments and a component based model like JSF, maybe where everything is expressed in java will be the way to go I beleive. I have been doing a bit of JSP programming and JSTL 2.0 lately. In combination with clever use of CSS like &lt;a href="http://css.maxdesign.com.au/"&gt;Maxdesign&lt;/a&gt; makes webdevelopment much more simple, event not as simple as I would like to.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115095903514550400?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115095903514550400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115095903514550400' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115095903514550400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115095903514550400'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/06/day-ii-tssjs.html' title='Day II TSSJS'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115089357023967465</id><published>2006-06-21T14:35:00.000+02:00</published><updated>2006-10-21T13:41:04.539+02:00</updated><title type='text'>Gregor on SOA</title><content type='html'>I attended Gregor Hophes session on SOA in Las Vegas I little over a year ago and liked it. I wanted to drop into his session in Barcelona to see if the presentation has been updated.&lt;br /&gt;&lt;br /&gt;Gregor now works for Google, let us see if that has changed his attitude and presentation form.&lt;br /&gt;&lt;br /&gt;Gregor gives the following definition of a service:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Self contained&lt;/li&gt;&lt;li&gt;Independent of consumer context (makes few assumptions on use)&lt;/li&gt;&lt;li&gt;universally accessible&lt;/li&gt;&lt;/ul&gt;Seems as if Gregor is pretty much doing the same presentation as he did at TSSJS in Vegas 2005, he is even cracking the same jokes. If he had put up the warning sign, I could be listening to &lt;a href="http://blog.rossmason.com/"&gt;Ross Mason&lt;/a&gt; talking about using Mule as an ESB instead.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Achitectural intent. Gregor talks about architectural styles and what architectural artifacts and specifics that defines SOA as a concept and architectural style. To define SOA  he claims that it is just as important to state what SOA is not in order to give a proper definition of SOA.&lt;br /&gt;&lt;br /&gt;Gregor uses Starbucks as an example of his discussions in the SOA space. At Starbucks (at least in the U.S) the staff performs a highly specialized task, one that collects the order, one that makes the coffee and one that processes the payment. This is throughput optimization, but requires a lot of staff, at least three people in this case.  If thoughput it not the case, you might me just as well of having one effective employee that does a good job, it is simpler, more general purpose and less expensive. The point is, maybe you can stick with simpler. Is loose coupling and high co    hesion allays for the best, even if you can implement the everything in one small class instead of three? I think that the problem with metaphors like the one with Starbucks is that I find it rare that people actually ask questions about what is the reason for having this design, and why not make it simpler. Developers tend to embrace new technology and paradigms regardless of their appliance. This may be good or bad. Bad in the sense that we may choose the wrong technology for a specific task. Good in the sense that we build knowledge on what works and what doesn't.&lt;br /&gt;&lt;br /&gt;For written definitions of what SOA is that you can memorize before you attend JavaZone2006 and want to ask questions, Gregor recommends &lt;a href="http://orchestrationpatterns.com/"&gt;Orchestrationpatterns&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Q &amp;amp; A&lt;br /&gt;The difference between &lt;a href="http://www.xfront.com/REST-Web-Services.html"&gt;REST&lt;/a&gt; and SOAP is brifly discussed. Gregor points out that the important part of SOA is really the architectural style not implementation specific issues.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115089357023967465?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115089357023967465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115089357023967465' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115089357023967465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115089357023967465'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/06/gregor-on-soa.html' title='Gregor on SOA'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115088452221909889</id><published>2006-06-21T12:02:00.000+02:00</published><updated>2006-10-21T13:41:04.467+02:00</updated><title type='text'>Where is the coffe and WIFI</title><content type='html'>Hey, we have to pay for WIFI here at Fira Palace. I stay at Vincci Arena nearby where WIFI is free.  I miss free WIFI, well, but to feed the community with information I am more than happy to pay 17 Euros for 24 hour access.&lt;br /&gt;&lt;br /&gt;We didnt get coffe when we arrived, I would like to get coffe when I want and as musch as I want.&lt;br /&gt;&lt;br /&gt;Anyway the conference is actually quite intimate. 250 Participants, 275 with speakers.&lt;br /&gt;My current session crasshed with Gavin King's session about Seam, so I went to listen to Jonas Boner instead.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115088452221909889?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115088452221909889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115088452221909889' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115088452221909889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115088452221909889'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/06/where-is-coffe-and-wifi.html' title='Where is the coffe and WIFI'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115088267591644270</id><published>2006-06-21T11:35:00.000+02:00</published><updated>2006-10-21T13:41:04.406+02:00</updated><title type='text'>Clustering in Spring</title><content type='html'>Jonas Boner is talking about clustering in spring, a topic of interest since I am currently developing applications that are deployed into a clustered envrionment, and I want the fact thta applications are  deployed into a clustered environment to be transparent. It should be possible to deploy applications that are clusterable also in to non clustered environments such as an embedded Jetty container because that facilitates effective unit testing.&lt;br /&gt;&lt;br /&gt;Jonas comes up with a problem definition, scaling and that we need to share data throughout multiple JVM's. I think that in most cases, this should not be neccessary. In stateless applications you might just as well keep multiple copies of reference data (which constitutes what Martin Fowler refers to as the knowledege tier), which is most likely read-only anyway.&lt;br /&gt;&lt;br /&gt;Jonas starts go into an example, a Store domain class that is subject to crud operations, and how to replicate state changes across a cluster. Hmmmm, this sounds more like how to replicate state across a cluster, well before you do that, ask the question do you need to? If you want to store the data, put it in the database, you will have to put it there eventually anyway.&lt;br /&gt;Now he continues to discuss aspects related to track changes, well, I have been using Hibernate for that some time, so this is for the most just problems from an OR mapping perspective.&lt;br /&gt;&lt;br /&gt;Now some stuff that actually relates to the spring clustering stuff and Teracotta of course, which is the product you will need to support directly what Jonas is referring to. Hani has some &lt;a href="http://jroller.com/page/fate?entry=terracotta_pimpage_galore"&gt;viewpoints on this.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In my perception try to design your application so that you have uniform access to data, either read mostly/only reference data and operational data. By designing a data layer effectively I see no reason whatsoever to associate spring with clustering throuch teracotta. If clustering relates to sharing data in a cluster, use isolate this in the data layer. You will most probably be using an OR-mapping tool anyway. Seems as Jonas is taking areas related to data synchronization from the data layer and moving it higher up in the application tiers where tehy do not belong. Synchronizing data using the database is probably the most effective solution anyway.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115088267591644270?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115088267591644270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115088267591644270' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115088267591644270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115088267591644270'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/06/clustering-in-spring.html' title='Clustering in Spring'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115088170069193101</id><published>2006-06-21T11:15:00.000+02:00</published><updated>2006-10-21T13:41:04.351+02:00</updated><title type='text'>Continuing the TSSJS venue</title><content type='html'>Ive just been relaxing in the back on a session with Geert Bevin, the founder of the RIFE framework and he has been explaining to us about continuations and how it is beeing used in RIFE, a webframework that uses continuations heavily.&lt;br /&gt;I was missing some informations related to how continuations may be used decoupled from RIFE by apart from that it is a very powerfult concept. I am not really sure how it will affect the programming model that I am currently using on my projects since all the classes that may contain state in continuations must be cloneable, but I will have to dig into that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115088170069193101?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115088170069193101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115088170069193101' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115088170069193101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115088170069193101'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/06/continuing-tssjs-venue.html' title='Continuing the TSSJS venue'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-115064374282070834</id><published>2006-06-18T17:07:00.000+02:00</published><updated>2006-10-21T13:41:04.293+02:00</updated><title type='text'>Preparing for TSSJS-Europe</title><content type='html'>Just been browsning through the agenda and preparing myself for the Barcelona trip. Been planning the agenda online as well using the online agenda planner available at &lt;a href="http://javasymposium-europe.techtarget.com/"&gt;http://javasymposium-europe.techtarget.com/&lt;/a&gt; . The slots available in the online tool are not the same as in the online agenda. It does not present the slots side by side when they are overlapping either. Guess I will stick to a printed version and just put circles (with a pen) around the slots I want to join.&lt;br /&gt;&lt;br /&gt;The agenda is not overly impressive. I counted 43 sessions plus some keynotes and some bofs. But given the lineup,  I will not have any problems attending something interesting.&lt;br /&gt;&lt;br /&gt;Compared to what we are planning for &lt;a href="http://javazone.no/"&gt;JavaZone 2006&lt;/a&gt; the venue in Barcelona is small compared to the +80 session programme we are currently concluding, with an even more impressive lineup.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-115064374282070834?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/115064374282070834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=115064374282070834' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115064374282070834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/115064374282070834'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/06/preparing-for-tssjs-europe.html' title='Preparing for TSSJS-Europe'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29135008.post-114920500753791924</id><published>2006-06-02T01:34:00.000+02:00</published><updated>2006-10-21T13:41:04.230+02:00</updated><title type='text'>Seaview is Back in business</title><content type='html'>After the hacker havok at svitjod.rymdweb.com, we never got our b2evolution installation up again. A pity, but thats life. I might as well find somewhere else. I am soon heading for TSSJS In Barcelona as welll, and I want to get ready for some hardcore blogging from the conference, so get ready, at least I am (will?)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29135008-114920500753791924?l=devperspective.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devperspective.blogspot.com/feeds/114920500753791924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29135008&amp;postID=114920500753791924' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/114920500753791924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29135008/posts/default/114920500753791924'/><link rel='alternate' type='text/html' href='http://devperspective.blogspot.com/2006/06/seaview-is-back-in-business.html' title='Seaview is Back in business'/><author><name>Bjørn Bjerkeli</name><uri>http://www.blogger.com/profile/01117393474329689344</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
