[
https://issues.apache.org/jira/browse/SOLR-336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670678#action_12670678
]
withinsea edited comment on SOLR-336 at 2/5/09 1:15 AM:
------------------------------------------------------
> Shalin Shekhar Mangar commented on SOLR-336:
> --------------------------------------------
>
> Why should the dataDir be a special thing? Why not support JNDI values for
> all properties implicitly? We currently support two kinds of properties, the
> ones defined in solr.xml and the environment variables. As a logical
> extension, we can add JNDI variables too so that we don't need to duplicate
> JNDI properties again in solr.xml.
Er, in fact I don't think dataDir is a special thing... I think any JNDI
configuration is special thing, if it has the same meaning with a system
property.
The dataDir is just a example --- I added it just because it's the only
specificated one in the wiki document.
But I opposite to the concept of refering properties and JNDI values in
different syntax...
for example, if <dataDir>${java:comp/env/solr/home}/data</dataDir> and
<dataDir>${solr.solr.home}/data</dataDir> are both supported
which is the one I should put into the solrconfig.xml?
There might be two solr servers using this configuration... one of them has
a JNDI home, and the other one is started from command line.
I think the problem is what we needed in configuration files is not a
parameter from somewhere, but a server's status in fact.
The server can be installed with a console parameter, with a JNDI context
file, or with hardcode in web.xml, it's doesn't matter.
I just want to know where the server's home is.
So, we either map both the JNDI value and system property into a same system
status variable, or just use properties to do this, and map JNDI values to
it.
That's why I only enabled JNDI lookup in property values.
If you think hardcode mapping into Config.java is to ugly, maybe a mapping
properties file in solr home dir will be a better choise?
Anyway, thanks for replying
> I guess the property syntax will need to be changed a bit because ':' is used
> for default values. We can either escape the ':' in JNDI name or we can make
> the DOMUtil.substituteProperty method aware of this change.
Yes, I totally agree with this.
was (Author: withinsea):
On Thu, Feb 5, 2009 at 2:55 PM, Shalin Shekhar Mangar (JIRA) <
Er, in fact I don't think dataDir is a special thing... I think any JNDI
configuration is special thing, if it has the same meaning with a system
property.
The dataDir is just a example --- I added it just because it's the only
specificated one in the wiki document.
But I opposite to the concept of refering properties and JNDI values in
different syntax...
for example, if <dataDir>${java:comp/env/solr/home}/data</dataDir> and
<dataDir>${solr.solr.home}/data</dataDir> are both supported
which is the one I should put into the solrconfig.xml?
There might be two solr servers using this configuration... one of them has
a JNDI home, and the other one is started from command line.
I think the problem is what we needed in configuration files is not a
parameter from somewhere, but a server's status in fact.
The server can be installed with a console parameter, with a JNDI context
file, or with hardcode in web.xml, it's doesn't matter.
I just want to know where the server's home is.
So, we either map both the JNDI value and system property into a same system
status variable, or just use properties to do this, and map JNDI values to
it.
That's why I only enabled JNDI lookup in property values.
If you think hardcode mapping into Config.java is to ugly, maybe a mapping
properties file in solr home dir will be a better choise?
Anyway, thanks for replying
I guess the property syntax will need to be changed a bit because ':' is
Yes, I totally agree with this.
> Allow setting solr.data.dir with JNDI
> -------------------------------------
>
> Key: SOLR-336
> URL: https://issues.apache.org/jira/browse/SOLR-336
> Project: Solr
> Issue Type: Improvement
> Components: update
> Reporter: Stu Hood
> Priority: Minor
> Attachments: jndi-data-dir.patch
>
>
> I would like to be able set the solr.data.dir with JNDI, as I can for the
> solr.home property. Currently the data directory is only looked up in the
> ${solr.home}/conf/solrconfig.xml file, or as a parameter passed into the
> SolrCore(String, IndexSchema) constructor.
> This allows more options for setting the data directory, such as from within
> a Servlet container's Context fragment.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.