简体   繁体   中英

Migrating from Weblogic to Spring/HikariCP

My current system is as follows:

  • Weblogic 12c
  • Spring 3.x
  • JSF 1.1

We are looking to migrate from Weblogic to HikariCP as we start our transition to Spring Boot & Angular.

Our datasources were setup and maintained in Weblogic and configured in Spring via the JndiObjectFactoryBean.

We'd like to lift our weblogic datasource/connection pool and replace it with Spring/Hikari.

I've changed all of the dataSources to Spring JDBC Beans.

Without changing my code is there a way to setup Hikari with these Datasource changes?

<bean id = "dataSource"
            class = 
  "org.springframework.jdbc.datasource.DriverManagerDataSource">
   <property name = "driverClassName" value = 
      "com.ibm.as400.access.AS400JDBCDriver"/>
   <property name = "url" value = "jdbc:as400://test"/>
   <property name = "username" value = "xxxxx"/>
   <property name = "password" value = "xxxxx"/>
</bean>

The configuration in context file will be :

 <bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
            <property name="dataSourceClassName" value="org.springframework.jdbc.datasource.DriverManagerDataSource" />
            <property name="minimumIdle" value="1"/>
            <property name="maximumPoolSize" value="10"/>
            <property name="connectionTimeout" value="5000"/>
            <property name="dataSourceProperties">
                <props>
                    <prop key="url">jdbc:as400://test</prop>
                    <prop key="user">xxxxx</prop>
                    <prop key="password">xxxxx</prop>
                </props>
            </property>
 </bean>

Hope this helps you :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM