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

ASF GitHub Bot commented on AIRAVATA-2607:
------------------------------------------

DImuthuUpe commented on a change in pull request #183: [AIRAVATA-2607]  Change 
all thrift clients to use ThriftClientPool
URL: https://github.com/apache/airavata/pull/183#discussion_r175244480
 
 

 ##########
 File path: 
airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/TenantProfileServiceHandler.java
 ##########
 @@ -247,30 +255,25 @@ private boolean checkDuplicateGateway(Gateway gateway) 
throws TenantProfileServi
     // admin passwords are stored in credential store in the super portal 
gateway and need to be
     // copied to a credential that is stored in the requested/newly created 
gateway
     private void copyAdminPasswordToGateway(AuthzToken authzToken, Gateway 
gateway) throws TException, ApplicationSettingsException {
-        CredentialStoreService.Client csClient = 
getCredentialStoreServiceClient();
+        CredentialStoreService.Client csClient = csClientPool.getResource();
         try {
             String requestGatewayId = 
authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
             PasswordCredential adminPasswordCredential = 
csClient.getPasswordCredential(gateway.getIdentityServerPasswordToken(), 
requestGatewayId);
             adminPasswordCredential.setGatewayId(gateway.getGatewayId());
             String newAdminPasswordCredentialToken = 
csClient.addPasswordCredential(adminPasswordCredential);
             
gateway.setIdentityServerPasswordToken(newAdminPasswordCredentialToken);
-        } finally {
+
+        }catch (TException e) {
+            throw new RuntimeException("Failed to copy the Admin Password to 
Gateway", e);
+        }
+        finally {
 
 Review comment:
   } finally {

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Change all thrift clients to use ThriftClientPool
> -------------------------------------------------
>
>                 Key: AIRAVATA-2607
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-2607
>             Project: Airavata
>          Issue Type: Improvement
>            Reporter: Suresh Marru
>            Assignee: Sachin Kariyattin
>            Priority: Major
>
> Currently, the API server uses ThriftClientPool but all other thrift servers 
> use a regular client. 
> We probably should move the current ThriftClientPool into the commons library 
> and have all thrift servers use this instead.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to