Comments (10)
Hi,
I am not sure how many are still running on JDK 5 which reached it "end of life" already: http://www.oracle.com/technetwork/java/javase/1-5-137169.html.
Maybe the minimum supported JVM should be updated to 1.6
Vlad
On Tuesday, April 1, 2014 11:40 AM, rankinc [email protected] wrote:
The Activator class contains these lines:
FileReader fileReader = new FileReader(cfgFile);
try { btmProperties.load(fileReader);
}
finally { fileReader.close();
}
Unfortunately, the Properties.load(Reader) API only exists since JDK6. To be compatible with JDK5 (which is your declared target), you need to use a FileInputStream instead of a FileReader.
On the positive side, this does appear to be the only JDK6 issue in the project.
Or you could switch to JDK6, now that JDK8 has been released.
—
Reply to this email directly or view it on GitHub.
from btm.
BTM 2.1.x' target was JDK 1.5 but I think we can reasonably make 3.0.0 require JDK 1.6.
from btm.
I wouldn't object to that ;-). That would mean that we could also replace constructs such as:
throw (SQLException) new SQLException("unilateral rollback of " + this).initCause(ex);
with:
throw SQLException("unilateral rollback of " + this, ex);
And that we wouldn't need to use Reflection in order to invoke Connection.isValid().
Not to mention proper use of @OverRide...
from btm.
You still need reflection because even though Java 6 defines the isValid()
signature, many drivers are only JDBC2/3 compliant (pre-Java 6) and do not
implement the method. So at runtime an exception is thrown when isValid()
is invoked. I forget which, maybe AbstractMethodException or something.
Anyway, we can't get rid of the reflection for probably a long time to
come.
On Tue, Apr 1, 2014 at 2:10 AM, rankinc [email protected] wrote:
I wouldn't object to that ;-). That would mean that we could also replace
constructs such as:throw (SQLException) new SQLException("unilateral rollback of " + this).initCause(ex);
with:
throw SQLException("unilateral rollback of " + this, ex);
And that we wouldn't need to use Reflection in order to invoke
Connection.isValid().Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-39184788
.
from btm.
OK, but the SQLExceptions and @OverRide annotations are fair game... ;-).
from btm.
Yes, they are. FYI BTM was designed during the JDK 1.4 era, so quite a fair bit of its architectural design was done with those limitations in mind. Support for JDK 1.5+ constructs were added later on here and there but I don't think we ever did a complete code review to use all the new constructs. If you feel like reviewing them, feel free!
from btm.
Indeed, I think I saw a "migrate to JDK5 so that we can use Generics" commit somewhere... ;-)
from btm.
BTW, how did you obtain jdbc-3.0.jar please? That will obviously need updating to jdbc-4.0.jar for Java 6.
from btm.
It turns out that I don't need a complete jdbc-4.0.jar. All I really need (so far, anyway) is to recreate JDBC 4.0's CommonDataSource, Connection and Driver interfaces, because these are the main API differences between 4.0 and 4.1. Once overlaid on top of JDK7, then JDK7's native JDBC API turns back into 4.0.
This approach is far more likely to comply with BTM's Apache licence than downloading the complete 4.0 API from the Internet ;-).
from btm.
BTM now requires JDK6.
from btm.
Related Issues (20)
- MySQL 8 support HOT 1
- How to configure log4j debug logs for bitrnix
- XAFactories which implement java.util.Map (MQXAConnectionFactory) cannot be initialized properly HOT 3
- Why is there no activity on the Bitronix github? HOT 2
- Using bitronox manager, XA not working with my custom dev-kit adapter HOT 7
- Transaction Manager problem HOT 1
- Glad to see the BTM project active again
- searching best solution for error handling HOT 1
- Error show in tomcat logs HOT 2
- Connection pool unable to recover after database connectivity loss HOT 1
- Question on rollback HOT 1
- Clarify requirements for XAResourceProducer unique name HOT 3
- Support custom XAResourceProducer implementations in ResourceLoader HOT 1
- Transaction Timeout Not working HOT 1
- Using ActiveMQ and bitronix-transaction-manager redelivery issue HOT 1
- Data Security Issue : Vendor property password is getting logged without masking HOT 1
- XA making multiple connections with MQ manager HOT 3
- Is it possible to recover heuristic exception.
- Is it possible to release 3.x?
- Issues related to spring cloud + feign HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from btm.