Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in insert query in hibernate

 
Saravanan Subramani
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using Hibernate version:3.0 and oracle 10.

In my method, first will execute 4 insert query. after executing all insert queries , finally it should be calling a procedure and commit the transaction.

My problem is when i calling this method, what hibernate does is,first calling the procedure and then executing all insert queries.

Why is it doing like this? Is there any configuration required to tell which kind of query should execute first ?.

Help needed.

Thanks in advance.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"ssaravanan saravanan", please check your private messages.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

In my method, first will execute 4 insert query. after executing all insert queries , finally it should be calling a procedure and commit the transaction.

Hibernate should perform the inserts in the order you ask them to. Can you show us your method?
 
Saravanan Subramani
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply.Please find my method.

private void storeRequests(CreateSubscriptionDAO createPrepaidSubscriptionDAO, GenerateDocumentDAO generateDocumentDAO, UpdateReservationDAO updateReservationDAO, CreateOracleERPOrderDAO createOracleERPOrderDAO) throws OrderEngineDatabaseException{
logger.debug("----storeBatchRequests----");

Session session = null;

try{
session = HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();

logger.info(Constants.LOG_STORE_BATCH_TABLES_ATTEMPT);
long t11 = System.currentTimeMillis();

// Create and store batch table object

Calendar timestamp = Calendar.getInstance();

String label = webShop + timestamp.getTime();

CallableStatement callableStatement = null;

callableStatement = session.connection().prepareCall("{? = call PSFTADM.xmlbatch_common.fetchbatchid(?,?)}");

callableStatement.setString(2,user);

callableStatement.setString(3,label);

callableStatement.registerOutParameter(1, OracleTypes.INTEGER);

callableStatement.execute();

Long batchId = new Long(callableStatement.getLong(1));

callableStatement.close();

logger.debug("Batch id :"+ batchId);

// Store all requests in the batch tables

if (createPrepaidSubscriptionDAO != null){
//create task id
Long taskId = createTaskId(session);

createPrepaidSubscriptionDAO.setBatchId(batchId);
createPrepaidSubscriptionDAO.setTaskId(taskId);

logger.info(Constants.LOG_PREPAID_SUBSCRIPTION_ATTEMPT);
long t1 = System.currentTimeMillis();
session.save(createPrepaidSubscriptionDAO);
//session.flush();
long t2 = System.currentTimeMillis();
logger.info(Constants.LOG_PREPAID_SUBSCRIPTION_SUCCESS + (t2-t1) + " ms");
}

if (generateDocumentDAO != null){
//create task id
Long taskId = createTaskId(session);

generateDocumentDAO.setBatchId(batchId);
generateDocumentDAO.setTaskId(taskId);

logger.info(Constants.LOG_GENERATE_DOCUMENT_ATTEMPT);
long t1 = System.currentTimeMillis();
session.save(generateDocumentDAO);
//session.flush();
long t2 = System.currentTimeMillis();
logger.info(Constants.LOG_GENERATE_DOCUMENT_SUCCESS + (t2-t1) + " ms");
}

if (updateReservationDAO != null){
//create task id
Long taskId = createTaskId(session);

updateReservationDAO.setBatchId(batchId);
updateReservationDAO.setTaskId(taskId);

logger.info(Constants.LOG_UPDATE_RESERVATION_ATTEMPT);
long t1 = System.currentTimeMillis();
session.save(updateReservationDAO);
//session.flush();
long t2 = System.currentTimeMillis();
logger.info(Constants.LOG_UPDATE_RESERVATION_SUCCESS + (t2-t1) + " ms");
}

if (createOracleERPOrderDAO != null){
//create task id
Long taskId = createTaskId(session);

createOracleERPOrderDAO.setBatchId(batchId);
createOracleERPOrderDAO.setTaskId(taskId);

logger.info(Constants.LOG_CREATE_ORACLE_ORDER_ATTEMPT);
long t1 = System.currentTimeMillis();
session.save(createOracleERPOrderDAO);
//session.flush();
long t2 = System.currentTimeMillis();
logger.info(Constants.LOG_CREATE_ORACLE_ORDER_SUCCESS + (t2-t1) + " ms");
}

//prepare batch - calling procedure
session.getNamedQuery("batchPrepare").setParameter(0, batchId).executeUpdate();
//update batch
logger.debug("BatchPrepare Success ");
// calling procedure
session.getNamedQuery("batchUpdate").setParameter(0, batchId).setParameter(1, "PRCS").executeUpdate();

long t22 = System.currentTimeMillis();
logger.info(Constants.LOG_STORE_BATCH_TABLES_SUCCESS + (t22-t11) + " ms");

session.getTransaction().commit();
HibernateUtil.getSessionFactory().close();

}
catch(Exception exception){
logger.error("Received exception: " + exception.getMessage());
session.getTransaction().rollback();
HibernateUtil.getSessionFactory().close();
//exception.printStackTrace();
OrderEngineDatabaseException orderEngineDatabaseException = new OrderEngineDatabaseException(exception.getMessage());
throw orderEngineDatabaseException;
}
}

query output is:

Hibernate: {call PSFTADM.xmlbatch_common.BATCH_PREPARE(?) }
Hibernate: {call PSFTADM.xmlbatch_common.BATCH_UPDATE(?,?) }
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUB (H1SD_XB_TRANS_ID, RBTACCTNO, SALES_USER_ID, H1SW_SALESIND_NAME, H1SD_OFFER1, H1SD_MSISDN_CH, H1UK_IMSI, UICCID, H1UK_PUK1A, H1SD_IMEI_CH, CAPTURE_ID, H1SD_MASTORDID_CH, H1SW_URL_CNTR, H1SD_PREPTYPE_CH, H1SD_ORDTYPE, H1SD_ORDACTION_CH, H1SD_EMAILTYPE_CH, EMAIL_ADDR, FIRST_NAME, LAST_NAME, H1SD_CALLDATA_CH, H1SD_DONORNUM_CH, H1SD_DONOROPR_CH, H1SD_DNRUICCID_CH, H1SD_PORTDATE_DT, H1SD_PORTHOUR_CH, H1SD_DEFFERED_CH, H1SD_DEV_PAY_CH, H1SD_START_PAY_CH, H1SD_LANG_CH, H1SD_ASYNC_CH, H1SD_PRINTCNTRCT, H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOC (H1SD_XB_TRANS_ID, CAPTURE_ID, H1SD_MASTORDID_CH, H1SD_SWITCHID_CH, H1SD_DOCTYPDESC_CH, H1SW_URL_CNTR, H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID) values (?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_UPDRES (H1SD_XB_TRANS_ID, H1SD_PAYMENT_ID, EXTERNAL_ID, H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID) values (?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_ERPORD (H1SD_XB_TRANS_ID, TAXPAYER_ID, H1SD_CUSTID_CH, H1SD_PRSNFLG_CH, BO_NAME, FIRST_NAME, LAST_NAME, H1SD_SITECODE_CH, ADDRESS1, ADDRESS2, ADDRESS3, ADDRESS4, POSTAL, CITY, COUNTRY, COUNTY, H1SD_MASTORDID_CH, URL, H1SD_ORDREF_CH, H1SD_SALESCHNL_CH, H1SD_ORDTYPE, H1SD_OPRTYPE_CH, H1SD_AUTHRET_CH, H1SD_PYMTCODE_CH, H1SD_CUSTPONM_CH, H1SD_RECCONFLG_CH, H1SD_CONFEMAIL_CH, H1SD_DELMETH_CH, H1SD_RETREASCD_CH, H1SD_RETPAIDBY_CH, H1SD_CUSTNT_CH, H1SD_HANDNT_CH, H1SD_ORDCRTBY_CH, H1SD_PAYTRXID_CH, H1SD_PARTDEL_CH, H1SD_ALLOWSTCK_CH, H1SD_DELCNTCT_CH, H1SD_DELCONT_CH, H1SD_DELPINCOD_CH, H1SD_DELPHONE_CH, H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_UPDRESP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTITEM_ID, H1SD_ITEM_ID) values (?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_UPDRESP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTITEM_ID, H1SD_ITEM_ID) values (?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_ERPORDP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, CAPTURE_ID, H1SD_MASTORDID_CH, H1SD_OPRTYPE_CH, PRODUCT_ID, H1SD_BINDING_CH, H1SD_OFFER1, RA_CAMPAIGN_ID, H1SD_ORDTYPE, H1SD_DISCNT_CH, H1SD_PRICE2_NM, REQUEST_DT, H1SD_MSISDN_CH, H1SD_DONORNUM_CH, RBTACCTNO, H1SD_PYMTCODE_CH, EMAIL_ADDR, FIRST_NAME, LAST_NAME, DESCR, H1SD_COSTCODE_CH, H1SW_SALESIND_NAME, H1SD_SALESCHNL_CH, H1SD_SUBSCRTYP_CH) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_ERPORDP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, CAPTURE_ID, H1SD_MASTORDID_CH, H1SD_OPRTYPE_CH, PRODUCT_ID, H1SD_BINDING_CH, H1SD_OFFER1, RA_CAMPAIGN_ID, H1SD_ORDTYPE, H1SD_DISCNT_CH, H1SD_PRICE2_NM, REQUEST_DT, H1SD_MSISDN_CH, H1SD_DONORNUM_CH, RBTACCTNO, H1SD_PYMTCODE_CH, EMAIL_ADDR, FIRST_NAME, LAST_NAME, DESCR, H1SD_COSTCODE_CH, H1SW_SALESIND_NAME, H1SD_SALESCHNL_CH, H1SD_SUBSCRTYP_CH) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: select orderstatu0_.EXTERNAL_ID as EXTERNAL1_1_0_, orderstatu0_.TRX_ID as TRX2_1_0_, orderstatu0_.H1SD_WEBORDRSTS_CH as H3_1_0_, orderstatu0_.H1SD_COUNTRY as H4_1_0_, orderstatu0_.H1SD_CUSTTYPE as H5_1_0_, orderstatu0_.H1SD_ORDTYPE as H6_1_0_, orderstatu0_.ERROR_CODE as ERROR7_1_0_, orderstatu0_.H1SD_ERROR_DESCR as H8_1_0_, orderstatu0_.ROW_ADDED_DTTM as ROW9_1_0_, orderstatu0_.ROW_ADDED_OPRID as ROW10_1_0_, orderstatu0_.ROW_LASTMANT_DTTM as ROW11_1_0_, orderstatu0_.ROW_LASTMANT_OPRID as ROW12_1_0_ from PSftadm.PS_H1SD_WEBORD_TBL orderstatu0_ where orderstatu0_.EXTERNAL_ID=?
Hibernate: update PSftadm.PS_H1SD_WEBORD_TBL set TRX_ID=?, H1SD_WEBORDRSTS_CH=?, H1SD_COUNTRY=?, H1SD_CUSTTYPE=?, H1SD_ORDTYPE=?, ERROR_CODE=?, H1SD_ERROR_DESCR=?, ROW_ADDED_DTTM=?, ROW_ADDED_OPRID=?, ROW_LASTMANT_DTTM=?, ROW_LASTMANT_OPRID=? where EXTERNAL_ID=?
u1562tzz: $ javaEngine.sh
Hibernate: select * from PSFTADM.PS_H1SD_WEBORD_TBL o where o.H1SD_WEBORDRSTS_CH = ? or o.H1SD_WEBORDRSTS_CH = ?
Hibernate: select orderstatu0_.EXTERNAL_ID as EXTERNAL1_1_0_, orderstatu0_.TRX_ID as TRX2_1_0_, orderstatu0_.H1SD_WEBORDRSTS_CH as H3_1_0_, orderstatu0_.H1SD_COUNTRY as H4_1_0_, orderstatu0_.H1SD_CUSTTYPE as H5_1_0_, orderstatu0_.H1SD_ORDTYPE as H6_1_0_, orderstatu0_.ERROR_CODE as ERROR7_1_0_, orderstatu0_.H1SD_ERROR_DESCR as H8_1_0_, orderstatu0_.ROW_ADDED_DTTM as ROW9_1_0_, orderstatu0_.ROW_ADDED_OPRID as ROW10_1_0_, orderstatu0_.ROW_LASTMANT_DTTM as ROW11_1_0_, orderstatu0_.ROW_LASTMANT_OPRID as ROW12_1_0_ from PSftadm.PS_H1SD_WEBORD_TBL orderstatu0_ where orderstatu0_.EXTERNAL_ID=?
Hibernate: update PSftadm.PS_H1SD_WEBORD_TBL set TRX_ID=?, H1SD_WEBORDRSTS_CH=?, H1SD_COUNTRY=?, H1SD_CUSTTYPE=?, H1SD_ORDTYPE=?, ERROR_CODE=?, H1SD_ERROR_DESCR=?, ROW_ADDED_DTTM=?, ROW_ADDED_OPRID=?, ROW_LASTMANT_DTTM=?, ROW_LASTMANT_OPRID=? where EXTERNAL_ID=?
Hibernate: select orderdao0_.EXTERNAL_ID as EXTERNAL1_0_0_, orderdao0_.H1SD_ORDERXML_L as H2_0_0_ from PSftadm.PS_H1SD_WEBXML_TBL orderdao0_ where orderdao0_.EXTERNAL_ID=?
PSProperties not loaded from file. Couldn't find file: pstools.properties
Hibernate: {call PSFTADM.xmlbatch_common.BATCH_PREPARE(?) }
Hibernate: {call PSFTADM.xmlbatch_common.BATCH_UPDATE(?,?) }
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUB (H1SD_XB_TRANS_ID, RBTACCTNO, SALES_USER_ID, H1SW_SALESIND_NAME, H1SD_OFFER1, H1SD_MSISDN_CH, H1UK_IMSI, UICCID, H1UK_PUK1A, H1SD_IMEI_CH, CAPTURE_ID, H1SD_MASTORDID_CH, H1SW_URL_CNTR, H1SD_PREPTYPE_CH, H1SD_ORDTYPE, H1SD_ORDACTION_CH, H1SD_EMAILTYPE_CH, EMAIL_ADDR, FIRST_NAME, LAST_NAME, H1SD_CALLDATA_CH, H1SD_DONORNUM_CH, H1SD_DONOROPR_CH, H1SD_DNRUICCID_CH, H1SD_PORTDATE_DT, H1SD_PORTHOUR_CH, H1SD_DEFFERED_CH, H1SD_DEV_PAY_CH, H1SD_START_PAY_CH, H1SD_LANG_CH, H1SD_ASYNC_CH, H1SD_PRINTCNTRCT, H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOC (H1SD_XB_TRANS_ID, CAPTURE_ID, H1SD_MASTORDID_CH, H1SD_SWITCHID_CH, H1SD_DOCTYPDESC_CH, H1SW_URL_CNTR, H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID) values (?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_UPDRES (H1SD_XB_TRANS_ID, H1SD_PAYMENT_ID, EXTERNAL_ID, H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID) values (?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_ERPORD (H1SD_XB_TRANS_ID, TAXPAYER_ID, H1SD_CUSTID_CH, H1SD_PRSNFLG_CH, BO_NAME, FIRST_NAME, LAST_NAME, H1SD_SITECODE_CH, ADDRESS1, ADDRESS2, ADDRESS3, ADDRESS4, POSTAL, CITY, COUNTRY, COUNTY, H1SD_MASTORDID_CH, URL, H1SD_ORDREF_CH, H1SD_SALESCHNL_CH, H1SD_ORDTYPE, H1SD_OPRTYPE_CH, H1SD_AUTHRET_CH, H1SD_PYMTCODE_CH, H1SD_CUSTPONM_CH, H1SD_RECCONFLG_CH, H1SD_CONFEMAIL_CH, H1SD_DELMETH_CH, H1SD_RETREASCD_CH, H1SD_RETPAIDBY_CH, H1SD_CUSTNT_CH, H1SD_HANDNT_CH, H1SD_ORDCRTBY_CH, H1SD_PAYTRXID_CH, H1SD_PARTDEL_CH, H1SD_ALLOWSTCK_CH, H1SD_DELCNTCT_CH, H1SD_DELCONT_CH, H1SD_DELPINCOD_CH, H1SD_DELPHONE_CH, H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_CRSUBP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, PRODUCT_ID) values (?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_GENDOCE (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTKEYNM_CH, H1SD_EXTKEYVAL_CH, H1SD_DATATYPE_CH, H1SD_EXTTYPNM_CH, DESCR) values (?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_UPDRESP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTITEM_ID, H1SD_ITEM_ID) values (?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_UPDRESP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, H1SD_EXTITEM_ID, H1SD_ITEM_ID) values (?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_ERPORDP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, CAPTURE_ID, H1SD_MASTORDID_CH, H1SD_OPRTYPE_CH, PRODUCT_ID, H1SD_BINDING_CH, H1SD_OFFER1, RA_CAMPAIGN_ID, H1SD_ORDTYPE, H1SD_DISCNT_CH, H1SD_PRICE2_NM, REQUEST_DT, H1SD_MSISDN_CH, H1SD_DONORNUM_CH, RBTACCTNO, H1SD_PYMTCODE_CH, EMAIL_ADDR, FIRST_NAME, LAST_NAME, DESCR, H1SD_COSTCODE_CH, H1SW_SALESIND_NAME, H1SD_SALESCHNL_CH, H1SD_SUBSCRTYP_CH) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into PSFTADM.PS_H1SD_XB_ERPORDP (H1SD_XB_BATCH_ID, H1SD_XB_TASK_ID, CAPTURE_ID, H1SD_MASTORDID_CH, H1SD_OPRTYPE_CH, PRODUCT_ID, H1SD_BINDING_CH, H1SD_OFFER1, RA_CAMPAIGN_ID, H1SD_ORDTYPE, H1SD_DISCNT_CH, H1SD_PRICE2_NM, REQUEST_DT, H1SD_MSISDN_CH, H1SD_DONORNUM_CH, RBTACCTNO, H1SD_PYMTCODE_CH, EMAIL_ADDR, FIRST_NAME, LAST_NAME, DESCR, H1SD_COSTCODE_CH, H1SW_SALESIND_NAME, H1SD_SALESCHNL_CH, H1SD_SUBSCRTYP_CH) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: select orderstatu0_.EXTERNAL_ID as EXTERNAL1_1_0_, orderstatu0_.TRX_ID as TRX2_1_0_, orderstatu0_.H1SD_WEBORDRSTS_CH as H3_1_0_, orderstatu0_.H1SD_COUNTRY as H4_1_0_, orderstatu0_.H1SD_CUSTTYPE as H5_1_0_, orderstatu0_.H1SD_ORDTYPE as H6_1_0_, orderstatu0_.ERROR_CODE as ERROR7_1_0_, orderstatu0_.H1SD_ERROR_DESCR as H8_1_0_, orderstatu0_.ROW_ADDED_DTTM as ROW9_1_0_, orderstatu0_.ROW_ADDED_OPRID as ROW10_1_0_, orderstatu0_.ROW_LASTMANT_DTTM as ROW11_1_0_, orderstatu0_.ROW_LASTMANT_OPRID as ROW12_1_0_ from PSftadm.PS_H1SD_WEBORD_TBL orderstatu0_ where orderstatu0_.EXTERNAL_ID=?
Hibernate: update PSftadm.PS_H1SD_WEBORD_TBL set TRX_ID=?, H1SD_WEBORDRSTS_CH=?, H1SD_COUNTRY=?, H1SD_CUSTTYPE=?, H1SD_ORDTYPE=?, ERROR_CODE=?, H1SD_ERROR_DESCR=?, ROW_ADDED_DTTM=?, ROW_ADDED_OPRID=?, ROW_LASTMANT_DTTM=?, ROW_LASTMANT_OPRID=? where EXTERNAL_ID=?s
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"saran"

Please provide your real first and real last names. Click on My profile link above and change your display name to meet the JavaRanch Naming Policy.

Thanks

Mark
 
Saravanan Subramani
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I modified first name and last name.
Thanks.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate is holding the changes in its cache, and not committing those changes to the database until the Session is closed or the transaction is committed. Since this is happening after the procedue, you see the procedure going first, and then the updates.

So, commit your changes earlier, and it should all work!

-Cameron McKenzie
 
Saravanan Subramani
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply.

You mean Once completed the insertion, commit the changes. then, again call the procedures with new transaction.

like this,

session = HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();
session.save();
session.save()
session.save()
session.getTransaction().commit();
HibernateUtil.getSessionFactory().close();

session = HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();

call the procedure();
call the procedure();

session.getTransaction().commit();
HibernateUtil.getSessionFactory().close();


Am i correct?

Thanks.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Saravanan.S",
Welcome to JavaRanch!

We're pleased to have you here with us here on the ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. Initials are OK for the first and middle names but not the last. You can change it here
[ July 25, 2008: Message edited by: Ben Souther ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic