<?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/'><id>tag:blogger.com,1999:blog-11583932.post116040319636524647..comments</id><updated>2008-12-01T21:27:44.369+01:00</updated><title type='text'>Comments on Welcome to the Jungle (Redux): Yes, we still need Transfer Objects with EJB3 JPA</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.diegoparrilla.com/feeds/116040319636524647/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default'/><link rel='alternate' type='text/html' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html'/><author><name>Diego Parrilla</name><uri>http://www.blogger.com/profile/18178999300259710048</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-11583932.post-317567390400898680</id><published>2008-12-01T21:27:44.369+01:00</published><updated>2008-12-01T21:27:44.369+01:00</updated><title type='text'>Did you actually try to expose your entities throu...</title><content type='html'>Did you actually try to expose your entities through Web Services? It will make the schema available to the outside world through WSDL definitions. You will have to watch out for cycle references and other artefacts, but your middle tier should be able to provide your web developers (browser-based or Swing or any other web-accessing layer) with the data they need.&lt;BR/&gt;&lt;BR/&gt;Alternatively, if the amount of entities is large, you might want to use reflection to expose your data objects instead of using DTOs for each entity.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default/317567390400898680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default/317567390400898680'/><link rel='alternate' type='text/html' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html?showComment=1228163264369#c317567390400898680' title=''/><author><name>Frank Klomp</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html' ref='tag:blogger.com,1999:blog-11583932.post-116040319636524647' source='http://www.blogger.com/feeds/11583932/posts/default/116040319636524647' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11583932.post-6601487731324503817</id><published>2008-07-25T14:23:23.679+02:00</published><updated>2008-07-25T14:23:23.679+02:00</updated><title type='text'>Yes, I have read POJOs in Action and I think it's ...</title><content type='html'>Yes, I have read POJOs in Action and I think it's a good training book, but honestly after reading it I did not get any magic answer to my thoughts: Yes, we still need transfer objects under some circumstances, and these are very common in complex Enterprise Architectures.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default/6601487731324503817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default/6601487731324503817'/><link rel='alternate' type='text/html' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html?showComment=1216988603679#c6601487731324503817' title=''/><author><name>Diego Parrilla</name><uri>http://www.blogger.com/profile/18178999300259710048</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10446181700127515883'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html' ref='tag:blogger.com,1999:blog-11583932.post-116040319636524647' source='http://www.blogger.com/feeds/11583932/posts/default/116040319636524647' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11583932.post-8652847499229596197</id><published>2008-07-25T00:12:43.298+02:00</published><updated>2008-07-25T00:12:43.298+02:00</updated><title type='text'>I suggest you read "POJOs in Action" by Chris Rich...</title><content type='html'>I suggest you read "POJOs in Action" by Chris Richardson.  Most of these issues can be solved by use of good design patterns.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default/8652847499229596197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default/8652847499229596197'/><link rel='alternate' type='text/html' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html?showComment=1216937563298#c8652847499229596197' title=''/><author><name>cheolho</name><uri>http://www.blogger.com/profile/17679423917393754186</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html' ref='tag:blogger.com,1999:blog-11583932.post-116040319636524647' source='http://www.blogger.com/feeds/11583932/posts/default/116040319636524647' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11583932.post-5478756765390403553</id><published>2008-07-04T13:23:56.839+02:00</published><updated>2008-07-04T13:23:56.839+02:00</updated><title type='text'>Well, 2 years after this post, and why don't I rea...</title><content type='html'>Well, 2 years after this post, and why don't I read this before ;). I made so many trials to surround a 20 entities relationship with simple EJB3 as PO[I]JO.. Large mistake, many problems, many things learned (JAXB, JPA implementations divergences between Toplink essentials and Hibernate 3 ...), but no real solution to escape to a DTO design and coding (or not stable).&lt;BR/&gt;&lt;BR/&gt;So agree than in real life objects are more quitely more complex than those provided for expert's tutorials and technics so deeply said deprecated still worth to use.&lt;BR/&gt;&lt;BR/&gt;Please to read you. I read in this post a so good sumary in my EJB3 integration experience in application bigger than an early sample that not fit real industry|life softwares.&lt;BR/&gt;&lt;BR/&gt;After 2 years of EJB3 production, do you have any particular feedback  ?&lt;BR/&gt;&lt;BR/&gt;Thanks again for sharing this real experience.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default/5478756765390403553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default/5478756765390403553'/><link rel='alternate' type='text/html' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html?showComment=1215170636839#c5478756765390403553' title=''/><author><name>chamal</name><uri>http://www.openidfrance.fr/chamal</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html' ref='tag:blogger.com,1999:blog-11583932.post-116040319636524647' source='http://www.blogger.com/feeds/11583932/posts/default/116040319636524647' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11583932.post-6973721344862531512</id><published>2006-12-21T18:53:00.000+01:00</published><updated>2006-12-21T18:53:00.000+01:00</updated><title type='text'>Seam works great for a web app, but what about a J...</title><content type='html'>Seam works great for a web app, but what about a Java Swing app that connects to a server via RMI?  What about an approach whereby the business method on the server pre-loads collections it knows are required by clients (i.e. instead of eager loading annotation)?  That might provide greater granularity rather than always eager joining.  Is that still too expensive?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default/6973721344862531512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default/6973721344862531512'/><link rel='alternate' type='text/html' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html?showComment=1166723580000#c6973721344862531512' title=''/><author><name>Dan</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html' ref='tag:blogger.com,1999:blog-11583932.post-116040319636524647' source='http://www.blogger.com/feeds/11583932/posts/default/116040319636524647' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11583932.post-7218021862560171599</id><published>2006-12-21T18:51:00.000+01:00</published><updated>2006-12-21T18:51:00.000+01:00</updated><title type='text'>Seam works great for a web application, but what a...</title><content type='html'>Seam works great for a web application, but what about a Swing application that connects to a server via RMI?  Are DTO's required for that architecture?  Can I pre-load collections in business methods on the server before returning detached entity beans?  Or is that too expensive?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default/7218021862560171599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default/7218021862560171599'/><link rel='alternate' type='text/html' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html?showComment=1166723460000#c7218021862560171599' title=''/><author><name>Dan</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html' ref='tag:blogger.com,1999:blog-11583932.post-116040319636524647' source='http://www.blogger.com/feeds/11583932/posts/default/116040319636524647' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11583932.post-8810322678869821579</id><published>2006-11-15T06:37:00.000+01:00</published><updated>2006-11-15T06:37:00.000+01:00</updated><title type='text'>Diego,

In regards the Lazy loading I gather your ...</title><content type='html'>Diego,&lt;br /&gt;&lt;br /&gt;In regards the Lazy loading I gather your issue was that your UI developers got LazyLoadingException's   and had to go back to the EJB developers all the time to eager load etc.&lt;br /&gt;&lt;br /&gt;This being the case, then do you know if you are running at READ_COMMITTED transaction isolation level? By default you should be according to the EJB3 spec (and for good reason).&lt;br /&gt;&lt;br /&gt;At this isolation level, are you aware that the transaction demarcation has no effect on the queries?&lt;br /&gt;&lt;br /&gt;That is, at READ_COMMITTED it does not matter if the query runs in its own transaction or not it still sees the same data.&lt;br /&gt;&lt;br /&gt;I have written an article on this issue so perhaps you could check it out to see if it clarifies the issue.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.avaje.org/lazy.html"&gt;Lazy loading and Transaction Isolation&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default/8810322678869821579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default/8810322678869821579'/><link rel='alternate' type='text/html' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html?showComment=1163569020000#c8810322678869821579' title=''/><author><name>Robin Bygrave</name><uri>http://www.blogger.com/profile/08931079620037626659</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html' ref='tag:blogger.com,1999:blog-11583932.post-116040319636524647' source='http://www.blogger.com/feeds/11583932/posts/default/116040319636524647' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11583932.post-116094906622743017</id><published>2006-10-15T23:51:06.273+02:00</published><updated>2006-10-15T23:51:06.273+02:00</updated><title type='text'>Gavin,I'm not complaining about the gaps between t...</title><content type='html'>Gavin,&lt;BR/&gt;&lt;BR/&gt;I'm not complaining about the gaps between the JPA spec and solutions with extended persistence context.&lt;BR/&gt;&lt;BR/&gt;I'm complaining about the fact that the deprecation of DTO was one of the new benefits of EJB3 and JPA, and this is not true. You need another piece of software: call it SEAM, Spring or any propietary solution.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default/116094906622743017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default/116094906622743017'/><link rel='alternate' type='text/html' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html?showComment=1160949066273#c116094906622743017' title=''/><author><name>Diego</name><uri>http://www.blogger.com/profile/18178999300259710048</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10446181700127515883'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html' ref='tag:blogger.com,1999:blog-11583932.post-116040319636524647' source='http://www.blogger.com/feeds/11583932/posts/default/116040319636524647' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11583932.post-116084429780377132</id><published>2006-10-14T18:44:00.000+02:00</published><updated>2006-10-14T18:44:00.000+02:00</updated><title type='text'>As Michael points out in his blogs, the "experts" ...</title><content type='html'>As Michael points out in his blogs, the "experts" thought hard about this problem, and provided extended persistence contexts to solve it.&lt;BR/&gt;&lt;BR/&gt;If your architecture does not support the use of extended persistence contexts, &lt;A HREF="http://jboss.com/products/seam" REL="nofollow"&gt;get one which does&lt;/A&gt;.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default/116084429780377132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default/116084429780377132'/><link rel='alternate' type='text/html' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html?showComment=1160844240000#c116084429780377132' title=''/><author><name>Gavin</name><uri>http://www.blogger.com/profile/14198156029403532767</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html' ref='tag:blogger.com,1999:blog-11583932.post-116040319636524647' source='http://www.blogger.com/feeds/11583932/posts/default/116040319636524647' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-11583932.post-116076930858369373</id><published>2006-10-13T21:55:00.000+02:00</published><updated>2006-10-13T21:55:00.000+02:00</updated><title type='text'>Hi Diego,I think the solution to your lazy loading...</title><content type='html'>Hi Diego,&lt;BR/&gt;&lt;BR/&gt;I think the solution to your lazy loading problems is to use a &lt;A HREF="http://www.michaelyuan.com/blog/seam-next-gen-web-framework/" REL="nofollow"&gt;"stateful web framework"&lt;/A&gt; that can leverage the EJB3 extended persistence context.&lt;BR/&gt;&lt;BR/&gt;I posted more details in &lt;A HREF="http://www.michaelyuan.com/blog/2006/10/13/how-to-get-rid-of-transfer-objects-with-ejb3-jpa-hint-deprecate-the-stateless-architecture/" REL="nofollow"&gt;my blog&lt;/A&gt;.&lt;BR/&gt;&lt;BR/&gt;cheers&lt;BR/&gt;Michael</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default/116076930858369373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11583932/116040319636524647/comments/default/116076930858369373'/><link rel='alternate' type='text/html' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html?showComment=1160769300000#c116076930858369373' title=''/><author><name>Michael Yuan</name><uri>http://www.michaelyuan.com/</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.diegoparrilla.com/2006/10/yes-we-still-need-transfer-objects.html' ref='tag:blogger.com,1999:blog-11583932.post-116040319636524647' source='http://www.blogger.com/feeds/11583932/posts/default/116040319636524647' type='text/html'/></entry></feed>