Project

General

Profile

Bug #6407

Use configuration option for portal client configuration location

Added by Ben Leinfelder about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
d1_portal_servlet
Target version:
Start date:
2014-09-24
Due date:
2014-10-17
% Done:

100%

Milestone:
None
Product Version:
*
Story Points:
Sprint:

Description

PortalCertificateManager had a hard-coded default for the MyProxy client configuration file with a method to override the default. This was used in the portal servlet itself (https://redmine.dataone.org/issues/5527) but not other projects that also use the PCM class.


Related issues

Related to Infrastructure - Bug #5527: Look up configFile from web.xml to override the default (references tomcat6) in portal module Closed 2014-07-01 2014-07-05
Related to Infrastructure - Story #6500: CCI 1.4.1 Release Closed 2014-10-08 2014-10-17

History

#1 Updated by Ben Leinfelder about 10 years ago

  • Status changed from New to In Progress

Committed change to trunk - perhaps Skye can review and make recommendations as to whether is this useful for cn and onemercury to use.

#2 Updated by Skye Roseboom about 10 years ago

Reviewed and looks good.

A suggestion - since most consumers of the PortalCertificateManager won't know the default location of the config file - it would be helpful if the class provided the default location. The Settings.getConfiguration call allows a default value to be provided - in cases where a property is not provided in the configuration/property files configured under Settings.

#3 Updated by Skye Roseboom about 10 years ago

  • Target version set to CCI-1.4.1
  • Due date set to 2014-09-24
  • Start date set to 2014-09-24

#4 Updated by Ben Leinfelder about 10 years ago

Thanks! I included the default value in the portal.properties file (in main resources, not just in test resources) which should be included with the jar file when packaged. This should act as the default since it will always be present until overridden. If that's too much indirection, we can certainly provide a default path in the getString() call.

#5 Updated by Robert Waltz about 10 years ago

  • Target version changed from CCI-1.4.1 to CCI-1.4.2

#6 Updated by Skye Roseboom about 10 years ago

  • Due date changed from 2014-09-24 to 2014-09-25

Excellent - I forgot that all config.xml files in included jars are added to Settings configuration. Sounds good!

#7 Updated by Robert Waltz about 10 years ago

  • Target version changed from CCI-1.4.2 to CCI-1.4.1
  • Due date changed from 2014-09-25 to 2014-10-02

#8 Updated by Robert Waltz about 10 years ago

  • Assignee changed from Ben Leinfelder to Robert Waltz

#9 Updated by Robert Waltz about 10 years ago

  • Assignee changed from Robert Waltz to Jing Tao

#10 Updated by Skye Roseboom about 10 years ago

All consumers of d1_cn_portal jar will need to be released with the new version of portal to effect this change.

#11 Updated by Jing Tao about 10 years ago

  • Due date changed from 2014-10-02 to 2014-10-17

The change seems in the trunk now. We need to copy the changes to the release branch.

#12 Updated by Jing Tao about 10 years ago

  • Status changed from In Progress to Testing

After copied the change to the branch and deployed the jar files to the sandbox, we got an NPE during the testing.

It turned out the cn-solr-extension.jar packs everything into a big jar file, so the the org/dataone/configuration/config.xml in the portal jar file was ignored.

So I changed to a suggstion from the #3 comment : A suggestion - since most consumers of the PortalCertificateManager won't know the default location of the config file - it would be helpful if the class provided the default location. The Settings.getConfiguration call allows a default value to be provided - in cases where a property is not provided in the configuration/property files configured under Settings.

It seems working right now.

#13 Updated by Robert Waltz about 10 years ago

  • Status changed from Testing to Closed

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)