tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Romain Manni-Bucau (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (OPENEJB-2027) @DataSourceDefinition with custom properties are not working
Date Thu, 01 May 2014 12:21:16 GMT

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

Romain Manni-Bucau resolved OPENEJB-2027.
-----------------------------------------

    Resolution: Fixed

> @DataSourceDefinition with custom properties are not working
> ------------------------------------------------------------
>
>                 Key: OPENEJB-2027
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-2027
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: configuration, deployment
>    Affects Versions: 4.5.1
>            Reporter: Philip Herbst
>            Assignee: Romain Manni-Bucau
>             Fix For: 4.6.0
>
>
> Consider following configuration
> @DataSourceDefinition(
> 		...
> 		properties = {"validationQuery= SELECT 1"}
> )
> The value of the property "validationQuery" ends up as "= SELECT 1" which is wrong.
> I tracked down this code in org.apache.openejb.config.AnnotationDeployer#buildDataSourceDefinition
> ...
> for (String s : d.properties()) {
>   final String key = s.substring(0, s.indexOf('='));
>   final String value = s.substring(s.indexOf('='));
>   dataSource.property(key, value);
> }
> The beginIndex of substring is inclusive so the equals sign is included. Perhaps you
can also add some trimming of whitespaces to the code



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message