Package javax.xml.registry

Examples of javax.xml.registry.Connection


   * @throws ServiceNotFoundException
   */
  public EPR findEPR(String category, String serviceName) throws RegistryException, ServiceNotFoundException
  {
        EPR epr = null ;
    Connection connection = JAXRConnectionSingleton.getConnection(jaxrConnectionFactory);
        try {
      final Concept jbossTModel = getJBossESBTModel(connection);

            Service service = findService(category, serviceName);
            if (service==null){
View Full Code Here


   */ 
    public static Organization findOrganization(String organizationName, JAXRConnectionFactory jaxrConnectionFactory) throws JAXRException {
      if (organizationName==null) {
        organizationName="";
      }
    Connection connection = JAXRConnectionSingleton.getConnection(jaxrConnectionFactory);
    try {
      // Get registry service and business query manager
      RegistryService rs = connection.getRegistryService();
      BusinessQueryManager bqm = rs.getBusinessQueryManager();
      // Define find qualifiers and name patterns
      Collection<String> findQualifiers = new ArrayList<String>();
      findQualifiers.add(FindQualifier.SORT_BY_NAME_ASC);
      Collection<String> namePatterns = new ArrayList<String>();
View Full Code Here

  protected Service findService(String category, String serviceName) throws JAXRException
  {
    if ((category==null) || (serviceName == null)) {
      return null ;
    }
    Connection connection = JAXRConnectionSingleton.getConnection(jaxrConnectionFactory);
    try {
      final Concept jbossTModel = getJBossESBTModel(connection);
      // Get registry service and business query manager
      RegistryService rs = connection.getRegistryService();
      BusinessQueryManager bqm = rs.getBusinessQueryManager();
            BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
            final ClassificationScheme cScheme = getClassificationScheme(bqm, blm) ;
            Collection<Classification> classifications = new ArrayList<Classification>();
            Classification classification =
View Full Code Here

  {
    Collection<Service> services = new ArrayList<Service>();
    if (category == null) {
      return services;
    }
    Connection connection = JAXRConnectionSingleton.getConnection(jaxrConnectionFactory);
    try {
      // Get registry service and business query manager
      RegistryService rs = connection.getRegistryService();
      BusinessQueryManager bqm = rs.getBusinessQueryManager();
            BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
            ClassificationScheme cScheme = getClassificationScheme(bqm, blm);
            //Create classification
            Classification classification =
View Full Code Here

   * @throws JAXRException
   */
    protected static Organization createJBossESBOrganization(JAXRConnectionFactory jaxrConnectionFactory) throws JAXRException
  {
//    Getting the connection to the Registry (reading config)
    Connection connection = JAXRConnectionSingleton.getConnection(jaxrConnectionFactory);
    try {
      //Logging in
      RegistryService rs = connection.getRegistryService();
      //Building organization
      BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
      Organization organization = blm.createOrganization(blm.createInternationalString("Red Hat/JBossESB"));
        organization.setDescription(blm.createInternationalString("Red Hat/JBoss Professional Open Source, Services for the JBossESB"));

View Full Code Here

   * @throws JAXRException For errors during querying/creating.
   */
  protected static void saveRegistryObject(RegistryObject registryObject, JAXRConnectionFactory jaxrConnectionFactory) throws JAXRException
  {
//    Getting the connection to the Registry (reading config)
    Connection connection = JAXRConnectionSingleton.getConnection(jaxrConnectionFactory);
    try {

      BulkResponse br = null;
      //Logging in
      RegistryService rs = connection.getRegistryService();
      //Building organization
      BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();

      final String interfaceName ;
      if (registryObject instanceof Organization) {
View Full Code Here

    if ((currentBindings != null) && (currentBindings.size() > 0)) {
      return currentBindings;
    }
   
    Collection<ServiceBinding> serviceBindings = new ArrayList<ServiceBinding>();
    Connection connection = JAXRConnectionSingleton.getConnection(jaxrConnectionFactory);
    try {
      final Concept jbossTModel = getJBossESBTModel(connection);
      RegistryService rs = connection.getRegistryService();
      BusinessQueryManager bqm = rs.getBusinessQueryManager();
      BusinessLifeCycleManager blm = rs.getBusinessLifeCycleManager();
      Collection<String> findQualifiers = null;
      //Collection<String> findQualifiers = new ArrayList<String>();
      //findQualifiers.add(FindQualifier.SORT_BY_DATE_ASC);
View Full Code Here

    }
   
    if (cachedConnectionHash.containsKey(factory)) {
      Stack stack = (Stack) cachedConnectionHash.get(factory);
      try {
        Connection connection = null;
        if (stack.isEmpty()) {
          connection = factory.getConnection();
          return connection;
        } else {
          connection = (Connection) stack.pop();
          if ((connection != null) && (!connection.isClosed())) {
            return connection;
          } else {
            logger.error("Cached connection was null or closed, creating new connection");
            connection = factory.getConnection();
            return connection;
          }
        }
      } catch (JAXRException jaxre) {
        return null;
      }
    } else {
      Stack stack = new Stack();
      cachedConnectionHash.put(factory, stack);
      Connection connection = factory.getConnection();
      return connection;
    }   
  }
View Full Code Here

        try
        {
            login();
            getJAXREssentials();
            // second user.
            Connection con2 = loginSecondUser();
            RegistryService rs2 = con2.getRegistryService();
            blm2 = rs2.getBusinessLifeCycleManager();
            bqm2 = rs2.getBusinessQueryManager();
            String orgTarget = "Target Organization";
            String orgSource = "Source Organization";
View Full Code Here

        {
            login();
            getJAXREssentials();

            // second user.
            Connection con2 = loginSecondUser();
            RegistryService rs2 = con2.getRegistryService();
            blm2 = rs2.getBusinessLifeCycleManager();
            bqm2 = rs2.getBusinessQueryManager();

            Organization target = blm2.createOrganization(blm.createInternationalString(orgTarget));
            Organization source = blm.createOrganization(blm.createInternationalString(orgSource));
View Full Code Here

TOP

Related Classes of javax.xml.registry.Connection

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.