two important properties of spring and abstract lazy-init

2010-06-03  来源:本站原创  分类:Java  人气:159 

1.lazy-init
<beans>
<bean type="bean Path " lazy-init="true"/>

<bean type="bean Path " lazy-init="false">
<property name="service1" ref="service1"/>
</ Bean>
</ Beans>

These two bean, a lazy-init attribute is true, one is false, by what difference does it make when the IoC container starts, service2 will be instantiated, but does not service1; but when a container is instantiated service2, service1 also been instances of, and why, because service2 need it. That lazy-init = "true" the bean, IoC container will not start instance of the bean, when used only when the container needs to instantiate it. lazy-init is conducive to the efficiency of the container, for without the bean can be the first matter.

2.abstract
<Bean
class = "org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
abstract = "true">
... ...
</ Bean>
bean abstract = "true", the bean will not be instantiated, the above bean is a template

相关文章
  • two important properties of spring and abstract lazy-init 2010-06-03

    1.lazy-init <beans> <bean type="bean Path " lazy-init="true"/> <bean type="bean Path " lazy-init="false"> <property name="service1" ref="service1"/> </ Bean> </ B

  • html dom number of important properties and methods of 2009-09-02

    Features / method type / Return Type Description node nodeName String name; according to the definition of the type of the node nodeValue String value of the node; according to the definition of the type of the node the type of the node nodeType Numb

  • html dom number of important properties and methods 2010-03-14

    Properties / methods Type / return type Help nodeName String node name; according to the definition of the type of the node nodeValue String node value; according to the definition of the type of the node nodeType Number one node of the type of const

  • Spring application of the properties file encryption and decryption 2010-04-04

    Introduction <br /> development in the Spring, we will use in many cases placeholder properties file reference attribute value to simplify our system and our system is more flexible and versatile. This configuration has two distinct advantages: 1, r

  • Flex integration as well as Hibernate's Lazy problems Spring.Hibernate ultimate solution 2010-05-21

    Original article from my blog: ( http://emavaj.blog.163.com ) If the Flex with Spring + Hibernate communication, then the Lazy Hibernate is to bring Blazeds error of the relationship ... because cglib proxy Even if you use Fetch to crawl out of the d

  • Flex and Hibernate integration Spring.Hibernate ultimate solution of the problem Lazy 2010-05-21

    Original article from my blog: ( http://emavaj.blog.163.com ) If the Flex with Spring + Hibernate communication, then the Lazy Hibernate is to bring Blazeds error of the relationship ... because cglib proxy Even if you use Fetch to crawl out of the d

  • spring abstract framework Services 2010-01-24

    Spring provides a consistent abstraction for transaction management. This abstraction is the abstraction of Spring, one of the most important, it has the following advantages: API for different services to provide a consistent programming model, such

  • Introduction to source analysis-XmlBeanFactory spring 2010-11-27

    Transfer from http://earthrelic.blog.sohu.com/156715443.html Source code analysis, is a painful and more enjoyable to see the code written by someone else, but when you can look at to understand the time, I believe that happiness will follow, in orde

  • Struts / Spring / Hibernate wiki translation in English 2011-01-08

    see http://en.wikipedia.org/wiki/Apache_Struts Apache Struts From Wikipedia, the free encyclopedia Apache Struts is an open-source web application framework for developing Java EE web applications. It uses and extends the Java Servlet API to encourag

  • spring transaction services 2010-06-06

    Spring for transaction management first-class support. It supports both programmatic and declarative transaction. To achieve robust enterprise applications, business can play an important role. Whether the use of programmatic and declarative transact

  • Discussion hibernate lazy loading 2010-10-01

    Hibernate lazy initialization error is the use of development projects in the most common mistakes. If the configuration of a class or collection of search strategy of delay, it must be when the agent or agent class instance is a collection of persis

  • Spring + Hibernate in (the owning Session was closed error) 2009-08-23

    Spring control of Hibernate as a result of the life cycle of only data layer and service layer, while the performance of management layers, so there will be the owning Session was closed phenomenon. Needle This point, I passed the hibernate filter to

  • Hibernate's lazy on the mechanism 2009-08-29

    Mechanism on the lazy, reprint Address: http://lz726.javaeye.com/blog/116616 Delay the use of Hibernate initialization errors are the most common development mistakes. If a class or configuration of the delay in collection of search strategy, it must

  • hibernate lazy 2009-08-29

    Could not initialize proxy - the owning Session was closed Hibernate session is closed because, as a result of lazy = true, action call session.load () has been the target is free and can not be changed, the method should be placed in the dao Hiberna

  • Spring AOP underlying implementation technology 2009-02-16

    Software programming language ultimate goal is to use more natural and more flexible way to simulate the world, from the original machine language to the process of language and then to object-oriented languages, we see programming language in a step

  • HBP-HTC modified properties of silk fabric dyed with reactive dyes 2010-02-18

    Keywords: HBP-HTC modified reactive dyeing properties of silk fabric Abstract: hyperbranched polymer is a kind of special structure and properties of polymers, preparation is simple, inexpensive, with practical value, quaternary ammonium compounds wi

  • flex + cairngorm + spring + hibernate integration example of 2010-04-12

    Preparation: SQL server2005: JDK: jdk-1.5.0.0 TOMCAT: tomcat-6.0.20 ECLIPSE: eclipse -3.3 MYECLIPSE plug-in: MyEclipse-6.5 Flex: FB3_WWEJ_Plugin.exe BLEAZEDS: BlazeDS, download address: http://opensource.adobe.com/wiki/display/blazeds/Release+Builds

  • Spring Framework's design concept and design patterns of (turn) 2010-06-13

    See the article in http://www.ibm.com feel very good, and records about, the original address: http://www.ibm.com/developerworks/cn/java/j-lo-spring-principle/index.html Spring bone structure Spring total of ten components, but the real core componen

  • Spring Framework Overview 2010-07-05

    Spring Framework contains a number of features, and is well organized in the next chart shows the six modules. This section describes each module in turn. Core package package is the most basic part of the framework, providing IoC and dependency inje

  • Spring reading notes 2010-08-15

    1.Spring is layered java se / ee-stop lightweight open-source application framework to Ioc (Inverse Of Control: Reverse Control) and AOP (Aspect Oriented Programming: surface Programming to the section) as the kernel. 2.JCP (Java Community Process) i