Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hikari 2.4.1, compatibility Patch shutdown() to close() #27

Closed
lewie opened this issue Sep 24, 2015 · 9 comments
Closed

hikari 2.4.1, compatibility Patch shutdown() to close() #27

lewie opened this issue Sep 24, 2015 · 9 comments

Comments

@lewie
Copy link

lewie commented Sep 24, 2015

Hy @timmolter,

diff --git a/src/main/java/com/xeiam/yank/YankPoolManager.java b/src/main/java/com/xeiam/yank/YankPoolManager.java
index da3d4e5..f374d7d 100644
--- a/src/main/java/com/xeiam/yank/YankPoolManager.java
+++ b/src/main/java/com/xeiam/yank/YankPoolManager.java
@@ -90,7 +90,7 @@

     if (this.hikariDataSource != null) {
       logger.info("Releasing pool: {}...", this.hikariDataSource.getPoolName());
-      this.hikariDataSource.shutdown();
+      this.hikariDataSource.close();
     }
   }

then pom.xml dependency can be changed too:
from:

        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP-java6</artifactId>
            <version>2.3.9</version>
            <scope>compile</scope>
        </dependency>

to:

        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP</artifactId>
            <version>2.4.1</version>
            <scope>compile</scope>
        </dependency>

A small issue I've found in examples MYSQL_SQL.properties too:

BOOKS_CREATE_TABLE=CREATE TABLE `Books` ...

should be changed to:

BOOKS_CREATE_TABLE=CREATE TABLE `BOOKS` ...

I tested with Mysql, and got an error: 'BOOKS' could not be found.

Thank you very much.
Helmut

@lewie
Copy link
Author

lewie commented Nov 25, 2015

Hello @timmolter,
I want to use Yank in a JDBC Bundle for https://github.com/openhab/openhab. Will the project be continued?

@timmolter
Copy link
Member

@lewie Sorry, somehow I missed you issue/question before. Let me answer it next...

@timmolter
Copy link
Member

OK, I updated all dependencies in the pom and fixed the BOOKS string. Please see/use latest snapshot jar. If you need a release jar let me know.

Are you saying this.hikariDataSource.shutdown(); should be replaced with this.hikariDataSource.close();?

If so, why?

@timmolter
Copy link
Member

BTW, I'm sticking to HikariCP-java6 rather than HikariCP in order to keep Yank compatible with Java 6. If that's an issue, let me know also please.

@timmolter
Copy link
Member

openhab looks awesome. I may end up using it as I'm starting to get into that application space with artificial intelligence stuff like anomaly detection, prediction, robotics. Glad you made me aware of it!

@lewie
Copy link
Author

lewie commented Nov 25, 2015

@timmolter,
yes, it is a java Version Problem, forgot to say.
We need compatibility with minimum java 7, better java 8 (upcomming openHAB2 aka since openhab2 core Components now named smarthome) and for HikariCP 2.4.1 hikariDataSource.close() needs to be used. In Source of HikariCP 2.4.1 it is @deprecated only, but (don't know why) I got errors running HikariCP 2.4.1 and Yank together.

After going through Mybatis I landed at HikariCP, after many more hours of research at Yank what my work has facilitated again. I am also thinking of the developers who want to maintain the JDBC Bundle further. (its not merged yet)

Wahh, anomaly detection, prediction... You're running an open door for me!!!
I use openHAB/SmartHome more and more for really everything to log, manage, eventing...., not only in Smarthomes. I take care of a few smaller companies, make them smarter, their consumption and material movements (Electricity, Air, Oil, Gas, Wood chips) more transparent. Complex machines seams to have on the let any peculiarity to identify it through a power supply system.

For example, I would like to identify, a current Power consumer at its 'switch on Power profile' or can identify at its load profile. Complex and simple Machines too seems to have this Profile, but can't describe it properly for a pattern recognition.
The deep mathematical understanding is missing me, unfortunately, in these areas often.

Nice to meet you
Helmut

timmolter added a commit that referenced this issue Nov 26, 2015
@timmolter
Copy link
Member

@lewie OK, I updated Yank for you and bumped the version to 3.1.0-SNAPSHOT. Let me know. If everything works for you, I'll do a release to Maven Central.

@lewie
Copy link
Author

lewie commented Nov 26, 2015

@timmolter,
Perfect! Everything works for me now.
A release on Maven Central would be absolutely perfect! 👍

Thank You
Helmut

@timmolter
Copy link
Member

3.1.0 pushed to Maven Central. Notice the namespace change:

<dependency>
    <groupId>org.knowm</groupId>
    <artifactId>yank</artifactId>
    <version>3.1.0</version>
</dependency>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants