Pruitt, Byron S | 8 Oct 21:00 2015

[dbcp] setting properties

The BasicDataSource class has methods for setting some validation policies


How are these invoked programmatically?  I started with the PoolingDataSourceExample code and nothing
created can set those.


Pruitt, Byron S | 7 Oct 21:35 2015

[dbcp] auto reconnecting

My server has long standing idle periods.  We are seeing: 
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received
from the server was...  errors.

I would like to fix it as simply as possible.  MySQL has two properties autoReconnect and
autoReconnectForPools that might fix the problem.  They both default to false and I can't find an easy way
to set them.
I had an earlier problem with auto commit and I fixed it with the setDefaultAutoCommit method on
PoolableConnectionFactory.  But, it doesn't have a similar setter for auto reconnect.

The only example I found of setting the autoReconnect property is on the connection url.  I use the interface
where I pass an instance of Properties, so I assume I can set those properties with it.

I am curious if there are better ways to set those properties.


Rebecca2w2 | 6 Oct 21:49 2015

[MATH] Linear Inequality Constraints in Optimizer

Is it possible to use linear inequality constraints (ie Ax < b) with the
multivariable non-linear optimizer?

View this message in context:
Sent from the Commons - User mailing list archive at
Ted Dunning | 6 Oct 03:02 2015

[MATH] Re: Where are the multivariate vector optimization options that are non-deprecated?

On Thu, Oct 1, 2015 at 4:07 PM, Gilles <gilles <at>> wrote:

> On Thu, 1 Oct 2015 15:40:24 -0700 (PDT), Rebecca2w2 wrote:
>> Hey, I'm new so maybe I'm missing something, but here we go.
> The first thing you have missed[1] is that posts' subject line should
> be prefixed with "[Math]". ;-)

Don't feel bad about that.  Pretty much everybody misses that the first few

Effectively, Gilles just missed this as well by replying to your email
without editing the subject.
Stephan Herrmann | 4 Oct 18:56 2015

[bcel] perspective?


The Object Teams project[1] has been successfully using BCEL for around
13 years now. As Java 8 becomes widely used, we obviously can no longer
use BCEL 5.2. For a while it seemed as if BCEL was dead, but I was happy
to see more activity as of late. This now puts as on a crossroad between
two options:
(1) migrate to BCEL 6.0
(2) rewrite our 10 kLOC bytecode transformers using another library

I would like to avoid the immense effort involved with (2), but I'm not
quite sure if (1) is a viable and sustainable option.

First, as an Eclipse project we cannot ship a private version of BCEL.
We have to go through the Eclipse IP process in order to put BCEL into
"Orbit"[2]. This in general requires a release of the upstream project.
(BCEL 5.2 is in Orbit since 2007).

Hence, my primary question: can we realistically expect a release of
BCEL 6.0 any time soon?

Secondly, what happens when future versions of Java introduce new
bytecodes? Currently it seems like Java 9 will only introduce one new
access flag and a new attribute, but of course future additions can
never be ruled out. Is there any commitment in the BCEL team to
support future bytecodes? I would be happy to help by way of bug
reports, possibly patches, but obviously some committer(s) would need
to drive this process. Is this something I could expect?

Lastly, already in version 5.2 we had to patch two files, because two
(Continue reading)

Rebecca2w2 | 2 Oct 00:40 2015

Where are the multivariate vector optimization options that are non-deprecated?

Hey, I'm new so maybe I'm missing something, but here we go.

I'm trying to find a multivariate vector optimizer for a non-least square
algorithm (just a basic equivalent to something like fmincon in MATLAB, if
that's helpful).  However, it looks like all are deprecated or moved in
optim.  Do any exist that are non-deprecated?  If so where?

Thanks for your help, it is much appreciated!

View this message in context:
Sent from the Commons - User mailing list archive at
McCormick, Jeremy I. | 29 Sep 20:09 2015

[pipeline] status of this project?


I am a scientific compuing applications developer and the Apache Commons Pipeline project was the first
hit I got when searching for "java pipeline" via Google.

I am trying to find existing Java software for setting up a job chain for data processing.

I notice that this project has no releases and that the webpage was last modified in 2009.  But it seems like
exactly what I would need to build something like this.

Is it completely abandoned?

Would it be possible to get a release tagged of this project so that I can make Maven releases that depend on it?

Or should I instead use some other Java library for data pipelining?  Any specific suggestions of what that
might be?


John Febarro | 22 Sep 23:34 2015

[daemon] When to use MyClass implements Daemon

I read the Wiki and looked at the examples in src/samples/ but it wasn't clear on when I would use a line like:

public class MyClass implements Daemon

or just  public class MyClass   (without the implements portion).

Is there any logic or reasons for when to use the implements Daemon and when not to?   Any significant difference?
Matthew Mann | 19 Sep 22:17 2015


When will beanutils2 be released?
Pruitt, Byron S | 17 Sep 21:02 2015

[dbcp] PoolingDataSourceExample with MySQL exception

I got the up and running using Vertica driver easily enough.
I now need to switch to MySQL.  I switched out the driver and the uri particulars.  But I am getting the
exception below.  Interesting enough I expected issues with Vertica, but not MySQL.  You just never know.

Exception in thread "main" java.lang.NullPointerException
	at java.util.Hashtable.put(
	at java.util.Properties.setProperty(
	at com.mysql.jdbc.NonRegisteringDriver.parseURL(
	at com.mysql.jdbc.NonRegisteringDriver.connect(
	at java.sql.DriverManager.getConnection(
	at java.sql.DriverManager.getConnection(
	at org.apache.commons.dbcp2.DriverManagerConnectionFactory.createConnection(
	at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(
	at org.apache.commons.pool2.impl.GenericObjectPool.create(
	at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(
	at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(
	at org.apache.commons.dbcp2.PoolingDataSource.getConnection(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at com.intellij.rt.execution.application.AppMain.main(

My setup hasn't really changed much from the working Vertica.

Properties dbProp = new Properties();
        dbProp.put("user", aUser);
        dbProp.put("password", aPw);
        dbProp.put("loginTimeout", "35");
(Continue reading)

Pruitt, Byron S | 16 Sep 19:35 2015

[dbcp] inconsistently set autocommit

My usual process for learning something is a quick prototype.  For setting up a driver pool with autocommit =
false, I implemented the little quickie prototype below.

Properties dbProp = new Properties();
dbProp.put("user", "aUser");
dbProp.put("password", "aPw");
dbProp.put("loginTimeout", "35");
dbProp.put("binaryBatchInsert", "true");
dbProp.put("autocommit", false);
DataSource dataSource = setupDataSource("myConnectURI", dbProp);  //this the standard example on the website

Connection conn = dataSource.getConnection();
System.out.println("autocommit: " + conn.getAutoCommit());   //this prints out false

I moved the above code verbatim to my actual server code.
The first connection I get from the pool has autocommit == false.  I return this connection back to the pool.
But the second time I get a connection from the pool it has autocommit == true.

I have no idea why autocommit is set to a different state for the second connection?  I can do a test and then set
to autocommit = false, but I would like to understand the inconsistency.


Steve Pruitt

To unsubscribe, e-mail: user-unsubscribe <at>
For additional commands, e-mail: user-help <at>
(Continue reading)