geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r644702 - in /geronimo/server/trunk/plugins/activemq/activemq-portlets: ./ src/main/java/org/apache/geronimo/console/jmsmanager/ src/main/java/org/apache/geronimo/console/jmsmanager/helper/ src/main/java/org/apache/geronimo/console/jmsmanag...
Date Fri, 04 Apr 2008 12:58:56 GMT
Author: dwoods
Date: Fri Apr  4 05:58:50 2008
New Revision: 644702

URL: http://svn.apache.org/viewvc?rev=644702&view=rev
Log:
GERONIMO-3819 Update JMS Resources Portlet.  Patch from Anish Pathadan.

Added:
    geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/JMSMessageInfo.java   (with props)
    geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/
    geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/AmqJMSMessageHelper.java   (with props)
    geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/JMSMessageHelper.java   (with props)
    geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/JMSMessageHelperFactory.java   (with props)
    geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/MessageDetailsHandler.java   (with props)
    geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/SendMessageHandler.java   (with props)
    geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/ViewMessageHandler.java   (with props)
    geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/messageDetails.jsp   (with props)
    geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/sendMessage.jsp   (with props)
Modified:
    geronimo/server/trunk/plugins/activemq/activemq-portlets/pom.xml
    geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java
    geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/JMSResourcePortlet.java
    geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/ListScreenHandler.java
    geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/resources/activemq.properties
    geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/viewmessages.jsp
    geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmswizard/list.jsp

Modified: geronimo/server/trunk/plugins/activemq/activemq-portlets/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq/activemq-portlets/pom.xml?rev=644702&r1=644701&r2=644702&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq/activemq-portlets/pom.xml (original)
+++ geronimo/server/trunk/plugins/activemq/activemq-portlets/pom.xml Fri Apr  4 05:58:50 2008
@@ -97,6 +97,12 @@
             <version>${version}</version>
             <scope>provided</scope>
         </dependency>
+		<dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-activemq</artifactId>
+			<version>${version}</version>
+            <scope>provided</scope>
+        </dependency>
     </dependencies>
     
     <build>

Added: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/JMSMessageInfo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/JMSMessageInfo.java?rev=644702&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/JMSMessageInfo.java (added)
+++ geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/JMSMessageInfo.java Fri Apr  4 05:58:50 2008
@@ -0,0 +1,152 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.console.jmsmanager;
+
+import java.io.Serializable;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class JMSMessageInfo implements Serializable{
+    private String adminObjName;
+    private String adminObjType;
+    private String physicalName;
+    private String adapterObjectName;
+    private String correlationId;
+    private boolean isPersistent;
+    private String replyTo;
+    private int priority;
+    private String jmsType;
+    private String message;
+    private String messageID;
+    private long timeStamp;
+    private String destination;
+    private long expiration;
+    
+    
+    public long getExpiration() {
+        return expiration;
+    }
+
+    public void setExpiration(long expiration) {
+        this.expiration = expiration;
+    }
+
+    public String getDestination() {
+        return destination;
+    }
+
+    public void setDestination(String destination) {
+        this.destination = destination;
+    }
+
+    public String getMessageID() {
+        return messageID;
+    }
+
+    public void setMessageId(String messageID) {
+        this.messageID = messageID;
+    }
+
+    public long getTimeStamp() {
+        return timeStamp;
+    }
+
+    public void setTimeStamp(long timeStamp) {
+        this.timeStamp = timeStamp;
+   }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public String getAdapterObjectName() {
+        return adapterObjectName;
+    }
+
+    public void setAdapterObjectName(String adapterObjectName) {
+        this.adapterObjectName = adapterObjectName;
+    }
+
+    public String getAdminObjName() {
+        return adminObjName;
+    }
+
+    public void setAdminObjName(String adminObjName) {
+        this.adminObjName = adminObjName;
+    }
+
+    public String getAdminObjType() {
+        return adminObjType;
+    }
+
+    public void setAdminObjType(String adminObjType) {
+        this.adminObjType = adminObjType;
+    }
+
+    public String getCorrelationId() {
+        return correlationId;
+    }
+
+    public void setCorrelationId(String correlationId) {
+        this.correlationId = correlationId;
+    }
+
+    public boolean isPersistent() {
+        return isPersistent;
+    }
+
+    public void setPersistent(boolean isPersistent) {
+        this.isPersistent = isPersistent;
+    }
+
+    public String getJmsType() {
+        return jmsType;
+    }
+
+    public void setJmsType(String jmsType) {
+        this.jmsType = jmsType;
+    }
+
+    public String getPhysicalName() {
+        return physicalName;
+    }
+
+    public void setPhysicalName(String physicalName) {
+        this.physicalName = physicalName;
+    }
+
+    public int getPriority() {
+        return priority;
+    }
+
+    public void setPriority(int priority) {
+        this.priority = priority;
+    }
+
+    public String getReplyTo() {
+        return replyTo;
+    }
+
+    public void setReplyTo(String replyTo) {
+        this.replyTo = replyTo;
+    }
+}

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/JMSMessageInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/JMSMessageInfo.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Id

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/JMSMessageInfo.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/AmqJMSMessageHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/AmqJMSMessageHelper.java?rev=644702&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/AmqJMSMessageHelper.java (added)
+++ geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/AmqJMSMessageHelper.java Fri Apr  4 05:58:50 2008
@@ -0,0 +1,103 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.console.jmsmanager.helper;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import javax.management.MBeanServer;
+import javax.management.MBeanServerInvocationHandler;
+import javax.management.ObjectInstance;
+import javax.management.ObjectName;
+import javax.portlet.PortletRequest;
+
+import org.apache.geronimo.activemq.BrokerServiceGBeanImpl;
+import org.apache.geronimo.console.util.PortletManager;
+import org.apache.geronimo.system.jmx.MBeanServerReference;
+import org.apache.activemq.broker.jmx.BrokerViewMBean;
+import org.apache.activemq.broker.jmx.QueueViewMBean;
+import org.apache.activemq.broker.jmx.TopicViewMBean;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class AmqJMSMessageHelper extends JMSMessageHelper {
+    private static final Log log = LogFactory.getLog(AmqJMSMessageHelper.class);
+
+    public void purge(PortletRequest renderRequest, String type, String physicalQName) {
+        try {
+            MBeanServer server = getMBeanServer();
+            String brokerName = getBrokerName();
+            ObjectName objName = new ObjectName("org.apache.activemq" + ":BrokerName=" + brokerName + ",Type=" + type + ",Destination=" + physicalQName);
+            if ("Queue".equals(type)) {
+                QueueViewMBean proxy = null;
+                if (!server.isRegistered(objName)) {
+                    // mbean is not yet registered.Adding the destination to activemq broker.
+                    ObjectName brokerObj = new ObjectName("org.apache.activemq" + ":BrokerName=" + brokerName + ",Type=Broker");
+                    Set set = server.queryMBeans(brokerObj, null);
+                    Iterator it = set.iterator();
+                    if (it.hasNext()) {
+                        ObjectInstance instance = (ObjectInstance) it.next();
+                        brokerObj = instance.getObjectName();
+                    }
+                    BrokerViewMBean brokerMBean = (BrokerViewMBean) MBeanServerInvocationHandler.newProxyInstance(server, brokerObj, BrokerViewMBean.class, true);
+                    brokerMBean.addQueue(physicalQName);
+                }
+                proxy = (QueueViewMBean) MBeanServerInvocationHandler.newProxyInstance(server, objName, QueueViewMBean.class, true);
+                proxy.purge();
+
+            }
+        } catch (Exception ex) {
+            // ignoring the exception
+            log.error(ex);
+        }
+    }
+
+    protected List getMessagesFromTopic(String type, String physicalQName) throws Exception {
+        /*
+         * MBeanServer server = getMBeanServer(); ObjectName objName = new
+         * ObjectName("org.apache.activemq"+":BrokerName=localhost,Type="+type+",Destination="+physicalQName);
+         * if(!server.isRegistered(objName)){ //mbean is not yet registered.Adding the destination to activemq broker.
+         * ObjectName brokerObj = new ObjectName("org.apache.activemq"+":BrokerName=localhost,Type=Broker");
+         * BrokerViewMBean brokerMBean = (BrokerViewMBean)MBeanServerInvocationHandler.newProxyInstance(server,
+         * brokerObj, BrokerViewMBean.class, true); brokerMBean.addTopic(physicalQName); } TopicViewMBean mbean =
+         * (TopicViewMBean)MBeanServerInvocationHandler.newProxyInstance(server, objName, TopicViewMBean.class, true);
+         * return mbean.browseMessages();
+         */
+        return null;
+    }
+
+    private MBeanServer getMBeanServer() throws Exception {
+        MBeanServerReference ref = (MBeanServerReference) kernel.getGBean(MBeanServerReference.class);
+        return ref.getMBeanServer();
+    }
+
+    private String getBrokerName() {
+        // default broker name
+        String brokerName = "localhost";
+        try {
+            BrokerServiceGBeanImpl ref = (BrokerServiceGBeanImpl) kernel.getGBean(BrokerServiceGBeanImpl.class);
+            brokerName = ref.getBrokerName();
+        } catch (Exception e) {
+            log.equals(e);
+        }
+        return brokerName;
+    }
+}

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/AmqJMSMessageHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/AmqJMSMessageHelper.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Id

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/AmqJMSMessageHelper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/JMSMessageHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/JMSMessageHelper.java?rev=644702&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/JMSMessageHelper.java (added)
+++ geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/JMSMessageHelper.java Fri Apr  4 05:58:50 2008
@@ -0,0 +1,278 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.console.jmsmanager.helper;
+
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
+
+import javax.jms.DeliveryMode;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.QueueBrowser;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSession;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.jms.Topic;
+import javax.jms.TopicConnection;
+import javax.jms.TopicConnectionFactory;
+import javax.jms.TopicSession;
+import javax.management.ObjectName;
+import javax.portlet.PortletRequest;
+import javax.portlet.RenderRequest;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.core.jms.TopicBrowserGBean;
+import org.apache.geronimo.console.jmsmanager.JMSMessageInfo;
+import org.apache.geronimo.console.util.PortletManager;
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.KernelRegistry;
+import org.apache.geronimo.kernel.proxy.GeronimoManagedBean;
+import org.apache.geronimo.management.geronimo.JCAAdminObject;
+import org.apache.geronimo.management.geronimo.JCAManagedConnectionFactory;
+import org.apache.geronimo.management.geronimo.ResourceAdapterModule;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public abstract class JMSMessageHelper {
+    protected static final Kernel kernel = KernelRegistry.getSingleKernel();
+    private static final Log log = LogFactory.getLog(JMSMessageHelper.class);
+
+    public void sendMessage(RenderRequest request, JMSMessageInfo messageInfo) throws Exception {
+        Destination dest = getDestination(request, messageInfo.getAdapterObjectName(), messageInfo.getPhysicalName());
+        if (dest == null) {
+            log.error("Unable to find the destination....Not sending message");
+            return;
+        }
+        if ("Queue".equals(messageInfo.getAdminObjType())) {
+            Queue destination = (Queue) dest;
+            QueueConnectionFactory connectionFactory = (QueueConnectionFactory) getJCAManagedConnectionFactory(request,
+                    messageInfo.getAdapterObjectName(), messageInfo.getAdminObjType()).getConnectionFactory();
+            if (connectionFactory == null) {
+                log.error("Unable to find Queue Connection factory...Not sending message");
+                return;
+            }
+            QueueConnection connection = null;
+            QueueSession session = null;
+            try {
+                connection = connectionFactory.createQueueConnection();
+                connection.start();
+                session = connection.createQueueSession(true, Session.DUPS_OK_ACKNOWLEDGE);
+
+                MessageProducer producer = session.createProducer(destination);
+                int deliveryMode = 0;
+                if (messageInfo.isPersistent()) {
+                    deliveryMode = DeliveryMode.PERSISTENT;
+                } else {
+                    deliveryMode = DeliveryMode.NON_PERSISTENT;
+                }
+                producer.setDeliveryMode(deliveryMode);
+                TextMessage msg = session.createTextMessage();
+                msg.setText(messageInfo.getMessage());
+                msg.setJMSCorrelationID(messageInfo.getCorrelationId());
+                msg.setJMSPriority(messageInfo.getPriority());
+                msg.setJMSType(messageInfo.getJmsType());
+                producer.send(msg,deliveryMode,messageInfo.getPriority(),TextMessage.DEFAULT_TIME_TO_LIVE);
+                session.commit();
+            } finally {
+                session.close();
+                connection.close();
+            }
+        } else {
+            Topic destination = (Topic) dest;
+            TopicConnectionFactory connectionFactory = (TopicConnectionFactory) getJCAManagedConnectionFactory(request,
+                    messageInfo.getAdapterObjectName(), messageInfo.getAdminObjType()).getConnectionFactory();
+            if (connectionFactory == null) {
+                log.error("Unable to find Topic Connection factory...Not sending message");
+                return;
+            }
+            TopicConnection connection = null;
+            TopicSession session = null;
+            try {
+                connection = connectionFactory.createTopicConnection();
+                connection.start();
+                session = connection.createTopicSession(true, Session.DUPS_OK_ACKNOWLEDGE);
+
+                MessageProducer producer = session.createProducer(destination);
+                int deliveryMode = 0;
+                if (messageInfo.isPersistent()) {
+                    deliveryMode = DeliveryMode.PERSISTENT;
+                } else {
+                    deliveryMode = DeliveryMode.NON_PERSISTENT;
+                }
+                producer.setDeliveryMode(deliveryMode);
+                TextMessage msg = session.createTextMessage();
+                msg.setText(messageInfo.getMessage());
+                msg.setJMSCorrelationID(messageInfo.getCorrelationId());
+                msg.setJMSPriority(messageInfo.getPriority());
+                msg.setJMSType(messageInfo.getJmsType());
+                producer.send(msg,deliveryMode,messageInfo.getPriority(),TextMessage.DEFAULT_TIME_TO_LIVE);
+                session.commit();
+            } finally {
+                session.close();
+                connection.close();
+            }
+        }
+    }
+
+    public List getMessagesList(RenderRequest request, String adapterObjectName, String adminObjName,
+            String physicalName, String type) throws Exception {
+        List ret = new ArrayList();
+        Destination dest = getDestination(request, adapterObjectName, physicalName);
+        if (dest == null)
+            return ret;
+
+        if ("Queue".equals(type)) {
+            Queue queue = (Queue) dest;
+            QueueConnectionFactory qConFactory = null;
+            QueueConnection qConnection = null;
+            QueueSession qSession = null;
+            QueueBrowser qBrowser = null;
+            try {
+                qConFactory = (QueueConnectionFactory) getJCAManagedConnectionFactory(request, adapterObjectName, type)
+                        .getConnectionFactory();
+                if (qConFactory == null)
+                    return ret;
+                qConnection = qConFactory.createQueueConnection();
+                qSession = qConnection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+                qBrowser = qSession.createBrowser(queue);
+                qConnection.start();
+                for (Enumeration e = qBrowser.getEnumeration(); e.hasMoreElements();) {
+                    Message message = (Message)e.nextElement();
+                    JMSMessageInfo messageInfo = new JMSMessageInfo();
+                    messageInfo.setPriority(message.getJMSPriority());
+                    messageInfo.setMessageId(message.getJMSMessageID());
+                    messageInfo.setDestination(message.getJMSDestination().toString());
+                    messageInfo.setTimeStamp(message.getJMSTimestamp());
+                    messageInfo.setExpiration(message.getJMSExpiration());
+                    messageInfo.setJmsType(message.getJMSType());
+                    messageInfo.setReplyTo(message.getJMSReplyTo()==null?"":message.getJMSReplyTo().toString());
+                    messageInfo.setCorrelationId(message.getJMSCorrelationID());
+                    if (message instanceof TextMessage) {
+                        messageInfo.setMessage(((TextMessage) message).getText());
+                    } else {
+                        messageInfo.setMessage("Only Text Messages will be displayed..");
+                    }
+                    ret.add(messageInfo);
+                }
+                qConnection.stop();
+            } catch (Exception e) {
+                log.error(e.getMessage(), e);
+            } finally {
+                try {
+                    if (qBrowser != null) {
+                        qBrowser.close();
+                    }
+                } catch (JMSException ignore) {
+                }
+                try {
+                    if (qSession != null) {
+                        qSession.close();
+                    }
+                } catch (JMSException ignore) {
+                }
+                try {
+                    if (qConnection != null) {
+                        qConnection.close();
+                    }
+                } catch (JMSException ignore) {
+                }
+            }
+
+        } else {
+            ret = getMessagesFromTopic(type, physicalName);
+
+        }
+        return ret;
+    }
+
+    private JCAManagedConnectionFactory getJCAManagedConnectionFactory(RenderRequest renderRequest, String objectName,
+            String type) {
+        ResourceAdapterModule[] modules = PortletManager.getOutboundRAModules(renderRequest,
+                new String[] { "javax.jms.ConnectionFactory", "javax.jms.QueueConnectionFactory",
+                        "javax.jms.TopicConnectionFactory", });
+        for (int i = 0; i < modules.length; i++) {
+            ResourceAdapterModule module = modules[i];
+            String objectNameTemp = module.getObjectName();
+            if (objectName != null && objectName.equals(objectNameTemp)) {
+                JCAManagedConnectionFactory[] factories = null;
+                if ("Queue".equals(type)) {
+                    factories = PortletManager.getOutboundFactoriesForRA(renderRequest, module,
+                            new String[] { "javax.jms.QueueConnectionFactory" });
+                } else if ("Topic".equals(type)) {
+                    factories = PortletManager.getOutboundFactoriesForRA(renderRequest, module,
+                            new String[] { "javax.jms.TopicConnectionFactory" });
+                }
+                if (factories == null ) {
+                    factories = PortletManager.getOutboundFactoriesForRA(renderRequest, module,
+                            new String[] { "javax.jms.ConnectionFactory" });
+                }
+                if (factories != null ) {
+                    return factories[0];
+                }
+
+            }
+        }
+        return null;
+
+    }
+
+    private Destination getDestination(RenderRequest renderRequest, String objectName, String physicalName) {
+        Destination dest = null;
+        try {
+            ResourceAdapterModule[] modules = PortletManager.getOutboundRAModules(renderRequest, new String[] {
+                    "javax.jms.ConnectionFactory", "javax.jms.QueueConnectionFactory",
+                    "javax.jms.TopicConnectionFactory", });
+            for (int i = 0; i < modules.length; i++) {
+                ResourceAdapterModule module = modules[i];
+                String objectNameTemp = module.getObjectName();
+                if (objectName != null && objectName.equals(objectNameTemp)) {
+                    JCAAdminObject[] admins = PortletManager.getAdminObjectsForRA(renderRequest, module, new String[] {
+                            "javax.jms.Queue", "javax.jms.Topic" });
+                    for (int j = 0; j < admins.length; j++) {
+                        GeronimoManagedBean bean = (GeronimoManagedBean) admins[j];
+                        ObjectName name = ObjectName.getInstance(bean.getObjectName());
+                        String physicalNameTemp = (String) admins[j].getConfigProperty("PhysicalName");
+                        if (physicalName != null && physicalName.equals(physicalNameTemp)) {
+                            AbstractName absName = kernel.getAbstractNameFor(bean);
+                            dest = (Destination) kernel.invoke(absName, "$getResource");
+                            return dest;
+                        }
+                    }
+                }
+            }
+        } catch (Exception ex) {
+            // ignore exception
+            log.error(ex);
+        }
+        return dest;
+    }
+
+    protected abstract List getMessagesFromTopic(String type, String physicalQName) throws Exception;
+
+    public abstract void purge(PortletRequest renderRequest, String type, String physicalQName);
+
+}

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/JMSMessageHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/JMSMessageHelper.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Id

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/JMSMessageHelper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/JMSMessageHelperFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/JMSMessageHelperFactory.java?rev=644702&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/JMSMessageHelperFactory.java (added)
+++ geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/JMSMessageHelperFactory.java Fri Apr  4 05:58:50 2008
@@ -0,0 +1,74 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.console.jmsmanager.helper;
+
+import java.util.List;
+
+import javax.portlet.PortletRequest;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.util.PortletManager;
+import org.apache.geronimo.management.geronimo.ResourceAdapterModule;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class JMSMessageHelperFactory {
+    private static final Log log = LogFactory.getLog(JMSMessageHelperFactory.class);
+
+    public static JMSMessageHelper getMessageHelper(PortletRequest renderRequest, String raName) {
+        JMSMessageHelper messageHelper = null;
+        try {
+            ResourceAdapterModule[] modules = PortletManager.getOutboundRAModules(renderRequest, new String[] {
+                    "javax.jms.ConnectionFactory", "javax.jms.QueueConnectionFactory",
+                    "javax.jms.TopicConnectionFactory", });
+            for (int i = 0; i < modules.length; i++) {
+                ResourceAdapterModule module = modules[i];
+                String objectNameTemp = module.getObjectName();
+                if (raName != null && raName.equals(objectNameTemp)) {
+                    String vendorName = module.getVendorName();
+                    if ("activemq.org".equals(vendorName)) {
+                        Class class_ = Class
+                                .forName("org.apache.geronimo.console.jmsmanager.helper.AmqJMSMessageHelper");
+                        messageHelper = (JMSMessageHelper) class_.newInstance();
+                    }
+                }
+            }
+            if (messageHelper == null) {
+                messageHelper = new JMSMessageHelper() {
+                    public List getMessagesFromTopic(String type, String physicalQName) {
+                        return null;
+                    }
+
+                    public void purge(PortletRequest renderRequest, String type, String physicalQName) {
+                        return;
+                    }
+                };
+            }
+            return messageHelper;
+
+        } catch (IllegalAccessException e) {
+            log.error(e);
+        } catch (InstantiationException e) {
+            log.error(e);
+        } catch (ClassNotFoundException e) {
+            log.error(e);
+        }
+        return messageHelper;
+    }
+}

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/JMSMessageHelperFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/JMSMessageHelperFactory.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Id

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/JMSMessageHelperFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java?rev=644702&r1=644701&r2=644702&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java (original)
+++ geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java Fri Apr  4 05:58:50 2008
@@ -76,6 +76,25 @@
     protected final static String SHOW_PLAN_MODE="plan";
     protected final static String DEPLOY_MODE="deploy";
 
+    protected final static String VIEW_MESSAGES="viewMessages";
+    protected final static String MESSAGE_DETAILS="messageDetails";
+    protected final static String SEND_MESSAGE="sendmessage";
+    protected final static String ADMIN_OBJ_NAME = "adminObjName";
+    protected final static String ADMIN_OBJ_TYPE = "adminObjType";
+    protected final static String STATUS = "status";
+    protected final static String SUBMIT = "submit";
+    protected final static String CORRELATION_ID = "correlationId";
+    protected final static String PURGE = "purge";
+    protected final static String IS_PERSISTENT = "isPersistent";
+    protected final static String PRIORITY = "priority";
+    protected final static String JMS_TYPE = "jmsType";
+    protected final static String MESSAGE = "message";
+    protected final static String PHYSICAL_NAME = "physicalName";
+    protected final static String RA_ADAPTER_OBJ_NAME = "adapterObjectName";
+    protected final static String MESSAGES = "messages";
+    protected final static String MESSAGE_ID = "messageId";
+    protected final static String MESSAGE_TXT="messageTxt";
+
     protected final static String PROVIDER_PARAMETER="provider";
     protected final static String RAR_FILE_PARAMETER="rar";
     protected final static String DEPENDENCY_PARAMETER="dependency";

Modified: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/JMSResourcePortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/JMSResourcePortlet.java?rev=644702&r1=644701&r2=644702&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/JMSResourcePortlet.java (original)
+++ geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/JMSResourcePortlet.java Fri Apr  4 05:58:50 2008
@@ -40,6 +40,9 @@
         addHelper(new ShowPlanHandler(), config);
         addHelper(new DeployHandler(), config);
         addHelper(new ReviewHandler(), config);
+        addHelper(new ViewMessageHandler(), config);
+        addHelper(new MessageDetailsHandler(), config);
+        addHelper(new SendMessageHandler(), config);
     }
 
     protected String getModelJSPVariableName() {

Modified: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/ListScreenHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/ListScreenHandler.java?rev=644702&r1=644701&r2=644702&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/ListScreenHandler.java (original)
+++ geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/ListScreenHandler.java Fri Apr  4 05:58:50 2008
@@ -31,6 +31,8 @@
 import javax.portlet.RenderResponse;
 
 import org.apache.geronimo.console.MultiPageModel;
+import org.apache.geronimo.console.jmsmanager.helper.JMSMessageHelper;
+import org.apache.geronimo.console.jmsmanager.helper.JMSMessageHelperFactory;
 import org.apache.geronimo.console.util.PortletManager;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.management.State;
@@ -56,6 +58,16 @@
     }
 
     public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
+        String purgeStr = request.getParameter(PURGE);
+        if (purgeStr != null) {
+            String physicalName = request.getParameter(PHYSICAL_NAME);
+            String adminObjType = request.getParameter(ADMIN_OBJ_TYPE);
+            String adapterObjectName = request.getParameter(RA_ADAPTER_OBJ_NAME);
+            response.setRenderParameter(ADMIN_OBJ_TYPE, adminObjType);
+            response.setRenderParameter(PHYSICAL_NAME, physicalName);
+            response.setRenderParameter(RA_ADAPTER_OBJ_NAME, adapterObjectName);
+            response.setRenderParameter(PURGE, purgeStr);
+        }
         return getMode();
     }
 
@@ -76,7 +88,16 @@
     }
 
 
-    private void populateExistingList(PortletRequest renderRequest) {
+    private void populateExistingList(PortletRequest renderRequest) throws PortletException {
+        String purgeStr = renderRequest.getParameter(PURGE);
+        if (purgeStr != null) {
+            String physicalName = renderRequest.getParameter(PHYSICAL_NAME);
+            String adminObjType = renderRequest.getParameter(ADMIN_OBJ_TYPE);
+            String adapterObjectName = renderRequest.getParameter(RA_ADAPTER_OBJ_NAME);
+            JMSMessageHelper helper = JMSMessageHelperFactory.getMessageHelper(renderRequest, adapterObjectName);
+            helper.purge(renderRequest, adminObjType, physicalName);
+        }
+
         // Prepare a list of JMS configurations
         List resources = new ArrayList();
 
@@ -156,9 +177,19 @@
                 for (int j = 0; j < admins.length; j++) {
                     GeronimoManagedBean bean = (GeronimoManagedBean) admins[j];
                     ObjectName name = ObjectName.getInstance(bean.getObjectName());
-                    target.getAdminObjects().add(new AdminObjectSummary(bean.getObjectName(), name.getKeyProperty(NameFactory.J2EE_NAME),
-                            admins[j].getAdminObjectInterface().indexOf("Queue") > -1 ? "Queue" : "Topic",
-                            bean.getState()));
+                    String queueName = name.getKeyProperty(NameFactory.J2EE_NAME);
+                    String physicalName = null;
+                    try {
+                        physicalName = (String) admins[j].getConfigProperty("PhysicalName");
+                    } catch (Exception e) {
+                        log.warn(e);
+                        log.warn("PhysicalName undefined, using queueName as PhysicalName");
+                        physicalName = queueName;
+                    }
+                    target.getAdminObjects().add(
+                            new AdminObjectSummary(bean.getObjectName(), queueName, physicalName, admins[j]
+                                    .getAdminObjectInterface().indexOf("Queue") > -1 ? "Queue" : "Topic", bean
+                                    .getState()));
                 }
             }
         } catch (MalformedObjectNameException e) {
@@ -296,10 +327,12 @@
         private final String name;
         private final String type;
         private final int state;
-
-        public AdminObjectSummary(String adminObjectName, String name, String type, int state) {
+        private final String physicalName;
+ 
+        public AdminObjectSummary(String adminObjectName, String name, String physicalName, String type, int state) {
             this.adminObjectName = adminObjectName;
             this.name = name;
+            this.physicalName = physicalName;
             this.type = type;
             this.state = state;
         }
@@ -310,6 +343,10 @@
 
         public String getName() {
             return name;
+        }
+
+        public String getPhysicalName() {
+            return physicalName;
         }
 
         public String getType() {

Added: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/MessageDetailsHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/MessageDetailsHandler.java?rev=644702&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/MessageDetailsHandler.java (added)
+++ geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/MessageDetailsHandler.java Fri Apr  4 05:58:50 2008
@@ -0,0 +1,76 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.geronimo.console.jmsmanager.wizard;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.TextMessage;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.apache.geronimo.console.MultiPageModel;
+import org.apache.geronimo.console.jmsmanager.JMSMessageInfo;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class MessageDetailsHandler extends AbstractHandler {
+
+    public MessageDetailsHandler() {
+        super(MESSAGE_DETAILS, "/WEB-INF/view/jmsmanager/messageDetails.jsp");
+    }
+
+    @Override
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model)
+            throws PortletException, IOException {
+
+        String next = request.getParameter("nextAction");
+        return next + BEFORE_ACTION;
+    }
+
+    @Override
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model)
+            throws PortletException, IOException {
+        String messageId = request.getParameter(MESSAGE_ID);
+        response.setRenderParameter(MESSAGE_ID, messageId);
+        return getMode();
+    }
+
+    @Override
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model)
+            throws PortletException, IOException {
+        String messageId = request.getParameter(MESSAGE_ID);
+        List messages = (List) (request.getPortletSession(true).getAttribute(MESSAGES));
+        Iterator it = messages.iterator();
+        while (it.hasNext()) {
+            JMSMessageInfo message = (JMSMessageInfo) it.next();
+            if (message.getMessageID().equals(messageId)) {
+                request.setAttribute(MESSAGE_TXT, message.getMessage());
+            }
+        }
+
+    }
+
+}

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/MessageDetailsHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/MessageDetailsHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Id

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/MessageDetailsHandler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/SendMessageHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/SendMessageHandler.java?rev=644702&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/SendMessageHandler.java (added)
+++ geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/SendMessageHandler.java Fri Apr  4 05:58:50 2008
@@ -0,0 +1,145 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.geronimo.console.jmsmanager.wizard;
+
+import java.io.IOException;
+
+import javax.jms.TextMessage;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.console.MultiPageModel;
+import org.apache.geronimo.console.jmsmanager.JMSMessageInfo;
+import org.apache.geronimo.console.jmsmanager.helper.AmqJMSMessageHelper;
+import org.apache.geronimo.console.jmsmanager.helper.JMSMessageHelper;
+import org.apache.geronimo.console.jmsmanager.helper.JMSMessageHelperFactory;
+
+/**
+ * 
+ * 
+ * @version $Rev$ $Date$
+ */
+public class SendMessageHandler extends AbstractHandler {
+    private static final Log log = LogFactory.getLog(SendMessageHandler.class);
+
+    public SendMessageHandler() {
+        super(SEND_MESSAGE, "/WEB-INF/view/jmsmanager/sendMessage.jsp");
+    }
+
+    @Override
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model)
+            throws PortletException, IOException {
+        String next = request.getParameter("nextAction");
+        return next + BEFORE_ACTION;
+    }
+
+    @Override
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model)
+            throws PortletException, IOException {
+        String adminObjName = request.getParameter(ADMIN_OBJ_NAME);
+        String adminObjType = request.getParameter(ADMIN_OBJ_TYPE);
+        String physicalName = request.getParameter(PHYSICAL_NAME);
+        String adapterObjectName = request.getParameter(RA_ADAPTER_OBJ_NAME);
+
+        response.setRenderParameter(ADMIN_OBJ_NAME, adminObjName);
+        response.setRenderParameter(ADMIN_OBJ_TYPE, adminObjType);
+        response.setRenderParameter(PHYSICAL_NAME, physicalName);
+        response.setRenderParameter(RA_ADAPTER_OBJ_NAME, adapterObjectName);
+
+        String submit = request.getParameter(SUBMIT);
+        if (submit != null) {
+            String correlationId = request.getParameter(CORRELATION_ID);
+            String isPersistentStr = request.getParameter(IS_PERSISTENT);
+            String priority = request.getParameter(PRIORITY);
+            String jmsType = request.getParameter(JMS_TYPE);
+            String message = request.getParameter(MESSAGE);
+
+            response.setRenderParameter(SUBMIT, submit);
+            if (correlationId != null)
+                response.setRenderParameter(CORRELATION_ID, correlationId);
+            if (isPersistentStr != null)
+                response.setRenderParameter(IS_PERSISTENT, isPersistentStr);
+            if (priority != null)
+                response.setRenderParameter(PRIORITY, priority);
+            if (jmsType != null)
+                response.setRenderParameter(JMS_TYPE, jmsType);
+            response.setRenderParameter(MESSAGE, message);
+        }
+
+        return getMode();
+    }
+
+    @Override
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model)
+            throws PortletException, IOException {
+
+        String adminObjName = request.getParameter(ADMIN_OBJ_NAME);
+        String adminObjType = request.getParameter(ADMIN_OBJ_TYPE);
+        String physicalName = request.getParameter(PHYSICAL_NAME);
+        String adapterObjectName = request.getParameter(RA_ADAPTER_OBJ_NAME);
+        String submit = request.getParameter(SUBMIT);
+
+        request.setAttribute(ADMIN_OBJ_NAME, adminObjName);
+        request.setAttribute(ADMIN_OBJ_TYPE, adminObjType);
+        request.setAttribute(PHYSICAL_NAME, physicalName);
+        request.setAttribute(RA_ADAPTER_OBJ_NAME, adapterObjectName);
+
+        if (submit != null) {
+            String correlationId = request.getParameter(CORRELATION_ID);
+            String isPersistentStr = request.getParameter(IS_PERSISTENT);
+            boolean isPersistent = isPersistentStr != null ? isPersistentStr.equals("on") ? true : false : false;
+
+            String priority = request.getParameter(PRIORITY);
+            String jmsType = request.getParameter(JMS_TYPE);
+            String message = request.getParameter(MESSAGE);
+
+            JMSMessageInfo messageInfo = new JMSMessageInfo();
+
+            messageInfo.setAdminObjName(adminObjName);
+            messageInfo.setAdminObjType(adminObjType);
+            messageInfo.setPhysicalName(physicalName);
+            messageInfo.setAdapterObjectName(adapterObjectName);
+            messageInfo.setCorrelationId(correlationId);
+            messageInfo.setPersistent(isPersistent);
+
+            if (priority != null) {
+                messageInfo.setPriority(Integer.parseInt(priority));
+            }else{
+                messageInfo.setPriority(TextMessage.DEFAULT_PRIORITY);
+            }
+            messageInfo.setJmsType(jmsType);
+            messageInfo.setMessage(message);
+
+            JMSMessageHelper helper = JMSMessageHelperFactory.getMessageHelper(request, adapterObjectName);
+            try {
+                helper.sendMessage(request, messageInfo);
+                request.setAttribute(STATUS, "success");
+            } catch (Exception e) {
+                request.setAttribute(STATUS, "error");
+                log.error(e);
+                // throw new PortletException(e);
+            }
+        }
+    }
+
+}

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/SendMessageHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/SendMessageHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Id

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/SendMessageHandler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/ViewMessageHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/ViewMessageHandler.java?rev=644702&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/ViewMessageHandler.java (added)
+++ geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/ViewMessageHandler.java Fri Apr  4 05:58:50 2008
@@ -0,0 +1,97 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.geronimo.console.jmsmanager.wizard;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequest;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.apache.geronimo.console.MultiPageModel;
+import org.apache.geronimo.console.jmsmanager.helper.AmqJMSMessageHelper;
+import org.apache.geronimo.console.jmsmanager.helper.JMSMessageHelper;
+import org.apache.geronimo.console.jmsmanager.helper.JMSMessageHelperFactory;
+import org.apache.geronimo.console.jmsmanager.wizard.AbstractHandler.JMSResourceData;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class ViewMessageHandler extends AbstractHandler {
+
+    public ViewMessageHandler() {
+        super(VIEW_MESSAGES, "/WEB-INF/view/jmsmanager/viewmessages.jsp");
+    }
+
+    public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model)
+            throws PortletException, IOException {
+        String adminObjName = request.getParameter(ADMIN_OBJ_NAME);
+        String adminObjType = request.getParameter(ADMIN_OBJ_TYPE);
+        String physicalName = request.getParameter(PHYSICAL_NAME);
+        String adapterObjectName = request.getParameter(RA_ADAPTER_OBJ_NAME);
+
+        if (adminObjName == null) {
+            // Takes the values from session.This is required for back functionality
+            adminObjName = (String) request.getPortletSession(true).getAttribute(ADMIN_OBJ_NAME);
+            adminObjType = (String) request.getPortletSession(true).getAttribute(ADMIN_OBJ_TYPE);
+            physicalName = (String) request.getPortletSession(true).getAttribute(PHYSICAL_NAME);
+            adapterObjectName = (String) request.getPortletSession(true).getAttribute(RA_ADAPTER_OBJ_NAME);
+        } else {
+            // Store the values to session
+            request.getPortletSession(true).setAttribute(ADMIN_OBJ_NAME, adminObjName);
+            request.getPortletSession(true).setAttribute(ADMIN_OBJ_TYPE, adminObjType);
+            request.getPortletSession(true).setAttribute(PHYSICAL_NAME, physicalName);
+            request.getPortletSession(true).setAttribute(RA_ADAPTER_OBJ_NAME, adapterObjectName);
+        }
+        response.setRenderParameter(ADMIN_OBJ_NAME, adminObjName);
+        response.setRenderParameter(ADMIN_OBJ_TYPE, adminObjType);
+        response.setRenderParameter(PHYSICAL_NAME, physicalName);
+        response.setRenderParameter(RA_ADAPTER_OBJ_NAME, adapterObjectName);
+
+        return getMode();
+    }
+
+    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model)
+            throws PortletException, IOException {
+        String physicalName = request.getParameter(PHYSICAL_NAME);
+        String adapterObjectName = request.getParameter(RA_ADAPTER_OBJ_NAME);
+        String adminObjType = request.getParameter(ADMIN_OBJ_TYPE);
+        String adminObjName = request.getParameter(ADMIN_OBJ_NAME);
+        JMSMessageHelper helper = JMSMessageHelperFactory.getMessageHelper(request, adapterObjectName);
+        List messages = new ArrayList();
+        try {
+            messages = helper.getMessagesList(request, adapterObjectName, adminObjName, physicalName, adminObjType);
+        } catch (Exception e) {
+            throw new PortletException(e);
+        }
+
+        request.setAttribute(MESSAGES, messages);
+        request.getPortletSession(true).setAttribute(MESSAGES, messages);
+    }
+
+    public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model)
+            throws PortletException, IOException {
+        String next = request.getParameter("nextAction");
+        return next + BEFORE_ACTION;
+    }
+}

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/ViewMessageHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/ViewMessageHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Id

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/wizard/ViewMessageHandler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/resources/activemq.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/resources/activemq.properties?rev=644702&r1=644701&r2=644702&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/resources/activemq.properties (original)
+++ geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/resources/activemq.properties Fri Apr  4 05:58:50 2008
@@ -65,6 +65,7 @@
 jmsmanager.common.maximumMessageLength                      = Maximum Message Length
 jmsmanager.common.messageDestinationName                    = Message Destination Name
 jmsmanager.common.messageID                                 = MessageID
+jmsmanager.common.message                                   = Message
 jmsmanager.common.moduleName                                = Module Name
 jmsmanager.common.name                                      = Name
 jmsmanager.common.openInputCount                            = Open Input Count
@@ -157,6 +158,9 @@
 jmswizard.common.transactionSupport                     = Transaction Support
 jmswizard.common.transactionSupportExp                  = Which JMS interface this connection factory should support.
 jmswizard.common.type                                   = Type
+jmswizard.common.Browse                                 = Browse
+jmswizard.common.Send                                   = Send
+jmswizard.common.Purge                                  = Purge
 jmswizard.destination.destinationConfSettings           = Destination Configuration Settings
 jmswizard.destination.messageDestinationName            = Message Destination Name
 jmswizard.destination.title                             = <b>JMS Resource Group</b> -- Configure Destination
@@ -196,3 +200,14 @@
 jmswizard.status.resourceGroup                          = Resource Group
 jmswizard.status.showPlan                               = Show Plan
 jmswizard.status.title                                  = <b>JMS Resource Group</b> -- Current Progress
+jmsmanager.sendmessage.title							= <b>Send Message</b>
+jmsmanager.sendmessage.destination						= Destination
+jmsmanager.sendmessage.correlationId					= JMS Correlation ID
+jmsmanager.sendmessage.persistence						= Perisistent Delivery
+jmsmanager.sendmessage.replyTo							= Reply To
+jmsmanager.sendmessage.priority							= Priority
+jmsmanager.sendmessage.type								= Type
+jmsmanager.sendmessage.message							= Message
+jmsmanager.sendmessage.send								= Send
+jmsmanager.sendmessage.success							= <b>Message send successfully...</b>
+jmsmanager.sendmessage.error							= <b>Error sending message...</b>

Added: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/messageDetails.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/messageDetails.jsp?rev=644702&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/messageDetails.jsp (added)
+++ geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/messageDetails.jsp Fri Apr  4 05:58:50 2008
@@ -0,0 +1,46 @@
+<%--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+--%>
+<%@ page import="javax.jms.Message" %>
+<%@ page import="java.util.List" %>
+<%@ page import="java.util.Iterator" %>
+
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
+<fmt:setBundle basename="activemq"/>
+
+<br>
+<table cellpadding="1" width="100%">     
+	<%
+	String[] styles = {"LightBackground","MediumBackground"};
+	String messageTxt = (String)request.getAttribute("messageTxt");
+	%>
+    <tr>
+        <td class="DarkBackground" align="center"><b><fmt:message key="jmsmanager.common.message" /></b></td>
+    </tr>
+    <tr>
+        <td class="<%=styles[0]%>" align="center"><%=messageTxt%></td>
+    </tr>
+    <tr>    
+        <td colspan="8" align="center">
+       	<a href="<portlet:actionURL portletMode="view">
+            <portlet:param name="mode" value="viewMessages-before" />
+       		</portlet:actionURL>">
+       	    <fmt:message key="jmsmanager.common.back"/></a> <a href=""><fmt:message key="jmsmanager.common.refresh"/></a></td>
+    </tr>
+</table>

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/messageDetails.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/messageDetails.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Revision Id

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/messageDetails.jsp
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/sendMessage.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/sendMessage.jsp?rev=644702&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/sendMessage.jsp (added)
+++ geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/sendMessage.jsp Fri Apr  4 05:58:50 2008
@@ -0,0 +1,91 @@
+<%--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+--%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> 
+<fmt:setBundle basename="activemq"/> 
+<portlet:defineObjects/>
+
+<c:choose>
+	<c:when test="${status == 'error'}">
+		<p><fmt:message key="jmsmanager.sendmessage.error" /></p>
+	</c:when>
+	<c:when test="${status == 'success'}">
+		<p><fmt:message key="jmsmanager.sendmessage.success" /></p>
+	</c:when>
+</c:choose>
+<!-- <p><fmt:message key="jmsmanager.sendmessage.title" /></p> -->
+
+<!--   FORM TO COLLECT DATA FOR THIS PAGE   -->
+<form name="<portlet:namespace/>JMSForm" action="<portlet:actionURL/>" method="post">
+    <input type="hidden" name="mode" value="sendmessage-before" />
+    <input type="hidden" name="submit" value="submit" />
+    <input type="hidden" name="adapterObjectName" value="${adapterObjectName}" />
+    <input type="hidden" name="adminObjName" value="${adminObjName}" />
+    <input type="hidden" name="adminObjType" value="${adminObjType}" />
+    <input type="hidden" name="physicalName" value="${physicalName}" />
+    <table border="0">
+    <!-- ENTRY FIELD: JMS Connection RAR -->
+      <tr>
+        <th><div align="right"><fmt:message key="jmsmanager.sendmessage.destination" />:</div></th>
+        <td>
+          <input type="text" name="destination" value="${adminObjName}" readonly="readonly"/>
+        </td>
+      </tr>
+      <tr>
+        <th><div align="right"><fmt:message key="jmsmanager.sendmessage.correlationId" />:</div></th>
+        <td>
+          <input type="text" name="correlationId"/>
+        </td>
+      </tr>
+      <tr>
+        <th><div align="right"><fmt:message key="jmsmanager.sendmessage.persistence" />:</div></th>
+        <td>
+          <input type="checkbox" name="isPersistent"/>
+        </td>
+      </tr>
+      
+      <tr>
+        <th><div align="right"><fmt:message key="jmsmanager.sendmessage.priority" />:</div></th>
+        <td>
+          <input type="text" name="priority"/>
+        </td>
+      </tr>
+      <tr>
+        <th><div align="right"><fmt:message key="jmsmanager.sendmessage.type" />:</div></th>
+        <td>
+          <input type="text" name="jmsType"/>
+        </td>
+      </tr>
+      <tr>
+        <th><div align="right"><fmt:message key="jmsmanager.sendmessage.message" />:</div></th>
+        <td>
+          <textarea name="message" cols="50" rows="8"/></textarea>
+        </td>
+      </tr>
+    <!-- SUBMIT BUTTON -->
+      <tr>
+        <td></td>
+        <td><input type="submit" value='<fmt:message key="jmsmanager.sendmessage.send"/>' /></td>
+      </tr>
+    </table>
+</form>
+<!--   END OF FORM TO COLLECT DATA FOR THIS PAGE   -->
+
+
+<p><a href="<portlet:renderURL/>"><fmt:message key="jmswizard.common.cancel"/></a></p>

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/sendMessage.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/sendMessage.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Revision Id

Propchange: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/sendMessage.jsp
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/viewmessages.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/viewmessages.jsp?rev=644702&r1=644701&r2=644702&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/viewmessages.jsp (original)
+++ geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmsmanager/viewmessages.jsp Fri Apr  4 05:58:50 2008
@@ -22,6 +22,7 @@
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
+<%@page import="org.apache.geronimo.console.jmsmanager.JMSMessageInfo"%>
 <fmt:setBundle basename="activemq"/>
 
 <br>
@@ -43,28 +44,32 @@
         List messages = (List)request.getAttribute("messages");
         int n = 0;
         for(Iterator i = messages.iterator();i.hasNext();n++){
-            Message message = (Message)i.next();
+            JMSMessageInfo message = (JMSMessageInfo)i.next();
         %>
-
-              <tr>
-                  <td class="<%=styles[n%2]%>" align="center"><%=message.getJMSPriority()%></td>
-                  <td class="<%=styles[n%2]%>" align="center"><%=message.getJMSMessageID()%></td>
-                  <td class="<%=styles[n%2]%>" align="center"><%=message.getJMSDestination()%></td>
-                  <td class="<%=styles[n%2]%>" align="center"><%=new java.util.Date(message.getJMSTimestamp())%></td>
+            <tr>
+                <td class="<%=styles[n%2]%>" align="center"><%=message.getPriority()%></td>
+                <td class="<%=styles[n%2]%>" align="center">
+                    <a href="<portlet:actionURL portletMode="view">
+                        <portlet:param name="mode" value="messageDetails-before" />
+                        <portlet:param name="messageId" value="<%=message.getMessageID()%>"/>
+                        </portlet:actionURL>"><%=message.getMessageID()%></a>
+                </td>
+                <td class="<%=styles[n%2]%>" align="center"><%=message.getDestination()%></td>
+                <td class="<%=styles[n%2]%>" align="center"><%=new java.util.Date(message.getTimeStamp())%></td>
                 <td class="<%=styles[n%2]%>" align="center">
-                <%=(message.getJMSExpiration()!=0)?new java.util.Date(message.getJMSExpiration()).toString():"No expiration"%>
+                    <%=(message.getExpiration()!=0)?new java.util.Date(message.getExpiration()).toString():"No expiration"%>
                 </td>
-                  <td class="<%=styles[n%2]%>" align="center"><%=message.getJMSType()%></td>
-                  <td class="<%=styles[n%2]%>" align="center"><%=message.getJMSReplyTo()%></td>
-                  <td class="<%=styles[n%2]%>" align="center"><%=message.getJMSCorrelationID()%></td>
+                <td class="<%=styles[n%2]%>" align="center"><%=message.getJmsType()==null?"":message.getJmsType()%></td>
+                <td class="<%=styles[n%2]%>" align="center"><%=message.getReplyTo()==null?"":message.getReplyTo()%></td>
+                <td class="<%=styles[n%2]%>" align="center"><%=message.getCorrelationId()==null?"":message.getCorrelationId()%></td>
             </tr>
         <%}%>
-           </c:when>
+        </c:when>
         <c:otherwise>
-        <tr>    
-            <td colspan="8" align="center"><fmt:message key="jmsmanager.viewmessages.jsp.noMessagesInDest" /></td>
-        </tr>
-           </c:otherwise>
+            <tr>    
+                <td colspan="8" align="center"><fmt:message key="jmsmanager.viewmessages.jsp.noMessagesInDest" /></td>
+            </tr>
+        </c:otherwise>
     </c:choose>
         <tr>    
             <td colspan="8" align="center"><a href="<portlet:renderURL/>"><fmt:message key="jmsmanager.common.back"/></a> <a href=""><fmt:message key="jmsmanager.common.refresh"/></a></td>

Modified: geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmswizard/list.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmswizard/list.jsp?rev=644702&r1=644701&r2=644702&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmswizard/list.jsp (original)
+++ geronimo/server/trunk/plugins/activemq/activemq-portlets/src/main/webapp/WEB-INF/view/jmswizard/list.jsp Fri Apr  4 05:58:50 2008
@@ -107,6 +107,32 @@
               </td>
               <td class="${backgroundClass}">${admin.stateName}</td>
               <td class="${backgroundClass}">
+              <c:if test="${ admin.type == 'Queue'}">
+                 <a href="<portlet:actionURL portletMode="view">
+	                  <portlet:param name="mode" value="viewMessages-before" />
+	                  <portlet:param name="adminObjName" value="${admin.name}" />
+	                  <portlet:param name="physicalName" value="${admin.physicalName}" />
+	                  <portlet:param name="adminObjType" value="${admin.type}" />
+	                  <portlet:param name="adapterObjectName" value="${resource.adapterObjectName}" />
+	                </portlet:actionURL>"><fmt:message key="jmswizard.common.Browse" /></a>
+	         </c:if>
+             <a href="<portlet:actionURL portletMode="view">
+                  <portlet:param name="mode" value="sendmessage-before" />
+                  <portlet:param name="adminObjName" value="${admin.name}" />
+                  <portlet:param name="physicalName" value="${admin.physicalName}" />
+                  <portlet:param name="adminObjType" value="${admin.type}" />
+                  <portlet:param name="adapterObjectName" value="${resource.adapterObjectName}" />
+                </portlet:actionURL>"><fmt:message key="jmswizard.common.Send" /></a>
+              <c:if test="${ admin.type == 'Queue'}">
+                <a href="<portlet:actionURL portletMode="view">
+                  <portlet:param name="mode" value="list-before" />
+                  <portlet:param name="purge" value="purge" />
+                  <portlet:param name="adminObjName" value="${admin.name}" />
+                  <portlet:param name="physicalName" value="${admin.physicalName}" />
+                  <portlet:param name="adminObjType" value="${admin.type}" />
+                  <portlet:param name="adapterObjectName" value="${resource.adapterObjectName}" />
+                </portlet:actionURL>" onclick="return confirm('Confirm message purge?');"><fmt:message key="jmswizard.common.Purge"/></a>
+              </c:if>
                 <%--
                 <a href="<portlet:actionURL portletMode="view">
                   <portlet:param name="mode" value="editExisting" />



Mime
View raw message