You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ar...@apache.org on 2007/09/17 14:22:08 UTC
svn commit: r576396 - in
/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client:
AMQConnectionDelegate_0_10.java AMQSession_0_10.java
Author: arnaudsimon
Date: Mon Sep 17 05:22:08 2007
New Revision: 576396
URL: http://svn.apache.org/viewvc?rev=576396&view=rev
Log:
changed qpid session propagation
Modified:
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java?rev=576396&r1=576395&r2=576396&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java (original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java Mon Sep 17 05:22:08 2007
@@ -47,12 +47,10 @@
{
_conn.checkNotClosed();
int channelId = _conn._idFactory.incrementAndGet();
- AMQSession session =
- new AMQSession_0_10(_conn, channelId, transacted, acknowledgeMode, prefetchHigh, prefetchLow);
+ AMQSession session;
try
- {
- // create the qpid session with an expiry <= 0 so that the session does not expire
- _qpidConnection.createSession(0);
+ {
+ session = new AMQSession_0_10(_qpidConnection, _conn, channelId, transacted, acknowledgeMode, prefetchHigh, prefetchLow);
_conn.registerSession(channelId, session);
if (_conn._started)
{
@@ -98,8 +96,8 @@
*/
public void resubscribeSessions() throws JMSException, AMQException, FailoverException
{
- //NOT implemented as railover is handled at a lower level
- throw new FailoverException("failing to reconnect during failover, operation not supported.");
+ //NOT implemented as railover is handled at a lower level
+ throw new FailoverException("failing to reconnect during failover, operation not supported.");
}
}
Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java?rev=576396&r1=576395&r2=576396&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java (original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java Mon Sep 17 05:22:08 2007
@@ -80,7 +80,7 @@
* @param defaultPrefetchHighMark The maximum number of messages to prefetched before suspending the session.
* @param defaultPrefetchLowMark The number of prefetched messages at which to resume the session.
*/
- AMQSession_0_10(AMQConnection con, int channelId, boolean transacted, int acknowledgeMode,
+ AMQSession_0_10( org.apache.qpidity.client.Connection qpidConnection, AMQConnection con, int channelId, boolean transacted, int acknowledgeMode,
MessageFactoryRegistry messageFactoryRegistry, int defaultPrefetchHighMark,
int defaultPrefetchLowMark)
{
@@ -88,7 +88,7 @@
super(con, channelId, transacted, acknowledgeMode, messageFactoryRegistry, defaultPrefetchHighMark,
defaultPrefetchLowMark);
// create the qpid session with an expiry <= 0 so that the session does not expire
- _qpidSession = null; // todo when the connection is finalized _connection.getQpidConnection().createSession(0);
+ _qpidSession = qpidConnection.createSession(0);
// set the exception listnere for this session
_qpidSession.setExceptionListener(new QpidSessionExceptionListener());
// set transacted if required
@@ -108,11 +108,11 @@
* @param defaultPrefetchHigh The maximum number of messages to prefetched before suspending the session.
* @param defaultPrefetchLow The number of prefetched messages at which to resume the session.
*/
- AMQSession_0_10(AMQConnection con, int channelId, boolean transacted, int acknowledgeMode, int defaultPrefetchHigh,
+ AMQSession_0_10(org.apache.qpidity.client.Connection qpidConnection, AMQConnection con, int channelId, boolean transacted, int acknowledgeMode, int defaultPrefetchHigh,
int defaultPrefetchLow)
{
- this(con, channelId, transacted, acknowledgeMode, MessageFactoryRegistry.newDefaultRegistry(),
+ this(qpidConnection, con, channelId, transacted, acknowledgeMode, MessageFactoryRegistry.newDefaultRegistry(),
defaultPrefetchHigh, defaultPrefetchLow);
}