oodt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ross Laidlaw (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OODT-649) Add PathUtils.replaceEnvVariables() wrapper around retrieved context parameters
Date Tue, 06 Aug 2013 17:43:48 GMT

    [ https://issues.apache.org/jira/browse/OODT-649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13731004#comment-13731004
] 

Ross Laidlaw commented on OODT-649:
-----------------------------------

Hi Rishi,

Regarding initialization, how about from a concurrency/multiple-user point of view?  Is it
ok for simultaneous requests to use the same XmlRpcFileMgrClient?  If so, could we have a
single XmlRpcFileMgrClient instance for the whole JAX-RS service (to be used by all resources/responders)?

Regarding context parameters, I noticed that there are also some defined in the (src/main/webapp/WEB-INF/)web.xml
file:

{code:xml}
<context-param>
  <param-name>filemgr.url</param-name>
  <param-value>http://localhost:9000</param-value>
</context-param>

<context-param>
  <param-name>filemgr.ns</param-name>
  <param-value>
    cas|urn:oodt:|rdf|http://www.w3.org/1999/02/22-rdf-syntax-ns#
  </param-value>
</context-param>

<context-param>
  <param-name>filemgr.ns.default</param-name>
  <param-value>cas</param-value>
</context-param>

<context-param>
  <param-name>filemgr.working.dir</param-name>
  <param-value>/tmp</param-value>
</context-param>
{code}

Would it make sense to transfer all of these to the context.xml file and have them all in
one place there?  Or is it preferable to have some defaults specified in web.xml?


Ross


                
> Add PathUtils.replaceEnvVariables() wrapper around retrieved context parameters
> -------------------------------------------------------------------------------
>
>                 Key: OODT-649
>                 URL: https://issues.apache.org/jira/browse/OODT-649
>             Project: OODT
>          Issue Type: Sub-task
>          Components: product server
>    Affects Versions: 0.7
>            Reporter: Ross Laidlaw
>            Assignee: Ross Laidlaw
>            Priority: Minor
>              Labels: gsoc
>             Fix For: 0.7
>
>         Attachments: OODT-649.rlaidlaw.2013-07-27.patch.txt
>
>
> Methods in several classes in the cas.product.service.resources package retrieve parameters
from the servlet context using the context.getInitParameter(String parameterName) method call,
for example as follows:
> {code}
> setWorkingDirPath(context.getInitParameter("filemgr.working.dir"));
> {code}
> But these parameters may contain environment variables such as [HOME] or [FMPROD_HOME],
etc.  Currently, these aren't processed properly and the getInitParameter call needs to be
wrapped in a call to PathUtils.replaceEnvVariables() (from the cas-metadata module) to process
the environment variables, for example as follows:
> {code}
> setWorkingDirPath(PathUtils.replaceEnvVariables(
>   context.getInitParameter("filemgr.working.dir")));
> {code}
> This is already done in the original Data, RDF and RSS servlets but was accidentally
omitted from the new resource classes in the cas.product.service.resources package.

--
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

Mime
View raw message