Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Transaction queue does not work after Pro to Power upgrade

    Hi
    I've recently upgraded from Pro to Power edition.
    The following code worked perfectly on Pro (as a result of discussion http://forums.smartclient.com/showthread.php?t=24190).

    Code:
    RPCManager.startQueue();
    cvarIntDBTransactionId = RPCManager.getCurrentTransactionId();
    
    dfRegisterUserAccountDetail.setSaveOperationType("add");
    dfRegisterUserAccountDetail.saveData();
    
    for (i = 0; i < lgdRegisterUserPeopleList.data.length; i++) {
        cvarArrTabs[i].saveDataOnSubmit();
    }
    
    RPCManager.sendQueue(
        function (responses) {
            var lvarErrorFlag = false;
            var lvarErrorTab = 0;
            for (j = 0; j < responses.length; j++) {
                if (responses[j].status != RPCResponse.STATUS_SUCCESS) {
                    lvarErrorFlag = true;
                    lvarErrorTab = j;
                    break;
                }
            }
            if (lvarErrorFlag == true) {
                RPCManager.cancelQueue(cvarIntDBTransactionId);
                tbsRegisterUser.selectTab(lvarErrorTab);
                RPCManager.handleError();
            } else {
                isc.say(
                    gvarObjClientConstants.ACCOUNT_REGISTER_SUCCESS,
                    function () {
                        window.location = gvarObjUserSession.getCvarStrContextPath() + gvarObjClientConstants.LOGIN_PAGE;
                    });
            }
        }
    );
    Now, I get the following error in Tomcat after a LONG wait. I looked at the examples again but can't see anything wrong:

    java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction.

    Please help me.

    #2
    First, start by filling in all of the information the forums prompts you for (always do this).

    Comment


      #3
      1. I'm using SmartClient Power Edition version 8.3 (SmartClient_v83p_2013-05-16).
      2. I'm using Chrome browser Version 27.0.1453.94 m
      3. Here's the complete log generated:
      === 2013-05-29 14:10:41,491 [ec-3] INFO RequestContext - URL: '/war/isomorphic/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.94 Safari/537.36': Safari with Accept-Encoding header
      === 2013-05-29 14:10:41,492 [ec-3] DEBUG IDACall - Header Name:Value pair: host:localhost:8888
      === 2013-05-29 14:10:41,493 [ec-3] DEBUG IDACall - Header Name:Value pair: connection:keep-alive
      === 2013-05-29 14:10:41,494 [ec-3] DEBUG IDACall - Header Name:Value pair: content-length:3228
      === 2013-05-29 14:10:41,495 [ec-3] DEBUG IDACall - Header Name:Value pair: origin:http://localhost:8888
      === 2013-05-29 14:10:41,496 [ec-3] DEBUG IDACall - Header Name:Value pair: user-agent:Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.94 Safari/537.36
      === 2013-05-29 14:10:41,498 [ec-3] DEBUG IDACall - Header Name:Value pair: content-type:application/x-www-form-urlencoded; charset=UTF-8
      === 2013-05-29 14:10:41,499 [ec-3] DEBUG IDACall - Header Name:Value pair: accept:*/*
      === 2013-05-29 14:10:41,500 [ec-3] DEBUG IDACall - Header Name:Value pair: referer:http://localhost:8888/war/register.jsp?cid=2&cdesc=MSport
      === 2013-05-29 14:10:41,501 [ec-3] DEBUG IDACall - Header Name:Value pair: accept-encoding:gzip,deflate,sdch
      === 2013-05-29 14:10:41,503 [ec-3] DEBUG IDACall - Header Name:Value pair: accept-language:en-US,en;q=0.8
      === 2013-05-29 14:10:41,504 [ec-3] DEBUG IDACall - Header Name:Value pair: cookie:JSESSIONID=C3F5A4847136F4C15ABC34CB9CFD4C8A; isc_cState=ready
      === 2013-05-29 14:10:41,505 [ec-3] DEBUG IDACall - session exists: C3F5A4847136F4C15ABC34CB9CFD4C8A
      === 2013-05-29 14:10:41,506 [ec-3] DEBUG IDACall - remote user: null
      === 2013-05-29 14:10:41,514 [ec-3] DEBUG XML - Parsed XML from (in memory stream): 3ms
      === 2013-05-29 14:10:41,518 [ec-3] DEBUG RPCManager - Processing 2 requests.
      === 2013-05-29 14:10:41,521 [ec-3] DEBUG RPCManager - Request #1 (DSRequest) payload: {
      values:{
      company_id:"2",
      status_cd:"Active",
      payment_terms_cd:"Monthly",
      surname:"aaaaaaaaaaaaa"
      },
      operationConfig:{
      dataSource:"company_account",
      operationType:"add"
      },
      componentId:"dfRegisterUserAccountDetail",
      appID:"builtinApplication",
      operation:"company_account_add",
      oldValues:{
      },
      criteria:{
      }
      }
      === 2013-05-29 14:10:41,524 [ec-3] DEBUG RPCManager - Request #2 (DSRequest) payload: {
      values:{
      company_id:"2",
      status_cd:"Active",
      role_responsible:1,
      role_attendee:1,
      role_communicator:1,
      role_web_user:1,
      name:"bbbbbbbbbb",
      surname:"aaaaaaaaaaaaa",
      birth_d:new Date(1369778400000),
      password:"aaaaaa",
      password2:"aaaaaa",
      title_cd:"Hon",
      gender_cd:"Female",
      id_number:"1111111111111",
      email:"ccccc@iits.co.za",
      cell_number:"2222222222",
      contact_number_w:"3333333333",
      contact_number_h:"4444444444",
      PostalAndStreetAddrSame:true,
      street_addr_line1:"aaaaaaaaaaaaaa",
      postal_addr_line1:"aaaaaaaaaaaaaa",
      street_addr_city:"bbbbbbbbbbbbbb",
      postal_addr_city:"bbbbbbbbbbbbbb",
      street_addr_code:"5555",
      postal_addr_code:"5555",
      medical_issues:"gsdgsdgf",
      orientation_cd:"Left handed",
      school_name:"Eldoraigne",
      school_grade:"12",
      activities:[
      "Ballewalles"
      ]
      },
      operationConfig:{
      dataSource:"register_account_person",
      operationType:"add"
      },
      componentId:"dfRegisterUserTabTab0",
      appID:"builtinApplication",
      operation:"register_account_person_add",
      oldValues:{
      },
      criteria:{
      }
      }
      === 2013-05-29 14:10:41,528 [ec-3] INFO IDACall - Performing 2 operation(s)
      === 2013-05-29 14:10:41,529 [ec-3] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
      === 2013-05-29 14:10:41,531 [ec-3] DEBUG DeclarativeSecurity - DataSource company_account is not in the pre-checked list, processing...
      === 2013-05-29 14:10:41,535 [ec-3] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
      === 2013-05-29 14:10:41,541 [ec-3] DEBUG DeclarativeSecurity - DataSource company_account is not in the pre-checked list, processing...
      === 2013-05-29 14:10:41,542 [ec-3] DEBUG AppBase - [builtinApplication.company_account_add] No userTypes defined, allowing anyone access to all operations for this application
      === 2013-05-29 14:10:41,542 [ec-3] DEBUG AppBase - [builtinApplication.company_account_add] No public zero-argument method named '_company_account_add' found, performing generic datasource operation
      === 2013-05-29 14:10:41,543 [ec-3] INFO SQLDataSource - [builtinApplication.company_account_add] Performing add operation with
      criteria: {company_id:"2",status_cd:"Active",payment_terms_cd:"Monthly",surname:"aaaaaaaaaaaaa"} values: {company_id:2,status_cd:"Active",payment_terms_cd:"Monthly",surname:"aaaaaaaaaaaaa"}
      === 2013-05-29 14:10:41,548 [ec-3] DEBUG SQLValuesClause - [builtinApplication.company_account_add] Sequences: {company_account_number=__default}
      === 2013-05-29 14:10:41,553 [ec-3] DEBUG PoolableSQLConnectionFactory - [builtinApplication.company_account_add] Executing pingTest 'select 1 from dual' on connection 729936505
      === 2013-05-29 14:10:41,554 [ec-3] DEBUG SQLConnectionManager - [builtinApplication.company_account_add] Returning borrowed connection '729936505'
      === 2013-05-29 14:10:41,554 [ec-3] DEBUG SQLTransaction - [builtinApplication.company_account_add] Started new Mysql transaction "729936505"
      === 2013-05-29 14:10:41,555 [ec-3] DEBUG SQLDriver - [builtinApplication.company_account_add] About to execute SQL update in 'Mysql' using connection'729936505'
      === 2013-05-29 14:10:41,555 [ec-3] INFO SQLDriver - [builtinApplication.company_account_add] Executing SQL update on 'Mysql': INSERT INTO company_account (company_id, payment_terms_cd, status_cd, surname) VALUES (2, 'Monthly', 'Active', 'aaaaaaaaaaaaa')
      === 2013-05-29 14:10:41,577 [ec-3] DEBUG SQLDataSource - [builtinApplication.company_account_add] add operation affected 1 rows
      === 2013-05-29 14:10:41,577 [ec-3] DEBUG MysqlDriver - [builtinApplication.company_account_add] fetchLastRow data - primaryKeysPresent: {}sequencesNotPresent: [company_account_number]
      === 2013-05-29 14:10:41,578 [ec-3] DEBUG SQLDriver - [builtinApplication.company_account_add] About to execute SQL query in 'Mysql' using connection '729936505'
      === 2013-05-29 14:10:41,578 [ec-3] INFO SQLDriver - [builtinApplication.company_account_add] Executing SQL query on 'Mysql': SELECT LAST_INSERT_ID()
      === 2013-05-29 14:10:41,581 [ec-3] INFO SQLDataSource - [builtinApplication.company_account_add] primaryKeys: {company_account_number=6}
      === 2013-05-29 14:10:41,582 [ec-3] DEBUG DeclarativeSecurity - [builtinApplication.company_account_add] Processing security checks for DataSource null, field null
      === 2013-05-29 14:10:41,583 [ec-3] DEBUG DeclarativeSecurity - [builtinApplication.company_account_add] DataSource company_account is not in the pre-checked list, processing...
      === 2013-05-29 14:10:41,584 [ec-3] DEBUG DeclarativeSecurity - [builtinApplication.company_account_add] Processing security checks for DataSource null, field null
      === 2013-05-29 14:10:41,585 [ec-3] DEBUG DeclarativeSecurity - [builtinApplication.company_account_add] DataSource company_account is not in the pre-checked list, processing...
      === 2013-05-29 14:10:41,585 [ec-3] DEBUG AppBase - [builtinApplication.company_account_add, builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
      === 2013-05-29 14:10:41,587 [ec-3] DEBUG AppBase - [builtinApplication.company_account_add, builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
      === 2013-05-29 14:10:41,588 [ec-3] INFO SQLDataSource - [builtinApplication.company_account_add, builtinApplication.null] Performing fetch operation with
      criteria: {company_account_number:6} values: {company_account_number:6}
      === 2013-05-29 14:10:41,590 [ec-3] INFO SQLDataSource - [builtinApplication.company_account_add, builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
      === 2013-05-29 14:10:41,590 [ec-3] INFO SQLDataSource - [builtinApplication.company_account_add, builtinApplication.null] Executing SQL query on 'Mysql': SELECT company_account.comment, company_account.company_account_number, company_account.company_id, company_account.payment_terms_cd, company_acc
      ount.status_cd, company_account.surname FROM company_account WHERE (company_account.company_account_number=6)
      === 2013-05-29 14:10:41,592 [ec-3] DEBUG SQLDriver - [builtinApplication.company_account_add, builtinApplication.null] About to execute SQL query in 'Mysql' using connection '729936505'
      === 2013-05-29 14:10:41,592 [ec-3] INFO SQLDriver - [builtinApplication.company_account_add, builtinApplication.null] Executing SQL query on 'Mysql': SELECT company_account.comment, company_account.company_account_number, company_account.company_id, company_account.payment_terms_cd, company_account
      .status_cd, company_account.surname FROM company_account WHERE (company_account.company_account_number=6)
      === 2013-05-29 14:10:41,595 [ec-3] INFO DSResponse - [builtinApplication.company_account_add, builtinApplication.null] DSResponse: List with 1 items
      === 2013-05-29 14:10:41,595 [ec-3] INFO DSResponse - [builtinApplication.company_account_add] DSResponse: List with 1 items
      === 2013-05-29 14:10:41,596 [ec-3] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
      === 2013-05-29 14:10:41,596 [ec-3] DEBUG DeclarativeSecurity - DataSource register_account_person is not in the pre-checked list, processing...
      === 2013-05-29 14:10:41,611 [ec-3] DEBUG XML - Parsed XML from C:\Dev\workspace\AdminOnlineProduct\AdminOnline\war\shared\ds\company_person.ds.xml: 2ms
      === 2013-05-29 14:10:41,619 [ec-3] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
      === 2013-05-29 14:10:41,619 [ec-3] DEBUG AppBase - [builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
      === 2013-05-29 14:10:41,620 [ec-3] DEBUG AppBase - [builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
      === 2013-05-29 14:10:41,621 [ec-3] INFO SQLDataSource - [builtinApplication.null] Performing fetch operation with
      criteria: {company_id:2,email:"ccccc@iits.co.za"} values: {company_id:2,email:"ccccc@iits.co.za"}
      === 2013-05-29 14:10:41,622 [ec-3] INFO SQLDataSource - [builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
      === 2013-05-29 14:10:41,623 [ec-3] INFO SQLDataSource - [builtinApplication.null] Executing SQL query on 'Mysql': SELECT company_person.birth_d, company_person.cell_number, company_person.comment, company_person.company_id, company_person.company_person_id, company_person.contact_number_h, company_
      person.contact_number_w, company_person.email, company_person.gender_cd, company_person.id_number, company_person.name, company_person.password, company_person.postal_addr_city, company_person.postal_addr_code, company_person.postal_addr_line1, company_person.postal_addr_line2, company_person.postal
      _addr_suburb, company_person.street_addr_city, company_person.street_addr_code, company_person.street_addr_line1, company_person.street_addr_line2, company_person.street_addr_suburb, company_person.surname, company_person.title_cd FROM company_person WHERE (company_person.company_id=2 AND company_pe
      rson.email='ccccc@iits.co.za')
      === 2013-05-29 14:10:41,624 [ec-3] DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] Executing pingTest 'select 1 from dual' on connection 1127887594
      === 2013-05-29 14:10:41,626 [ec-3] DEBUG SQLConnectionManager - [builtinApplication.null] Returning borrowed connection '1127887594'
      === 2013-05-29 14:10:41,626 [ec-3] DEBUG SQLDriver - [builtinApplication.null] About to execute SQL query in 'Mysql' using connection '1127887594'
      === 2013-05-29 14:10:41,627 [ec-3] INFO SQLDriver - [builtinApplication.null] Executing SQL query on 'Mysql': SELECT company_person.birth_d, company_person.cell_number, company_person.comment, company_person.company_id, company_person.company_person_id, company_person.contact_number_h, company_pers
      on.contact_number_w, company_person.email, company_person.gender_cd, company_person.id_number, company_person.name, company_person.password, company_person.postal_addr_city, company_person.postal_addr_code, company_person.postal_addr_line1, company_person.postal_addr_line2, company_person.postal_add
      r_suburb, company_person.street_addr_city, company_person.street_addr_code, company_person.street_addr_line1, company_person.street_addr_line2, company_person.street_addr_suburb, company_person.surname, company_person.title_cd FROM company_person WHERE (company_person.company_id=2 AND company_person
      .email='ccccc@iits.co.za')
      === 2013-05-29 14:10:41,633 [ec-3] INFO DSResponse - [builtinApplication.null] DSResponse: List with 0 items
      === 2013-05-29 14:10:41,633 [ec-3] DEBUG SQLConnectionManager - About to close PoolableConnection with hashcode "1127887594"
      === 2013-05-29 14:10:41,634 [ec-3] DEBUG PoolableSQLConnectionFactory - Executing pingTest 'select 1 from dual' on connection 1127887594
      === 2013-05-29 14:10:41,667 [ec-3] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
      === 2013-05-29 14:10:41,668 [ec-3] WARN DataSourceDMI - DataSource company_person: received a request to execute an operation of type 'add' named 'add', but this operation is not defined to the dataSource. Falling back to default behavior for operationType 'add'
      === 2013-05-29 14:10:41,669 [ec-3] DEBUG AppBase - [builtinApplication.add] No userTypes defined, allowing anyone access to all operations for this application
      === 2013-05-29 14:10:41,670 [ec-3] DEBUG AppBase - [builtinApplication.add] No public zero-argument method named '_add' found, performing generic datasource operation
      === 2013-05-29 14:10:41,672 [ec-3] INFO SQLDataSource - [builtinApplication.add] Performing add operation with
      criteria: {postal_addr_code:"5555",company_id:2,street_addr_line2:null,street_addr_line1:"aaaaaaaaaaaaaa",id_number:"1111111111111",surname:"aaaaaaaaaaaaa",cell_number:"2222222222",contact_number_h:"4444444444",password:"aaaaaa",postal_addr_line2:null,street_addr_city:"bbbbbbbbbbbbbb",postal
      _addr_suburb:null,street_addr_suburb:null,status_cd:"Active",email:"ccccc@iits.co.za",postal_addr_line1:"aaaaaaaaaaaaaa",postal_addr_city:"bbbbbbbbbbbbbb",name:"bbbbbbbbbb",birth_d:new Date(1369778400000),gender_cd:"Female",title_cd:"Hon",street_addr_code:"5555",contact_number_w:"3333333333"} valu
      es: {postal_addr_code:"5555",company_id:2,street_addr_line2:null,street_addr_line1:"aaaaaaaaaaaaaa",id_number:"1111111111111",surname:"aaaaaaaaaaaaa",cell_number:"2222222222",contact_number_h:"4444444444",password:"aaaaaa",postal_addr_line2:null,street_addr_city:"bbbbbbbbbbbbbb",postal_addr_suburb:n
      ull,street_addr_suburb:null,status_cd:"Active",email:"ccccc@iits.co.za",postal_addr_line1:"aaaaaaaaaaaaaa",postal_addr_city:"bbbbbbbbbbbbbb",name:"bbbbbbbbbb",birth_d:new Date(1369778400000),gender_cd:"Female",title_cd:"Hon",street_addr_code:"5555",contact_number_w:"3333333333"}
      === 2013-05-29 14:10:41,673 [ec-3] INFO SQLValuesClause - [builtinApplication.add] Ignored data for non-existent or included columns: [status_cd]
      === 2013-05-29 14:10:41,674 [ec-3] DEBUG SQLValuesClause - [builtinApplication.add] Sequences: {company_person_id=__default}
      === 2013-05-29 14:10:41,675 [ec-3] WARN SQLDriver - [builtinApplication.add] DSRequest has no RPCManager set when testing if we should join a transaction - transaction will not be joined
      === 2013-05-29 14:10:41,675 [ec-3] DEBUG PoolableSQLConnectionFactory - [builtinApplication.add] Executing pingTest 'select 1 from dual' on connection 1127887594
      === 2013-05-29 14:10:41,676 [ec-3] DEBUG SQLConnectionManager - [builtinApplication.add] Returning borrowed connection '1127887594'
      === 2013-05-29 14:10:41,678 [ec-3] DEBUG SQLDriver - [builtinApplication.add] About to execute SQL update in 'Mysql' using connection'1127887594'
      === 2013-05-29 14:10:41,678 [ec-3] INFO SQLDriver - [builtinApplication.add] Executing SQL update on 'Mysql': INSERT INTO company_person (birth_d, cell_number, company_id, contact_number_h, contact_number_w, email, gender_cd, id_number, name, password, postal_addr_city, postal_addr_code, postal_add
      r_line1, postal_addr_line2, postal_addr_suburb, street_addr_city, street_addr_code, street_addr_line1, street_addr_line2, street_addr_suburb, surname, title_cd) VALUES ('2013-05-29', '2222222222', 2, '4444444444', '3333333333', 'ccccc@iits.co.za', 'Female', '1111111111111', 'bbbbbbbbbb', 'aaaaaa', '
      bbbbbbbbbbbbbb', '5555', 'aaaaaaaaaaaaaa', NULL, NULL, 'bbbbbbbbbbbbbb', '5555', 'aaaaaaaaaaaaaa', NULL, NULL, 'aaaaaaaaaaaaa', 'Hon')
      === 2013-05-29 14:10:41,712 [ec-3] DEBUG SQLDataSource - [builtinApplication.add] add operation affected 1 rows
      === 2013-05-29 14:10:41,712 [ec-3] DEBUG MysqlDriver - [builtinApplication.add] fetchLastRow data - primaryKeysPresent: {}sequencesNotPresent: [company_person_id]
      === 2013-05-29 14:10:41,713 [ec-3] DEBUG SQLDriver - [builtinApplication.add] About to execute SQL query in 'Mysql' using connection '1127887594'
      === 2013-05-29 14:10:41,713 [ec-3] INFO SQLDriver - [builtinApplication.add] Executing SQL query on 'Mysql': SELECT LAST_INSERT_ID()
      === 2013-05-29 14:10:41,715 [ec-3] INFO SQLDataSource - [builtinApplication.add] primaryKeys: {company_person_id=9}
      === 2013-05-29 14:10:41,716 [ec-3] DEBUG DeclarativeSecurity - [builtinApplication.add] Processing security checks for DataSource null, field null
      === 2013-05-29 14:10:41,716 [ec-3] DEBUG AppBase - [builtinApplication.add, builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
      === 2013-05-29 14:10:41,718 [ec-3] DEBUG AppBase - [builtinApplication.add, builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
      === 2013-05-29 14:10:41,719 [ec-3] INFO SQLDataSource - [builtinApplication.add, builtinApplication.null] Performing fetch operation with
      criteria: {company_person_id:9} values: {company_person_id:9}
      === 2013-05-29 14:10:41,721 [ec-3] INFO SQLDataSource - [builtinApplication.add, builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
      === 2013-05-29 14:10:41,721 [ec-3] INFO SQLDataSource - [builtinApplication.add, builtinApplication.null] Executing SQL query on 'Mysql': SELECT company_person.birth_d, company_person.cell_number, company_person.comment, company_person.company_id, company_person.company_person_id, company_person.co
      ntact_number_h, company_person.contact_number_w, company_person.email, company_person.gender_cd, company_person.id_number, company_person.name, company_person.password, company_person.postal_addr_city, company_person.postal_addr_code, company_person.postal_addr_line1, company_person.postal_addr_line
      2, company_person.postal_addr_suburb, company_person.street_addr_city, company_person.street_addr_code, company_person.street_addr_line1, company_person.street_addr_line2, company_person.street_addr_suburb, company_person.surname, company_person.title_cd FROM company_person WHERE (company_person.com
      pany_person_id=9)
      === 2013-05-29 14:10:41,723 [ec-3] DEBUG SQLDriver - [builtinApplication.add, builtinApplication.null] About to execute SQL query in 'Mysql' using connection '1127887594'
      === 2013-05-29 14:10:41,723 [ec-3] INFO SQLDriver - [builtinApplication.add, builtinApplication.null] Executing SQL query on 'Mysql': SELECT company_person.birth_d, company_person.cell_number, company_person.comment, company_person.company_id, company_person.company_person_id, company_person.contac
      t_number_h, company_person.contact_number_w, company_person.email, company_person.gender_cd, company_person.id_number, company_person.name, company_person.password, company_person.postal_addr_city, company_person.postal_addr_code, company_person.postal_addr_line1, company_person.postal_addr_line2, c
      ompany_person.postal_addr_suburb, company_person.street_addr_city, company_person.street_addr_code, company_person.street_addr_line1, company_person.street_addr_line2, company_person.street_addr_suburb, company_person.surname, company_person.title_cd FROM company_person WHERE (company_person.company
      _person_id=9)
      === 2013-05-29 14:10:41,727 [ec-3] INFO DSResponse - [builtinApplication.add, builtinApplication.null] DSResponse: List with 1 items
      === 2013-05-29 14:10:41,728 [ec-3] DEBUG SQLConnectionManager - [builtinApplication.add] About to close PoolableConnection with hashcode "1127887594"
      === 2013-05-29 14:10:41,729 [ec-3] DEBUG PoolableSQLConnectionFactory - [builtinApplication.add] Executing pingTest 'select 1 from dual' on connection 1127887594
      === 2013-05-29 14:10:41,730 [ec-3] INFO DSResponse - [builtinApplication.add] DSResponse: List with 1 items
      === 2013-05-29 14:10:41,735 [ec-3] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
      === 2013-05-29 14:10:41,740 [ec-3] DEBUG XML - Parsed XML from C:\Dev\workspace\AdminOnlineProduct\AdminOnline\war\shared\ds\account_member.ds.xml: 2ms
      === 2013-05-29 14:10:41,746 [ec-3] WARN DataSourceDMI - DataSource account_member: received a request to execute an operation of type 'add' named 'add', but this operation is not defined to the dataSource. Falling back to default behavior for operationType 'add'
      === 2013-05-29 14:10:41,747 [ec-3] DEBUG AppBase - [builtinApplication.add] No userTypes defined, allowing anyone access to all operations for this application
      === 2013-05-29 14:10:41,747 [ec-3] DEBUG AppBase - [builtinApplication.add] No public zero-argument method named '_add' found, performing generic datasource operation
      === 2013-05-29 14:10:41,749 [ec-3] INFO SQLDataSource - [builtinApplication.add] Performing add operation with
      criteria: {company_id:2,role_web_user:1,medical_issues:"gsdgsdgf",school_name:"Eldoraigne",status_cd:"Active",role_communicator:1,orientation_cd:"Left handed",role_responsible:1,school_grade:"12",role_attendee:1,company_person_id:9,use_transport:null,company_account_number:6} values: {com
      pany_id:2,role_web_user:1,medical_issues:"gsdgsdgf",school_name:"Eldoraigne",status_cd:"Active",role_communicator:1,orientation_cd:"Left handed",role_responsible:1,school_grade:"12",role_attendee:1,company_person_id:9,use_transport:null,company_account_number:6}
      === 2013-05-29 14:10:41,751 [ec-3] DEBUG SQLValuesClause - [builtinApplication.add] Sequences: {}
      === 2013-05-29 14:10:41,752 [ec-3] WARN SQLDriver - [builtinApplication.add] DSRequest has no RPCManager set when testing if we should join a transaction - transaction will not be joined
      === 2013-05-29 14:10:41,752 [ec-3] DEBUG PoolableSQLConnectionFactory - [builtinApplication.add] Executing pingTest 'select 1 from dual' on connection 1127887594
      === 2013-05-29 14:10:41,753 [ec-3] DEBUG SQLConnectionManager - [builtinApplication.add] Returning borrowed connection '1127887594'
      === 2013-05-29 14:10:41,755 [ec-3] DEBUG SQLDriver - [builtinApplication.add] About to execute SQL update in 'Mysql' using connection'1127887594'
      === 2013-05-29 14:10:41,756 [ec-3] INFO SQLDriver - [builtinApplication.add] Executing SQL update on 'Mysql': INSERT INTO account_member (company_account_number, company_id, company_person_id, medical_issues, orientation_cd, role_attendee, role_communicator, role_responsible, role_web_user, school_
      grade, school_name, status_cd, use_transport) VALUES (6, 2, 9, 'gsdgsdgf', 'Left handed', 1, 1, 1, 1, '12', 'Eldoraigne', 'Active', NULL)
      === 2013-05-29 14:11:32,131 [ec-3] INFO SQLDriver - [builtinApplication.add] Execute of update: INSERT INTO account_member (company_account_number, company_id, company_person_id, medical_issues, orientation_cd, role_attendee, role_communicator, role_responsible, role_web_user, school_grade, school_
      name, status_cd, use_transport) VALUES (6, 2, 9, 'gsdgsdgf', 'Left handed', 1, 1, 1, 1, '12', 'Eldoraigne', 'Active', NULL) on db: Mysql threw exception: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction - assuming stale connection and retrying update.
      === 2013-05-29 14:11:32,133 [ec-3] DEBUG SQLConnectionManager - [builtinApplication.add] About to close PoolableConnection with hashcode "1127887594"
      === 2013-05-29 14:11:32,133 [ec-3] DEBUG PoolableSQLConnectionFactory - [builtinApplication.add] Executing pingTest 'select 1 from dual' on connection 1127887594
      === 2013-05-29 14:11:32,145 [ec-3] DEBUG PoolableSQLConnectionFactory - [builtinApplication.add] makeObject() created a pooled Connection '950450465'
      === 2013-05-29 14:12:23,141 [ec-3] DEBUG SQLConnectionManager - About to close PoolableConnection with hashcode "950450465"
      === 2013-05-29 14:12:23,142 [ec-3] DEBUG PoolableSQLConnectionFactory - Executing pingTest 'select 1 from dual' on connection 950450465
      === 2013-05-29 14:12:23,174 [ec-3] DEBUG DataSourceDMI - Invocation threw exception
      java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1075)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3566)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3498)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2568)
      at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2113)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2409)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2327)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2312)
      at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
      at com.isomorphic.sql.SQLDriver.doUpdate(SQLDriver.java:774)
      at com.isomorphic.sql.SQLDriver.update(SQLDriver.java:735)
      at com.isomorphic.sql.SQLDriver.executeUpdate(SQLDriver.java:848)
      at com.isomorphic.sql.SQLDataSource.executeNativeUpdate(SQLDataSource.java:427)
      at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1476)
      at com.isomorphic.sql.SQLDataSource.processRequest(SQLDataSource.java:314)
      at com.isomorphic.sql.SQLDataSource.executeAdd(SQLDataSource.java:266)
      at com.isomorphic.datasource.DataSource.execute(DataSource.java:1370)
      at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:726)
      at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658)
      at com.isomorphic.application.AppBase.execute(AppBase.java:491)
      at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2033)
      at za.co.adminonline.dmi.RegisterCompanyDMI.add(RegisterCompanyDMI.java:93)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:972)
      at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:416)
      at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:64)
      at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2030)
      at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:216)
      at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:173)
      at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:138)
      at com.isomorphic.servlet.IDACall.doPost(IDACall.java:74)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
      at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1822)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      === 2013-05-29 14:12:23,184 [ec-3] WARN RequestContext - dsRequest.execute() failed:
      java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1075)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3566)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3498)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2568)
      at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2113)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2409)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2327)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2312)
      at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
      at com.isomorphic.sql.SQLDriver.doUpdate(SQLDriver.java:774)
      at com.isomorphic.sql.SQLDriver.update(SQLDriver.java:735)
      at com.isomorphic.sql.SQLDriver.executeUpdate(SQLDriver.java:848)
      at com.isomorphic.sql.SQLDataSource.executeNativeUpdate(SQLDataSource.java:427)
      at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1476)
      at com.isomorphic.sql.SQLDataSource.processRequest(SQLDataSource.java:314)
      at com.isomorphic.sql.SQLDataSource.executeAdd(SQLDataSource.java:266)
      at com.isomorphic.datasource.DataSource.execute(DataSource.java:1370)
      at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:726)
      at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658)
      at com.isomorphic.application.AppBase.execute(AppBase.java:491)
      at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2033)
      at za.co.adminonline.dmi.RegisterCompanyDMI.add(RegisterCompanyDMI.java:93)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at com.isomorphic.base.Reflection.adaptArgsAndInvoke(Reflection.java:972)
      at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:416)
      at com.isomorphic.datasource.DataSourceDMI.execute(DataSourceDMI.java:64)
      at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2030)
      at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:216)
      at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:173)
      at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:138)
      at com.isomorphic.servlet.IDACall.doPost(IDACall.java:74)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
      at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1822)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      === 2013-05-29 14:12:23,201 [ec-3] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
      === 2013-05-29 14:12:23,201 [ec-3] DEBUG SQLTransaction - Committing Mysql transaction "729936505"
      === 2013-05-29 14:12:23,228 [ec-3] DEBUG RPCManager - DMI response, dropExtraFields: true
      === 2013-05-29 14:12:23,229 [ec-3] DEBUG RPCManager - non-DMI response, dropExtraFields: false
      === 2013-05-29 14:12:23,230 [ec-3] DEBUG SQLTransaction - Returning transactional connection for Mysql with hashcode "729936505"
      === 2013-05-29 14:12:23,230 [ec-3] DEBUG SQLTransaction - Ending Mysql transaction "729936505"
      === 2013-05-29 14:12:23,231 [ec-3] DEBUG SQLConnectionManager - About to close PoolableConnection with hashcode "729936505"
      === 2013-05-29 14:12:23,233 [ec-3] DEBUG PoolableSQLConnectionFactory - Executing pingTest 'select 1 from dual' on connection 729936505
      === 2013-05-29 14:12:23,234 [ec-3] DEBUG SQLTransaction - Returning transactional connection for Mysql (connection is null)
      === 2013-05-29 14:12:23,236 [ec-3] INFO Compression - /war/isomorphic/IDACall: 378 -> 246 bytes

      Comment


        #4
        This log suggests that automatic transactions have been explicitly turned off, which might have happened if you did not copy over server.properties from your new build, or if you, for some reason, just turned the feature off (in server.properties, or with a programmatic call to RPCManager.setTransactionPolicy()).

        Alternatively, you may have custom server code which is calling new DSRequest() and not calling setRPCManager() on that request. This log suggests that:

        === 2013-05-29 14:10:41,675 [ec-3] WARN SQLDriver - [builtinApplication.add] DSRequest has no RPCManager set when testing if we should join a transaction - transaction will not be joined
        You have some other coding errors as well - you are using operationId of "add" but there is no such operation defined in your DataSource, resulting in this log:

        === 2013-05-29 14:10:41,668 [ec-3] WARN DataSourceDMI - DataSource company_person: received a request to execute an operation of type 'add' named 'add', but this operation is not defined to the dataSource. Falling back to default behavior for operationType 'add'
        And, it would never be valid to call RPCManager.handleError() as you've shown. If you've implemented custom error handling code in handleError(), call your own code directly; do not call handleError().

        Comment


          #5
          For completeness, we can tell transactions are just not being attempted at all because you can see the connection ids being logged and they differ.

          And, MySQL will generally hang indefinitely if you attempt to access a row that is involved in an uncommitted transaction (at least older MySQL will by default), so it's not surprising that you've got a hang.

          Comment


            #6
            Thank you for the quick and accurate reply. The issue was that I've created more DSRequest objects in DMI but did not set the RPCManager.
            I also fixed the operation ID issue.

            I do have a question though, I upgraded to Power to get the automatic database transactions.

            Like now, there is one datasource request to the DMI class, from where I launch multiple DSRequests (all now with the same RPCManager).
            But if I exit halfway through due to error, the data is committed in the database?

            Here's the link to the previous discussion quite some time ago:
            http://forums.smartclient.com/showthread.php?t=26017

            Comment


              #7
              If your code throws an Exception from a DMI, changes will be rolled back. Likewise if you return a DSResponse with an error.

              Comment


                #8
                At this moment, this is not the case - so clearly I'm doing something wrong.
                Here's my scenario:
                SmartClient JS:
                CreateQueue & SendQueue
                - Send DS1 (add/insert)
                - Send DS2 (add/insert)

                DMI Java Code
                - On receiving DS1, Forward DS1 as-is
                - On receiving DS2,
                - Extract auto-increment value generated by DS1 DB insert
                - Add extracted value to DS2 value list
                - Create and execute DS3, DS4 and DS5 from the DS2 values

                Is there an example I can look at? My biggest requirement is that everything must commit or rolledback.
                And I need the auto-incremented value from the first insert as a value in the other inserts.

                Comment


                  #9
                  This example shows automatic rollback based on a failing request.

                  Comment


                    #10
                    OK, I've looked at all the examples, adjusted my code, but it does not work.
                    Here's the client code:

                    Code:
                    RPCManager.startQueue();
                    
                    dynamicForm.setSaveOperationType("add");
                    dynamicForm.saveData();
                    
                    //Loop through tab list and save data on each tab, calling:
                    // dynamicForm.setSaveOperationType("add");
                    // dynamicForm.saveData();
                    for (i = 0; i < tabList.data.length; i++) {
                        cvarArrTabs[i].saveDataOnSubmit();
                    }
                    
                    RPCManager.sendQueue(
                      function (responses) {
                        isc.say(
                          "Success Message",
                      }
                    );
                    Here's my server code:
                    Code:
                    public DSResponse add(DSRequest dsRequest) throws Exception {
                    
                      if (dsRequest.getDataSourceName().equals("company_account")) {
                    
                          return dsRequest.execute();
                    
                      } else if (dsRequest.getDataSourceName().equals("register_account_person")) {
                    
                        DSResponse dsResponse = dsRequest.getRPCManager().findLastResponse("company_account", "add");
                        Long companyAccountNumber = (Long) dsResponse.getFieldValue(ServerConstants.FLD_ID_COMPANY_ACCOUNT_NUMBER);
                    
                        DSResponse validatePersonEmailDSOut = DataValidationServices.isEmailCompanyDuplicate(
                                (Long) dsRequest.getFieldValue(ServerConstants.FLD_ID_COMPANY_ID),
                                (String) dsRequest.getFieldValue(ServerConstants.FLD_ID_EMAIL));
                        if (validatePersonEmailDSOut != null) {
                            return validatePersonEmailDSOut;
                        }
                    
                        DSRequest dsReqCoPer = new DSRequest("company_person", "add");
                        dsReqCoPer.setRPCManager(dsRequest.getRPCManager());
                        Map values = new HashMap();
                        values.put(ServerConstants.FLD_ID_COMPANY_ID, dsRequest.getFieldValue(ServerConstants.FLD_ID_COMPANY_ID));
                        values.put(ServerConstants.FLD_ID_NAME, dsRequest.getFieldValue(ServerConstants.FLD_ID_NAME));
                        values.put(ServerConstants.FLD_ID_SURNAME, dsRequest.getFieldValue(ServerConstants.FLD_ID_SURNAME));
                        values.put(ServerConstants.FLD_ID_BIRTH_D, dsRequest.getFieldValue(ServerConstants.FLD_ID_BIRTH_D));
                        values.put(ServerConstants.FLD_ID_GENDER_CD, dsRequest.getFieldValue(ServerConstants.FLD_ID_GENDER_CD));
                        values.put(ServerConstants.FLD_ID_STATUS_CD, dsRequest.getFieldValue(ServerConstants.FLD_ID_STATUS_CD));
                        values.put(ServerConstants.FLD_ID_EMAIL, dsRequest.getFieldValue(ServerConstants.FLD_ID_EMAIL));
                        values.put(ServerConstants.FLD_ID_PASSWORD, dsRequest.getFieldValue(ServerConstants.FLD_ID_PASSWORD));
                        values.put(ServerConstants.FLD_ID_CELL_NUMBER, dsRequest.getFieldValue(ServerConstants.FLD_ID_CELL_NUMBER));
                        values.put(ServerConstants.FLD_ID_TITLE_CD, dsRequest.getFieldValue(ServerConstants.FLD_ID_TITLE_CD));
                        values.put(ServerConstants.FLD_ID_CONTACT_NUMBER_H, dsRequest.getFieldValue(ServerConstants.FLD_ID_CONTACT_NUMBER_H));
                        values.put(ServerConstants.FLD_ID_CONTACT_NUMBER_W, dsRequest.getFieldValue(ServerConstants.FLD_ID_CONTACT_NUMBER_W));
                        values.put(ServerConstants.FLD_ID_ID_NUMBER, dsRequest.getFieldValue(ServerConstants.FLD_ID_ID_NUMBER));
                        values.put(ServerConstants.FLD_ID_STREET_ADDR_LINE1, dsRequest.getFieldValue(ServerConstants.FLD_ID_STREET_ADDR_LINE1));
                        values.put(ServerConstants.FLD_ID_STREET_ADDR_LINE2, dsRequest.getFieldValue(ServerConstants.FLD_ID_STREET_ADDR_LINE2));
                        values.put(ServerConstants.FLD_ID_STREET_ADDR_SUBURB, dsRequest.getFieldValue(ServerConstants.FLD_ID_STREET_ADDR_SUBURB));
                        values.put(ServerConstants.FLD_ID_STREET_ADDR_CITY, dsRequest.getFieldValue(ServerConstants.FLD_ID_STREET_ADDR_CITY));
                        values.put(ServerConstants.FLD_ID_STREET_ADDR_CODE, dsRequest.getFieldValue(ServerConstants.FLD_ID_STREET_ADDR_CODE));
                        values.put(ServerConstants.FLD_ID_POSTAL_ADDR_LINE1, dsRequest.getFieldValue(ServerConstants.FLD_ID_POSTAL_ADDR_LINE1));
                        values.put(ServerConstants.FLD_ID_POSTAL_ADDR_LINE2, dsRequest.getFieldValue(ServerConstants.FLD_ID_POSTAL_ADDR_LINE2));
                        values.put(ServerConstants.FLD_ID_POSTAL_ADDR_SUBURB, dsRequest.getFieldValue(ServerConstants.FLD_ID_POSTAL_ADDR_SUBURB));
                        values.put(ServerConstants.FLD_ID_POSTAL_ADDR_CITY, dsRequest.getFieldValue(ServerConstants.FLD_ID_POSTAL_ADDR_CITY));
                        values.put(ServerConstants.FLD_ID_POSTAL_ADDR_CODE, dsRequest.getFieldValue(ServerConstants.FLD_ID_POSTAL_ADDR_CODE));
                        dsReqCoPer.setValues(values);
                        DSResponse companyPersonDs = dsReqCoPer.execute();
                    
                    
                        Long companyPersonId = (Long) companyPersonDs.getFieldValue(ServerConstants.FLD_ID_COMPANY_PERSON_ID);
                        DSRequest dsReqAccMember = new DSRequest("account_member", "add");
                        dsReqAccMember.setRPCManager(dsRequest.getRPCManager());
                    
                        values = new HashMap();
                        values.put(ServerConstants.FLD_ID_COMPANY_ACCOUNT_NUMBER, companyAccountNumber);
                        values.put(ServerConstants.FLD_ID_COMPANY_PERSON_ID, companyPersonId);
                        values.put(ServerConstants.FLD_ID_COMPANY_ID, dsRequest.getFieldValue(ServerConstants.FLD_ID_COMPANY_ID));
                        values.put(ServerConstants.FLD_ID_STATUS_CD, dsRequest.getFieldValue(ServerConstants.FLD_ID_STATUS_CD));
                        values.put(ServerConstants.FLD_ID_SCHOOL_NAME, dsRequest.getFieldValue(ServerConstants.FLD_ID_SCHOOL_NAME));
                        values.put(ServerConstants.FLD_ID_SCHOOL_GRADE, dsRequest.getFieldValue(ServerConstants.FLD_ID_SCHOOL_GRADE));
                        values.put(ServerConstants.FLD_ID_ORIENTATION_CD, dsRequest.getFieldValue(ServerConstants.FLD_ID_ORIENTATION_CD));
                        values.put(ServerConstants.FLD_ID_MEDICAL_ISSUES, dsRequest.getFieldValue(ServerConstants.FLD_ID_MEDICAL_ISSUES));
                        values.put(ServerConstants.FLD_ID_USE_TRANSPORT, dsRequest.getFieldValue(ServerConstants.FLD_ID_USE_TRANSPORT));
                        values.put(ServerConstants.FLD_ID_ROLE_RESPONSIBLE, dsRequest.getFieldValue(ServerConstants.FLD_ID_ROLE_RESPONSIBLE));
                        values.put(ServerConstants.FLD_ID_ROLE_ATTENDEE, dsRequest.getFieldValue(ServerConstants.FLD_ID_ROLE_ATTENDEE));
                        values.put(ServerConstants.FLD_ID_ROLE_COMMUNICATOR, dsRequest.getFieldValue(ServerConstants.FLD_ID_ROLE_COMMUNICATOR));
                        values.put(ServerConstants.FLD_ID_ROLE_WEB_USER, dsRequest.getFieldValue(ServerConstants.FLD_ID_ROLE_WEB_USER));
                        dsReqAccMember.setValues(values);
                    
                        DSResponse accountMemberDs = dsReqAccMember.execute();
                    
                    
                    
                        DSRequest dsReqCoPerRole = new DSRequest("company_person_user_role", "add");
                        dsReqCoPerRole.setRPCManager(dsRequest.getRPCManager());
                    
                        values = new HashMap();
                        values.put(ServerConstants.FLD_ID_COMPANY_PERSON_ID, companyPersonId);
                        values.put(ServerConstants.FLD_ID_ROLE_CD, ServerConstants.FLD_OPT_ROLE_ACCOUNT_HOLDER);
                        dsReqCoPerRole.setValues(values);
                    
                        DSResponse coPerRoleDs = dsReqCoPerRole.execute();
                    
                    
                    
                        ArrayList activities = (ArrayList) dsRequest.getFieldValue(ServerConstants.FLD_ID_ACTIVITIES);
                        for (int i = 0; i < activities.size(); i++) {
                            DSRequest dsReqAccMemberActivity = new DSRequest("account_member_activities", "add");
                            dsReqAccMemberActivity.setRPCManager(dsRequest.getRPCManager());
                            values = new HashMap();
                            values.put(ServerConstants.FLD_ID_COMPANY_ACCOUNT_NUMBER, companyAccountNumber);
                            values.put(ServerConstants.FLD_ID_COMPANY_PERSON_ID, companyPersonId);
                            values.put(ServerConstants.FLD_ID_COMPANY_ID, dsRequest.getFieldValue(ServerConstants.FLD_ID_COMPANY_ID));
                            values.put(ServerConstants.FLD_ID_STATUS_CD, ServerConstants.FLD_OPT_ACCOUNT_MEMBER_STATUS_REGISTERED);
                            values.put(ServerConstants.FLD_ID_ACTIVITY_NAME, activities.get(i));
                            dsReqAccMemberActivity.setValues(values);
                            dsReqAccMemberActivity.execute();
                        }
                    
                        return accountMemberDs;
                    
                      }
                      return null;
                    }
                    Here's the server full output log:
                    === 2013-06-01 09:37:58,379 [c-10] DEBUG IDACall - Header Name:Value pair: host:localhost:8888
                    === 2013-06-01 09:37:58,379 [c-10] DEBUG IDACall - Header Name:Value pair: connection:keep-alive
                    === 2013-06-01 09:37:58,380 [c-10] DEBUG IDACall - Header Name:Value pair: content-length:3209
                    === 2013-06-01 09:37:58,380 [c-10] DEBUG IDACall - Header Name:Value pair: origin:http://localhost:8888
                    === 2013-06-01 09:37:58,383 [c-10] DEBUG IDACall - Header Name:Value pair: user-agent:Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.94 Safari/537.36
                    === 2013-06-01 09:37:58,383 [c-10] DEBUG IDACall - Header Name:Value pair: content-type:application/x-www-form-urlencoded; charset=UTF-8
                    === 2013-06-01 09:37:58,385 [c-10] DEBUG IDACall - Header Name:Value pair: accept:*/*
                    === 2013-06-01 09:37:58,386 [c-10] DEBUG IDACall - Header Name:Value pair: referer:http://localhost:8888/war/register.jsp
                    === 2013-06-01 09:37:58,387 [c-10] DEBUG IDACall - Header Name:Value pair: accept-encoding:gzip,deflate,sdch
                    === 2013-06-01 09:37:58,388 [c-10] DEBUG IDACall - Header Name:Value pair: accept-language:en-US,en;q=0.8
                    === 2013-06-01 09:37:58,390 [c-10] DEBUG IDACall - Header Name:Value pair: cookie:JSESSIONID=F8C22F36B7BEEEB2E8BFF1B56EE80965; isc_cState=ready
                    === 2013-06-01 09:37:58,390 [c-10] DEBUG IDACall - session exists: F8C22F36B7BEEEB2E8BFF1B56EE80965
                    === 2013-06-01 09:37:58,392 [c-10] DEBUG IDACall - remote user: null
                    === 2013-06-01 09:37:58,398 [c-10] DEBUG XML - Parsed XML from (in memory stream): 3ms
                    === 2013-06-01 09:37:58,400 [c-10] DEBUG RPCManager - Processing 2 requests.
                    === 2013-06-01 09:37:58,402 [c-10] DEBUG RPCManager - Request #1 (DSRequest) payload: {
                    values:{
                    company_id:"2",
                    status_cd:"Active",
                    payment_terms_cd:"Monthly",
                    surname:"XXXXX"
                    },
                    operationConfig:{
                    dataSource:"company_account",
                    operationType:"add"
                    },
                    componentId:"dfRegisterUserAccountDetail",
                    appID:"builtinApplication",
                    operation:"company_account_add",
                    oldValues:{
                    },
                    criteria:{
                    }
                    }
                    === 2013-06-01 09:37:58,404 [c-10] DEBUG RPCManager - Request #2 (DSRequest) payload: {
                    values:{
                    company_id:"2",
                    status_cd:"Active",
                    role_responsible:1,
                    role_attendee:1,
                    role_communicator:1,
                    role_web_user:1,
                    name:"yyyyy",
                    surname:"XXXXX",
                    birth_d:new Date(1370037600000),
                    password:"aaaaaa",
                    password2:"aaaaaa",
                    title_cd:"Hon",
                    gender_cd:"Female",
                    id_number:"1111111111111",
                    email:"a1@iits.co.za",
                    cell_number:"1111111111",
                    contact_number_w:"2222222222",
                    contact_number_h:"3333333333",
                    PostalAndStreetAddrSame:true,
                    street_addr_line1:"aaaaaaaaaaaaa",
                    postal_addr_line1:"aaaaaaaaaaaaa",
                    street_addr_city:"bbbbbbbbbbbbb",
                    postal_addr_city:"bbbbbbbbbbbbb",
                    street_addr_code:"4444",
                    postal_addr_code:"4444",
                    medical_issues:"ccccccccccccccccc",
                    orientation_cd:"Left handed",
                    school_name:"Eldoraigne",
                    school_grade:"12",
                    activities:[
                    "Ballewalles"
                    ]
                    },
                    operationConfig:{
                    dataSource:"register_account_person",
                    operationType:"add"
                    },
                    componentId:"dfRegisterUserTabTab0",
                    appID:"builtinApplication",
                    operation:"register_account_person_add",
                    oldValues:{
                    },
                    criteria:{
                    }
                    }
                    === 2013-06-01 09:37:58,408 [c-10] INFO IDACall - Performing 2 operation(s)
                    === 2013-06-01 09:37:58,408 [c-10] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
                    === 2013-06-01 09:37:58,409 [c-10] DEBUG DeclarativeSecurity - DataSource company_account is not in the pre-checked list, processing...
                    === 2013-06-01 09:37:58,418 [c-10] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
                    === 2013-06-01 09:37:58,418 [c-10] DEBUG DeclarativeSecurity - DataSource company_account is not in the pre-checked list, processing...
                    === 2013-06-01 09:37:58,419 [c-10] DEBUG AppBase - [builtinApplication.company_account_add] No userTypes defined, allowing anyone access to all operations for this application
                    === 2013-06-01 09:37:58,420 [c-10] DEBUG AppBase - [builtinApplication.company_account_add] No public zero-argument method named '_company_account_add' found, performing generic datasource operation
                    === 2013-06-01 09:37:58,424 [c-10] INFO SQLDataSource - [builtinApplication.company_account_add] Performing add operation with
                    criteria: {company_id:"2",status_cd:"Active",payment_terms_cd:"Monthly",surname:"XXXXX"} values: {company_id:2,status_cd:"Active",payment_terms_cd:"Monthly",surname:"XXXXX"}
                    === 2013-06-01 09:37:58,425 [c-10] DEBUG SQLValuesClause - [builtinApplication.company_account_add] Sequences: {company_account_number=__default}
                    === 2013-06-01 09:37:58,426 [c-10] DEBUG PoolableSQLConnectionFactory - [builtinApplication.company_account_add] Executing pingTest 'select 1 from dual' on connection 660470922
                    === 2013-06-01 09:37:58,427 [c-10] DEBUG SQLConnectionManager - [builtinApplication.company_account_add] Returning borrowed connection '660470922'
                    === 2013-06-01 09:37:58,430 [c-10] DEBUG SQLTransaction - [builtinApplication.company_account_add] Started new Mysql transaction "660470922"
                    === 2013-06-01 09:37:58,430 [c-10] DEBUG SQLDriver - [builtinApplication.company_account_add] About to execute SQL update in 'Mysql' using connection'660470922'
                    === 2013-06-01 09:37:58,432 [c-10] INFO SQLDriver - [builtinApplication.company_account_add] Executing SQL update on 'Mysql': INSERT INTO company_account (company_id, payment_terms_cd, status_cd, surname) VALUES (2, 'Monthly', 'Active', 'XXXXX')
                    === 2013-06-01 09:37:58,434 [c-10] DEBUG SQLDataSource - [builtinApplication.company_account_add] add operation affected 1 rows
                    === 2013-06-01 09:37:58,434 [c-10] DEBUG MysqlDriver - [builtinApplication.company_account_add] fetchLastRow data - primaryKeysPresent: {}sequencesNotPresent: [company_account_number]
                    === 2013-06-01 09:37:58,435 [c-10] DEBUG SQLDriver - [builtinApplication.company_account_add] About to execute SQL query in 'Mysql' using connection '660470922'
                    === 2013-06-01 09:37:58,437 [c-10] INFO SQLDriver - [builtinApplication.company_account_add] Executing SQL query on 'Mysql': SELECT LAST_INSERT_ID()
                    === 2013-06-01 09:37:58,438 [c-10] INFO SQLDataSource - [builtinApplication.company_account_add] primaryKeys: {company_account_number=11}
                    === 2013-06-01 09:37:58,439 [c-10] DEBUG DeclarativeSecurity - [builtinApplication.company_account_add] Processing security checks for DataSource null, field null
                    === 2013-06-01 09:37:58,439 [c-10] DEBUG DeclarativeSecurity - [builtinApplication.company_account_add] DataSource company_account is not in the pre-checked list, processing...
                    === 2013-06-01 09:37:58,442 [c-10] DEBUG DeclarativeSecurity - [builtinApplication.company_account_add] Processing security checks for DataSource null, field null
                    === 2013-06-01 09:37:58,442 [c-10] DEBUG DeclarativeSecurity - [builtinApplication.company_account_add] DataSource company_account is not in the pre-checked list, processing...
                    === 2013-06-01 09:37:58,443 [c-10] DEBUG AppBase - [builtinApplication.company_account_add, builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
                    === 2013-06-01 09:37:58,444 [c-10] DEBUG AppBase - [builtinApplication.company_account_add, builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
                    === 2013-06-01 09:37:58,446 [c-10] INFO SQLDataSource - [builtinApplication.company_account_add, builtinApplication.null] Performing fetch operation with
                    criteria: {company_account_number:11} values: {company_account_number:11}
                    === 2013-06-01 09:37:58,446 [c-10] INFO SQLDataSource - [builtinApplication.company_account_add, builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
                    === 2013-06-01 09:37:58,448 [c-10] INFO SQLDataSource - [builtinApplication.company_account_add, builtinApplication.null] Executing SQL query on 'Mysql': SELECT company_account.comment, company_account.company_account_number, company_account.company_id, company_account.payment_terms_cd, company_acc
                    ount.status_cd, company_account.surname FROM company_account WHERE (company_account.company_account_number=11)
                    === 2013-06-01 09:37:58,448 [c-10] DEBUG SQLDriver - [builtinApplication.company_account_add, builtinApplication.null] About to execute SQL query in 'Mysql' using connection '660470922'
                    === 2013-06-01 09:37:58,450 [c-10] INFO SQLDriver - [builtinApplication.company_account_add, builtinApplication.null] Executing SQL query on 'Mysql': SELECT company_account.comment, company_account.company_account_number, company_account.company_id, company_account.payment_terms_cd, company_account
                    .status_cd, company_account.surname FROM company_account WHERE (company_account.company_account_number=11)
                    === 2013-06-01 09:37:58,451 [c-10] INFO DSResponse - [builtinApplication.company_account_add, builtinApplication.null] DSResponse: List with 1 items
                    === 2013-06-01 09:37:58,452 [c-10] INFO DSResponse - [builtinApplication.company_account_add] DSResponse: List with 1 items
                    === 2013-06-01 09:37:58,452 [c-10] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
                    === 2013-06-01 09:37:58,454 [c-10] DEBUG DeclarativeSecurity - DataSource register_account_person is not in the pre-checked list, processing...
                    === 2013-06-01 09:37:58,458 [c-10] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null
                    === 2013-06-01 09:37:58,458 [c-10] DEBUG AppBase - [builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application
                    === 2013-06-01 09:37:58,459 [c-10] DEBUG AppBase - [builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
                    === 2013-06-01 09:37:58,459 [c-10] INFO SQLDataSource - [builtinApplication.null] Performing fetch operation with
                    criteria: {company_id:2,email:"a1@iits.co.za"} values: {company_id:2,email:"a1@iits.co.za"}
                    === 2013-06-01 09:37:58,460 [c-10] INFO SQLDataSource - [builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause
                    === 2013-06-01 09:37:58,462 [c-10] INFO SQLDataSource - [builtinApplication.null] Executing SQL query on 'Mysql': SELECT company_person.birth_d, company_person.cell_number, company_person.comment, company_person.company_id, company_person.company_person_id, company_person.contact_number_h, company_
                    person.contact_number_w, company_person.email, company_person.gender_cd, company_person.id_number, company_person.name, company_person.password, company_person.postal_addr_city, company_person.postal_addr_code, company_person.postal_addr_line1, company_person.postal_addr_line2, company_person.postal
                    _addr_suburb, company_person.street_addr_city, company_person.street_addr_code, company_person.street_addr_line1, company_person.street_addr_line2, company_person.street_addr_suburb, company_person.surname, company_person.title_cd FROM company_person WHERE (company_person.company_id=2 AND company_pe
                    rson.email='a1@iits.co.za')
                    === 2013-06-01 09:37:58,463 [c-10] DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] Executing pingTest 'select 1 from dual' on connection 466702316
                    === 2013-06-01 09:37:58,464 [c-10] DEBUG SQLConnectionManager - [builtinApplication.null] Returning borrowed connection '466702316'
                    === 2013-06-01 09:37:58,464 [c-10] DEBUG SQLDriver - [builtinApplication.null] About to execute SQL query in 'Mysql' using connection '466702316'
                    === 2013-06-01 09:37:58,467 [c-10] INFO SQLDriver - [builtinApplication.null] Executing SQL query on 'Mysql': SELECT company_person.birth_d, company_person.cell_number, company_person.comment, company_person.company_id, company_person.company_person_id, company_person.contact_number_h, company_pers
                    on.contact_number_w, company_person.email, company_person.gender_cd, company_person.id_number, company_person.name, company_person.password, company_person.postal_addr_city, company_person.postal_addr_code, company_person.postal_addr_line1, company_person.postal_addr_line2, company_person.postal_add
                    r_suburb, company_person.street_addr_city, company_person.street_addr_code, company_person.street_addr_line1, company_person.street_addr_line2, company_person.street_addr_suburb, company_person.surname, company_person.title_cd FROM company_person WHERE (company_person.company_id=2 AND company_person
                    .email='a1@iits.co.za')
                    === 2013-06-01 09:37:58,470 [c-10] INFO DSResponse - [builtinApplication.null] DSResponse: List with 1 items
                    === 2013-06-01 09:37:58,470 [c-10] DEBUG SQLConnectionManager - About to close PoolableConnection with hashcode "466702316"
                    === 2013-06-01 09:37:58,470 [c-10] DEBUG PoolableSQLConnectionFactory - Executing pingTest 'select 1 from dual' on connection 466702316
                    === 2013-06-01 09:37:58,483 [c-10] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
                    === 2013-06-01 09:37:58,484 [c-10] DEBUG SQLTransaction - Committing Mysql transaction "660470922"
                    === 2013-06-01 09:37:58,517 [c-10] DEBUG RPCManager - DMI response, dropExtraFields: true
                    === 2013-06-01 09:37:58,518 [c-10] DEBUG RPCManager - DMI response, dropExtraFields: true
                    === 2013-06-01 09:37:58,519 [c-10] DEBUG SQLTransaction - Returning transactional connection for Mysql with hashcode "660470922"
                    === 2013-06-01 09:37:58,519 [c-10] DEBUG SQLTransaction - Ending Mysql transaction "660470922"
                    === 2013-06-01 09:37:58,521 [c-10] DEBUG SQLConnectionManager - About to close PoolableConnection with hashcode "660470922"
                    === 2013-06-01 09:37:58,521 [c-10] DEBUG PoolableSQLConnectionFactory - Executing pingTest 'select 1 from dual' on connection 660470922
                    === 2013-06-01 09:37:58,523 [c-10] DEBUG SQLTransaction - Returning transactional connection for Mysql (connection is null)
                    === 2013-06-01 09:37:58,523 [c-10] INFO Compression - /war/isomorphic/IDACall: 945 -> 477 bytes
                    === 2013-06-01 09:37:58,627 [ec-4] INFO RequestContext - URL: '/war/images/help_Disabled.png', User-Agent: 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.94 Safari/537.36': Safari with Accept-Encoding header
                    === 2013-06-01 09:38:04,176 [ec-1] INFO RequestContext - URL: '/war/login.jsp', User-Agent: 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.94 Safari/537.36': Safari with Accept-Encoding header
                    === 2013-06-01 09:38:04,177 [ec-1] INFO Compression - /war/login.jsp: 2899 -> 1034 bytes

                    Comment


                      #11
                      What is it you're trying to show with this code and this log?

                      Transactional commits not happening as expected?

                      Rollback not happening as expected?

                      Something else?

                      All it seems to show is that the second "add" operation is not performed, which would be expected if the first had failed.

                      Comment


                        #12
                        I am trying to show that insert 1 does not rollback when insert 2 does not happen because I've returned an error DSResponse back.

                        Comment


                          #13
                          Are we missing something in the code or logs? There doesn't appear to be a failure response.

                          Comment


                            #14
                            This code sets an error on the DSResponse that is sent back:

                            validatePersonEmailDSOut.addError(
                            ServerConstants.FLD_ID_EMAIL,
                            String.format( ServerConstants. REGISTER_ACCOUNT_EMAIL_ALREADY_EXISTS_PRE_MSG,
                            email));

                            So, I do add the error? What must I do in the DMI to indicate a rollback?

                            Comment


                              #15
                              ? This code wasn't in the original listing.

                              Sorry, at this point, if you think there's an issue with transactions being rolled back automatically, we'll need to see a minimal test case (based on one of the samples) showing that there's a problem.

                              Comment

                              Working...
                              X