Announcement Announcement Module
No announcement yet.
Spring JDBCDaoSupport Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring JDBCDaoSupport

    I need to support multiple datasources (sybase,oracle,mysql,cassandra etc) in my web application. I'm using spring framework in retrieving the datasource connections via the jndi which is configured in the tomcat container.

    Now i need to know a programmatic way in spring to identif if the particular database technology is supported by Spring, so that I can use them in the project? Say for instance,cassandra (with spring3.0.7) is not supported , so i would like to know if there is any util class specifying the supported database product names? I tried out SQLerrorcodes which has getDatabaseProductNmaes method but them its always coming as null?

    Also i see one another option -DataType Enum under batch support package, Can we use this to determine the supported DB's?

    If a database product is not supported, i will then need to use plain jdbc to query the database

    Also I need to have the same bean id 'datasource' defined for all the datasources. jndiname property below should be replaced based on the input parameter to the program.i.e, i need to programmtically set this jndiname based on the parameter i get as an request. And there can be any number of datasources requested at a given point of time.

    <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBea n"> <property name="jndiName"> <value>{jndiname}</value> </property> </bean> tech : java1.5, spring3.0.7 , tomcat6

    Any clue on this?

  • #2
    Any help on this ?