/** * Starts (or restarts) a connection's delivery of incoming messages. A call * to <CODE>start</CODE> on a connection that has already been started is * ignored. * * @throws JMSException if the JMS provider fails to start message delivery * due to some internal error. * @see javax.jms.Connection#stop() */ @Override public void start() throws JMSException { checkClosedOrFailed(); ensureConnectionInfoSent(); if (started.compareAndSet(false, true)) { for (Iterator<ActiveMQSession> i = sessions.iterator(); i.hasNext();) { ActiveMQSession session = i.next(); session.start(); } } }
session.start();
/** * Construct the Session * * @param connection * @param sessionId * @param acknowledgeMode n.b if transacted - the acknowledgeMode == * Session.SESSION_TRANSACTED * @param asyncDispatch * @param sessionAsyncDispatch * @throws JMSException on internal error */ protected ActiveMQSession(ActiveMQConnection connection, SessionId sessionId, int acknowledgeMode, boolean asyncDispatch, boolean sessionAsyncDispatch) throws JMSException { this.debug = LOG.isDebugEnabled(); this.connection = connection; this.acknowledgementMode = acknowledgeMode; this.asyncDispatch = asyncDispatch; this.sessionAsyncDispatch = sessionAsyncDispatch; this.info = new SessionInfo(connection.getConnectionInfo(), sessionId.getValue()); setTransactionContext(new TransactionContext(connection)); stats = new JMSSessionStatsImpl(producers, consumers); this.connection.asyncSendPacket(info); setTransformer(connection.getTransformer()); setBlobTransferPolicy(connection.getBlobTransferPolicy()); this.connectionExecutor=connection.getExecutor(); this.executor = new ActiveMQSessionExecutor(this); connection.addSession(this); if (connection.isStarted()) { start(); } }
/** * Starts (or restarts) a connection's delivery of incoming messages. A call * to <CODE>start</CODE> on a connection that has already been started is * ignored. * * @throws JMSException if the JMS provider fails to start message delivery * due to some internal error. * @see javax.jms.Connection#stop() */ @Override public void start() throws JMSException { checkClosedOrFailed(); ensureConnectionInfoSent(); if (started.compareAndSet(false, true)) { for (Iterator<ActiveMQSession> i = sessions.iterator(); i.hasNext();) { ActiveMQSession session = i.next(); session.start(); } } }
/** * Starts (or restarts) a connection's delivery of incoming messages. A call * to <CODE>start</CODE> on a connection that has already been started is * ignored. * * @throws JMSException if the JMS provider fails to start message delivery * due to some internal error. * @see javax.jms.Connection#stop() */ @Override public void start() throws JMSException { checkClosedOrFailed(); ensureConnectionInfoSent(); if (started.compareAndSet(false, true)) { for (Iterator<ActiveMQSession> i = sessions.iterator(); i.hasNext();) { ActiveMQSession session = i.next(); session.start(); } } }
/** * Starts (or restarts) a connection's delivery of incoming messages. A call * to <CODE>start</CODE> on a connection that has already been started is * ignored. * * @throws JMSException if the JMS provider fails to start message delivery * due to some internal error. * @see javax.jms.Connection#stop() */ public void start() throws JMSException { checkClosedOrFailed(); ensureConnectionInfoSent(); if (started.compareAndSet(false, true)) { for (Iterator<ActiveMQSession> i = sessions.iterator(); i.hasNext();) { ActiveMQSession session = i.next(); session.start(); } } }
/** * Starts (or restarts) a connection's delivery of incoming messages. A call * to <CODE>start</CODE> on a connection that has already been started is * ignored. * * @throws JMSException if the JMS provider fails to start message delivery * due to some internal error. * @see javax.jms.Connection#stop() */ @Override public void start() throws JMSException { checkClosedOrFailed(); ensureConnectionInfoSent(); if (started.compareAndSet(false, true)) { for (Iterator<ActiveMQSession> i = sessions.iterator(); i.hasNext();) { ActiveMQSession session = i.next(); session.start(); } } }
session.start();
/** * Construct the Session * * @param connection * @param sessionId * @param acknowledgeMode n.b if transacted - the acknowledgeMode == * Session.SESSION_TRANSACTED * @param asyncDispatch * @param sessionAsyncDispatch * @throws JMSException on internal error */ protected ActiveMQSession(ActiveMQConnection connection, SessionId sessionId, int acknowledgeMode, boolean asyncDispatch, boolean sessionAsyncDispatch) throws JMSException { this.debug = LOG.isDebugEnabled(); this.connection = connection; this.acknowledgementMode = acknowledgeMode; this.asyncDispatch = asyncDispatch; this.sessionAsyncDispatch = sessionAsyncDispatch; this.info = new SessionInfo(connection.getConnectionInfo(), sessionId.getValue()); setTransactionContext(new TransactionContext(connection)); stats = new JMSSessionStatsImpl(producers, consumers); this.connection.asyncSendPacket(info); setTransformer(connection.getTransformer()); setBlobTransferPolicy(connection.getBlobTransferPolicy()); this.connectionExecutor=connection.getExecutor(); this.executor = new ActiveMQSessionExecutor(this); connection.addSession(this); if (connection.isStarted()) { start(); } }
/** * Construct the Session * * @param connection * @param sessionId * @param acknowledgeMode n.b if transacted - the acknowledgeMode == * Session.SESSION_TRANSACTED * @param asyncDispatch * @param sessionAsyncDispatch * @throws JMSException on internal error */ protected ActiveMQSession(ActiveMQConnection connection, SessionId sessionId, int acknowledgeMode, boolean asyncDispatch, boolean sessionAsyncDispatch) throws JMSException { this.debug = LOG.isDebugEnabled(); this.connection = connection; this.acknowledgementMode = acknowledgeMode; this.asyncDispatch = asyncDispatch; this.sessionAsyncDispatch = sessionAsyncDispatch; this.info = new SessionInfo(connection.getConnectionInfo(), sessionId.getValue()); setTransactionContext(new TransactionContext(connection)); stats = new JMSSessionStatsImpl(producers, consumers); this.connection.asyncSendPacket(info); setTransformer(connection.getTransformer()); setBlobTransferPolicy(connection.getBlobTransferPolicy()); this.connectionExecutor=connection.getExecutor(); this.executor = new ActiveMQSessionExecutor(this); connection.addSession(this); if (connection.isStarted()) { start(); } }
/** * Construct the Session * * @param connection * @param sessionId * @param acknowledgeMode n.b if transacted - the acknowledgeMode == * Session.SESSION_TRANSACTED * @param asyncDispatch * @param sessionAsyncDispatch * @throws JMSException on internal error */ protected ActiveMQSession(ActiveMQConnection connection, SessionId sessionId, int acknowledgeMode, boolean asyncDispatch, boolean sessionAsyncDispatch) throws JMSException { this.debug = LOG.isDebugEnabled(); this.connection = connection; this.acknowledgementMode = acknowledgeMode; this.asyncDispatch = asyncDispatch; this.sessionAsyncDispatch = sessionAsyncDispatch; this.info = new SessionInfo(connection.getConnectionInfo(), sessionId.getValue()); setTransactionContext(new TransactionContext(connection)); stats = new JMSSessionStatsImpl(producers, consumers); this.connection.asyncSendPacket(info); setTransformer(connection.getTransformer()); setBlobTransferPolicy(connection.getBlobTransferPolicy()); this.connectionExecutor=connection.getExecutor(); this.executor = new ActiveMQSessionExecutor(this); connection.addSession(this); if (connection.isStarted()) { start(); } }
connection.addSession(this); if (connection.isStarted()) { start();