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

Alasdair Nottingham resolved ARIES-250.
---------------------------------------

    Resolution: Fixed

> JNDI service name lookup bugs
> -----------------------------
>
>                 Key: ARIES-250
>                 URL: https://issues.apache.org/jira/browse/ARIES-250
>             Project: Aries
>          Issue Type: Bug
>          Components: JNDI
>    Affects Versions: 0.1
>            Reporter: Alasdair Nottingham
>            Assignee: Alasdair Nottingham
>             Fix For: 0.1
>
>
> There are two bugs related to lookups using the osgi.jndi.service.name 
> property. These are:
> osgi:service/jdbc/myDataSource
> results in a NamingException. To work correctly first off we try looking 
> using an interface name of jdbc and a filer of myDataSource. Since 
> myDataSource is not a valid filter we get a FilterSyntaxException when we 
> first query. This results in a NamingException. Instead we should ignore the 
> exception so we fall back to a service name lookup.
> The following lookup doesn't work:
> osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/myDataSource)
> because we basically do a split on /, so we end up with:
> osg:service
> javax.sql.DataSource
> (osgi.jndi.service.name=jdbc
> /myDataSource)
> hasFilter returns false in this case which means we query for 
> javax.sql.DataSource with a null filter so we get the wrong DataSource (well 
> only if there are multiple).
> So two fixes:
> 1. If we have more than 3 parts we shouldn't query with interface/filter but 
> go straight to service name.
> 2. We should ignore the / inside a filter, so we need better parsing that 
> balances the brackets.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to