Create Resource Environment Provider and associated entries
Step 1
Get the details of the Resource Environment Provider(REP), references, associated Resource Environment Entries (REE) and custom properties from the developers via ERF.
Step 2
This feature is turned-off by default. Turn it on in your deployment scripts by adding the following line in the project.py (if you have one) or in your usual environment py file.
installREProvider = "true"
Step 3
Add the Resource Environment Provider and associated Entries and custom properties in your usual py file using the syntax shown in the example below.In the example below shows.
- One Resource Environment Provider defined at cell scope.
- One referencible defined for this provider.
- Two Resource Environment Entries created.
- The first Resource Environment Entry has 10 custom properties defined.
- The second Resource Environment Entry has 1 custom property defined.
Edit your jython file according to your need.
#--------------------------------------------------- # Resource Environment Variables #--------------------------------------------------- # #---------- Resource Env Provider 1 ------------------- # ResEnvProviderName_1 = "mvproject_ResEnvProvider" ResEnvProviderScope_1 = "cell" #---------- Referenceable 1 ------------------- ResRefFactoryClass_1 = "com.ibm.issw.util.websphere.ResourceEnvEntryMap" ResRefClass_1 = "com.ibm.issw.util.websphere.ResourceEnvEntryMap" #---------- Referenceable 2 ------------------- ResRefFactoryClass_2 = "com.midvision.rapiddeploy.PropertiesFactory" ResRefClass_2 = "com.midvision.rapiddeploy.Properties" #---------- Resource Env Entry 1 ------------------- # Resource Env Entry 1 ResEnvEntName_1 = "FuseResourceRef" ResEnvEntJndiName_1 = "rep/MV/mvproject/FuseResourceRef" # Separate ResRefFactoryClass and ResRefClass with a forward slash ("/") ResEnvEntReferenceable_1 = ResRefFactoryClass_2 + "/" + ResRefClass_2 # Custom property 1 for Resource Env Entry 1 ResEnvEntCustPropName_1_1 = "LeadsService_responseTimeMax" ResEnvEntCustPropValue_1_1 = "5000" ResEnvEntCustPropDesc_1_1 = "Description" ResEnvEntCustPropType_1_1 = "java.lang.Long" ResEnvEntCustPropRequired_1_1 = "false" # Custom property 2 for Resource Env Entry 1 ResEnvEntCustPropName_1_2 = "LeadsService_concurrencyMax" ResEnvEntCustPropValue_1_2 = "30" ResEnvEntCustPropDesc_1_2 = "Description" ResEnvEntCustPropType_1_2 = "java.lang.Long" ResEnvEntCustPropRequired_1_2 = "false" # Custom property 3 for Resource Env Entry 1 ResEnvEntCustPropName_1_3 = "LeadsService_failInterval" ResEnvEntCustPropValue_1_3 = "5000" ResEnvEntCustPropDesc_1_3 = "Description" ResEnvEntCustPropType_1_3 = "java.lang.Long" ResEnvEntCustPropRequired_1_3 = "false" # Custom property 4 for Resource Env Entry 1 ResEnvEntCustPropName_1_4 = "LeadsService_failCountMax" ResEnvEntCustPropValue_1_4 = "10" ResEnvEntCustPropDesc_1_4 = "Description" ResEnvEntCustPropType_1_4 = "java.lang.Integer" ResEnvEntCustPropRequired_1_4 = "false" # Custom property 5 for Resource Env Entry 1 ResEnvEntCustPropName_1_5 = "LeadsService_fuseResetTime" ResEnvEntCustPropValue_1_5 = "3600000" ResEnvEntCustPropDesc_1_5 = "Description" ResEnvEntCustPropType_1_5 = "java.lang.Long" ResEnvEntCustPropRequired_1_5 = "false" # Custom property 6 for Resource Env Entry 1 ResEnvEntCustPropName_1_6 = "LoansService_responseTimeMax" ResEnvEntCustPropValue_1_6 = "3000" ResEnvEntCustPropDesc_1_6 = "Description" ResEnvEntCustPropType_1_6 = "java.lang.Long" ResEnvEntCustPropRequired_1_6 = "false" # Custom property 7 for Resource Env Entry 1 ResEnvEntCustPropName_1_7 = "LoansService_concurrencyMax" ResEnvEntCustPropValue_1_7 = "30" ResEnvEntCustPropDesc_1_7 = "Description" ResEnvEntCustPropType_1_7 = "java.lang.Long" ResEnvEntCustPropRequired_1_7 = "false" # Custom property 8 for Resource Env Entry 1 ResEnvEntCustPropName_1_8 = "LoansService_failInterval" ResEnvEntCustPropValue_1_8 = "1000" ResEnvEntCustPropDesc_1_8 = "Description" ResEnvEntCustPropType_1_8 = "java.lang.Long" ResEnvEntCustPropRequired_1_8 = "false" # Custom property 9 for Resource Env Entry 1 ResEnvEntCustPropName_1_9 = "LoansService_failCountMax" ResEnvEntCustPropValue_1_9 = "1" ResEnvEntCustPropDesc_1_9 = "Description" ResEnvEntCustPropType_1_9 = "java.lang.Integer" ResEnvEntCustPropRequired_1_9 = "false" # Custom property 10 for Resource Env Entry 1 ResEnvEntCustPropName_1_10 = "LeadsService_fuseResetTime" ResEnvEntCustPropValue_1_10 = "3600000" ResEnvEntCustPropDesc_1_10 = "Description" ResEnvEntCustPropType_1_10 = "java.lang.Long" ResEnvEntCustPropRequired_1_10 = "false" #---------- Resource Env Entry 2 ------------------- ResEnvEntName_2 = "LogResourceRef" ResEnvEntJndiName_2 = "rep/MV/mvproject/LogResourceRef" # Custom property 1 for Resource Env Entry 2 ResEnvEntCustPropName_2_1 = "EALoggingEnabled" ResEnvEntCustPropValue_2_1 = "true" ResEnvEntCustPropDesc_2_1 = "Description" ResEnvEntCustPropType_2_1 = "java.lang.Boolean" ResEnvEntCustPropRequired_2_1 = "false"
Step 4
Build and deploy as usual. Alternatively use latest config and deploy as usual.
FYI-1: What is Resource Environment Provider?
FYI-2:
The Resource Environment Providers (REP) are treated as a whole in the deployment. It means that the REP and associated REE and custum properties defined in the script will be deleted first (if already exists) and recreated afresh in full during deployment. It will not just update the existing one. (The reason being the complexity associated with the nested referencibles which can not be updated due to lack of their uniqueness in the object structure).