State (Transient)has just been created with the new statement and has not been persisted and is not in the session cachePersistent State (persistent)has been persisted and added to the session's cacheFree State (Detached)has been persisted, but is no longer in the session's cache
Three persistence and ORM are also part of the hibernate that needs to be understood.Persistence: Data Model (Memory) "-" Stora
Ssh:Struts (presentation layer) +spring (business layer) +hibernate (persistence layer)Struts:Struts is a presentation-layer framework that mainly functions as interface display, receiving requests, and distributing requests.In the MVC framework, struts belongs to the VC level, responsible for the interface performance, responsible for the distribution of MVC relationship. (View: jsp,http,form,tag,resourse;
code is formatted, comprehensive comments, beautiful and easy to read.11, detailed record system operation log, help the operation and maintenance personnel for system analysis and troubleshooting.12, using Ehcache two cache, Spring MVC static load cache and other mechanisms to improve system performance.13, the data persistence layer is divided into hibernate and MyBatis two big architectures. 2 sets of s
no longer in the session's cache
Three persistence and ORM are also part of the hibernate that needs to be understood.Persistence: Data Model (Memory) "-" Storage model (persistent device), which is said to be persistent in Java, usually refers to the use of SQL to store data in a relational database.ORM is a persistent solution that maps the object model and r
In struts+hibernate this kind of structure, is should not pass the PO that hibernate produces directly to JSP, whether he is iterator, or list, this is a design error.
Let me talk about the data representation for each layer in the Java EE architecture:
The data representation of the Web layer is Formbean, and the data comes from the HTML Form POST
The data re
in programming development, we have very many frameworks, they are very convenient and very useful, today we come to know a Java the classic frame Hibernate , Hibernate The English name is "hibernation". This is a very interesting technology, the same name is also very clever! Let's look at the cover of this technical book abroad:Brief Introduction:It is known th
In the past few days, a part-time employee's information entry system has encountered an error where hibernate cannot query the specified condition data. Now we can find a solution:
The error message is as follows:HTTP status 500-
--------------------------------------------------------------------------------
Type exception report
Message
Description the server encountered an internal error () that prevented it from fulfilling this request.
Exception
Persistence classthe whole concept of hibernate is to take the value from the Java class attribute and will persist to the database table. A mapping file Hibernate help determine how to pull the values from the class and map them to the table and related fields.
Java classe
, in fact, do not worry, you just need to download a complete final package, all the necessary jar inside. After downloading the final package, unzip the directory such as:Hibernate includes a total of 23 jar packs, dazzling. This article will explain in detail the role of each jar package in hibernate, so that you can make your own choices in your application.To download hibernate, for example 3.6.1 stable
Java framework --- session Status of hibernate, hibernatesession
Session interface is the most important interface that Hibernate provides to the program to manipulate the database,Is a single-threaded objectIt provides basic methods for saving, updating, deleting, and querying. It has a cache that stores persistent objects. When the cache is cleared, the databas
the JDBC driver of MySQL, download well in advance;Then the user name, password, if the information is correct, then the connection is successful.2. Create a new Java project and add hibernate features to itThe process is as follows:Right-click Project-->myeclipse-->add Hibernate capabilities--> Select version, I choose the 4.1 version here, and then choose Hibe
the use of database characteristics of the statement, it will be difficult to tune, such as: stored procedures, etc. is more difficult.Hibernate Advantages and Disadvantages:(1) AdvantagesA, increase productivity;B, the development of more targeted (impedance mismatch);C, portability;D, no intrusion, support for transparent persistence.(2) DisadvantagesA, the use of database characteristics of the statement, it will be difficult to tune;B, there are
Unconsciously, Dalian has been studying excellent open-source Java development frameworks or template engines such as struts, webwork, velocity, sitmesh, and hibernate for more than three months, especially struts and hibernate, because struts is actually the standard implementation of the MVC design pattern and is widely used in various large-scale enterprise de
pages, and PDF document view components that collect user requests and realistic processing results.The Java EE components of each layer are coupled loosely coupled, and the components are not hard-coded to be coupled, which improves the extensibility and maintainability of the application.1.2. Components for Java EE applications>> Presentation Layer Components: The most common is JSP.>> controller compone
varchar2 (50), birthday date, sex char (1), salary number (8, 2 )); -- add comments to the columns comment on column tmp_emp.id is 'Primary key id'; Comment on column tmp_emp.name is 'name'; Comment on column tmp_emp.birthday is 'date '; comment on column tmp_emp.sex is 'gender (f female, M male) '; Comment on column tmp_emp.salary is 'wage'; -- create/recreate primary, unique and foreign key constraints alter table tmp_emp add constraint pk_tmp_emp_id primary key (ID); -- create sequence sq_tm
)VALUES(3,'Books');Db_store.sql2. Code StructureThe IDE I'm using is ideaiu, which builds the project through MAVEN and configures spring through XML. The code structure after completion is:3. Create entity class categoryClass category{ private int cateid; Private String catename; Number of omitted Get,set method @Override public String toString () { return "id=" +cateid+ "name=" +catename; }} 4. Modify the pom.xml, and introduce the relevant Dependencies. 5. Configure
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.