How to set "Enable the ability to run Custom Java Procedures" configuration to true or false through an API in TIBCO Data Virtualization?

How to set "Enable the ability to run Custom Java Procedures" configuration to true or false through an API in TIBCO Data Virtualization?

book

Article ID: KB0072045

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization 8.5.2

Description

This article shows how to set "Enable the ability to run Custom Java Procedures" configuration to true or false through an API.

 

Environment

All Supported Operating Systems

Resolution

The "updateServerAttributes" API which is available under "/services/webservices/system/admin/server/operations/updateServerAttributes" can be used to set "Enable the ability to run Custom Java Procedures" to true (or change the value back to false).

User-added image

Below is a sample to change Enable the ability to run Custom Java Procedures using the "updateServerAttributes" API.
----------------------------------------------------------------------------

<server:updateServerAttributes xmlns:server="http://www.compositesw.com/services/system/admin/server" xmlns:common="http://www.compositesw.com/services/system/util/common">
  <server:attributes>
    <common:attribute>
      <common:name>/sources/cjp/enableCJPs</common:name>
      <common:type>BOOLEAN</common:type>
      <common:value>true</common:value>
    </common:attribute>
  </server:attributes>
</server:updateServerAttributes>



--------------------------------------------------------------------------------

You can find out these values, which will be used in input XML from :

<tdv_installation_dir>/apps/server/server_defs.xml or server_defs-<highest version>.xml  file and Search for the name of the configuration(Enable the ability to run Custom Java Procedures). 

Copy the value of
<common:name> for name
<common:type> for type
<common:defaultValue> for an example of the value you want to change


User-added image

Note: Please don't modify the server_defs.xml file. It makes the server inoperable. 

Issue/Introduction

How to set "Enable the ability to run Custom Java Procedures" configuration to true or false through an API in TIBCO Data Virtualization?