Results 1 to 2 of 2

Thread: In Spring 1.1.1 's reference, There was a small mistake .

  1. #1
    Join Date
    Aug 2004
    Posts
    15

    Default In Spring 1.1.1 's reference, There was a small mistake .

    In SpringFramework 1.1.1 's reference, There was a small mistake in 3.4.1.2 I think.
    The destroy-method attribute's value "destroy" may be the same with ExampleBean's method ,but there is a "cleanup()" method there.

    :wink:
    ==============================================
    3.4.1.2. DisposableBean / destroy-method
    ...

    Note: generally, the use of the DisposableBean marker interface can be avoided (and is discouraged since it unecessarily couples the code to Spring). A bean definition provides support for a generic destroy method to be specified. In the case of the XmlBeanFactory, this is done via the destroy-method attribute. For example, the following definition:

    <bean id="exampleInitBean" class="examples.ExampleBean" destroy-method="destroy"/>

    public class ExampleBean {
    public void cleanup() {
    // do some destruction work (like closing connection)
    }
    }
    Is exactly the same as:

    <bean id="exampleInitBean" class="examples.AnotherExampleBean"/>

    public class AnotherExampleBean implements DisposableBean {
    public void destroy() {
    // do some destruction work
    }
    }

    ==============================================

  2. #2
    Join Date
    Aug 2004
    Location
    Amsterdam, Netherlands
    Posts
    450

    Default

    Thanx! I've just fixed this.

Similar Threads

  1. Replies: 7
    Last Post: Dec 20th, 2012, 12:28 PM
  2. Spring MVC Web Framework versus Struts
    By biguniverse in forum Web Flow
    Replies: 27
    Last Post: Aug 29th, 2012, 03:57 AM
  3. korean Spring reference..
    By fromm0 in forum Meta
    Replies: 4
    Last Post: Aug 31st, 2005, 07:36 AM
  4. Replies: 14
    Last Post: Feb 21st, 2005, 05:41 PM
  5. Spring reference translation
    By turgayz in forum Meta
    Replies: 2
    Last Post: Sep 20th, 2004, 09:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •