The setting property in Sqlmapconfig.xml Ibatis MyBatis

Source: Internet
Author: User

<settings
Cachemodelsenabled= "true"
Lazyloadingenabled= "false"
Enhancementenabled= "true"
Maxsessions= "64"
Maxtransactions= "8"
maxrequests= "128"
Usestatementnamespaces= "false"
Classinfocacheenabled= "true"
Errortracingenabled= "true"
Defaultstatementtimeout= ""
Statementcachingenabled= "true"
/>
<!--
maxrequests
The maximum number of threads executing the SQL statement at the same time. A thread larger than this value will block until another thread finishes executing. Different DBMS have different limit values, but any database has these restrictions. Typically this value should be at least 10 times times the maxtransactions (see below) and always be greater than maxSessions and maxtranactions. Reducing this parameter value usually improves performance.

Example: maxrequests= "256"
Default value: 512

maxSessions
The maximum number of sessions for the activity during the same time. A session can be maxsessions an explicit session of a code request, or it can be a session automatically obtained by a thread using an Sqlmapclient instance (that is, executing a statement). It should always be greater than or equal to maxtransactions and less than maxrequests. Reducing this parameter value usually reduces memory usage.

Example: maxsessions= "64"
Default value: 128

maxtransactions
The maximum number of thread maxtransactions to enter Sqlmapclient.starttransaction () at the same time. A thread larger than this value will block until another thread exits. Different DBMS have different limit values, but any database has these restrictions. This parameter value should always be less than or equal to maxsessions and is always much smaller than maxrequests. Reducing this parameter value usually improves performance.

Example: maxtransactions= "16"
Default value: 32

cachemodelsenabled
Globally enables or disables all cache cachemodelsenabled model for sqlmapclient. used when debugging a program.

Example: Cachemodelsenabled= "true"
Default value: True (Enabled)

lazyloadingenabled
Globally enables or disables all lazy loading of sqlmapclient. Lazyloadingenabled is used when debugging a program.
Example: Lazyloadingenabled= "true"
Default value: True (Enabled)

enhancementenabled
Globally enable or disable runtime bytecode enhancement to optimize the visit to enhancementenabled
Ask about the performance of Java Bean properties while optimizing the performance of lazy loading.

Example: Enhancementenabled= "true"
Default value: False (Disabled)

usestatementnamespaces
If you enable this property, you must use the fully qualified name to refer to mapped usestatementnamespaces
Statement The fully qualified name of the Mapped statement is synthesized by the name of Sql-map and the name of the mapped-statement. For example: queryForObject ("Sqlmapname.statementname");

Example: Usestatementnamespaces= "false"
Default value: False (Disabled)

Defaultstatementtimeout
This setting value must be an integer, which can be reset by the statement property of any of the mapped files as the JDBC connection times out.
If not specified, the query will have no time-out limit unless the statement property value is set in the mapping file. The value is set to wait for the connection to expire in seconds

Classinfocacheenabled
With this setting enabled, IBATIS would maintain a cache of introspected
Classes. This'll leads to a significant reduction in startup time if many
Classes is reused.
Example: Classinfocacheenabled= "true"
Default value: True (Enabled)

statementcachingenabled (available in later versions of IBATIS 2.3.0)
With this setting enabled, IBATIS would maintain a local cache of
Prepared statements. This can leads to significant performance
improvements.
Example: Statementcachingenabled= "true"
Default value: True (Enabled)
-

Transferred from: http://blog.csdn.net/wang_fangyong/article/details/5847403

The setting property in Sqlmapconfig.xml Ibatis MyBatis

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.