/** * @return connectionId for connection */ private ConnectionId getConnectionId() { return connection.getConnectionInfo().getConnectionId(); }
private void signalInterruptionProcessingComplete() { if (LOG.isDebugEnabled()) { LOG.debug("transportInterruptionProcessingComplete: " + transportInterruptionProcessingComplete.get() + " for:" + this.getConnectionInfo().getConnectionId()); } FailoverTransport failoverTransport = transport.narrow(FailoverTransport.class); if (failoverTransport != null) { failoverTransport.connectionInterruptProcessingComplete(this.getConnectionInfo().getConnectionId()); if (LOG.isDebugEnabled()) { LOG.debug("notified failover transport (" + failoverTransport + ") of interruption completion for: " + this.getConnectionInfo().getConnectionId()); } } transportInterruptionProcessingComplete.set(0); }
private void signalInterruptionProcessingNeeded() { FailoverTransport failoverTransport = transport.narrow(FailoverTransport.class); if (failoverTransport != null) { failoverTransport.getStateTracker().transportInterrupted(this.getConnectionInfo().getConnectionId()); if (LOG.isDebugEnabled()) { LOG.debug("notified failover transport (" + failoverTransport + ") of pending interruption processing for: " + this.getConnectionInfo().getConnectionId()); } } }
/** * Returns the SessionInfo bean. * * @return info - SessionInfo bean. * @throws JMSException */ protected SessionInfo getSessionInfo() throws JMSException { SessionInfo info = new SessionInfo(connection.getConnectionInfo(), getSessionId().getValue()); return info; }
/** * Unsubscribes a durable subscription that has been created by a client. * <P> * This method deletes the state being maintained on behalf of the * subscriber by its provider. * <P> * It is erroneous for a client to delete a durable subscription while there * is an active <CODE>MessageConsumer </CODE> or * <CODE>TopicSubscriber</CODE> for the subscription, or while a consumed * message is part of a pending transaction or has not been acknowledged in * the session. * * @param name the name used to identify this subscription * @throws JMSException if the session fails to unsubscribe to the durable * subscription due to some internal error. * @throws InvalidDestinationException if an invalid subscription name is * specified. * @since 1.1 */ public void unsubscribe(String name) throws InvalidDestinationException, JMSException { checkClosedOrFailed(); RemoveSubscriptionInfo rsi = new RemoveSubscriptionInfo(); rsi.setConnectionId(getConnectionInfo().getConnectionId()); rsi.setSubscriptionName(name); rsi.setClientId(getConnectionInfo().getClientId()); syncSendPacket(rsi); }
/** * 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(); } }
String connectionID = session.connection.getConnectionInfo().getConnectionId().getValue();
/** * @return connectionId for connection */ private ConnectionId getConnectionId() { return connection.getConnectionInfo().getConnectionId(); }
/** * @return connectionId for connection */ private ConnectionId getConnectionId() { return connection.getConnectionInfo().getConnectionId(); }
/** * @return connectionId for connection */ private ConnectionId getConnectionId() { return connection.getConnectionInfo().getConnectionId(); }
/** * @return connectionId for connection */ private ConnectionId getConnectionId() { return connection.getConnectionInfo().getConnectionId(); }
public TransactionContext(ActiveMQConnection connection) { this.connection = connection; this.localTransactionIdGenerator = connection.getLocalTransactionIdGenerator(); this.connectionId = connection.getConnectionInfo().getConnectionId(); }
private void signalInterruptionProcessingNeeded() { FailoverTransport failoverTransport = transport.narrow(FailoverTransport.class); if (failoverTransport != null) { failoverTransport.getStateTracker().transportInterrupted(this.getConnectionInfo().getConnectionId()); if (LOG.isDebugEnabled()) { LOG.debug("notified failover transport (" + failoverTransport + ") of pending interruption processing for: " + this.getConnectionInfo().getConnectionId()); } } }
@JmsListener(destination = "mytopic") public void processMessage(BytesMessage message) { ActiveMQBytesMessage msg = (ActiveMQBytesMessage) message; ActiveMQConnection conn = msg.getConnection(); ConnectionInfo info = conn.getConnectionInfo(); String username = info.getUserName(); }
private void signalInterruptionProcessingNeeded() { FailoverTransport failoverTransport = transport.narrow(FailoverTransport.class); if (failoverTransport != null) { failoverTransport.getStateTracker().transportInterrupted(this.getConnectionInfo().getConnectionId()); if (LOG.isDebugEnabled()) { LOG.debug("notified failover transport (" + failoverTransport + ") of pending interruption processing for: " + this.getConnectionInfo().getConnectionId()); } } }
private void signalInterruptionProcessingNeeded() { FailoverTransport failoverTransport = transport.narrow(FailoverTransport.class); if (failoverTransport != null) { failoverTransport.getStateTracker().transportInterrupted(this.getConnectionInfo().getConnectionId()); if (LOG.isDebugEnabled()) { LOG.debug("notified failover transport (" + failoverTransport + ") of pending interruption processing for: " + this.getConnectionInfo().getConnectionId()); } } }
/** * Returns the SessionInfo bean. * * @return info - SessionInfo bean. * @throws JMSException */ protected SessionInfo getSessionInfo() throws JMSException { SessionInfo info = new SessionInfo(connection.getConnectionInfo(), getSessionId().getValue()); return info; }
/** * Returns the SessionInfo bean. * * @return info - SessionInfo bean. * @throws JMSException */ protected SessionInfo getSessionInfo() throws JMSException { SessionInfo info = new SessionInfo(connection.getConnectionInfo(), getSessionId().getValue()); return info; }
/** * Returns the SessionInfo bean. * * @return info - SessionInfo bean. * @throws JMSException */ protected SessionInfo getSessionInfo() throws JMSException { SessionInfo info = new SessionInfo(connection.getConnectionInfo(), getSessionId().getValue()); return info; }
/** * Returns the SessionInfo bean. * * @return info - SessionInfo bean. * @throws JMSException */ protected SessionInfo getSessionInfo() throws JMSException { SessionInfo info = new SessionInfo(connection.getConnectionInfo(), getSessionId().getValue()); return info; }