Package xregistry

Examples of xregistry.XregistryException


      if (results.next()) {
        docToReturn = results.getString(returnedRow);
      }
      return docToReturn;
    } catch (SQLException e) {
      throw new XregistryException(e);
    } finally {
      try {
        results.close();
        statement.close();
        connection.setAutoCommit(true);
        globalContext.closeConnection(connection);
      } catch (SQLException e) {
        throw new XregistryException(e);
      }
    }
  }
View Full Code Here


                  }
                  list.add(returnValues);
              }
      return docToReturn;
    } catch (SQLException e) {
      throw new XregistryException(e);
    } finally {
         try {
               results.close();
             statement.close();
           connection.setAutoCommit(true);
                globalContext.closeConnection(connection);
         } catch (SQLException e) {
            throw new XregistryException(e);
         }
   
    }
  }
View Full Code Here

               
                // Add the group to memory model
                connection.commit();
            } catch (SQLException e) {
                connection.rollback();
                throw new XregistryException(e);
            } finally {
               try {
             statement.close();
             connection.setAutoCommit(true);
                    globalContext.closeConnection(connection);
           } catch (SQLException e) {
              throw new XregistryException(e);
           }
            }
        } catch (SQLException e) {
            throw new XregistryException(e);
        }

    }
View Full Code Here

                }
                list.add(returnValues);
            }
            return list;
        } catch (SQLException e) {
            throw new XregistryException(e);
        } finally {
            try {
        results.close();
        statement.close();
        globalContext.closeConnection(connection);
      } catch (SQLException e) {
         throw new XregistryException(e);
      }
        }
    }
View Full Code Here

        }
        list.add(returnValues);
      }
      return list;
    } catch (SQLException e) {
      throw new XregistryException(e);
    } finally {
       try {
          results.close();
          statement.close();
          globalContext.closeConnection(connection);
        } catch (SQLException e) {
           throw new XregistryException(e);
        }
    }
  }
View Full Code Here

            WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
            Definition definition = reader.readWSDL(null, new InputSource(new StringReader(
                    wsdlAsStr)));

            if (definition.getServices() == null) {
                throw new XregistryException(
                        "WSDL must be a concreate WSDL, it must have service defined");
            }
            Iterator it = definition.getServices().values().iterator();
            if (it.hasNext()) {
                Service service = (Service) it.next();
                QName wsdlQname = service.getQName();
                QName portTypeName;
                Iterator ports = service.getPorts().values().iterator();
                if (ports.hasNext()) {
                    Port port = (Port) ports.next();
                    portTypeName = port.getBinding().getPortType().getQName();
                } else {
                    throw new XregistryException(
                            "WSDL must be a concreate WSDL, it must have port defined");
                }
                String resourceID = ResourceUtils
                        .getResourceID(DocType.CWsdl,wsdlQname.toString());
                // INSERT INTO
                // cwsdl_table(resourceid,qname,wsdl_str,time_stamp,life_time,port_type_name)
                // VALUES (?, ?, ?, ?, ?, ?)
                //if CWSDL is alredy there, delete it
                removeResource(resourceID, DELETE_CWSDL_SQL, new String[]{wsdlQname.toString()});
                //Add CWSDL
                return registerResource(user, resourceID, ADD_CWSDL_SQL, new SqlParam[] {
                        new SqlParam(resourceID), new SqlParam(wsdlQname.toString()),
                        new SqlParam(wsdlAsStr),
                        new SqlParam(String.valueOf(System.currentTimeMillis()), SqlParmType.Long),
                        new SqlParam(String.valueOf(lifetimeAsSeconds*1000), SqlParmType.Int),
                        new SqlParam(portTypeName.toString()) });
            } else {
                throw new XregistryException(
                        "WSDL must be a concreate WSDL, it must have service defined");
            }
        } catch (WSDLException e) {
            throw new XregistryException(e);
        }
    }
View Full Code Here

            while (results.next()) {
                list.add(results.getString(HOST_NAME));
            }
            return Utils.toStrListToArray(list);
        } catch (SQLException e) {
            throw new XregistryException(e);
        } finally {
           try {
          results.close();
          statement.close();
          globalContext.closeConnection(connection);
        } catch (SQLException e) {
           throw new XregistryException(e);
        }
        }
    }
View Full Code Here

TOP

Related Classes of xregistry.XregistryException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.