예제 #1
0
 /**
  * @param serviceKey String
  * @param runType int
  * @param paramObject JParamObject
  * @param dataObject Object
  * @param customObject Object
  * @param addinObject Object
  * @return JResponseObject
  * @throws Exception
  */
 public static JResponseObject runEnterpriseService(
     String serviceKey,
     int runType,
     JParamObject paramObject,
     Object dataObject,
     Object customObject,
     Object addinObject)
     throws Exception {
   if (serviceKey == null || serviceKey.trim().length() == 0) return null;
   //
   paramObject.SetValueByEnvName("ServiceKey", serviceKey);
   if (runType == 0x0001)
     //
     return (JResponseObject)
         EAI.DAL.IOM(
             "BZServiceComponentManager",
             "syncRunService",
             paramObject,
             dataObject,
             customObject,
             addinObject);
   if (runType == 0x0002)
     // �������ú�̨����
     return (JResponseObject)
         EAI.DAL.IOM(
             "BZServiceComponentManager",
             "asyncRunService",
             paramObject,
             dataObject,
             customObject,
             addinObject);
   return null;
 }
예제 #2
0
 /**
  * @param serviceKey String
  * @param paramObject JParamObject
  * @param dataObject Object
  * @param customObject Object
  * @param addinObject Object
  * @return JResponseObject
  * @throws Exception
  */
 public static JResponseObject runAyncService(
     String serviceKey,
     JParamObject paramObject,
     Object dataObject,
     Object customObject,
     Object addinObject)
     throws Exception {
   if (serviceKey == null || serviceKey.trim().length() == 0) return null;
   //
   paramObject.SetValueByEnvName("ServiceKey", serviceKey);
   return runEnterpriseService(
       serviceKey, 0x0002, paramObject, dataObject, customObject, addinObject);
 }
예제 #3
0
 /**
  * @param paramObject JParamObject
  * @return JConnection
  * @throws Exception
  */
 public JConnection getConnection(
     JParamObject paramObject, Object Data, Object CustomObject, Object AdditiveObject)
     throws Exception {
   JConnection conn = null;
   AccountStub accountStub = getAccountStub(paramObject);
   if (accountStub == null) return null;
   // 设置dbOwner
   paramObject.SetValueByEnvName("dbOwner", accountStub.getUserId());
   DataStorageStub dataStorageStub = getDataStorageStub(accountStub);
   if (dataStorageStub == null) return null;
   JDataSourceStub dataSourceStub = (JDataSourceStub) getDataSourceStub(dataStorageStub);
   conn = createConnection(dataSourceStub);
   return initConnection(conn, paramObject, dataSourceStub, accountStub, dataStorageStub);
 }