Why do EMC coders like static variables?

When I discovered trace_complete_launch and trace_http_post debug options some diagnostic routines got easier: the first one (trace_complete_launch) has the same effect as set trace_launch=T for all docbase methods, the second one (trace_http_post) turns on extra logging on CS:

2014-09-03T21:21:46.631080      25928[25928]    0101ffd7800860fb        HTTP_POST TRACE: 
  retryCount=(0), at_least_one_jms_available=(1), jmsList={
    JMS_COUNT=(1), CURRENT_LB_INDEX=(0), JMS_LB_COUNT=(1), 
    CURRENT_FO_INDEX=(-1), JMS_FO_COUNT=(0), 
    LIST_REFRESH_TIME=(Sun Aug 31 21:46:07 2014)=(1409507167), 
    INCR_WAIT_TIME_ON_FAILURE=(30), MAX_WAIT_TIME_ON_FAILURE=(3600), 
    jmsLBList[0].jms_config_id=0801ffd780000c98, 
    jmsLBList[0].server_config_id=3d01ffd780000102, 
    jmsLBList[0].object_name=JMS localhost:9080 for repo.repo, 
    jmsLBList[0].config_type=2, jmsLBList[0].is_disabled_in_db=0, 
    jmsLBList[0].location=1, jmsList[0].primary_function=101, 
    jmsLBList[0].proximity=1, jmsLBList[0].last_failure_time=N/A=-1, 
    jmsLBList[0].next_retry_time=N/A=-1, 
    jmsLBList[0].retry_count=0, jmsFOList is EMPTY 
 }
2014-09-03T21:21:46.632225      25928[25928]    0101ffd7800860fb        HTTP_POST TRACE: 
 parsedArguments:
   method_verb=class&__debug_trace__=T&__dm_docbase__=repo&__dm_server_config__=repo
   &docbase_name=repo.repo&user_name=dmadmin&job_id=0801ffd7800ef35d
   &method_trace_level=10, 
 paramNames: method_verb,__debug_trace__,__dm_docbase__,__dm_server_config__
  ,docbase_name,user_name,job_id,method_trace_level
2014-09-03T21:21:46.634262      25928[25928]    0101ffd7800860fb        HTTP_POST TRACE: 
 digital signature: 
  HVQqHm+16KDO4SjPE7tV47x4Mh1f1O9mAzZVIRj6H6ZwdAj8RX+qGuMJFUsaDbboyrsR5mZdIys4sb0S4mZ/Cu
  815GgW3/CJJs/HPKE3xW2U4UVMal3FeqBo4+Nwz+PGMnwSPcxFObfNWN6dN+0aCzoj1N8G5m0962WZpo0+52I=, 
  strlen(signature): 172
2014-09-03T21:21:46.634360      25928[25928]    0101ffd7800860fb        HTTP_POST TRACE: 
 Final parsedArguments:
  __signature_params__=method_verb%2C__debug_trace__%2C__dm_docbase__
  %2C__dm_server_config__%2Cdocbase_name%2Cuser_name%2Cjob_id%2Cmethod_trace_level
  &__digital_signature__=HVQqHm%2B16KDO4SjPE7tV47x4Mh1f1O9mAzZVIRj6H6ZwdAj8RX%2BqGuMJFU
  saDbboyrsR5mZdIys4sb0S4mZ%2FCu815GgW3%2FCJJs%2FHPKE3xW2U4UVMal3FeqBo4%2BNwz%2BPGMnwSP
  cxFObfNWN6dN%2B0aCzoj1N8G5m0962WZpo0%2B52I%3D&method_verb=class&__debug_trace__=T
  &__dm_docbase__=repo&__dm_server_config__=repo&docbase_name=repo.repo
  &user_name=dmadmin&job_id=0801ffd7800ef35d&method_trace_level=10

and JMS:

21:28:16,835 INFO  [STDOUT] <DCTM>
21:28:16,836 INFO  [STDOUT] <
21:28:16,836 INFO  [STDOUT] INFO
21:28:16,836 INFO  [STDOUT] >
21:28:16,836 INFO  [STDOUT] verifyDigitalSignature(): 
    docbaseName=repo: installOwnerName=dmadmin: 
    inputData=method_verb=class&__debug_trace__=T&__dm_docbase__=repo
      &__dm_server_config__=repo&docbase_name=repo.repo&user_name=dmadmin
      &job_id=0801ffd7800f2e92&method_trace_level=10: 
    encodedDigitalSignature=GWcijQU6IP599JkO/VApWrk9q5D2d4bSv57B6/ruhOSuQ2YCbNk4KwC2w
      ztE2iDCuKWPJCp3W7jw1cVEcBDqCLsIGERevrByI9OWh6Y7E31EoM0HVR16GuFfUNnRh/2pnqEAb5Qw
      9S4zn+GfkTNzIyIlLpG5i/M05L5GuEp3JZM=: 
    encodedDigitalSignature.length()=172
21:28:16,836 INFO  [STDOUT] <DCTM>
21:28:16,836 INFO  [STDOUT] <
21:28:16,836 INFO  [STDOUT] INFO
21:28:16,836 INFO  [STDOUT] >
21:28:16,836 INFO  [STDOUT] verifyDigitalSignature(): success
21:28:16,837 INFO  [STDOUT] <DCTM>
21:28:16,837 INFO  [STDOUT] <
21:28:16,837 INFO  [STDOUT] INFO
21:28:16,837 INFO  [STDOUT] >
21:28:16,837 INFO  [STDOUT] [http-0.0.0.0-9080-2:Method name=class]
                           Successfully located java method/module
21:28:16,837 INFO  [STDOUT] <DCTM>
21:28:16,837 INFO  [STDOUT] <
21:28:16,838 INFO  [STDOUT] INFO
21:28:16,838 INFO  [STDOUT] >
21:28:16,838 INFO  [STDOUT] [http-0.0.0.0-9080-2:Method name=class]
                           Is an instance of IDfMethod
21:28:16,838 INFO  [STDOUT] <DCTM>
21:28:16,838 INFO  [STDOUT] <
21:28:16,838 INFO  [STDOUT] INFO
21:28:16,838 INFO  [STDOUT] >
21:28:16,838 INFO  [STDOUT] [http-0.0.0.0-9080-2:Method name=class]
                           Preparing to execute.
21:28:17,511 INFO  [STDOUT] <DCTM>
21:28:17,512 INFO  [STDOUT] <
21:28:17,512 INFO  [STDOUT] INFO
21:28:17,513 INFO  [STDOUT] >
21:28:17,513 INFO  [STDOUT] [http-0.0.0.0-9080-2:Method name=class]
                           Completed executing. Total Time Taken: 0 secs

I am not sure about performance, but both options, obviously, have security impact – they cause CS and JMS print login tickets into logs (in case of workflow methods), so regular user is not able to turn on trace_complete_launch or trace_http_post debug options. However, after playing with trace_http_post option I found out that turning off trace_http_post (i.e.: apply,c,,SET_OPTIONS,OPTIONS,S,trace_http_post,VALUE,B,F) does not turn off JMS tracing. After some research I found that DoMethod servlet manages tracing in the following way:

  • if request contains __debug_trace__ parameter, DoMethod servlet parses it’s value and stores in static variable
  • if request does not contain __debug_trace__ parameter, DoMethod servlet does nothing

Such behaviour clarifies why turning off trace_complete_launch does not turn off JMS tracing.

2 thoughts on “Why do EMC coders like static variables?

  1. Pingback: Is it possible to compromise Documentum by deleting object? Typical mistakes | Documentum in a (nuts)HELL
  2. Pingback: Weird release management | Documentum in a (nuts)HELL

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s