You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Laird Nelson <lj...@gmail.com> on 2010/02/24 21:18:11 UTC

clone() contract broken for JDBCConfigurationImpl instances

Hello; JDBCConfigurationImpl, when cloned, drops its passwords on the floor.

This did not happen in version 1.2.2.

The problem is related to the introduction of the EncryptionProvider in the
2.0 line (and others).

The bug is here: https://issues.apache.org/jira/browse/OPENJPA-1534

This is a showstopper for me, but I'm not clear what the proper resolution
is (other than to implement clone() by calling super.clone() as should be
the case).

Thanks,
Laird

Re: clone() contract broken for JDBCConfigurationImpl instances

Posted by Laird Nelson <lj...@gmail.com>.
Aha; not a show stopper: the workaround is to simply do:

firstConf.setConnectionPassword(secondConf.getConnectionPassword());
firstConf.setConnection2Password(secondConf.getConnection2Password());

I'll update https://issues.apache.org/jira/browse/OPENJPA-1534 with the
workaround.  I also don't know what other properties don't "make it" during
a clone.

Laird

On Wed, Feb 24, 2010 at 3:18 PM, Laird Nelson <lj...@gmail.com> wrote:

> Hello; JDBCConfigurationImpl, when cloned, drops its passwords on the
> floor.
>
> This did not happen in version 1.2.2.
>
> The problem is related to the introduction of the EncryptionProvider in the
> 2.0 line (and others).
>
> The bug is here: https://issues.apache.org/jira/browse/OPENJPA-1534
>
> This is a showstopper for me, but I'm not clear what the proper resolution
> is (other than to implement clone() by calling super.clone() as should be
> the case).
>
> Thanks,
> Laird
>