You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Michael Henson (JIRA)" <ji...@apache.org> on 2009/01/29 00:52:59 UTC

[jira] Created: (SOLR-992) Add Ability To Use JNDI Keys In Configuration String Replacement Tags

Add Ability To Use JNDI Keys In Configuration String Replacement Tags
---------------------------------------------------------------------

                 Key: SOLR-992
                 URL: https://issues.apache.org/jira/browse/SOLR-992
             Project: Solr
          Issue Type: Improvement
    Affects Versions: 1.4
         Environment: jdk 1.6.x,  Tomcat 5.x, 6.x
            Reporter: Michael Henson
            Priority: Minor
         Attachments: solr-992.zip

The configuration syntax allows users to specify tags which will be replaced with values pulled from system properties, or a given default value if the system property can not be found. It could also be useful to allow users to pull replacement values from the JNDI environment configuration.

Issues:
1. Full JNDI tags are specified with a url syntax, which includes a ":" character. The ":" character is currently used to separate the system property name to be used for replacement from the (optional) default value to use.
2. JNDI might not be configured for the application's context at all.
3. The specified JNDI reference might not be found in the application's context.
4. The specified JNDI reference might be malformed.

The attached patch is a simple first-draft attempt to merge the code used to pull a value for solr.home from JNDI into the variable replacement utility. The syntax I went with for determining that it's a JNDI replacement key is to require a "jndi/" prefix, where anything following that prefix is expected to be a "/"-delimited JNDI path: "jndi/data/home".

I had to comment out the log references because there is no log object available in the DOMUtil. I also had to replace the reference to "project" with its defined value, since that variable is just a final static String in the SolrResourceLoader class anyway.


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


[jira] Updated: (SOLR-992) Add Ability To Use JNDI Keys In Configuration String Replacement Tags

Posted by "Michael Henson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Henson updated SOLR-992:
--------------------------------

    Attachment: solr-992.zip

First draft version of the patch.

> Add Ability To Use JNDI Keys In Configuration String Replacement Tags
> ---------------------------------------------------------------------
>
>                 Key: SOLR-992
>                 URL: https://issues.apache.org/jira/browse/SOLR-992
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.4
>         Environment: jdk 1.6.x,  Tomcat 5.x, 6.x
>            Reporter: Michael Henson
>            Priority: Minor
>         Attachments: solr-992.zip
>
>
> The configuration syntax allows users to specify tags which will be replaced with values pulled from system properties, or a given default value if the system property can not be found. It could also be useful to allow users to pull replacement values from the JNDI environment configuration.
> Issues:
> 1. Full JNDI tags are specified with a url syntax, which includes a ":" character. The ":" character is currently used to separate the system property name to be used for replacement from the (optional) default value to use.
> 2. JNDI might not be configured for the application's context at all.
> 3. The specified JNDI reference might not be found in the application's context.
> 4. The specified JNDI reference might be malformed.
> The attached patch is a simple first-draft attempt to merge the code used to pull a value for solr.home from JNDI into the variable replacement utility. The syntax I went with for determining that it's a JNDI replacement key is to require a "jndi/" prefix, where anything following that prefix is expected to be a "/"-delimited JNDI path: "jndi/data/home".
> I had to comment out the log references because there is no log object available in the DOMUtil. I also had to replace the reference to "project" with its defined value, since that variable is just a final static String in the SolrResourceLoader class anyway.

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