I'm thinking of using the Open In Session Filter (OSIV) filter or the sniffer that comes with Spring, since it seems convenient to me as a developer. If you recommend, do you recommend using a filter or interceptor and why?
I am also interested in how it will mix with HibernateTemplate , and if I lose the ability to mark methods as @Transactional (readOnly = true) , etc. and therefore lose the opportunity to get even finer-grained transaction control?
Is there any best practice for integrating such a solution with a three-tier architecture using Hibernate and Spring (I suppose my decision to use Wicket for presentation should not make much difference)?
If I use OSIV, I will at least never go over to lazy loading errors, on the other hand, my transaction will live longer than it can commit, being uncommitted in the view.
This is really a matter of personal taste.
. SOA, . 2 ( , ), 2 , .. , , .
OTOH , ( , , ..).
, , - Value . VO. ( , ), , ...
: , , , , . ( SOA-, , ,...). - LazyLoadingExceptions, VO. VO - , , , , DRY. VO, , VO - . , . , : , , .
OSIV, , ,
, LazyInitializationException, , , LIE
Source: https://habr.com/ru/post/1702959/More articles:CSS alignment issues CSS - cssHow to start batch processes on SQL Server 2008 - c #Mass updates and fixed frequency in SQL Server - sqlHow to search for multiple file types in the search appliance - fileEnd Console Closing - overrideСоздание ресурсов в DLL для повторного использования, MFC/VС++ - dllgridview asp.net mouse over TR finds which row was clicked on server side - javascriptHow do I enable the Connect to Outlook feature in your user list? - synchronizationWhat is the difference between .resx and .config files in .NET? - .netСписок синхронизации с Outlook только с элементами в текущем виде - synchronizationAll Articles