Announcement Announcement Module
Collapse
No announcement yet.
DriverManagerDataSource close method Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • DriverManagerDataSource close method

    Hello,

    When I'm having the DriverManagerDataSource in bean configuration xml and managed by Spring IDE, eclipse always indicate destroy-method="close" is an error with the following message:

    Destroy-method 'close' not found in bean class 'org.springframework.jdbc.datasource.DriverManager DataSource'

    Here is the bean definition:
    Code:
    <bean id="dataSource"
    	class="org.springframework.jdbc.datasource.DriverManagerDataSource"
    	destroy-method="close">
    	<property name="driverClassName"
    		value="${jdbc.driverClassName}" />
    	<property name="url" value="${jdbc.url}" />
    	<property name="username" value="${jdbc.username}" />
    	<property name="password" value="${jdbc.password}" />
    </bean>
    So, is the close() destroy method really not needed?

    Thanks.

  • #2
    It isn't. I suggest you read up on what the function of the destroy-method is, it is clearly explained in the reference guide.

    Comment

    Working...
    X