[jboss-cvs] JBoss Messaging SVN: r2399 - in trunk/src: main/org/jboss/jms/client/container and 5 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Feb 22 20:21:29 EST 2007
Author: ovidiu.feodorov at jboss.com
Date: 2007-02-22 20:21:29 -0500 (Thu, 22 Feb 2007)
New Revision: 2399
Modified:
trunk/src/etc/server/default/deploy/remoting-service.xml
trunk/src/main/org/jboss/jms/client/container/ProducerAspect.java
trunk/src/main/org/jboss/jms/client/container/StateCreationAspect.java
trunk/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java
trunk/src/main/org/jboss/jms/client/remoting/ClientSocketWrapper.java
trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java
trunk/src/main/org/jboss/jms/server/remoting/JMSWireFormat.java
trunk/src/main/org/jboss/messaging/core/local/PagingFilteredQueue.java
Log:
minor
Modified: trunk/src/etc/server/default/deploy/remoting-service.xml
===================================================================
--- trunk/src/etc/server/default/deploy/remoting-service.xml 2007-02-23 00:46:00 UTC (rev 2398)
+++ trunk/src/etc/server/default/deploy/remoting-service.xml 2007-02-23 01:21:29 UTC (rev 2399)
@@ -60,7 +60,6 @@
<attribute name="leasePeriod">20000</attribute>
<attribute name="callbackStore">org.jboss.remoting.callback.CallbackStore</attribute>
<attribute name="callbackPollPeriod" isParam="true">100</attribute>
- <attribute name="onewayThreadPool">org.jboss.jms.server.remoting.DirectThreadPool</attribute>
</invoker>
<handlers>
<handler subsystem="JMS">org.jboss.jms.server.remoting.JMSServerInvocationHandler</handler>
Modified: trunk/src/main/org/jboss/jms/client/container/ProducerAspect.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/container/ProducerAspect.java 2007-02-23 00:46:00 UTC (rev 2398)
+++ trunk/src/main/org/jboss/jms/client/container/ProducerAspect.java 2007-02-23 01:21:29 UTC (rev 2399)
@@ -46,10 +46,9 @@
import org.jboss.logging.Logger;
/**
+ * Handles sending of messages plus handles get and set methods for Producer returning state from
+ * local cache.
*
- * Handles sending of messages plus handles get and set methods for Producer -
- * returning state from local cache
- *
* This aspect is PER_VM.
*
* Remember! PER_INSTANCE aspects are very expensive so we avoid them.
@@ -61,25 +60,19 @@
*/
public class ProducerAspect
{
- // Constants -----------------------------------------------------
+ // Constants ------------------------------------------------------------------------------------
private static final Logger log = Logger.getLogger(ProducerAspect.class);
- // Attributes ----------------------------------------------------
+ // Attributes -----------------------------------------------------------------------------------
private boolean trace = log.isTraceEnabled();
- //protected ProducerState producerState;
+ // Static ---------------------------------------------------------------------------------------
- //protected ConnectionState connectionState;
+ // Constructors ---------------------------------------------------------------------------------
- //protected SessionState sessionState;
-
- // Static --------------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
+ // Public ---------------------------------------------------------------------------------------
public Object handleSend(Invocation invocation) throws Throwable
{
@@ -344,22 +337,20 @@
return null;
}
- // Class YYY overrides -------------------------------------------
+ // Class YYY overrides --------------------------------------------------------------------------
- // Protected -----------------------------------------------------
+ // Protected ------------------------------------------------------------------------------------
- // Package Private -----------------------------------------------
+ // Package Private ------------------------------------------------------------------------------
- // Private -------------------------------------------------------
+ // Private --------------------------------------------------------------------------------------
private ProducerState getProducerState(Invocation inv)
{
- ProducerState producerState = (ProducerState)((DelegateSupport)inv.getTargetObject()).getState();
-
- return producerState;
+ return (ProducerState)((DelegateSupport)inv.getTargetObject()).getState();
}
- // Inner Classes -------------------------------------------------
+ // Inner Classes --------------------------------------------------------------------------------
}
Modified: trunk/src/main/org/jboss/jms/client/container/StateCreationAspect.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/container/StateCreationAspect.java 2007-02-23 00:46:00 UTC (rev 2398)
+++ trunk/src/main/org/jboss/jms/client/container/StateCreationAspect.java 2007-02-23 01:21:29 UTC (rev 2399)
@@ -65,19 +65,19 @@
*/
public class StateCreationAspect
{
- // Constants -----------------------------------------------------
+ // Constants ------------------------------------------------------------------------------------
private static final Logger log = Logger.getLogger(StateCreationAspect.class);
- // Attributes ----------------------------------------------------
+ // Attributes -----------------------------------------------------------------------------------
private boolean trace = log.isTraceEnabled();
- // Static --------------------------------------------------------
+ // Static ---------------------------------------------------------------------------------------
- // Constructors --------------------------------------------------
+ // Constructors ---------------------------------------------------------------------------------
- // Public --------------------------------------------------------
+ // Public ---------------------------------------------------------------------------------------
public Object handleCreateConnectionDelegate(Invocation inv) throws Throwable
{
@@ -138,7 +138,8 @@
boolean xa = ((Boolean)mi.getArguments()[2]).booleanValue();
SessionState sessionState =
- new SessionState(connectionState, sessionDelegate, transacted, ackMode, xa, sessionDelegate.getDupsOKBatchSize());
+ new SessionState(connectionState, sessionDelegate, transacted,
+ ackMode, xa, sessionDelegate.getDupsOKBatchSize());
delegate.setState(sessionState);
return delegate;
@@ -217,17 +218,17 @@
return browserDelegate;
}
- // Protected ------------------------------------------------------
+ // Protected ------------------------------------------------------------------------------------
- // Package Private ------------------------------------------------
+ // Package Private ------------------------------------------------------------------------------
- // Private --------------------------------------------------------
+ // Private --------------------------------------------------------------------------------------
private HierarchicalState getState(Invocation inv)
{
return ((DelegateSupport)inv.getTargetObject()).getState();
}
- // Inner Classes --------------------------------------------------
+ // Inner Classes --------------------------------------------------------------------------------
}
Modified: trunk/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java 2007-02-23 00:46:00 UTC (rev 2398)
+++ trunk/src/main/org/jboss/jms/client/delegate/ClientSessionDelegate.java 2007-02-23 01:21:29 UTC (rev 2399)
@@ -65,7 +65,6 @@
import org.jboss.jms.wireformat.SessionRecoverDeliveriesRequest;
import org.jboss.jms.wireformat.SessionSendRequest;
import org.jboss.jms.wireformat.SessionUnsubscribeRequest;
-import org.jboss.logging.Logger;
/**
* The client-side Session delegate class.
@@ -84,9 +83,6 @@
private static final long serialVersionUID = -8096852898620279131L;
- private static final Logger log = Logger.getLogger(ClientSessionDelegate.class);
-
-
// Attributes -----------------------------------------------------------------------------------
private int dupsOKBatchSize;
@@ -389,7 +385,6 @@
/**
* This invocation should either be handled by the client-side interceptor chain or by the
* server-side endpoint.
- * @see org.jboss.jms.client.container.AsfAspect#handleSetMessageListener(org.jboss.aop.joinpoint.Invocation)
*/
public void setMessageListener(MessageListener listener) throws JMSException
{
@@ -496,7 +491,6 @@
return "SessionDelegate[" + id + "]";
}
-
// Protected ------------------------------------------------------------------------------------
// Package Private ------------------------------------------------------------------------------
Modified: trunk/src/main/org/jboss/jms/client/remoting/ClientSocketWrapper.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/remoting/ClientSocketWrapper.java 2007-02-23 00:46:00 UTC (rev 2398)
+++ trunk/src/main/org/jboss/jms/client/remoting/ClientSocketWrapper.java 2007-02-23 01:21:29 UTC (rev 2399)
@@ -124,9 +124,8 @@
protected DataInputStream createInputStream(Socket socket)
throws IOException
{
- //We make sure the buffer is big (default is 8192)- remember we flush after every request
- //or response so this is ok.
- //We want to avoid flushes at other times
+ // We make sure the buffer is big (default is 8192)- remember we flush after every request
+ // or response so this is ok. We want to avoid flushes at other times.
//TODO this could be made configurable
BufferedInputStream bin = new BufferedInputStream(socket.getInputStream(), 65536);
@@ -137,9 +136,8 @@
protected DataOutputStream createOutputStream(Socket socket)
throws IOException
{
- //We make sure the buffer is big (default is 8192)- remember we flush after every request
- //or response so this is ok.
- //We want to avoid flushes at other times
+ // We make sure the buffer is big (default is 8192)- remember we flush after every request
+ // or response so this is ok. We want to avoid flushes at other times.
//TODO this could be made configurable
BufferedOutputStream bout = new BufferedOutputStream(socket.getOutputStream(), 65536);
Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java 2007-02-23 00:46:00 UTC (rev 2398)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java 2007-02-23 01:21:29 UTC (rev 2399)
@@ -138,16 +138,15 @@
this.expiryQueue = expiryQueue;
- //Always start as false - wait for consumer to initiate
+ // Always start as false - wait for consumer to initiate.
this.clientAccepting = false;
this.startStopLock = new Object();
if (dest.isTopic() && !messageQueue.isRecoverable())
{
- //This is a consumer of a non durable topic subscription
- //We don't need to store deliveries since if the consumer is closed or
- //dies the refs go too
+ // This is a consumer of a non durable topic subscription. We don't need to store
+ // deliveries since if the consumer is closed or dies the refs go too.
this.storeDeliveries = false;
}
else
Modified: trunk/src/main/org/jboss/jms/server/remoting/JMSWireFormat.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/remoting/JMSWireFormat.java 2007-02-23 00:46:00 UTC (rev 2398)
+++ trunk/src/main/org/jboss/jms/server/remoting/JMSWireFormat.java 2007-02-23 01:21:29 UTC (rev 2399)
@@ -49,20 +49,15 @@
import org.jboss.remoting.marshal.UnMarshaller;
/**
+ * We do not use Java or JBoss serialization to send data over the wire. Serialization adds
+ * considerable overhead in terms of the amount of data sent (it adds class information plus block
+ * data information) which significantly degrades performance.
*
- * A JMSWireFormat.
+ * Instead we define a customer wire format that minimises the amount of data sent.
*
- * We do not use Java or JBoss serialization to send data over the wire.
- * Serialization adds considerable overhead in terms of the amount of data sent (it adds class information
- * plus block data information) which significantly degrades performance.
+ * The only exception to this rule is when sending an ObjectMessage which contains a user defined
+ * object whose type is only known at run-time. In this case we use serialization.
*
- * Instead we define a customer wire format that minimises the
- * amount of data sent.
- *
- * The only exception to this rule is when sending an ObjectMessage which contains a user
- * defined object whose type is only known at run-time. In this case we use serialization.
- *
- *
* @author <a href="tim.fox at jboss.com">Tim Fox</a>
* @author <a href="ovidiu at jboss.org">Ovidiu Feodorov</a>
* @version <tt>$Revision$</tt>
Modified: trunk/src/main/org/jboss/messaging/core/local/PagingFilteredQueue.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/local/PagingFilteredQueue.java 2007-02-23 00:46:00 UTC (rev 2398)
+++ trunk/src/main/org/jboss/messaging/core/local/PagingFilteredQueue.java 2007-02-23 01:21:29 UTC (rev 2399)
@@ -21,7 +21,6 @@
*/
package org.jboss.messaging.core.local;
-import org.jboss.logging.Logger;
import org.jboss.messaging.core.Delivery;
import org.jboss.messaging.core.DeliveryObserver;
import org.jboss.messaging.core.Filter;
@@ -50,16 +49,6 @@
{
// Constants -----------------------------------------------------
- private static final Logger log;
-
- private static final boolean trace;
-
- static
- {
- log = Logger.getLogger(PagingFilteredQueue.class);
- trace = log.isTraceEnabled();
- }
-
// Static --------------------------------------------------------
// Attributes ----------------------------------------------------
@@ -88,7 +77,8 @@
int maxSize, Filter filter,
int fullSize, int pageSize, int downCacheSize)
{
- super(id, ms, pm, acceptReliableMessages, recoverable, maxSize, fullSize, pageSize, downCacheSize);
+ super(id, ms, pm, acceptReliableMessages, recoverable,
+ maxSize, fullSize, pageSize, downCacheSize);
router = new RoundRobinPointToPointRouter();
@@ -125,9 +115,7 @@
}
else
{
- Delivery del = new SimpleDelivery(this, ref, true, false);
-
- return del;
+ return new SimpleDelivery(this, ref, true, false);
}
}
More information about the jboss-cvs-commits
mailing list