Examples of closeConnection()


Examples of org.apache.qpid.management.common.mbeans.ManagedConnection.closeConnection()

        // Get a managedConnection
        ManagedConnection mangedConnection = _jmxUtils.getManagedObject(ManagedConnection.class, "org.apache.qpid:type=VirtualHost.Connection,*");

        //Close the connection
        mangedConnection.closeConnection();

        //Wait for the connection to close
        assertTrue("Timed out waiting for conneciton to report close",
                   exceptionReceived.await(2, TimeUnit.SECONDS));

View Full Code Here

Examples of org.apache.qpid.server.protocol.AMQProtocolSession.closeConnection()

    {
        while (!_registry.isEmpty())
        {
            AMQProtocolSession connection = _registry.get(0);

            connection.closeConnection(0, new AMQConnectionException(AMQConstant.INTERNAL_ERROR, "Broker is shutting down",
                                                                  0, 0,
                                                                  connection.getProtocolOutputConverter().getProtocolMajorVersion(),
                                                                  connection.getProtocolOutputConverter().getProtocolMinorVersion(),
                                                                  (Throwable) null), true);
        }
View Full Code Here

Examples of org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory.closeConnection()

        Session session = rf.getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
        MessageProducer p = session.createProducer(rf.lookupDestination(destName));
        rf.getConnection().start();
        session.run();
        p.send(session.createTextMessage(payload));
        rf.closeConnection();
    }

    protected static void sendObjectMessage(String destName, Object payload) throws JMSException, NamingException {
        JMSResourceFactory rf = new JMSResourceFactoryImpl(null, null, null, "tcp://localhost:61623");
        Session session = rf.getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
View Full Code Here

Examples of org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactoryImpl.closeConnection()

        Session session = rf.getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
        MessageProducer p = session.createProducer(rf.lookupDestination(destName));
        rf.getConnection().start();
        session.run();
        p.send(session.createTextMessage(payload));
        rf.closeConnection();
    }

    protected static void sendObjectMessage(String destName, Object payload) throws JMSException, NamingException {
        JMSResourceFactory rf = new JMSResourceFactoryImpl(null, null, null, "tcp://localhost:61623");
        Session session = rf.getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
View Full Code Here

Examples of org.cspoker.server.xml.sockets.ClientContext.closeConnection()

      if (numBytesRead == -1) {
        // No more bytes can be read from the channel
        logger.debug("channel has reached end-of-stream");
        ClientContext context = getContext(key, client);
        context.closeConnection();
      } else {
        logger.trace("Reading " + numBytesRead + " bytes from socket");
        // To read the bytes, flip the buffer
        buffer.flip();
        ClientContext context = getContext(key, client);
View Full Code Here

Examples of org.cspoker.server.xml.sockets.ClientContext.closeConnection()

        }
      }
    } catch (IOException e) {
      logger.debug("Exception reading from socket, closing socket: "+e.getMessage());
      ClientContext context = getContext(key, client);
      context.closeConnection();
      // Rethrow exception as declared
      throw (e);
    }

  }
View Full Code Here

Examples of org.hibernate.connection.ConnectionProvider.closeConnection()

            }
          }

        }
        finally {
          connections.closeConnection(conn);
        }
      }
      catch (SQLException sqle) {
        log.warn("Could not obtain connection metadata", sqle);
      }
View Full Code Here

Examples of org.hibernate.connection.ConnectionProvider.closeConnection()

        }
        catch ( SQLException sqle ) {
          log.warn( "Could not obtain connection metadata", sqle );
        }
        finally {
          connections.closeConnection( conn );
        }
      }
      catch ( SQLException sqle ) {
        log.warn( "Could not obtain connection to query metadata", sqle );
        dialect = DialectFactory.buildDialect( props );
View Full Code Here

Examples of org.hibernate.connection.ConnectionProvider.closeConnection()

        }
        catch ( SQLException sqle ) {
          log.warn( "Could not obtain connection metadata", sqle );
        }
        finally {
          connections.closeConnection( conn );
        }
      }
      catch ( SQLException sqle ) {
        log.warn( "Could not obtain connection to query metadata", sqle );
        dialect = DialectFactory.buildDialect( props );
View Full Code Here

Examples of org.hibernate.connection.ConnectionProvider.closeConnection()

        }
        catch ( SQLException sqle ) {
          log.warn( "Could not obtain connection metadata", sqle );
        }
        finally {
          connections.closeConnection( conn );
        }
      }
      catch ( SQLException sqle ) {
        log.warn( "Could not obtain connection to query metadata", sqle );
        dialect = DialectFactory.buildDialect( props );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.