You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2006/12/21 23:22:13 UTC

svn commit: r489477 [2/2] - in /incubator/qpid/branches/new_persistence/java: broker/src/main/java/org/apache/qpid/server/ broker/src/main/java/org/apache/qpid/server/exchange/ broker/src/main/java/org/apache/qpid/server/handler/ broker/src/main/java/o...

Modified: incubator/qpid/branches/new_persistence/java/common/src/test/java/org/apache/qpid/framing/JMSPropertyFieldTableTest.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/new_persistence/java/common/src/test/java/org/apache/qpid/framing/JMSPropertyFieldTableTest.java?view=diff&rev=489477&r1=489476&r2=489477
==============================================================================
--- incubator/qpid/branches/new_persistence/java/common/src/test/java/org/apache/qpid/framing/JMSPropertyFieldTableTest.java (original)
+++ incubator/qpid/branches/new_persistence/java/common/src/test/java/org/apache/qpid/framing/JMSPropertyFieldTableTest.java Thu Dec 21 14:22:09 2006
@@ -24,11 +24,7 @@
 import junit.framework.TestCase;
 
 import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.HashMap;
 
-import org.apache.mina.common.ByteBuffer;
 import org.apache.log4j.Logger;
 
 import javax.jms.JMSException;

Modified: incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java?view=diff&rev=489477&r1=489476&r2=489477
==============================================================================
--- incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java (original)
+++ incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java Thu Dec 21 14:22:09 2006
@@ -36,11 +36,12 @@
     public final static String MBEAN      = "mbean";
     public final static String ATTRIBUTES = "Attributes";
     public final static String NOTIFICATION = "Notifications";
+    public final static String RESULT = "Result";
     
     public final static String ALL = "All";
     
     public final static String NAVIGATION_ROOT = "Qpid Connections";
-    public final static String DESCRIPTION = " Description : ";
+    public final static String DESCRIPTION = " Description";
     
     public final static String BROKER_MANAGER = "Broker_Manager";
     public final static String QUEUE  = "Queue";
@@ -76,6 +77,8 @@
     public final static String BUTTON_CLEAR = "Clear";
     public final static String BUTTON_CONNECT = "Connect";
     public final static String BUTTON_CANCEL = "Cancel";
+    public final static String BUTTON_UPDATE = "Update";
+    
     
     public final static int OPERATION_IMPACT_INFO    = 0;
     public final static int OPERATION_IMPACT_ACTION  = 1;

Modified: incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/AttributesTabControl.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/AttributesTabControl.java?view=diff&rev=489477&r1=489476&r2=489477
==============================================================================
--- incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/AttributesTabControl.java (original)
+++ incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/AttributesTabControl.java Thu Dec 21 14:22:09 2006
@@ -39,6 +39,7 @@
 import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerSorter;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.DisposeEvent;
 import org.eclipse.swt.events.DisposeListener;
@@ -80,6 +81,10 @@
 import org.eclipse.ui.forms.widgets.FormToolkit;
 
 
+/**
+ * Creates controller composite for the attribute's tab. 
+ * @author Bhupendra Bhardwaj
+ */
 public class AttributesTabControl extends TabControl
 {    
     private FormToolkit  _toolkit;
@@ -87,10 +92,11 @@
     private Table _table = null;
     private TableViewer _tableViewer = null;
     private static final int[] tableWidths = new int[] {300, 300};
-    private static final String DESCRIPTION = "Description";
-    private static final String UPDATE_BUTTON = "Update";
     private final String[] _tableTitles = {"Attribute Name", "Value"};
     
+    private Composite _tableComposite = null;
+    private Composite _buttonsComposite = null;
+    
     private DisposeListener tableDisposeListener = new DisposeListenerImpl();
     final Image image;
     private Button _detailsButton  = null;
@@ -107,8 +113,6 @@
     private int startX = 80;
     private int startY = 60;
     
-    static int number = 0;
-    
     public AttributesTabControl(TabFolder tabFolder)
     {
         super(tabFolder);
@@ -118,16 +122,28 @@
         gridLayout.marginWidth = 0;
         gridLayout.marginHeight = 0;       
         _form.getBody().setLayout(gridLayout);
+        _tableComposite = _toolkit.createComposite(_form.getBody());
+        _tableComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+        _tableComposite.setLayout(new GridLayout());
+        _buttonsComposite = _toolkit.createComposite(_form.getBody());
+        _tableComposite.setLayoutData(new GridData());
+        _buttonsComposite.setLayout(new GridLayout());
         
         image = Display.getCurrent().getSystemImage(SWT.ICON_INFORMATION);
         createWidgets();         
     }
     
+    /**
+     * @see TabControl#getControl()
+     */
     public Control getControl()
     {
         return _form;
     }
     
+    /**
+     * Creates required widgets for Attribute's tab
+     */
     protected void createWidgets()
     {
         createTable();
@@ -136,10 +152,13 @@
         addTableListeners();        
     }
     
+    /**
+     * Creates table for listing the MBean attributes
+     */
     private void createTable()
-    {
-        _table = _toolkit.createTable(_form.getBody(),  SWT.FULL_SELECTION);        
-        GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false, 1, 6);
+    {  
+        _table = _toolkit.createTable(_tableComposite,  SWT.FULL_SELECTION); 
+        GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
         _table.setLayoutData(gridData);
         
         for (int i = 0; i < _tableTitles.length; ++i)
@@ -154,35 +173,18 @@
         _table.setHeaderVisible (true);
     }
     
+    /**
+     * Creates tableviewer for the attribute's table
+     *
+     */
     private void createTableViewer()
     {
         _tableViewer = new TableViewer(_table);
         _tableViewer.setUseHashlookup(true);
-        //_tableViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 6));
-        
-        // Set the column properties that will be used in callbacks to recognize
-        // the column on which we will want to operate
         _tableViewer.setColumnProperties(_tableTitles);
-        /*
-        // Create the cell editors
-        CellEditor[] cellEditors = new CellEditor[_tableTitles.length];
-        
-        
-        TextCellEditor textEditor = new TextCellEditor(_table);
-        cellEditors[0] = textEditor;
-        textEditor = new TextCellEditor(_table);
-        cellEditors[1] = textEditor;
-        
-        // Assign the cell editors to the viewer 
-        _tableViewer.setCellEditors(cellEditors);
-        _tableViewer.setCellModifier(new TableCellModifier());
-        */
-        
-        
-        
         _tableViewer.setContentProvider(new ContentProviderImpl());
         _tableViewer.setLabelProvider(new LabelProviderImpl());
-        
+        _tableViewer.setSorter(new ViewerSorterImpl());
     }
     
     private void createButtons()
@@ -192,17 +194,13 @@
         addGraphButton();
         addRefreshButton();
     }
-    
-    
+      
     private void addDetailsButton()
     {
         // Create and configure the button for attribute details
-        _detailsButton = _toolkit.createButton(_form.getBody(), 
-                                               Constants.BUTTON_DETAILS,
-                                               SWT.PUSH | SWT.CENTER);
-        
+        _detailsButton = _toolkit.createButton(_buttonsComposite, Constants.BUTTON_DETAILS, SWT.PUSH | SWT.CENTER);
         _detailsButton.setFont(ApplicationRegistry.getFont(Constants.FONT_BUTTON));
-        GridData gridData = new GridData(SWT.BEGINNING, SWT.TOP, true, false);
+        GridData gridData = new GridData(SWT.FILL, SWT.TOP, true, false);
         gridData.widthHint = 80;
         _detailsButton.setLayoutData(gridData);
         _detailsButton.addSelectionListener(new SelectionAdapter()
@@ -219,14 +217,15 @@
             });
     }
     
+    /**
+     * Creates the button for editing attributes.
+     */
     private void addEditButton()
     {
         // Create and configure the button for editing attribute
-        _editButton = _toolkit.createButton(_form.getBody(), 
-                                               Constants.BUTTON_EDIT_ATTRIBUTE,
-                                               SWT.PUSH | SWT.CENTER);
+        _editButton = _toolkit.createButton(_buttonsComposite, Constants.BUTTON_EDIT_ATTRIBUTE, SWT.PUSH | SWT.CENTER);
         _editButton.setFont(ApplicationRegistry.getFont(Constants.FONT_BUTTON));
-        GridData gridData = new GridData(SWT.BEGINNING, SWT.TOP, true, false);
+        GridData gridData = new GridData(SWT.FILL, SWT.TOP, true, false);
         gridData.widthHint = 80;
         _editButton.setLayoutData(gridData);
         _editButton.addSelectionListener(new SelectionAdapter()
@@ -241,13 +240,14 @@
             });
     }
     
+    /**
+     * Creates the button for viewing Graphs
+     */ 
     private void addGraphButton()
     {
-        _graphButton = _toolkit.createButton(_form.getBody(), 
-                                               Constants.BUTTON_GRAPH,
-                                               SWT.PUSH | SWT.CENTER);
+        _graphButton = _toolkit.createButton(_buttonsComposite, Constants.BUTTON_GRAPH, SWT.PUSH | SWT.CENTER);
         _graphButton.setFont(ApplicationRegistry.getFont(Constants.FONT_BUTTON));
-        GridData gridData = new GridData(SWT.BEGINNING, SWT.TOP, true, false);
+        GridData gridData = new GridData(SWT.FILL, SWT.TOP, true, false);
         gridData.widthHint = 80;
         _graphButton.setLayoutData(gridData);
         _graphButton.addSelectionListener(new SelectionAdapter()
@@ -262,15 +262,15 @@
             });
     }
     
+    /**
+     * Creates the "Refresh" button
+     */
     private void addRefreshButton()
     {    
-        // Create and configure the "Refresh" button
-        _refreshButton = _toolkit.createButton(_form.getBody(),
-                                               Constants.BUTTON_REFRESH,
-                                               SWT.PUSH | SWT.CENTER);
+        _refreshButton = _toolkit.createButton(_buttonsComposite, Constants.BUTTON_REFRESH, SWT.PUSH | SWT.CENTER);
 
         _refreshButton.setFont(ApplicationRegistry.getFont(Constants.FONT_BUTTON));
-        GridData gridData = new GridData(SWT.BEGINNING, SWT.TOP, true, false);
+        GridData gridData = new GridData(SWT.FILL, SWT.TOP, true, false);
         gridData.widthHint = 80;
         _refreshButton.setLayoutData(gridData);
         _refreshButton.addSelectionListener(new SelectionAdapter()
@@ -314,25 +314,14 @@
             {    
                 event.height = event.gc.getFontMetrics().getHeight()  * 3/2;
             }  
-        });  
-        
-        // Below to be worked on to set an image in front of each row.
-        /*
-        _table.addListener(SWT.PaintItem, new Listener() {  
-            public void handleEvent(Event event)
-            {    
-                int x = event.x + event.width;
-                Rectangle rect = image.getBounds();
-                int offset = Math.max(0, (event.height - rect.height) / 2);
-                event.gc.drawImage(image, event.x, event.y + offset);
-            }  
-        });
-        */ 
+        }); 
     }
     
-    private class MouseListenerImpl implements MouseTrackListener, MouseMoveListener,
-                                               KeyListener, MouseListener
-                                               
+    /**
+     * Listeners implementation class for showing table tooltip
+     * @author Bhupendra Bhardwaj
+     */
+    private class MouseListenerImpl implements MouseTrackListener, MouseMoveListener, KeyListener, MouseListener                                              
     {
         Shell tooltipShell = null;
         Label tooltipLabel = null;
@@ -425,6 +414,10 @@
         }
     } // end of MouseListenerImpl
     
+    /**
+     * Creates pop-up window for showing attribute details
+     * @param data - Selectes attribute
+     */
     public void createDetailsPopup(AttributeData data)
     {
         int width = 500;
@@ -448,6 +441,9 @@
         shell.dispose();
     }
     
+    /**
+     * Listener class for table tooltip label
+     */
     final Listener tooltipLabelListener = new Listener ()
     {
         public void handleEvent (Event event)
@@ -471,6 +467,11 @@
     };
     
     
+    /**
+     * Create the contents for the attribute details window pop-up
+     * @param shell - The shell that will be filled with details.
+     * @param attribute - Selected attribute
+     */
     private void createDetailsPopupContents(Composite shell, AttributeData attribute)
     {
         GridLayout layout = new GridLayout(2, false);
@@ -495,7 +496,7 @@
         
         // Description
         label = new Label(parent, SWT.NONE);
-        label.setText(DESCRIPTION);
+        label.setText(Constants.DESCRIPTION);
         label.setLayoutData(new GridData(SWT.TRAIL, SWT.TOP, false, false));
         value = new Text(parent, SWT.BEGINNING | SWT.BORDER | SWT.READ_ONLY);
         value.setText(attribute.getDescription());
@@ -576,13 +577,16 @@
         }
     }
     
+    /**
+     * Create the button for updating attributes.  This should be enabled for writable attribute
+     */
     private Button addUpdateButton(Composite parent)
     {
         final Button updateButton = new Button(parent, SWT.PUSH | SWT.CENTER);
         // set the data to access in the listener
-        parent.setData(UPDATE_BUTTON, updateButton);
+        parent.setData(Constants.BUTTON_UPDATE, updateButton);
         
-        updateButton.setText(UPDATE_BUTTON);
+        updateButton.setText(Constants.BUTTON_UPDATE);
         GridData gridData = new GridData (SWT.CENTER, SWT.BOTTOM, true, true, 2, 1);
         gridData.widthHint = 100;
         updateButton.setLayoutData(gridData);
@@ -617,7 +621,9 @@
         _tableViewer.setInput(attributesList);
     }
     
-    // Refreshes the attribute tab by querying the mbean server for latest values
+    /**
+     * Refreshes the attribute tab by querying the mbean server for latest values
+     */ 
     @Override
     public void refresh(ManagedBean mbean) 
     {
@@ -637,18 +643,23 @@
             MBeanUtility.handleException(_mbean, ex);
         }
         _tableViewer.setInput(attributesList);
-        _table.setItemCount(attributesList.getCount());
-       
-        // No attribtue selected when refreshing the tab
-        checkForEnablingButtons(null);
+        checkForEnablingButtons(getSelectionAttribute());
         _form.layout();
     }
     
+    /**
+     * @see TabControl#setFocus()
+     */
     public void setFocus()
     {
         _table.setFocus();
     }
     
+    /**
+     * Checks which buttons are to be enabled or disabled. The graph button will be enabled only
+     * for readable number attributes.  Editing is enabled for writeable attribtues.
+     * @param attribute
+     */
     private void checkForEnablingButtons(AttributeData attribute)
     {
         if (attribute == null)
@@ -681,6 +692,10 @@
         }
     }
     
+    /**
+     * Creates graph in a pop-up window for given attribute.
+     * @param data
+     */
     private void createGraph(final AttributeData data)
     {       
         Display display = Display.getCurrent();        
@@ -769,8 +784,10 @@
         // Launch the timer
         display.timerExec(Constants.TIMER_INTERVAL, runnable);
         
-        while (!shell.isDisposed()) {
-            if (!display.readAndDispatch()) {
+        while (!shell.isDisposed())
+        {
+            if (!display.readAndDispatch())
+            {
                 display.sleep();
             }
         }
@@ -780,6 +797,9 @@
         shell.dispose();
     }
     
+    /**
+     * @return selected attribute in the table
+     */
     public AttributeData getSelectionAttribute()
     {
         int index = _table.getSelectionIndex();
@@ -789,6 +809,12 @@
         return (AttributeData)_table.getItem(index).getData();
     }
     
+    /**
+     * checks for newer values of selected attribute to update the graph
+     * @param canvas
+     * @param data
+     * @throws Exception
+     */
     private void animate(Canvas canvas, AttributeData data) throws Exception
     {
         String attribute = data.getName();
@@ -813,6 +839,10 @@
         canvas.redraw();
     }
     
+    /**
+     * @param maxAttributeValue
+     * @return dynamically calculated value for y-axis on the graph
+     */
     private long getGraphMaxValue(long maxAttributeValue)
     {
         long maxGraphValue = 100;
@@ -826,6 +856,10 @@
         return maxGraphValue;
     }
     
+    /**
+     * Content Provider class for the table viewer
+     * @author Bhupendra Bhardwaj
+     */
     private class ContentProviderImpl  implements IStructuredContentProvider
     {
         
@@ -845,11 +879,14 @@
         }
     }
     
+    /**
+     * Label Provider class for the table viewer
+     * @author Bhupendra Bhardwaj
+     */
     private class LabelProviderImpl extends LabelProvider implements ITableLabelProvider, 
                                                                      IFontProvider,
                                                                      IColorProvider
     {
-
         AttributeData attribute = null;
         public String getColumnText(Object element, int columnIndex)
         {
@@ -903,58 +940,20 @@
             
         }
     }
-    
-    /*
-    class TableCellModifier implements ICellModifier 
-    {
-        
-        public boolean canModify(Object element, String property)
-        {
-            int columnIndex = Arrays.asList(_tableTitles).indexOf(property);
-            if (columnIndex == 0)
-                return false;
-            
-            return true;
-        }
-        
-        public Object getValue(Object element, String property) {
 
-            // Find the index of the column
-            int columnIndex = Arrays.asList(_tableTitles).indexOf(property);
-            Attribute attribute = (Attribute)element;
-     
-            
-            Object result = null;
-            
-            switch (columnIndex)
-            {
-                case 0 : // attribute name column 
-                    result = attribute.getName();
-                    break;
-                case 1 : // attribute value column 
-                    result = attribute.getValue();
-                    break;
-                default :
-                    result = "";
-            }
-            
-            return result;
-        }
-        
-        
-        public void modify(Object element, String property, Object value)
+    /**
+     * Sorter class for the table viewer. It sorts the table for according to attribute name.
+     * @author Bhupendra Bhardwaj
+     *
+     */
+    private class ViewerSorterImpl extends ViewerSorter
+    {
+        public int compare(Viewer viewer, Object o1, Object o2) 
         {
-            // Find the index of the column
-            int columnIndex = Arrays.asList(_tableTitles).indexOf(property);
+            AttributeData attribtue1 = (AttributeData)o1;
+            AttributeData attribtue2 = (AttributeData)o2;
             
-            if (columnIndex == 1)
-            {
-                //TODO
-                // update the attribute value and call the MBean setAttribute method
-                // then refresh the attribute tab with new values
-            }
+            return collator.compare(attribtue1.getName(), attribtue2.getName());
         }
     }
-    */
-    
 }

Modified: incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/MBeanView.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/MBeanView.java?view=diff&rev=489477&r1=489476&r2=489477
==============================================================================
--- incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/MBeanView.java (original)
+++ incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/MBeanView.java Thu Dec 21 14:22:09 2006
@@ -78,74 +78,6 @@
             IStructuredSelection ss = (IStructuredSelection) sel;
             TreeObject node = (TreeObject)ss.getFirstElement();
             showSelectedMBean(node);
-            /*
-            _mbean = null;
-            setInvisible();
-            
-            if (node == null)
-            {
-                _form.setText("Qpid Management Console");
-                return;
-            }
-            
-            if (Constants.NOTIFICATION.equals(node.getType()))
-            {
-                _mbean = (ManagedBean)node.getParent().getManagedObject();                
-            }
-            else if (Constants.MBEAN.equals(node.getType()))
-            {
-                _mbean = (ManagedBean)node.getManagedObject();                
-            }
-            else
-            {
-                _form.setText("Qpid Management Console");
-                return;
-            }
-            
-            setFocus();
-            try
-            {                
-                MBeanUtility.getMBeanInfo(_mbean);     
-            }
-            catch(Exception ex)
-            {
-                MBeanUtility.handleException(_mbean, ex);
-                return;
-            }
-
-            TabFolder tabFolder = tabFolderMap.get(_mbean.getType());
-            if (tabFolder == null)
-            {
-                tabFolder = createTabFolder();
-            }
-            
-            String text = _mbean.getType();
-            if (_mbean.getName() != null && _mbean.getName().length() != 0)
-            {
-                text = text + ": " + _mbean.getName();
-            }
-            _form.setText(text);
-            int tabIndex = 0;
-            if (Constants.NOTIFICATION.equals(node.getType()))
-            {
-                tabIndex = tabFolder.getItemCount() -1;
-            }
-           
-            TabItem tab = tabFolder.getItem(tabIndex);
-            // refreshTab(tab);
-            // If folder is being set as visible after tab refresh, then the tab 
-            // doesn't have the focus.
-                       
-            tabFolder.setSelection(tabIndex);
-            refreshTab(tab);
-            setVisible(tabFolder); 
-            _form.layout();
-            
-            // Set the focus on the first attribute in attributes table
-            if (tab.getText().equals(Constants.ATTRIBUTES))
-            {
-                ((TabControl)tabFolder.getData(ATTRIBUTES_CONTROL)).setFocus();
-            }*/
         }
     }
 
@@ -156,7 +88,7 @@
         
         if (node == null)
         {
-            _form.setText("Qpid Management Console");
+            _form.setText(Constants.APPLICATION_NAME);
             return;
         }
         
@@ -170,7 +102,7 @@
         }
         else
         {
-            _form.setText("Qpid Management Console");
+            _form.setText(Constants.APPLICATION_NAME);
             return;
         }
         

Modified: incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NotificationsTabControl.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NotificationsTabControl.java?view=diff&rev=489477&r1=489476&r2=489477
==============================================================================
--- incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NotificationsTabControl.java (original)
+++ incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NotificationsTabControl.java Thu Dec 21 14:22:09 2006
@@ -63,9 +63,8 @@
 import org.eclipse.ui.forms.widgets.FormToolkit;
 
 /**
- * 
+ * Creates control composite for Notifications tab
  * @author Bhupendra Bhardwaj
- *
  */
 public class NotificationsTabControl extends TabControl
 {
@@ -124,11 +123,18 @@
         createTableViewer();
     }
     
+    /**
+     * @see TabControl#getControl()
+     */
     public Control getControl()
     {
         return _form;
     }
     
+    /**
+     * Creates composite and populates for displaying Notification Information (name, type, description)
+     * and creates buttons for subscribing or unsubscribing for notifications
+     */
     private void createNotificationInfoComposite()
     {
         Composite composite = _toolkit.createComposite(_form.getBody(), SWT.NONE);
@@ -183,7 +189,7 @@
         formData.top = new FormAttachment(notificationNameCombo, 5);
         formData.left = new FormAttachment(0, 10);
         fixedLabel.setLayoutData(formData);
-        fixedLabel.setText(Constants.DESCRIPTION);
+        fixedLabel.setText(Constants.DESCRIPTION + " : ");
         fixedLabel.setFont(ApplicationRegistry.getFont(Constants.FONT_BOLD));
         
         descriptionLabel = _toolkit.createLabel(composite, "");
@@ -196,6 +202,9 @@
         descriptionLabel.setFont(ApplicationRegistry.getFont(Constants.FONT_ITALIC));
     }
     
+    /**
+     * Creates clear buttin and refresh button
+     */
     private void addButtons()
     {    
         Composite composite = _toolkit.createComposite(_form.getBody(), SWT.NONE);
@@ -239,6 +248,9 @@
             });
     }
     
+    /**
+     * Creates table to display notifications
+     */
     private void createTable()
     {
         table = _toolkit.createTable(_form.getBody(),  SWT.FULL_SELECTION);
@@ -264,6 +276,9 @@
         table.setLinesVisible(true);
     }
     
+    /**
+     * Creates JFace viewer for the notifications table
+     */
     protected void createTableViewer()
     {
         createTable();
@@ -300,6 +315,9 @@
         //viewerComposite.layout();
     }
     
+    /**
+     * Adds listeners to the viewer for displaying notification details 
+     */
     private void addTableListeners()
     {
         _tableViewer.addDoubleClickListener(new IDoubleClickListener()
@@ -409,15 +427,6 @@
         }
         
         populateNotificationInfo();        
-        /*
-        ServerRegistry serverRegistry = ApplicationRegistry.getServerRegistry(_mbean);        
-        _notifications = serverRegistry.getNotifications(_mbean);
-        if (_notifications != null)
-        {
-            _tableViewer.setInput(_notifications);
-            
-        }*/
-        //_tableViewer.setInput(null);
         workerRunning = true;
         _form.layout();       
     }
@@ -428,6 +437,9 @@
         _tableViewer.getTable().clearAll();
     }
     
+    /**
+     * Fills the notification information widgets for selected mbean
+     */
     private void populateNotificationInfo()
     {
         notificationNameCombo.removeAll();
@@ -448,6 +460,9 @@
         checkForEnablingButtons();
     }
     
+    /**
+     * Checks and the enabing/disabling of buttons
+     */
     private void checkForEnablingButtons()
     {
         int nameIndex = notificationNameCombo.getSelectionIndex();
@@ -492,6 +507,9 @@
             return true;
     }
     
+    /**
+     * Selection listener for subscribing or unsubscribing the notifications
+     */
     private class SelectionListenerImpl extends SelectionAdapter
     {
         public void widgetSelected(SelectionEvent e)
@@ -528,7 +546,10 @@
         }
     }
     
-    
+    /**
+     * Selection listener class for the Notification Name. The notification type and description will be 
+     * displayed accordingly
+     */
     private class ComboSelectionListener extends SelectionAdapter
     {
         public void widgetSelected(SelectionEvent e)
@@ -559,6 +580,9 @@
         }
     }
     
+    /**
+     * Content provider class for the table viewer
+     */
     private class ContentProviderImpl implements IStructuredContentProvider, INotificationViewer
     {
         public void inputChanged(Viewer v, Object oldInput, Object newInput)
@@ -584,6 +608,9 @@
         }
     }
     
+    /**
+     * Label provider for the table viewer
+     */
     private class LabelProviderImpl implements ITableLabelProvider
     {
         List<ILabelProviderListener> listeners = new ArrayList<ILabelProviderListener>();       
@@ -643,6 +670,9 @@
         workerRunning = running;
     }
     
+    /**
+     * Worker class which keeps looking if there are new notifications coming from server for the selected mbean
+     */
     private class Worker implements Runnable
     {
         public void run()
@@ -684,22 +714,15 @@
         }
     }
     
+    /**
+     * Updates the table with new notifications received from mbean server for the selected mbean
+     */
     private void updateTableViewer()
     {
         ServerRegistry serverRegistry = ApplicationRegistry.getServerRegistry(_mbean);        
         List<NotificationObject> newList = serverRegistry.getNotifications(_mbean);
         if (newList == null)
             return;
-        
-        /*
-        int notificationCount = 0;
-        if (_notifications != null)
-            notificationCount = _notifications.size();
-        
-        for (int i = notificationCount; i < newList.size(); i++)
-        {
-            ((INotificationViewer)contentProvider).addNotification(newList.get(i));
-        }*/
         
         _notifications = newList;
         _tableViewer.setInput(_notifications);

Modified: incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java?view=diff&rev=489477&r1=489476&r2=489477
==============================================================================
--- incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java (original)
+++ incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java Thu Dec 21 14:22:09 2006
@@ -66,7 +66,6 @@
  * Control class for the MBean operations tab. It creates the required widgets
  * for the selected MBean.
  * @author Bhupendra Bhardwaj
- *
  */
 public class OperationTabControl extends TabControl
 {
@@ -100,19 +99,28 @@
         _toolkit = new FormToolkit(_tabFolder.getDisplay());
         _form = _toolkit.createForm(_tabFolder);
         _form.getBody().setLayout(new GridLayout());
-        
-        // Form area is devided in four parts:
-        // Header composite - displays operaiton information
-        // Patameters composite - displays parameters if there
-        // Button - operation execution button
-        // Results composite - displays results for operations, which have 
-        //                     no parameters but have some return value
+    }
+    
+    /**
+     * Form area is devided in four parts:
+     * Header composite - displays operaiton information
+     * Patameters composite - displays parameters if there
+     * Button - operation execution button
+     * Results composite - displays results for operations, which have 
+     *                     no parameters but have some return value
+     */
+    private void createComposites()
+    {
+        // 
         _headerComposite = _toolkit.createComposite(_form.getBody(), SWT.NONE);
         _headerComposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
         
-        _paramsComposite = _toolkit.createComposite(_form.getBody(), SWT.NONE);
-        _paramsComposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
-        
+        List<ParameterData> params = _opData.getParameters();
+        if (params != null && !params.isEmpty())
+        {
+            _paramsComposite = _toolkit.createComposite(_form.getBody(), SWT.NONE);
+            _paramsComposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
+        }
         _executionButton = _toolkit.createButton(_form.getBody(), Constants.BUTTON_EXECUTE, SWT.PUSH | SWT.CENTER);
         _executionButton.setFont(ApplicationRegistry.getFont(Constants.FONT_BUTTON));
         GridData layoutData = new GridData(SWT.CENTER, SWT.TOP, true, false);
@@ -126,11 +134,15 @@
         _resultsComposite.setLayout(new GridLayout());
     }
     
+    /**
+     * @see TabControl#getControl()
+     */
     public Control getControl()
     {
         return _form;
     }
     
+    @Override
     public void refresh(ManagedBean mbean)
     {
         _mbean = mbean;
@@ -138,6 +150,7 @@
         _opData = serverRegistry.getOperationModel(mbean).getOperations().get(0);
         refresh(_mbean, _opData);
     }
+    
     public void refresh(ManagedBean mbean, OperationData opData)
     {
         _mbean = mbean;
@@ -148,13 +161,14 @@
         // instead of having half the widgets displayed.
         _form.setVisible(false);
         
-        ViewUtility.disposeChildren(_headerComposite);
-        ViewUtility.disposeChildren(_paramsComposite);
-        ViewUtility.disposeChildren(_resultsComposite);
-        
+        ViewUtility.disposeChildren(_form.getBody());        
+        createComposites();
         setHeader();
         createParameterWidgets();
         
+        // Set button text and add appropriate listener to button.
+        // If there are no parameters and it is info operation, then operation gets executed
+        // and result is displayed
         List<ParameterData> params = opData.getParameters();
         if (params != null && !params.isEmpty())
         {            
@@ -174,12 +188,15 @@
         _form.layout();
     }
     
+    /**
+     * populates the header composite, containing the operation name and description.
+     */
     private void setHeader()
     {
         _form.setText(ViewUtility.getDisplayText(_opData.getName()));
         _headerComposite.setLayout(new GridLayout(2, false));
         //operation description
-        Label label = _toolkit.createLabel(_headerComposite,  Constants.DESCRIPTION);
+        Label label = _toolkit.createLabel(_headerComposite,  Constants.DESCRIPTION + " : ");
         label.setFont(ApplicationRegistry.getFont(Constants.FONT_BOLD));
         label.setLayoutData(new GridData(SWT.LEAD, SWT.TOP, false, false));
         
@@ -190,6 +207,9 @@
         _headerComposite.layout();
     }
     
+    /**
+     * Creates the widgets for operation parameters if there are any
+     */
     private void createParameterWidgets()
     {
         List<ParameterData> params = _opData.getParameters();
@@ -299,11 +319,12 @@
             formData.left = new FormAttachment(valueNumerator, 5);
             label.setLayoutData(formData);
         }
-        
-        //_parametersHolder.setMinSize(_parametersComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
-        //_parametersComposite.layout();
     }
     
+    /**
+     * Creates customized dispaly for a method "CreateNewBinding" for Headers exchange
+     *
+     */
     private void customCreateNewBinding()
     {
         headerBindingHashMap = new HashMap<Text, Text>();
@@ -381,6 +402,12 @@
         composite.layout();
     }
     
+    /**
+     * Adds a row for adding a binding for Headers Exchange. Used by the method, which creates the customized
+     * layout and widgest for Header's exchange method createNewBinding.
+     * @param parent composite
+     * @param rowCount - row number
+     */
     private void createARowForCreatingHeadersBinding(Composite parent, int rowCount)
     {  
         Label key = _toolkit.createLabel(parent, "Name");
@@ -415,6 +442,10 @@
         headerBindingHashMap.put(keyText, valueText);
     }
     
+    /**
+     * Sets text and listener for the operation execution button
+     * @param text
+     */
     private void setButton(String text)
     {
         _executionButton.setText(text);
@@ -431,12 +462,16 @@
         }
     }   
 
+    /**
+     * displays the operation result in a pop-up window
+     * @param result
+     */
     private void populateResults(Object result)
     {
         Display display = Display.getCurrent();
         int width = 600;
         int height = 400;
-        Shell shell = ViewUtility.createPopupShell("Result", width, height);
+        Shell shell = ViewUtility.createPopupShell(Constants.RESULT, width, height);
         populateResults(result, shell);
         
         shell.open();
@@ -448,6 +483,11 @@
         shell.dispose();
     }
     
+    /**
+     * Displays the operation result
+     * @param result
+     * @param parent
+     */
     private void populateResults(Object result, Composite parent)
     {
         if (result instanceof TabularDataSupport)
@@ -458,34 +498,11 @@
         {
             ViewUtility.populateCompositeDataHolder(parent, (CompositeDataSupport)result);
         }
-    }    
+    }  
     
     /**
-     * clears the parameter values entered.
-     * @param opName
-     
-    private void clearParameterValues()
-    {
-        List<ParameterData> params = _opData.getParameters();
-        if (params != null && !params.isEmpty())
-        {
-            for (ParameterData param : params)
-            {
-                param.setValue(null);
-            }
-            
-            Control[] controls = _paramsComposite.getChildren();
-            
-            for (int i = 0; i < controls.length; i++)
-            {
-                if (controls[i] instanceof Combo)
-                    ((Combo)controls[i]).select(0);
-                else if (controls[i] instanceof Text)
-                    ((Text)controls[i]).setText("");
-            }
-        }
-    }*/
-    
+     * Clears the parameter values of the operation
+     */
     private void clearParameters()
     {
         List<ParameterData> params = _opData.getParameters();
@@ -498,6 +515,10 @@
         }
     }
     
+    /**
+     * Clears the values entered by the user from parameter value widgets
+     * @param control
+     */
     private void clearParameterValues(Composite control)
     {
         Control[] controls = control.getChildren();
@@ -556,6 +577,7 @@
         }
     }
     
+    // Listener for the "Refresh" execution button
     private class RefreshListener extends SelectionAdapter
     {
         public void widgetSelected(SelectionEvent e)
@@ -564,7 +586,9 @@
         }
     }
     
-    
+    /**
+     * Executres the operation, gets the result from server and displays to the user
+     */
     private void executeAndShowResults()
     {
         Object result = null;
@@ -578,6 +602,7 @@
             return;
         }
         
+        // Some mbeans have only "type" and no "name".
         String title = _mbean.getType();
         if (_mbean.getName() != null && _mbean.getName().length() != 0)
         {
@@ -623,6 +648,9 @@
         }
     }
     
+    /**
+     * Listener class for boolean parameter widgets
+     */
     private class BooleanSelectionListener extends SelectionAdapter
     {
         public void widgetSelected(SelectionEvent e)
@@ -652,6 +680,10 @@
         }
     }
     
+    /**
+     * Listener class for HeaderExchange's new binding widgets. Used when the new bindings are 
+     * being created for Header's Exchange
+     */
     private class HeaderBindingKeyListener extends KeyAdapter
     {
         public void keyReleased(KeyEvent e) 
@@ -679,6 +711,9 @@
         }
     }
     
+    /**
+     * Listener class for verifying the user input with parameter type
+     */
     private class VerifyListenerImpl implements VerifyListener
     {
         public void verifyText(VerifyEvent event)

Modified: incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/TabControl.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/TabControl.java?view=diff&rev=489477&r1=489476&r2=489477
==============================================================================
--- incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/TabControl.java (original)
+++ incubator/qpid/branches/new_persistence/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/TabControl.java Thu Dec 21 14:22:09 2006
@@ -25,6 +25,10 @@
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.TabFolder;
 
+/**
+ * Abstract class for all the control classes of tabs.
+ * @author Bhupendra Bhardwaj
+ */
 public abstract class TabControl
 {
     protected ManagedBean _mbean = null;
@@ -35,21 +39,24 @@
         _tabFolder = tabFolder;
     }
     
+    /**
+     * @return controller composite for the tab
+     */
     public Control getControl()
     {
         return null;
     }
     
-    public void refresh(ManagedBean mbean)
-    {
-        
-    }
+    public abstract void refresh(ManagedBean mbean);
     
     public void refresh(ManagedBean mbean, OperationData opData)
     {
         
     }
     
+    /**
+     * Sets focus on a widget
+     */
     public void setFocus()
     {
         

Modified: incubator/qpid/branches/new_persistence/java/systests/src/test/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTestBase.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/new_persistence/java/systests/src/test/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTestBase.java?view=diff&rev=489477&r1=489476&r2=489477
==============================================================================
--- incubator/qpid/branches/new_persistence/java/systests/src/test/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTestBase.java (original)
+++ incubator/qpid/branches/new_persistence/java/systests/src/test/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTestBase.java Thu Dec 21 14:22:09 2006
@@ -58,6 +58,11 @@
 
     private int count;
 
+    public void testDoNothing()
+    {
+        // this is here only to make junit under Eclipse happy
+    }
+
     protected TestQueue bindDefault(String... bindings) throws AMQException
     {
         return bind("Queue" + (++count), bindings);

Modified: incubator/qpid/branches/new_persistence/java/systests/src/test/java/org/apache/qpid/server/exchange/HeadersExchangeTest.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/new_persistence/java/systests/src/test/java/org/apache/qpid/server/exchange/HeadersExchangeTest.java?view=diff&rev=489477&r1=489476&r2=489477
==============================================================================
--- incubator/qpid/branches/new_persistence/java/systests/src/test/java/org/apache/qpid/server/exchange/HeadersExchangeTest.java (original)
+++ incubator/qpid/branches/new_persistence/java/systests/src/test/java/org/apache/qpid/server/exchange/HeadersExchangeTest.java Thu Dec 21 14:22:09 2006
@@ -43,8 +43,6 @@
         TestQueue q6 = bindDefault("F0000=Aardvark", "F0001=Bear");
         TestQueue q7 = bindDefault("F0000", "F0001=Bear");
         TestQueue q8 = bindDefault("F0000=Aardvark", "F0001");
-        TestQueue q9 = bindDefault("F0000=Apple", "F0001=Banana");
-        TestQueue q10 = bindDefault("F0000=Apple", "F0001");
 
         routeAndTest(new Message("Message1", "F0000"), q1);
         routeAndTest(new Message("Message2", "F0000=Aardvark"), q1, q2);
@@ -74,7 +72,6 @@
         TestQueue q2 = bindDefault("F0000=Aardvark", "F0001=Bear", "X-match=any");
         TestQueue q3 = bindDefault("F0000", "F0001=Bear", "X-match=any");
         TestQueue q4 = bindDefault("F0000=Aardvark", "F0001", "X-match=any");
-        TestQueue q5 = bindDefault("F0000=Apple", "F0001=Banana", "X-match=any");
         TestQueue q6 = bindDefault("F0000=Apple", "F0001", "X-match=any");
 
         routeAndTest(new Message("Message1", "F0000"), q1, q3);
@@ -87,16 +84,14 @@
 
     public void testMandatory() throws AMQException
     {
-        TestQueue q1 = bindDefault("F0000");
+        bindDefault("F0000");
         Message m1 = new Message("Message1", "XXXXX");
         Message m2 = new Message("Message2", "F0000");
         BasicPublishBody pb1 = m1.getPublishBody();
         pb1.mandatory = true;
-        BasicPublishBody pb2 = m1.getPublishBody();
+        BasicPublishBody pb2 = m2.getPublishBody();
         pb2.mandatory = true;
         routeAndTest(m1,true);
-
-
     }
 
     public static junit.framework.Test suite()

Modified: incubator/qpid/branches/new_persistence/java/systests/src/test/java/org/apache/qpid/server/exchange/ReturnUnroutableMandatoryMessageTest.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/new_persistence/java/systests/src/test/java/org/apache/qpid/server/exchange/ReturnUnroutableMandatoryMessageTest.java?view=diff&rev=489477&r1=489476&r2=489477
==============================================================================
--- incubator/qpid/branches/new_persistence/java/systests/src/test/java/org/apache/qpid/server/exchange/ReturnUnroutableMandatoryMessageTest.java (original)
+++ incubator/qpid/branches/new_persistence/java/systests/src/test/java/org/apache/qpid/server/exchange/ReturnUnroutableMandatoryMessageTest.java Thu Dec 21 14:22:09 2006
@@ -5,7 +5,6 @@
 import org.apache.qpid.test.VMBrokerSetup;
 import org.apache.qpid.server.registry.ApplicationRegistry;
 import org.apache.qpid.server.util.TestApplicationRegistry;
-import org.apache.qpid.server.store.TestableMemoryMessageStore;
 import org.apache.qpid.client.*;
 import org.apache.qpid.url.AMQBindingURL;
 import org.apache.qpid.url.BindingURL;
@@ -57,16 +56,12 @@
         _bouncedMessageList.clear();
         Connection con = new AMQConnection("vm://:1", "guest", "guest", "consumer1", "/test");
 
-        TestableMemoryMessageStore store = (TestableMemoryMessageStore) ApplicationRegistry.getInstance().getMessageStore();
-
         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'"));
         FieldTable ft = new PropertyFieldTable();
         ft.setString("F1000","1");
         MessageConsumer consumer = consumerSession.createConsumer(queue, AMQSession.DEFAULT_PREFETCH_LOW_MARK, AMQSession.DEFAULT_PREFETCH_HIGH_MARK, false, false, (String)null, ft);
-
         
         //force synch to ensure the consumer has resulted in a bound queue
         ((AMQSession) consumerSession).declareExchangeSynch(ExchangeDefaults.HEADERS_EXCHANGE_NAME, ExchangeDefaults.HEADERS_EXCHANGE_CLASS);

Copied: incubator/qpid/branches/new_persistence/java/systests/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java (from r488596, incubator/qpid/trunk/qpid/java/systests/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java)
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/new_persistence/java/systests/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java?view=diff&rev=489477&p1=incubator/qpid/trunk/qpid/java/systests/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java&r1=488596&p2=incubator/qpid/branches/new_persistence/java/systests/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java&r2=489477
==============================================================================
--- incubator/qpid/trunk/qpid/java/systests/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java (original)
+++ incubator/qpid/branches/new_persistence/java/systests/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java Thu Dec 21 14:22:09 2006
@@ -22,10 +22,14 @@
 import org.apache.qpid.framing.BasicPublishBody;
 import org.apache.qpid.framing.ContentHeaderBody;
 import org.apache.qpid.server.AMQChannel;
+import org.apache.qpid.server.RequiredDeliveryException;
+import org.apache.qpid.server.txn.TransactionalContext;
+import org.apache.qpid.server.txn.NonTransactionalContext;
 import org.apache.qpid.server.store.MessageStore;
 import org.apache.qpid.server.store.SkeletonMessageStore;
 
 import javax.management.JMException;
+import java.util.LinkedList;
 
 /**
  * Test class to test AMQQueueMBean attribtues and operations
@@ -36,6 +40,8 @@
     private AMQQueueMBean _queueMBean;
     private QueueRegistry _queueRegistry;
     private MessageStore _messageStore = new SkeletonMessageStore();
+    private TransactionalContext _transactionalContext = new NonTransactionalContext(_messageStore, null,
+                                                                                     new LinkedList<RequiredDeliveryException>()); 
     private MockProtocolSession _protocolSession;
     private AMQChannel _channel;
 
@@ -133,7 +139,7 @@
         AMQMessage msg = message(false);
         long id = msg.getMessageId();
         _queue.clearQueue();
-        _queue.deliver(msg);
+        _queue.process(msg);
         _queueMBean.viewMessageContent(id);
         try
         {
@@ -152,7 +158,7 @@
         publish.immediate = immediate;
         ContentHeaderBody contentHeaderBody = new ContentHeaderBody();
         contentHeaderBody.bodySize = 1000;   // in bytes       
-        return new AMQMessage(_messageStore, publish, contentHeaderBody, null);
+        return new AMQMessage(_messageStore.getNewMessageId(), publish, _transactionalContext, contentHeaderBody);
     }
 
     @Override
@@ -173,7 +179,7 @@
         }
         for (int i = 0; i < messageCount; i++)
         {
-            _queue.deliver(messages[i]);
+            _queue.process(messages[i]);
         }
     }
 }

Modified: incubator/qpid/branches/new_persistence/java/systests/src/test/java/org/apache/qpid/server/queue/SynchronizedDeliveryManagerTest.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/new_persistence/java/systests/src/test/java/org/apache/qpid/server/queue/SynchronizedDeliveryManagerTest.java?view=diff&rev=489477&r1=489476&r2=489477
==============================================================================
--- incubator/qpid/branches/new_persistence/java/systests/src/test/java/org/apache/qpid/server/queue/SynchronizedDeliveryManagerTest.java (original)
+++ incubator/qpid/branches/new_persistence/java/systests/src/test/java/org/apache/qpid/server/queue/SynchronizedDeliveryManagerTest.java Thu Dec 21 14:22:09 2006
@@ -23,7 +23,6 @@
 import org.apache.qpid.server.queue.SynchronizedDeliveryManager;
 import org.apache.qpid.server.queue.AMQQueue;
 import org.apache.qpid.server.queue.DefaultQueueRegistry;
-import org.apache.qpid.server.queue.ConcurrentDeliveryManager;
 import org.apache.qpid.server.queue.DeliveryManagerTest;
 import org.apache.qpid.AMQException;