Two years ago, I studied hibernate and recorded the learning process of hibernate through a blog, with the following address:Hibernate learning Notes (1)Hibernate learning Notes (2)Recently in review hibernate, in the process of re-learning, there
In-depth Session
Session Overview
When Session interfaces are used, Hibernate provides the application with the primary interface for database operations. It provides basic methods for saving, updating, deleting, and loading Java
Level 1 cache (session cache)1. The life cycle is the life cycle of the session.2. data stored in the primary cache is private data.Stores sessions in threadlocal, and different threads cannot be accessed. This ensures data security.3. How to store
public class Studenttest {Session session=null; Transaction Transaction=null; Execute the Before @Before public void before () {/** * 01) before executing the test method. Reads the core configuration file under the SRC root directory!
From: http://blog.163.com/love-love-l/blog/static/210783042009618919985/#comment=fks_083070085095080069081094083095086087081068092085086071
I copied two tablets from the Internet. It feels good.
Article 1
This time, let's talk about the difference
1. What is HibernateHibernate is a free open source framework, a or-mapping mapping tool that maps entity classes to database tables, is an excellent persistence layer solution, hibernate encapsulates JDBC, and we don't need to care about the
analysis of the questions of Hibernate noodles1. What are Hibernate's search methods?
① Navigation Object Graph retrieval
②oid Search
③HQL Search
④QBC Search
⑤ local SQL retrieval
2. What are the status of Java objects
about Hibernate:Hibernate is an open source framework, which is a framework for object-relational mapping, and it is a lightweight encapsulation of JDBC, and our Java programmers can manipulate the database using object-oriented thinking. Hibernate
9.4 Batch processing data typically, only a limited number of persisted objects are stored in the cache of a Session object, and the session object is closed when the session object processes the transaction, thus releasing the memory occupied by
For hibernate performance optimizations, a post has also been written to test the performance of large amounts of data using hibernate
Later found that the foreigner has a summary of the article is very good revving up Your Hibernate Engine only for
This article mainly introduces the difference between session and cache in ASP.net, this article combined with the use of experience, summed up the 5-point session cache and cache caching differences, the need for friends can refer to the
There are
Hibernate realizes a good cache mechanism, and can quickly improve the data reading performance of the system with the help of the cache inside the hibernate. Hibernate in the cache can be divided into two layers: first-level cache and level two
The previous article (Portal: Hibernate learning note _01) introduced a brief introduction to what Hibernate is, how to build it, a detailed description of the configuration file, and a few basic API details of hibernate. Then this article will take
Because I have been obsessed with the design principle and practice of large distributed system. But the conditions are limited, after all, still reading, can not touch the real distributed, real big data. can only on their own computer through the
The example of this article describes the method of hibernate bulk operation. Share to everyone for your reference, specific as follows:
Batch processing of Hibernate
Hibernate operates the database entirely in an object-oriented manner, and is
First, Hibernate's object state1, hibernate in the state of the object: temporary/transient State, persistent state, Free State.
1) Temporary status features:A) a direct new object.b) Management that is not in sessionc) There are no records of
Life cycle of Session cache cache当打开session以后,该缓存就开始了,当session关闭以后,该缓存不存在,其生命周期和session的生命周期是一样的How to store data in the cache get methodsession.get方法可以把一个对象放入到session的缓存中,以主键标识该对象,所以我们把这样的主键也叫oidSave methodSession.save方法可以把对象放入到缓存中Update
The first aspect: comparison of development speedIn terms of development speed, Hibernate's real mastery is more difficult than mybatis. The MyBatis framework is relatively simple and easy to get started with, but also relatively rudimentary.
Hibernate and MyBatis have studied, in the Java interview is also mentioned asked, in the project practice has also been used, now to hibernate and MyBatis to do a contrast, so that everyone better understanding and learning, so that they do more
I. OverviewSession cache is a piece of memory space, in this memory space to store the interrelated Java objects, which is located in the session cache object is also called persistent object, the session is responsible for the persistence of the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.