oodt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rishi Verma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OODT-649) Add PathUtils.replaceEnvVariables() wrapper around retrieved context parameters
Date Thu, 08 Aug 2013 18:23:48 GMT

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

Rishi Verma commented on OODT-649:
----------------------------------

Hey Ross,

{quote}
Whenever I make a change to the file or copy in a new version of the WAR to the /usr/local/oodt/webapp/fmprod
directory, Tomcat automatically updates/redeploys to pick up the changes. So all appears to
be working well.
{quote}

+1 to this approach. Thanks for further testing this!

{quote}
Where the jaxrs.scope prototype parameter specifies that new instances of the resource classes
are created per-request. Even if this is the case, with a new instance per request, I think
the CasProductJaxrsServlet instance may persist for longer. The resource instances can access
the objects that were initialized in the servlet by calling ServletContext.getAttribute(String),
e.g. as follows:
{quote}

I like this idea a lot. +1 here. 

Thanks for going through this so systematically. It looks like you've arrived at an ideal
solution, and also helped others (like me) learn more about CXF context parameters. Way to
go, Ross!

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