Examples of createSession()


Examples of org.apache.qpid.client.AMQConnection.createSession()

    private static final Logger _logger = LoggerFactory.getLogger(StreamMessageTest.class);

    public void testStreamMessageEOF() throws Exception
    {
        AMQConnection con = (AMQConnection) getConnection("guest", "guest");
        AMQSession consumerSession = (AMQSession) con.createSession(false, Session.CLIENT_ACKNOWLEDGE);

        AMQHeadersExchange queue =
            new AMQHeadersExchange(new AMQBindingURL(
                    ExchangeDefaults.HEADERS_EXCHANGE_CLASS + "://" + ExchangeDefaults.HEADERS_EXCHANGE_NAME
                    + "/test/queue1?" + BindingURL.OPTION_ROUTING_KEY + "='F0000=1'"));
View Full Code Here

Examples of org.apache.qpid.nclient.Connection.createSession()

            System.out.print("Error connecting to broker");
            e.printStackTrace();
        }

        // Create session
        Session session = con.createSession(0);

        // Create an instance of the listener
        TopicPublisher publisher = new TopicPublisher();

        publisher.publishMessages(session, "usa.news");
View Full Code Here

Examples of org.apache.qpid.transport.Connection.createSession()

    private void declareQueue(String exch, String routkey, String qname) throws Exception
    {
        Connection conn = new Connection();
        conn.connect("localhost", QpidBrokerTestCase.DEFAULT_PORT, "test", "guest", "guest",false);
        Session sess = conn.createSession(0);
        sess.exchangeDeclare(exch, "direct", null, null);
        sess.queueDeclare(qname, null, null);
        sess.exchangeBind(qname, exch, routkey, null);
        sess.sync();
        conn.close();       
View Full Code Here

Examples of org.caffinitas.mapper.core.PersistenceManager.createSession()

            System.out.println("Wait until all schema objects are available...");
            System.out.println();
            persistenceManager.refreshSchema(); // This is necessary until schema changes are propagated from the Java Driver to Caffinitas Mappe automatically!
            schemaGenerator.forSchemaObjectsAvailable().awaitUninterruptibly();

            PersistenceSession session = persistenceManager.createSession();
            try
            {

                // create a user object and persist it
View Full Code Here

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

        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());
        producer = p.createProducer(session, destination);
        System.out.println("Created producer: " + producer);
View Full Code Here

Examples of org.eclipse.jetty.websocket.common.SessionFactory.createSession()

        WebSocketPolicy policy = websocket.getPolicy();

        WebSocketClientConnection connection = new WebSocketClientConnection(endp,executor,connectPromise,policy);

        SessionFactory sessionFactory = connectPromise.getClient().getSessionFactory();
        WebSocketSession session = sessionFactory.createSession(request.getRequestURI(),websocket,connection);
        session.setPolicy(policy);
        session.setUpgradeResponse(response);

        connection.setSession(session);
View Full Code Here

Examples of org.eclipse.m2e.core.embedder.IMaven.createSession()

    markerManager.deleteMarkers(pomResource, MavenWtpConstants.WTP_MARKER_GENERATE_APPLICATIONXML_ERROR);

    //Create a maven request + session
    IMaven maven = MavenPlugin.getMaven();
    MavenExecutionRequest request = projectManager.createExecutionRequest(pomResource, mavenFacade.getResolverConfiguration(), monitor);
    MavenSession session = maven.createSession(request, mavenProject);

    MavenExecutionPlan executionPlan = maven.calculateExecutionPlan(session, mavenProject, Collections.singletonList("ear:generate-application-xml"), true, monitor); //$NON-NLS-1$
    MojoExecution genConfigMojo = getExecution(executionPlan, "maven-ear-plugin", "generate-application-xml"); //$NON-NLS-1$ //$NON-NLS-2$
    if(genConfigMojo == null) {
      //TODO Better error management
View Full Code Here

Examples of org.hornetq.api.core.client.ClientSessionFactory.createSession()

      embeddedServerRunning = true;
    }

    TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getCanonicalName(), connectionParams);
    ClientSessionFactory factory = HornetQClient.createClientSessionFactory(transportConfiguration);
    session = factory.createSession();
    try {
      session.createQueue(SERVER_TASK_COMMANDS_QUEUE, SERVER_TASK_COMMANDS_QUEUE, true);
    }
    catch (HornetQException e) {
      if (e.getCode()!=HornetQException.QUEUE_EXISTS) {
View Full Code Here

Examples of org.hornetq.api.core.client.ClientSessionFactory.createSession()

      connectionParams.put(TransportConstants.PORT_PROP_NAME, port);
      connectionParams.put(TransportConstants.HOST_PROP_NAME, address);

      TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getCanonicalName(), connectionParams);
      ClientSessionFactory factory = HornetQClient.createClientSessionFactory(transportConfiguration);
      session = factory.createSession();
      producer = session.createProducer(HornetQTaskServer.SERVER_TASK_COMMANDS_QUEUE);

      createClientQueue();

      Thread responsesThread = new Thread(new Runnable() {
View Full Code Here

Examples of org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSession()

         ClientSessionFactoryImpl sf = (ClientSessionFactoryImpl) HornetQClient.createClientSessionFactory(new TransportConfiguration("org.hornetq.core.remoting.impl.invm.InVMConnectorFactory"));

         sf.setReconnectAttempts(-1);
         sf.setConfirmationWindowSize(1024 * 1024);

         ClientSession session = sf.createSession(false, false, false);

         Failer failer = startFailer(1000, session);

         do
         {
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.