Examples of createConnection()


Examples of org.codehaus.activemq.ActiveMQConnectionFactory.createConnection()

    }
       
    protected void createConnection() throws JMSException {
        String providerURL = getProviderURL();
        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, pwd, providerURL);
        connection = connectionFactory.createConnection();
    }
   
    protected void createSession() throws JMSException {
        session = connection.createSession(transacted, ackMode);
    }
View Full Code Here

Examples of org.codehaus.activemq.test.JmsResourceProvider.createConnection()

        JmsResourceProvider p = getJmsResourceProvider();
        // We will be using transacted sessions.
        p.setTransacted(true);

        connectionFactory = p.createConnectionFactory();
        connection = p.createConnection(connectionFactory);
        System.out.println("Created connection: " + connection);
        session = p.createSession(connection);
        System.out.println("Created session: " + session);
        Destination destination = p.createDestination(session, getSubject() + "." + getName());
        System.out.println("Created destination: " + destination + " of type: " + destination.getClass());
View Full Code Here

Examples of org.eobjects.analyzer.connection.JdbcDatastore.createConnection()

      @Override
      public void actionPerformed(ActionEvent event) {
        JdbcDatastore datastore = createDatastore();
        try {
          Connection connection = datastore.createConnection();
          connection.close();
          JOptionPane.showMessageDialog(JdbcDatastoreDialog.this, "Connection successful!");
        } catch (Throwable e) {
          WidgetUtils.showErrorMessage("Could not establish connection", e);
        }
View Full Code Here

Examples of org.exolab.castor.jdo.engine.DatabaseRegistry.createConnection()

        dr=DatabaseRegistry.getDatabaseRegistry(database.getDatabaseName());

        conn = (Connection) _separateConnections.get( dr );
        if ( conn == null ) {
            try {
                conn = dr.createConnection();
                conn.setAutoCommit( false );
                _separateConnections.put( dr, conn );
            } catch ( SQLException except ) {
                throw new PersistenceException( Messages.message("persist.cannotCreateSeparateConn"), except );
            }
View Full Code Here

Examples of org.exolab.jms.server.ServerConnectionFactory.createConnection()

        ServerConnectionFactory factory
                = getServerConnectionFactory(user, password);
        try {
            ServerConnection connection
                    = factory.createConnection(clientID, user, password);
            stub = new JmsConnectionStubImpl(connection, _orb, _serverURI,
                                             user, password);
        } finally {
            if (factory instanceof Proxy) {
                ((Proxy) factory).disposeProxy();
View Full Code Here

Examples of org.exolab.jms.server.net.RemoteJmsAdminServerIfc.createConnection()

        }

        RemoteJmsAdminServerIfc admin = null;
        try {
            admin = (RemoteJmsAdminServerIfc) registry.lookup("admin");
            _connection = admin.createConnection(username, password);
        } catch (NotBoundException exception) {
            throw new JMSException("Administration server is not bound in the registry for "
                    + "URL: " + url);
        } catch (RemoteException exception) {
            JMSException error = new JMSException("Failed to lookup OpenJMS administration server at URL: "
View Full Code Here

Examples of org.fusesource.stomp.jms.StompJmsConnectionFactory.createConnection()

            new Thread("JMS Client: "+client) {
                @Override
                public void run() {
                    while(tracker.attemptRetain()) {
                        try {
                            Connection connection = factory.createConnection();
                            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
                            MessageConsumer consumer = session.createConsumer(session.createTopic("FOO"));
                            MessageProducer producer = session.createProducer(session.createTopic("FOO"));
                            producer.send(session.createTextMessage("Hello"));
                            consumer.receive(1000);
View Full Code Here

Examples of org.fusesource.stompjms.StompJmsConnectionFactory.createConnection()

        }

        StompJmsConnectionFactory factory = new StompJmsConnectionFactory();
        factory.setBrokerURI("tcp://" + host + ":" + port);

        Connection connection = factory.createConnection(user, password);
        connection.start();
        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Destination dest = StompJmsDestination.createDestination(destination);
        MessageProducer producer = session.createProducer(dest);
        producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
View Full Code Here

Examples of org.gudy.azureus2.plugins.messaging.generic.GenericMessageRegistration.createConnection()

           
            System.out.println( "Test: initiating connection" );
           
            final AESemaphore  sem = new AESemaphore( "wait!" );
           
            GenericMessageConnection  con = reg.createConnection( endpoint );
           
            if ( use_sts ){
             
              con = sec_man.getSTSConnection(
                con, my_key,
View Full Code Here

Examples of org.h2.engine.Session.createConnection()

        if (triggerCallback != null) {
            return;
        }
        try {
            Session session = database.getSystemSession();
            Connection c2 = session.createConnection(false);
            Object obj = Utils.loadUserClass(triggerClassName).newInstance();
            triggerCallback = (Trigger) obj;
            triggerCallback.init(c2, getSchema().getName(), getName(), table.getName(), before, typeMask);
        } catch (Throwable e) {
            // try again later
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.