You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "David Jencks (JIRA)" <ji...@apache.org> on 2008/03/25 01:53:33 UTC

[jira] Reopened: (AMQ-1254) Kaha Store puts a non-string into System properties

     [ https://issues.apache.org/activemq/browse/AMQ-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Jencks reopened AMQ-1254:
-------------------------------


Committed improved fix in 4.1 branch rev 640659.

The trunk fix completely ignores the main point of the lock, which is to prevent copies of activemq in the same vm but in different classloaders from attempting to use the same file.  The branch fix locks on a constant string, which according to the java docs is interned and thus guaranteed to be the same object across classloaders.

> Kaha Store puts a non-string into System properties
> ---------------------------------------------------
>
>                 Key: AMQ-1254
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1254
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 4.1.2
>            Reporter: David Jencks
>            Assignee: Rob Davies
>             Fix For: 5.0.0
>
>         Attachments: Kaha-Store.patch
>
>
> KahaStore puts a hashmap into SystemProperties, which causes problems with programs that expect only strings as properties.  In particular some versions of Hibernate assume all system properties are strings: this is causing difficulties running roller in geronimo 2.0
> Attached is a proposed solution.  I have no idea how to test it.  I get the same 7 failures and one error building amq with and without the change.
> The proposal stores the list of locked directories in a string and converts it back and forth to a map whenever it is accessed.  I use a constant string as the vm-wide lock monitor formerly provided by the HashSet.  According to the String javadoc constant strings are intern()ed and the same instance is provided in any classloader: this makes it suitable for a vm-wide lock monitor.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.