[
https://issues.apache.org/jira/browse/OPENEJB-2027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Romain Manni-Bucau updated OPENEJB-2027:
----------------------------------------
Fix Version/s: 4.6.0
Assignee: Romain Manni-Bucau
> @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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira