You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2008/12/09 00:59:59 UTC
svn commit: r724558 - in /geronimo/server/trunk: ./
plugingroups/javaee5-jetty/ plugingroups/javaee5-jetty/src/main/history/
plugingroups/javaee5-tomcat/ plugingroups/javaee5-tomcat/src/main/history/
plugins/activemq5/ plugins/activemq5/activemq5-broke...
Author: djencks
Date: Mon Dec 8 15:59:58 2008
New Revision: 724558
URL: http://svn.apache.org/viewvc?rev=724558&view=rev
Log:
GERONIMO-4337 upgrade to activemq 5.2. Reduced console functionality
Added:
geronimo/server/trunk/plugins/activemq5/geronimo-activemq5/src/main/java/org/apache/geronimo/activemq/management/ActiveMQTransportConnector.java (with props)
Modified:
geronimo/server/trunk/plugingroups/javaee5-jetty/pom.xml
geronimo/server/trunk/plugingroups/javaee5-jetty/src/main/history/dependencies.xml
geronimo/server/trunk/plugingroups/javaee5-tomcat/pom.xml
geronimo/server/trunk/plugingroups/javaee5-tomcat/src/main/history/dependencies.xml
geronimo/server/trunk/plugins/activemq5/activemq5-broker/src/main/history/dependencies.xml
geronimo/server/trunk/plugins/activemq5/activemq5-broker/src/main/plan/plan.xml
geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/AmqJMSMessageHelper.java
geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/server/BaseJMSPortlet.java
geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/server/JMSConnectorPortlet.java
geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/resources/jms-resource-providers.properties
geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/webapp/WEB-INF/view/jmsmanager/server/connector/normal.jsp
geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/webapp/WEB-INF/view/jmsmanager/server/normal.jsp
geronimo/server/trunk/plugins/activemq5/activemq5-server/pom.xml
geronimo/server/trunk/plugins/activemq5/geronimo-activemq5/src/main/java/org/apache/geronimo/activemq/BrokerServiceGBeanImpl.java
geronimo/server/trunk/plugins/activemq5/geronimo-activemq5/src/main/java/org/apache/geronimo/activemq/management/ActiveMQManagerGBean.java
geronimo/server/trunk/plugins/activemq5/pom.xml
geronimo/server/trunk/pom.xml
geronimo/server/trunk/testsuite/commands-testsuite/gshell/src/test/java/org/apache/geronimo/testsuite/gshell/deploy/DeployTest.java
geronimo/server/trunk/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/JMSServerTest.java
geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/main/resources/META-INF/geronimo-application.xml
geronimo/server/trunk/testsuite/web-testsuite/test-web-references/web-references-ear/src/main/resources/META-INF/geronimo-application.xml
Modified: geronimo/server/trunk/plugingroups/javaee5-jetty/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugingroups/javaee5-jetty/pom.xml?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/plugingroups/javaee5-jetty/pom.xml (original)
+++ geronimo/server/trunk/plugingroups/javaee5-jetty/pom.xml Mon Dec 8 15:59:58 2008
@@ -141,7 +141,7 @@
<dependency>
<groupId>org.apache.geronimo.configs</groupId>
- <artifactId>activemq-ra</artifactId>
+ <artifactId>${activemqString}-ra</artifactId>
<version>${version}</version>
<type>car</type>
</dependency>
@@ -177,7 +177,7 @@
<dependency>
<groupId>org.apache.geronimo.plugins</groupId>
- <artifactId>activemq-console-jetty</artifactId>
+ <artifactId>${activemqString}-console-jetty</artifactId>
<version>${version}</version>
<type>car</type>
</dependency>
Modified: geronimo/server/trunk/plugingroups/javaee5-jetty/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugingroups/javaee5-jetty/src/main/history/dependencies.xml?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/plugingroups/javaee5-jetty/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/plugingroups/javaee5-jetty/src/main/history/dependencies.xml Mon Dec 8 15:59:58 2008
@@ -7,63 +7,63 @@
<type>car</type>
</module-id>
<dependency>
- <groupId>org.apache.geronimo.plugins</groupId>
- <artifactId>plancreator-console-jetty</artifactId>
+ <groupId>org.apache.geronimo.plugingroups</groupId>
+ <artifactId>client</artifactId>
<type>car</type>
</dependency>
<dependency>
<groupId>org.apache.geronimo.plugingroups</groupId>
- <artifactId>webservices-cxf</artifactId>
+ <artifactId>clustering-jetty</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.configs</groupId>
- <artifactId>activemq-ra</artifactId>
+ <groupId>org.apache.geronimo.plugingroups</groupId>
+ <artifactId>ejb</artifactId>
<type>car</type>
</dependency>
<dependency>
<groupId>org.apache.geronimo.plugingroups</groupId>
- <artifactId>persistence</artifactId>
+ <artifactId>framework</artifactId>
<type>car</type>
</dependency>
<dependency>
<groupId>org.apache.geronimo.plugingroups</groupId>
- <artifactId>web-jetty</artifactId>
+ <artifactId>persistence</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.configs</groupId>
- <artifactId>uddi-jetty6</artifactId>
+ <groupId>org.apache.geronimo.plugingroups</groupId>
+ <artifactId>web-jetty</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.configs</groupId>
- <artifactId>ca-helper-jetty</artifactId>
+ <groupId>org.apache.geronimo.plugingroups</groupId>
+ <artifactId>webservices-axis2</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugins.monitoring</groupId>
- <artifactId>agent</artifactId>
+ <groupId>org.apache.geronimo.plugingroups</groupId>
+ <artifactId>webservices-cxf</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugins</groupId>
- <artifactId>debugviews-console-jetty</artifactId>
+ <groupId>org.apache.geronimo.configs</groupId>
+ <artifactId>concurrent-deployer</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugingroups</groupId>
- <artifactId>client</artifactId>
+ <groupId>org.apache.geronimo.configs</groupId>
+ <artifactId>javamail</artifactId>
<type>car</type>
</dependency>
<dependency>
<groupId>org.apache.geronimo.configs</groupId>
- <artifactId>concurrent-deployer</artifactId>
+ <artifactId>uddi-jetty6</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugins.monitoring</groupId>
- <artifactId>mconsole-jetty</artifactId>
+ <groupId>org.apache.geronimo.configs</groupId>
+ <artifactId>welcome-jetty</artifactId>
<type>car</type>
</dependency>
<dependency>
@@ -72,13 +72,13 @@
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugingroups</groupId>
- <artifactId>clustering-jetty</artifactId>
+ <groupId>org.apache.geronimo.plugins</groupId>
+ <artifactId>debugviews-console-jetty</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugingroups</groupId>
- <artifactId>framework</artifactId>
+ <groupId>org.apache.geronimo.configs</groupId>
+ <artifactId>activemq5-ra</artifactId>
<type>car</type>
</dependency>
<dependency>
@@ -87,43 +87,43 @@
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugins</groupId>
- <artifactId>sysdb-console-jetty</artifactId>
+ <groupId>org.apache.geronimo.configs</groupId>
+ <artifactId>ca-helper-jetty</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugins</groupId>
- <artifactId>activemq-console-jetty</artifactId>
+ <groupId>org.apache.geronimo.plugins.monitoring</groupId>
+ <artifactId>agent</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.configs</groupId>
- <artifactId>welcome-jetty</artifactId>
+ <groupId>org.apache.geronimo.plugins.monitoring</groupId>
+ <artifactId>mconsole-jetty</artifactId>
<type>car</type>
</dependency>
<dependency>
<groupId>org.apache.geronimo.plugins</groupId>
- <artifactId>plugin-console-jetty</artifactId>
+ <artifactId>activemq5-console-jetty</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.configs</groupId>
- <artifactId>javamail</artifactId>
+ <groupId>org.apache.geronimo.plugins</groupId>
+ <artifactId>plancreator-console-jetty</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugingroups</groupId>
- <artifactId>webservices-axis2</artifactId>
+ <groupId>org.apache.geronimo.plugins</groupId>
+ <artifactId>plugin-console-jetty</artifactId>
<type>car</type>
</dependency>
<dependency>
<groupId>org.apache.geronimo.plugins</groupId>
- <artifactId>openejb-console-jetty</artifactId>
+ <artifactId>sysdb-console-jetty</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugingroups</groupId>
- <artifactId>ejb</artifactId>
+ <groupId>org.apache.geronimo.plugins</groupId>
+ <artifactId>openejb-console-jetty</artifactId>
<type>car</type>
</dependency>
</plugin-artifact>
Modified: geronimo/server/trunk/plugingroups/javaee5-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugingroups/javaee5-tomcat/pom.xml?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/plugingroups/javaee5-tomcat/pom.xml (original)
+++ geronimo/server/trunk/plugingroups/javaee5-tomcat/pom.xml Mon Dec 8 15:59:58 2008
@@ -133,7 +133,7 @@
<dependency>
<groupId>org.apache.geronimo.configs</groupId>
- <artifactId>activemq-ra</artifactId>
+ <artifactId>${activemqString}-ra</artifactId>
<version>${version}</version>
<type>car</type>
</dependency>
@@ -169,7 +169,7 @@
<dependency>
<groupId>org.apache.geronimo.plugins</groupId>
- <artifactId>activemq-console-tomcat</artifactId>
+ <artifactId>${activemqString}-console-tomcat</artifactId>
<version>${version}</version>
<type>car</type>
</dependency>
Modified: geronimo/server/trunk/plugingroups/javaee5-tomcat/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugingroups/javaee5-tomcat/src/main/history/dependencies.xml?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/plugingroups/javaee5-tomcat/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/plugingroups/javaee5-tomcat/src/main/history/dependencies.xml Mon Dec 8 15:59:58 2008
@@ -7,23 +7,23 @@
<type>car</type>
</module-id>
<dependency>
- <groupId>org.apache.geronimo.configs</groupId>
- <artifactId>ca-helper-tomcat</artifactId>
+ <groupId>org.apache.geronimo.plugingroups</groupId>
+ <artifactId>client</artifactId>
<type>car</type>
</dependency>
<dependency>
<groupId>org.apache.geronimo.plugingroups</groupId>
- <artifactId>webservices-cxf</artifactId>
+ <artifactId>clustering-tomcat</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugins</groupId>
- <artifactId>activemq-console-tomcat</artifactId>
+ <groupId>org.apache.geronimo.plugingroups</groupId>
+ <artifactId>ejb</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.configs</groupId>
- <artifactId>activemq-ra</artifactId>
+ <groupId>org.apache.geronimo.plugingroups</groupId>
+ <artifactId>framework</artifactId>
<type>car</type>
</dependency>
<dependency>
@@ -33,42 +33,37 @@
</dependency>
<dependency>
<groupId>org.apache.geronimo.plugingroups</groupId>
- <artifactId>clustering-tomcat</artifactId>
- <type>car</type>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.configs</groupId>
- <artifactId>uddi-tomcat</artifactId>
+ <artifactId>web-tomcat</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugins</groupId>
- <artifactId>plancreator-console-tomcat</artifactId>
+ <groupId>org.apache.geronimo.plugingroups</groupId>
+ <artifactId>webservices-axis2</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugins.monitoring</groupId>
- <artifactId>agent</artifactId>
+ <groupId>org.apache.geronimo.plugingroups</groupId>
+ <artifactId>webservices-cxf</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugingroups</groupId>
- <artifactId>web-tomcat</artifactId>
+ <groupId>org.apache.geronimo.configs</groupId>
+ <artifactId>concurrent-deployer</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugingroups</groupId>
- <artifactId>client</artifactId>
+ <groupId>org.apache.geronimo.configs</groupId>
+ <artifactId>javamail</artifactId>
<type>car</type>
</dependency>
<dependency>
<groupId>org.apache.geronimo.configs</groupId>
- <artifactId>concurrent-deployer</artifactId>
+ <artifactId>uddi-tomcat</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugins</groupId>
- <artifactId>debugviews-console-tomcat</artifactId>
+ <groupId>org.apache.geronimo.configs</groupId>
+ <artifactId>welcome-tomcat</artifactId>
<type>car</type>
</dependency>
<dependency>
@@ -77,8 +72,8 @@
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugingroups</groupId>
- <artifactId>framework</artifactId>
+ <groupId>org.apache.geronimo.configs</groupId>
+ <artifactId>activemq5-ra</artifactId>
<type>car</type>
</dependency>
<dependency>
@@ -87,43 +82,48 @@
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugins</groupId>
- <artifactId>plugin-console-tomcat</artifactId>
+ <groupId>org.apache.geronimo.configs</groupId>
+ <artifactId>ca-helper-tomcat</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugins</groupId>
- <artifactId>openejb-console-tomcat</artifactId>
+ <groupId>org.apache.geronimo.plugins.monitoring</groupId>
+ <artifactId>agent</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.configs</groupId>
- <artifactId>javamail</artifactId>
+ <groupId>org.apache.geronimo.plugins.monitoring</groupId>
+ <artifactId>mconsole-tomcat</artifactId>
<type>car</type>
</dependency>
<dependency>
<groupId>org.apache.geronimo.plugins</groupId>
- <artifactId>sysdb-console-tomcat</artifactId>
+ <artifactId>activemq5-console-tomcat</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugins.monitoring</groupId>
- <artifactId>mconsole-tomcat</artifactId>
+ <groupId>org.apache.geronimo.plugins</groupId>
+ <artifactId>debugviews-console-tomcat</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugingroups</groupId>
- <artifactId>webservices-axis2</artifactId>
+ <groupId>org.apache.geronimo.plugins</groupId>
+ <artifactId>plancreator-console-tomcat</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.plugingroups</groupId>
- <artifactId>ejb</artifactId>
+ <groupId>org.apache.geronimo.plugins</groupId>
+ <artifactId>plugin-console-tomcat</artifactId>
<type>car</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.configs</groupId>
- <artifactId>welcome-tomcat</artifactId>
+ <groupId>org.apache.geronimo.plugins</groupId>
+ <artifactId>sysdb-console-tomcat</artifactId>
+ <type>car</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.plugins</groupId>
+ <artifactId>openejb-console-tomcat</artifactId>
<type>car</type>
</dependency>
</plugin-artifact>
Modified: geronimo/server/trunk/plugins/activemq5/activemq5-broker/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq5/activemq5-broker/src/main/history/dependencies.xml?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq5/activemq5-broker/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/plugins/activemq5/activemq5-broker/src/main/history/dependencies.xml Mon Dec 8 15:59:58 2008
@@ -22,11 +22,6 @@
<type>jar</type>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- <type>jar</type>
- </dependency>
- <dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<type>jar</type>
Modified: geronimo/server/trunk/plugins/activemq5/activemq5-broker/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq5/activemq5-broker/src/main/plan/plan.xml?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq5/activemq5-broker/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/plugins/activemq5/activemq5-broker/src/main/plan/plan.xml Mon Dec 8 15:59:58 2008
@@ -20,11 +20,11 @@
<module xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
- <!-- gbean name="ActiveMQManager" class="org.apache.geronimo.activemq.management.ActiveMQManagerGBean"/-->
+ <gbean name="ActiveMQManager" class="org.apache.geronimo.activemq.management.ActiveMQManagerGBean"/>
<gbean name="ActiveMQ" class="org.apache.geronimo.activemq.BrokerServiceGBeanImpl">
<attribute name="amqBaseDir">var/activemq/</attribute>
- <attribute name="amqDataDir">data</attribute>
+ <attribute name="amqDataDir">data</attribute>
<attribute name="amqConfigFile">conf/activemq.xml</attribute>
<attribute name="useShutdownHook">false</attribute>
<!--reference name="dataSource">
Modified: geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/AmqJMSMessageHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/AmqJMSMessageHelper.java?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/AmqJMSMessageHelper.java (original)
+++ geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/helper/AmqJMSMessageHelper.java Mon Dec 8 15:59:58 2008
@@ -28,7 +28,6 @@
import org.apache.geronimo.activemq.BrokerServiceGBeanImpl;
import org.apache.geronimo.console.jmsmanager.DestinationStatistics;
-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.DestinationViewMBean;
@@ -49,7 +48,7 @@
String brokerName = getBrokerName();
ObjectName objName = new ObjectName("org.apache.activemq" + ":BrokerName=" + brokerName + ",Type=" + type + ",Destination=" + physicalQName);
if ("Queue".equals(type)) {
- QueueViewMBean proxy = null;
+ QueueViewMBean proxy;
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");
@@ -91,7 +90,7 @@
MBeanServer server = getMBeanServer();
String brokerName = getBrokerName();
ObjectName objName = new ObjectName("org.apache.activemq" + ":BrokerName=" + brokerName + ",Type=" + destType + ",Destination=" + physicalName);
- DestinationViewMBean proxy = null;
+ DestinationViewMBean proxy;
if ("Queue".equals(destType)) {
if (!server.isRegistered(objName)) {
// mbean is not yet registered.Adding the destination to activemq broker.
@@ -133,7 +132,7 @@
}
private MBeanServer getMBeanServer() throws Exception {
- MBeanServerReference ref = (MBeanServerReference) kernel.getGBean(MBeanServerReference.class);
+ MBeanServerReference ref = kernel.getGBean(MBeanServerReference.class);
return ref.getMBeanServer();
}
@@ -141,7 +140,7 @@
// default broker name
String brokerName = "localhost";
try {
- BrokerServiceGBeanImpl ref = (BrokerServiceGBeanImpl) kernel.getGBean(BrokerServiceGBeanImpl.class);
+ BrokerServiceGBeanImpl ref = kernel.getGBean(BrokerServiceGBeanImpl.class);
brokerName = ref.getBrokerName();
} catch (Exception e) {
log.error("Failed to get broker name", e);
Modified: geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/server/BaseJMSPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/server/BaseJMSPortlet.java?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/server/BaseJMSPortlet.java (original)
+++ geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/server/BaseJMSPortlet.java Mon Dec 8 15:59:58 2008
@@ -37,15 +37,15 @@
/**
* Gets a Map relating broker name to JMSBroker instance
*/
- protected static List getBrokerList(RenderRequest renderRequest, JMSManager manager) throws PortletException {
+ protected static List<BrokerWrapper> getBrokerList(RenderRequest renderRequest, JMSManager manager) throws PortletException {
JMSBroker[] brokers = (JMSBroker[]) manager.getContainers();
- List beans = new ArrayList();
+ List<BrokerWrapper> beans = new ArrayList<BrokerWrapper>();
try {
- for (int i = 0; i < brokers.length; i++) {
- AbstractName abstractName = PortletManager.getNameFor(renderRequest, brokers[i]);
+ for (JMSBroker broker : brokers) {
+ AbstractName abstractName = PortletManager.getNameFor(renderRequest, broker);
String displayName = abstractName.getName().get("name").toString();
- beans.add(new BrokerWrapper(displayName, abstractName.toString(), brokers[i]));
+ beans.add(new BrokerWrapper(displayName, abstractName.toString(), broker));
}
} catch (Exception e) {
throw new PortletException(e);
Modified: geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/server/JMSConnectorPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/server/JMSConnectorPortlet.java?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/server/JMSConnectorPortlet.java (original)
+++ geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/server/JMSConnectorPortlet.java Mon Dec 8 15:59:58 2008
@@ -36,7 +36,9 @@
import org.apache.geronimo.management.geronimo.JMSConnector;
import org.apache.geronimo.management.geronimo.JMSManager;
import org.apache.geronimo.management.geronimo.JMSBroker;
+import org.apache.geronimo.management.geronimo.NetworkConnector;
import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.activemq.ActiveMQConnector;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -183,14 +185,12 @@
for (int i = 0; i < brokers.length; i++) {
JMSBroker broker = brokers[i];
AbstractName brokerAbstractName = PortletManager.getNameFor(renderRequest, broker);
- JMSConnector[] connectors = (JMSConnector[]) manager.getConnectorsForContainer(broker);
+ NetworkConnector[] connectors = manager.getConnectorsForContainer(broker);
for (int j = 0; j < connectors.length; j++) {
- JMSConnector connector = connectors[j];
- AbstractName connectorAbstractName = PortletManager.getNameFor(renderRequest,connector);
+ ActiveMQConnector connector = (ActiveMQConnector) connectors[j];
String brokerName = brokerAbstractName.getName().get("name").toString();
- String connectorName = connectorAbstractName.getName().get("name").toString();
ConnectorWrapper info = new ConnectorWrapper(brokerName, brokerAbstractName.toString(),
- connectorName, connectorAbstractName.toString(),
+ connector.getPath(),
connector);
beans.add(info);
}
@@ -238,14 +238,12 @@
public static class ConnectorWrapper {
private String brokerName;
private String brokerURI;
- private String connectorName;
private String connectorURI;
private JMSConnector connector;
- public ConnectorWrapper(String brokerName, String brokerURI, String connectorName, String connectorURI, JMSConnector connector) {
+ public ConnectorWrapper(String brokerName, String brokerURI, String connectorURI, JMSConnector connector) {
this.brokerName = brokerName;
this.brokerURI = brokerURI;
- this.connectorName = connectorName;
this.connectorURI = connectorURI;
this.connector = connector;
}
@@ -254,10 +252,6 @@
return brokerName;
}
- public String getConnectorName() {
- return connectorName;
- }
-
public JMSConnector getConnector() {
return connector;
}
Modified: geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/resources/jms-resource-providers.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/resources/jms-resource-providers.properties?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/resources/jms-resource-providers.properties (original)
+++ geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/resources/jms-resource-providers.properties Mon Dec 8 15:59:58 2008
@@ -19,6 +19,6 @@
##
provider.activemq.name=ActiveMQ
-provider.activemq.rar=org.apache.geronimo.modules/geronimo-activemq-ra//rar
-provider.activemq.dependency=org.apache.geronimo.configs/activemq-broker//car
+provider.activemq.rar=org.apache.geronimo.modules/geronimo-activemq5-ra//rar
+provider.activemq.dependency=org.apache.geronimo.configs/activemq5-broker//car
Modified: geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/webapp/WEB-INF/view/jmsmanager/server/connector/normal.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/webapp/WEB-INF/view/jmsmanager/server/connector/normal.jsp?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/webapp/WEB-INF/view/jmsmanager/server/connector/normal.jsp (original)
+++ geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/webapp/WEB-INF/view/jmsmanager/server/connector/normal.jsp Mon Dec 8 15:59:58 2008
@@ -33,8 +33,8 @@
<th scope="col" class="DarkBackground" align="center"><fmt:message key="jmsmanager.common.broker" /></th>
<th scope="col" class="DarkBackground" align="center"><fmt:message key="jmsmanager.common.protocol" /></th>
<th scope="col" class="DarkBackground" align="center"><fmt:message key="jmsmanager.common.port" /></th>
- <th scope="col" class="DarkBackground" align="center"><fmt:message key="jmsmanager.common.state"/></th>
- <th scope="col" class="DarkBackground" align="center"><fmt:message key="jmsmanager.common.actions"/></th>
+ <%--<th scope="col" class="DarkBackground" align="center"><fmt:message key="jmsmanager.common.state"/></th>--%>
+ <%--<th scope="col" class="DarkBackground" align="center"><fmt:message key="jmsmanager.common.actions"/></th>--%>
</tr>
<c:set var="backgroundClass" value='MediumBackground'/>
<c:forEach var="info" items="${connectors}">
@@ -47,39 +47,38 @@
</c:otherwise>
</c:choose>
<tr>
- <td class="${backgroundClass}">${info.connectorName}</td>
+ <td class="${backgroundClass}">${info.connectorURI}</td>
<td class="${backgroundClass}">${info.brokerName}</td>
<td class="${backgroundClass}">${info.connector.protocol}</td>
<td class="${backgroundClass}">${info.connector.port}</td>
- <td class="${backgroundClass}">${info.connector.stateInstance}</td>
- <td class="${backgroundClass}">
- <c:choose>
- <c:when test="${info.connector.stateInstance.name eq 'running'}">
- <a href="<portlet:actionURL portletMode="view">
- <portlet:param name="mode" value="stop" />
- <portlet:param name="brokerURI" value="${info.brokerURI}" />
- <portlet:param name="connectorURI" value="${info.connectorURI}" />
- </portlet:actionURL>"><fmt:message key="jmsmanager.common.stop"/></a>
- </c:when>
- <c:otherwise>
- <a href="<portlet:actionURL portletMode="view">
- <portlet:param name="mode" value="start" />
- <portlet:param name="brokerURI" value="${info.brokerURI}" />
- <portlet:param name="connectorURI" value="${info.connectorURI}" />
- </portlet:actionURL>"><fmt:message key="jmsmanager.common.start"/></a>
- </c:otherwise>
- </c:choose>
- <a href="<portlet:actionURL portletMode="view">
- <portlet:param name="mode" value="edit" />
- <portlet:param name="brokerURI" value="${info.brokerURI}" />
- <portlet:param name="connectorURI" value="${info.connectorURI}" />
- </portlet:actionURL>"><fmt:message key="jmsmanager.common.edit"/></a>
- <a href="<portlet:actionURL portletMode="view">
- <portlet:param name="mode" value="delete" />
- <portlet:param name="brokerURI" value="${info.brokerURI}" />
- <portlet:param name="connectorURI" value="${info.connectorURI}" />
- </portlet:actionURL>" onClick="return confirm('<fmt:message key="jmsmanager.server.connector.normal.confirmDelete"><fmt:param value="${info.connectorName}"/></fmt:message>');"><fmt:message key="jmsmanager.common.delete"/></a>
- </td>
+ <%--<td class="${backgroundClass}">--%>
+ <%--<c:choose>--%>
+ <%--<c:when test="${info.connector.stateInstance.name eq 'running'}">--%>
+ <%--<a href="<portlet:actionURL portletMode="view">--%>
+ <%--<portlet:param name="mode" value="stop" />--%>
+ <%--<portlet:param name="brokerURI" value="${info.brokerURI}" />--%>
+ <%--<portlet:param name="connectorURI" value="${info.connectorURI}" />--%>
+ <%--</portlet:actionURL>"><fmt:message key="jmsmanager.common.stop"/></a>--%>
+ <%--</c:when>--%>
+ <%--<c:otherwise>--%>
+ <%--<a href="<portlet:actionURL portletMode="view">--%>
+ <%--<portlet:param name="mode" value="start" />--%>
+ <%--<portlet:param name="brokerURI" value="${info.brokerURI}" />--%>
+ <%--<portlet:param name="connectorURI" value="${info.connectorURI}" />--%>
+ <%--</portlet:actionURL>"><fmt:message key="jmsmanager.common.start"/></a>--%>
+ <%--</c:otherwise>--%>
+ <%--</c:choose>--%>
+ <%--<a href="<portlet:actionURL portletMode="view">--%>
+ <%--<portlet:param name="mode" value="edit" />--%>
+ <%--<portlet:param name="brokerURI" value="${info.brokerURI}" />--%>
+ <%--<portlet:param name="connectorURI" value="${info.connectorURI}" />--%>
+ <%--</portlet:actionURL>"><fmt:message key="jmsmanager.common.edit"/></a>--%>
+ <%--<a href="<portlet:actionURL portletMode="view">--%>
+ <%--<portlet:param name="mode" value="delete" />--%>
+ <%--<portlet:param name="brokerURI" value="${info.brokerURI}" />--%>
+ <%--<portlet:param name="connectorURI" value="${info.connectorURI}" />--%>
+ <%--</portlet:actionURL>" onClick="return confirm('<fmt:message key="jmsmanager.server.connector.normal.confirmDelete"><fmt:param value="${info.connectorURI}"/></fmt:message>');"><fmt:message key="jmsmanager.common.delete"/></a>--%>
+ <!--</td>-->
</tr>
</c:forEach>
</table>
Modified: geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/webapp/WEB-INF/view/jmsmanager/server/normal.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/webapp/WEB-INF/view/jmsmanager/server/normal.jsp?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/webapp/WEB-INF/view/jmsmanager/server/normal.jsp (original)
+++ geronimo/server/trunk/plugins/activemq5/activemq5-portlets/src/main/webapp/WEB-INF/view/jmsmanager/server/normal.jsp Mon Dec 8 15:59:58 2008
@@ -29,7 +29,7 @@
<tr>
<th scope="col" class="DarkBackground"><fmt:message key="jmsmanager.common.name"/></th>
- <th scope="col" class="DarkBackground" align="center"><fmt:message key="jmsmanager.common.state"/></th>
+ <%--<th scope="col" class="DarkBackground" align="center"><fmt:message key="jmsmanager.common.state"/></th>--%>
<!--
<th class="DarkBackground" align="center">Actions</th>
-->
@@ -46,33 +46,31 @@
</c:choose>
<tr>
<td class="${backgroundClass}">${entry.brokerName}</td>
- <td class="${backgroundClass}">${entry.broker.stateInstance}</td>
-<!--
- <td class="${backgroundClass}">
- <c:choose>
- <c:when test="${entry.broker.stateInstance.name eq 'running'}">
- <a href="<portlet:actionURL portletMode="view">
- <portlet:param name="mode" value="stop" />
- <portlet:param name="objectName" value="${entry.brokerURI}" />
- </portlet:actionURL>">stop</a>
- </c:when>
- <c:otherwise>
- <a href="<portlet:actionURL portletMode="view">
- <portlet:param name="mode" value="start" />
- <portlet:param name="objectName" value="${entry.brokerURI}" />
- </portlet:actionURL>">start</a>
- </c:otherwise>
- </c:choose>
- <a href="<portlet:actionURL portletMode="view">
- <portlet:param name="mode" value="edit" />
- <portlet:param name="objectName" value="${entry.brokerURI}" />
- </portlet:actionURL>">edit</a>
- <a href="<portlet:actionURL portletMode="view">
- <portlet:param name="mode" value="delete" />
- <portlet:param name="objectName" value="${entry.brokerURI}" />
- </portlet:actionURL>" onClick="return confirm('Are you sure you want to delete ${entry.brokerName}?');">delete</a>
- </td>
--->
+ <%--<td class="${backgroundClass}">--%>
+ <%--<c:choose>--%>
+ <%--<c:when test="${entry.broker.stateInstance.name eq 'running'}">--%>
+ <%--<a href="<portlet:actionURL portletMode="view">--%>
+ <%--<portlet:param name="mode" value="stop" />--%>
+ <%--<portlet:param name="objectName" value="${entry.brokerURI}" />--%>
+ <%--</portlet:actionURL>">stop</a>--%>
+ <%--</c:when>--%>
+ <%--<c:otherwise>--%>
+ <%--<a href="<portlet:actionURL portletMode="view">--%>
+ <%--<portlet:param name="mode" value="start" />--%>
+ <%--<portlet:param name="objectName" value="${entry.brokerURI}" />--%>
+ <%--</portlet:actionURL>">start</a>--%>
+ <%--</c:otherwise>--%>
+ <%--</c:choose>--%>
+ <%--<a href="<portlet:actionURL portletMode="view">--%>
+ <%--<portlet:param name="mode" value="edit" />--%>
+ <%--<portlet:param name="objectName" value="${entry.brokerURI}" />--%>
+ <%--</portlet:actionURL>">edit</a>--%>
+ <%--<a href="<portlet:actionURL portletMode="view">--%>
+ <%--<portlet:param name="mode" value="delete" />--%>
+ <%--<portlet:param name="objectName" value="${entry.brokerURI}" />--%>
+ <%--</portlet:actionURL>" onClick="return confirm('Are you sure you want to delete ${entry.brokerName}?');">delete</a>--%>
+ <!--</td>-->
+
</tr>
</c:forEach>
</table>
Modified: geronimo/server/trunk/plugins/activemq5/activemq5-server/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq5/activemq5-server/pom.xml?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq5/activemq5-server/pom.xml (original)
+++ geronimo/server/trunk/plugins/activemq5/activemq5-server/pom.xml Mon Dec 8 15:59:58 2008
@@ -44,6 +44,18 @@
<version>${geronimoVersion}</version>
<type>car</type>
</dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.configs</groupId>
+ <artifactId>activemq5-ra</artifactId>
+ <version>${geronimoVersion}</version>
+ <type>car</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.plugins</groupId>
+ <artifactId>activemq5-console-jetty</artifactId>
+ <version>${geronimoVersion}</version>
+ <type>car</type>
+ </dependency>
</dependencies>
<build>
Modified: geronimo/server/trunk/plugins/activemq5/geronimo-activemq5/src/main/java/org/apache/geronimo/activemq/BrokerServiceGBeanImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq5/geronimo-activemq5/src/main/java/org/apache/geronimo/activemq/BrokerServiceGBeanImpl.java?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq5/geronimo-activemq5/src/main/java/org/apache/geronimo/activemq/BrokerServiceGBeanImpl.java (original)
+++ geronimo/server/trunk/plugins/activemq5/geronimo-activemq5/src/main/java/org/apache/geronimo/activemq/BrokerServiceGBeanImpl.java Mon Dec 8 15:59:58 2008
@@ -47,10 +47,11 @@
* @version $Rev$ $Date$
*/
@GBean (j2eeType="JMSServer")
-public class BrokerServiceGBeanImpl implements GBeanLifecycle {
+public class BrokerServiceGBeanImpl implements BrokerServiceGBean, GBeanLifecycle {
private static final Logger log = LoggerFactory.getLogger(BrokerServiceGBeanImpl.class);
+ private final String objectName;
private final BrokerService brokerService;
// private ResourceSource<ResourceException> dataSource;
private JMSManager manager;
@@ -60,11 +61,12 @@
@ParamAttribute (name="amqConfigFile") String amqConfigFile,
@ParamAttribute (name="useShutdownHook") boolean useShutdownHook,
@ParamReference (name="ServerInfo") ServerInfo serverInfo,
- @ParamReference (name="MBeanServerReference") MBeanServerReference mbeanServerReference,
+ @ParamReference (name="MBeanServerReference") MBeanServerReference mbeanServerReference,
+ @ParamSpecial (type= SpecialAttributeType.objectName) String objectName,
@ParamSpecial (type=SpecialAttributeType.classLoader) ClassLoader classLoader)
throws Exception {
-
+ this.objectName = objectName;
URI baseDir = serverInfo.resolveServer(amqBaseDir);
URI dataDir = baseDir.resolve(amqDataDir);
URI amqConfigUri = baseDir.resolve(amqConfigFile);
@@ -104,6 +106,10 @@
return brokerService;
}
+ public String getBrokerName() {
+ return brokerService.getBrokerName();
+ }
+
public synchronized void doStart() throws Exception {
}
@@ -135,6 +141,16 @@
// this.dataSource = dataSource;
// }
+ /**
+ * Gets the unique name of this object. The object name must comply with the ObjectName specification
+ * in the JMX specification and the restrictions in the J2EEManagementInterface.
+ *
+ * @return the unique name of this object within the server
+ */
+ public String getObjectName() {
+ return objectName;
+ }
+
public boolean isStateManageable() {
return true;
}
Modified: geronimo/server/trunk/plugins/activemq5/geronimo-activemq5/src/main/java/org/apache/geronimo/activemq/management/ActiveMQManagerGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq5/geronimo-activemq5/src/main/java/org/apache/geronimo/activemq/management/ActiveMQManagerGBean.java?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq5/geronimo-activemq5/src/main/java/org/apache/geronimo/activemq/management/ActiveMQManagerGBean.java (original)
+++ geronimo/server/trunk/plugins/activemq5/geronimo-activemq5/src/main/java/org/apache/geronimo/activemq/management/ActiveMQManagerGBean.java Mon Dec 8 15:59:58 2008
@@ -28,6 +28,7 @@
import org.apache.geronimo.activemq.ActiveMQBroker;
import org.apache.geronimo.activemq.ActiveMQConnector;
import org.apache.geronimo.activemq.ActiveMQManager;
+import org.apache.geronimo.activemq.BrokerServiceGBean;
//import org.apache.geronimo.activemq.TransportConnectorGBeanImpl;
import org.apache.geronimo.gbean.AbstractName;
import org.apache.geronimo.gbean.AbstractNameQuery;
@@ -35,6 +36,9 @@
import org.apache.geronimo.gbean.GBeanInfo;
import org.apache.geronimo.gbean.GBeanInfoBuilder;
import org.apache.geronimo.gbean.ReferencePatterns;
+import org.apache.geronimo.gbean.annotation.GBean;
+import org.apache.geronimo.gbean.annotation.ParamSpecial;
+import org.apache.geronimo.gbean.annotation.SpecialAttributeType;
//import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
import org.apache.geronimo.kernel.GBeanNotFoundException;
import org.apache.geronimo.kernel.Kernel;
@@ -45,6 +49,7 @@
import org.apache.geronimo.management.geronimo.JMSBroker;
import org.apache.geronimo.management.geronimo.JMSConnector;
import org.apache.geronimo.management.geronimo.NetworkConnector;
+import org.apache.activemq.broker.TransportConnector;
/**
* Implementation of the ActiveMQ management interface. These are the ActiveMQ
@@ -52,12 +57,14 @@
*
* @version $Rev$ $Date$
*/
+@GBean
public class ActiveMQManagerGBean implements ActiveMQManager {
private static final Logger log = LoggerFactory.getLogger(ActiveMQManagerGBean.class);
private Kernel kernel;
private String objectName;
- public ActiveMQManagerGBean(Kernel kernel, String objectName) {
+ public ActiveMQManagerGBean(@ParamSpecial(type= SpecialAttributeType.kernel) Kernel kernel,
+ @ParamSpecial(type = SpecialAttributeType.objectName) String objectName) {
this.kernel = kernel;
this.objectName = objectName;
}
@@ -83,108 +90,77 @@
}
public Object[] getContainers() {
- ProxyManager proxyManager = kernel.getProxyManager();
AbstractNameQuery query = new AbstractNameQuery(ActiveMQBroker.class.getName());
- Set names = kernel.listGBeans(query);
+ Set<AbstractName> names = kernel.listGBeans(query);
ActiveMQBroker[] results = new ActiveMQBroker[names.size()];
int i=0;
- for (Iterator it = names.iterator(); it.hasNext(); i++) {
- AbstractName name = (AbstractName) it.next();
- results[i] = (ActiveMQBroker) proxyManager.createProxy(name, ActiveMQBroker.class.getClassLoader());
+ for (AbstractName name: names) {
+ try {
+ results[i] = (ActiveMQBroker) kernel.getGBean(name);
+ } catch (GBeanNotFoundException e) {
+ log.info("broker not found", e);
+ }
}
return results;
}
public String[] getSupportedProtocols() {
// see files in modules/core/src/conf/META-INF/services/org/activemq/transport/server/
- return new String[]{ "tcp", "stomp", "vm", "peer", "udp", "multicast", "failover"};
+ return new String[]{};// "tcp", "stomp", "vm", "peer", "udp", "multicast", "failover"};
}
public NetworkConnector[] getConnectors() {
- ProxyManager proxyManager = kernel.getProxyManager();
- AbstractNameQuery query = new AbstractNameQuery(ActiveMQConnector.class.getName());
- Set names = kernel.listGBeans(query);
- ActiveMQConnector[] results = new ActiveMQConnector[names.size()];
- int i=0;
- for (Iterator it = names.iterator(); it.hasNext(); i++) {
- AbstractName name = (AbstractName) it.next();
- results[i] = (ActiveMQConnector) proxyManager.createProxy(name, ActiveMQConnector.class.getClassLoader());
+ List<NetworkConnector> connectors = getConnectorsList();
+ return connectors.toArray(new NetworkConnector[] {});
+ }
+
+ private List<NetworkConnector> getConnectorsList() {
+ List<NetworkConnector> connectors = new ArrayList<NetworkConnector>();
+ ActiveMQBroker[] brokers = (ActiveMQBroker[]) getContainers();
+ for (ActiveMQBroker broker: brokers) {
+ connectors.addAll(getConnectorListForContainer((BrokerServiceGBean) broker));
}
- return results;
+ return connectors;
}
public NetworkConnector[] getConnectors(String protocol) {
if(protocol == null) {
return getConnectors();
}
- List result = new ArrayList();
- ProxyManager proxyManager = kernel.getProxyManager();
- AbstractNameQuery query = new AbstractNameQuery(ActiveMQConnector.class.getName());
- Set names = kernel.listGBeans(query);
- for (Iterator it = names.iterator(); it.hasNext();) {
- AbstractName name = (AbstractName) it.next();
- try {
- if (kernel.getAttribute(name, "protocol").equals(protocol)) {
- result.add(proxyManager.createProxy(name, ActiveMQConnector.class.getClassLoader()));
- }
- } catch (Exception e) {
- log.error("Unable to check the protocol for a connector", e);
+ List<NetworkConnector> connectors = getConnectorsList();
+ filterConnectorsByProtocol(protocol, connectors);
+ return connectors.toArray(new NetworkConnector[] {});
+ }
+
+ private void filterConnectorsByProtocol(String protocol, List<NetworkConnector> connectors) {
+ for (Iterator<NetworkConnector> connectorIterator = connectors.iterator(); connectorIterator.hasNext();) {
+ if (protocol.equals(connectorIterator.next().getProtocol())) {
+ connectorIterator.remove();
}
}
- return (ActiveMQConnector[]) result.toArray(new ActiveMQConnector[names.size()]);
}
- public NetworkConnector[] getConnectorsForContainer(Object broker) {
- AbstractName containerName = kernel.getAbstractNameFor(broker);
- ProxyManager mgr = kernel.getProxyManager();
- try {
- List results = new ArrayList();
- AbstractNameQuery query = new AbstractNameQuery(ActiveMQConnector.class.getName());
- Set set = kernel.listGBeans(query); // all Jetty connectors
- for (Iterator it = set.iterator(); it.hasNext();) {
- AbstractName name = (AbstractName) it.next(); // a single Jetty connector
- GBeanData data = kernel.getGBeanData(name);
- ReferencePatterns refs = data.getReferencePatterns("brokerService");
- if (containerName.equals(refs.getAbstractName())) {
- results.add(mgr.createProxy(name, ActiveMQConnector.class.getClassLoader()));
- }
- }
- return (ActiveMQConnector[]) results.toArray(new ActiveMQConnector[results.size()]);
- } catch (Exception e) {
- throw (IllegalArgumentException) new IllegalArgumentException("Unable to look up connectors for ActiveMQ broker '"+containerName).initCause(e);
+ public NetworkConnector[] getConnectorsForContainer(Object genericBroker) {
+
+ return getConnectorListForContainer((BrokerServiceGBean) genericBroker).toArray(new NetworkConnector[] {});
+ }
+
+ private List<NetworkConnector> getConnectorListForContainer(BrokerServiceGBean broker) {
+ List<TransportConnector> transportConnectors = broker.getBrokerContainer().getTransportConnectors();
+ List<NetworkConnector> connectors = new ArrayList<NetworkConnector>();
+ for (TransportConnector transportConnector: transportConnectors) {
+ connectors.add(new ActiveMQTransportConnector(transportConnector));
}
+ return connectors;
}
public NetworkConnector[] getConnectorsForContainer(Object broker, String protocol) {
if(protocol == null) {
return getConnectorsForContainer(broker);
}
- AbstractName containerName = kernel.getAbstractNameFor(broker);
- ProxyManager mgr = kernel.getProxyManager();
- try {
- List results = new ArrayList();
- AbstractNameQuery query = new AbstractNameQuery(ActiveMQConnector.class.getName());
- Set set = kernel.listGBeans(query); // all Jetty connectors
- for (Iterator it = set.iterator(); it.hasNext();) {
- AbstractName name = (AbstractName) it.next(); // a single Jetty connector
- GBeanData data = kernel.getGBeanData(name);
- ReferencePatterns refs = data.getReferencePatterns("brokerService");
- if(containerName.equals(refs.getAbstractName())) {
- try {
- String testProtocol = (String) kernel.getAttribute(name, "protocol");
- if(testProtocol != null && testProtocol.equals(protocol)) {
- results.add(mgr.createProxy(name, ActiveMQConnector.class.getClassLoader()));
- }
- } catch (Exception e) {
- log.error("Unable to look up protocol for connector '"+name+"'",e);
- }
- break;
- }
- }
- return (ActiveMQConnector[]) results.toArray(new ActiveMQConnector[results.size()]);
- } catch (Exception e) {
- throw (IllegalArgumentException)new IllegalArgumentException("Unable to look up connectors for ActiveMQ broker '"+containerName +"': ").initCause(e);
- }
+ List<NetworkConnector> connectors = getConnectorListForContainer((BrokerServiceGBean) broker);
+ filterConnectorsByProtocol(protocol, connectors);
+ return connectors.toArray(new NetworkConnector[] {});
}
/**
@@ -193,76 +169,11 @@
* functional (e.g. SSL settings for a secure connector).
*/
public JMSConnector addConnector(JMSBroker broker, String uniqueName, String protocol, String host, int port) {
-// AbstractName brokerAbstractName = kernel.getAbstractNameFor(broker);
-// AbstractName name = kernel.getNaming().createChildName(brokerAbstractName, uniqueName, GBeanInfoBuilder.DEFAULT_J2EE_TYPE);
-// GBeanData connector = new GBeanData(name, TransportConnectorGBeanImpl.GBEAN_INFO);
-// //todo: if SSL is supported, need to add more properties or use a different GBean?
-// connector.setAttribute("protocol", protocol);
-// connector.setAttribute("host", host);
-// connector.setAttribute("port", new Integer(port));
-// connector.setReferencePattern("brokerService", brokerAbstractName);
-// EditableConfigurationManager mgr = ConfigurationUtil.getEditableConfigurationManager(kernel);
-// if(mgr != null) {
-// try {
-// mgr.addGBeanToConfiguration(brokerAbstractName.getArtifact(), connector, false);
-// return (JMSConnector) kernel.getProxyManager().createProxy(name, ActiveMQConnector.class.getClassLoader());
-// } catch (InvalidConfigException e) {
-// log.error("Unable to add GBean", e);
-// return null;
-// } finally {
-// ConfigurationUtil.releaseConfigurationManager(kernel, mgr);
-// }
-// } else {
-// log.warn("The ConfigurationManager in the kernel does not allow editing");
- return null;
-// }
+ throw new RuntimeException("not implemented");
}
public void removeConnector(AbstractName connectorName) {
- try {
- GBeanInfo info = kernel.getGBeanInfo(connectorName);
- boolean found = false;
- Set intfs = info.getInterfaces();
- for (Iterator it = intfs.iterator(); it.hasNext();) {
- String intf = (String) it.next();
- if (intf.equals(ActiveMQConnector.class.getName())) {
- found = true;
- }
- }
- if (!found) {
- throw new GBeanNotFoundException(connectorName);
- }
- EditableConfigurationManager mgr = ConfigurationUtil.getEditableConfigurationManager(kernel);
- if (mgr != null) {
- try {
- mgr.removeGBeanFromConfiguration(connectorName.getArtifact(), connectorName);
- } catch (InvalidConfigException e) {
- log.error("Unable to add GBean", e);
- } finally {
- ConfigurationUtil.releaseConfigurationManager(kernel, mgr);
- }
- } else {
- log.warn("The ConfigurationManager in the kernel does not allow editing");
- }
- } catch (GBeanNotFoundException e) {
- log.warn("No such GBean '" + connectorName + "'"); //todo: what if we want to remove a failed GBean?
- } catch (Exception e) {
- log.error("Failed to remove connector", e);
- }
- }
-
- public static final GBeanInfo GBEAN_INFO;
+ throw new RuntimeException("not implemented");
+ }
- static {
- GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("ActiveMQ Manager", ActiveMQManagerGBean.class);
- infoFactory.addAttribute("kernel", Kernel.class, false);
- infoFactory.addAttribute("objectName", String.class, false);
- infoFactory.addInterface(ActiveMQManager.class);
- infoFactory.setConstructor(new String[]{"kernel", "objectName"});
- GBEAN_INFO = infoFactory.getBeanInfo();
- }
-
- public static GBeanInfo getGBeanInfo() {
- return GBEAN_INFO;
- }
}
Added: geronimo/server/trunk/plugins/activemq5/geronimo-activemq5/src/main/java/org/apache/geronimo/activemq/management/ActiveMQTransportConnector.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq5/geronimo-activemq5/src/main/java/org/apache/geronimo/activemq/management/ActiveMQTransportConnector.java?rev=724558&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/activemq5/geronimo-activemq5/src/main/java/org/apache/geronimo/activemq/management/ActiveMQTransportConnector.java (added)
+++ geronimo/server/trunk/plugins/activemq5/geronimo-activemq5/src/main/java/org/apache/geronimo/activemq/management/ActiveMQTransportConnector.java Mon Dec 8 15:59:58 2008
@@ -0,0 +1,137 @@
+/*
+ * 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.activemq.management;
+
+import java.net.UnknownHostException;
+import java.net.InetSocketAddress;
+import java.net.URISyntaxException;
+import java.io.IOException;
+
+import org.apache.geronimo.activemq.ActiveMQConnector;
+import org.apache.activemq.broker.TransportConnector;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public class ActiveMQTransportConnector implements ActiveMQConnector {
+
+ private static final Logger log = LoggerFactory.getLogger(ActiveMQTransportConnector.class);
+
+ private final TransportConnector transportConnector;
+
+ public ActiveMQTransportConnector(TransportConnector transportConnector) {
+ this.transportConnector = transportConnector;
+ }
+
+ // Additional stuff you can add to an ActiveMQ connector URI
+ public String getPath() {
+ try {
+ return transportConnector.getConnectUri().toString();
+ } catch (Exception e) {
+ log.warn("error", e);
+ return "Error: " + e.getMessage();
+ }
+ }
+
+ public void setPath(String path) {
+ throw new RuntimeException("Not implemented");
+ }
+
+ //????
+ public String getQuery() {
+ try {
+ return transportConnector.getConnectUri().getQuery();
+ } catch (Exception e) {
+ log.warn("error", e);
+ return "Error: " + e.getMessage();
+ }
+ }
+
+ public void setQuery(String query) {
+ throw new RuntimeException("Not implemented");
+ }
+
+ /**
+ * Gets the network protocol that this connector handles.
+ */
+ public String getProtocol() {
+ try {
+ return transportConnector.getConnectUri().getScheme();
+ } catch (Exception e) {
+ log.warn("error", e);
+ return "Error: " + e.getMessage();
+ }
+ }
+
+ /**
+ * Gets the network port that this connector listens on.
+ */
+ public int getPort() {
+ try {
+ return transportConnector.getConnectUri().getPort();
+ } catch (Exception e) {
+ log.warn("error", e);
+ return -1;
+ }
+ }
+
+ /**
+ * Sets the network port that this connector listens on.
+ */
+ public void setPort(int port) {
+ throw new RuntimeException("Not implemented");
+ }
+
+ /**
+ * Gets the hostname/IP that this connector listens on.
+ */
+ public String getHost() {
+ try {
+ return transportConnector.getConnectUri().getHost();
+ } catch (Exception e) {
+ log.warn("error", e);
+ return "Error: " + e.getMessage();
+ }
+ }
+
+ /**
+ * Sets the hostname/IP that this connector listens on. This is typically
+ * most useful for machines with multiple network cards, but can be used
+ * to limit a connector to only listen for connections from the local
+ * machine (127.0.0.1). To listen on all available network interfaces,
+ * specify an address of 0.0.0.0.
+ */
+ public void setHost(String host) throws UnknownHostException {
+ throw new RuntimeException("Not implemented");
+ }
+
+ /**
+ * Every connector must specify a property of type InetSocketAddress
+ * because we use that to identify the network services to print a list
+ * during startup. However, this can be read-only since the host and port
+ * are set separately using setHost and setPort.
+ */
+ public InetSocketAddress getListenAddress() {
+ return new InetSocketAddress(getHost(), getPort());
+ }
+}
Propchange: geronimo/server/trunk/plugins/activemq5/geronimo-activemq5/src/main/java/org/apache/geronimo/activemq/management/ActiveMQTransportConnector.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/trunk/plugins/activemq5/geronimo-activemq5/src/main/java/org/apache/geronimo/activemq/management/ActiveMQTransportConnector.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/server/trunk/plugins/activemq5/geronimo-activemq5/src/main/java/org/apache/geronimo/activemq/management/ActiveMQTransportConnector.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/server/trunk/plugins/activemq5/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/activemq5/pom.xml?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/activemq5/pom.xml (original)
+++ geronimo/server/trunk/plugins/activemq5/pom.xml Mon Dec 8 15:59:58 2008
@@ -42,9 +42,9 @@
<module>activemq5-ra</module>
<module>geronimo-activemq5</module>
<module>geronimo-activemq5-management</module>
- <!--<module>activemq5-portlets</module>-->
- <!--<module>activemq5-console-jetty</module>-->
- <!--<module>activemq5-console-tomcat</module>-->
+ <module>activemq5-portlets</module>
+ <module>activemq5-console-jetty</module>
+ <module>activemq5-console-tomcat</module>
<module>activemq5-server</module>
</modules>
Modified: geronimo/server/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/pom.xml?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/pom.xml (original)
+++ geronimo/server/trunk/pom.xml Mon Dec 8 15:59:58 2008
@@ -96,6 +96,7 @@
<!--<txmanagerVersion>2.2-SNAPSHOT</txmanagerVersion>-->
<monitoringConsoleVersion>2.2-SNAPSHOT</monitoringConsoleVersion>
+<activemqString>activemq5</activemqString>
<!-- Deployers -->
<gbeanDeployerBootstrap>org.apache.geronimo.framework/geronimo-gbean-deployer-bootstrap/${version}/car</gbeanDeployerBootstrap>
Modified: geronimo/server/trunk/testsuite/commands-testsuite/gshell/src/test/java/org/apache/geronimo/testsuite/gshell/deploy/DeployTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/commands-testsuite/gshell/src/test/java/org/apache/geronimo/testsuite/gshell/deploy/DeployTest.java?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/commands-testsuite/gshell/src/test/java/org/apache/geronimo/testsuite/gshell/deploy/DeployTest.java (original)
+++ geronimo/server/trunk/testsuite/commands-testsuite/gshell/src/test/java/org/apache/geronimo/testsuite/gshell/deploy/DeployTest.java Mon Dec 8 15:59:58 2008
@@ -50,7 +50,7 @@
String output = execute(args);
- if (output.indexOf("org.apache.geronimo.configs/activemq-broker") < 0) {
+ if (output.indexOf("org.apache.geronimo.framework/j2ee-system") < 0) {
Assert.fail("deploy/list-modules failed : " + output);
}
}
@@ -61,11 +61,11 @@
String output = execute(args);
- if (output.indexOf("org.apache.geronimo.configs/activemq-broker") < 0) {
- Assert.fail("deploy/list-modules failed : " + output);
+ if (output.indexOf("org.apache.geronimo.framework/j2ee-system") < 0) {
+ Assert.fail("deploy/list-modules --started failed : " + output);
}
if (output.indexOf("org.apache.geronimo.configs/client-corba-yoko") > 0) {
- Assert.fail("deploy/list-modules failed : " + output);
+ Assert.fail("deploy/list-modules --started failed : " + output);
}
}
@@ -75,26 +75,25 @@
String output = execute(args);
- if (output.indexOf("org.apache.geronimo.configs/activemq-broker") > 0) {
- Assert.fail("deploy/list-modules failed : " + output);
+ if (output.indexOf("org.apache.geronimo.framework/j2ee-system") > 0) {
+ Assert.fail("deploy/list-modules --stopped failed : " + output);
}
if (output.indexOf("org.apache.geronimo.configs/client-corba-yoko") < 0) {
- Assert.fail("deploy/list-modules failed : " + output);
+ Assert.fail("deploy/list-modules --stopped failed : " + output);
}
}
public void testListAllPlugins() throws Exception {
- //todo this testcase fails
- /*
- String[] args = new String[]{ "-c", "deploy/list-plugins -u system -w manager" };
+ //todo this testcase fails due to needing to select a repo
+ /*
+ String[] args = new String[]{"deploy/list-plugins " + UP};
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- execute( command, args, null, baos );
+ String output = execute(args);
- if (baos.toString().indexOf("org.apache.geronimo.configs/activemq-broker") < 0) {
- Assert.fail("deploy/list-modules failed : " + baos.toString());
+ if (output.indexOf("org.apache.geronimo.framework/j2ee-system") < 0) {
+ Assert.fail("deploy/list-modules failed : " + output);
}
- */
+ */
}
}
Modified: geronimo/server/trunk/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/JMSServerTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/JMSServerTest.java?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/JMSServerTest.java (original)
+++ geronimo/server/trunk/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/JMSServerTest.java Mon Dec 8 15:59:58 2008
@@ -25,7 +25,7 @@
* @version $Rev$ $Date$
*/
public class JMSServerTest extends TestSupport {
- @Test
+ // @Test
public void testNewListener() throws Exception {
selenium.click("link=JMS Server");
waitForPageLoad();
@@ -43,7 +43,7 @@
assertTrue(selenium.getConfirmation().matches("^Are you sure you want to delete uniquename[\\s\\S]$"));
}
- @Test
+ //@Test
public void testStartStopListener() throws Exception {
selenium.click("link=JMS Server");
waitForPageLoad();
@@ -55,7 +55,7 @@
assertEquals("running", selenium.getText("//tr[3]/td[5]"));
}
- @Test
+ // @Test
public void testEditNetworkListener() throws Exception {
selenium.click("link=JMS Server");
waitForPageLoad();
Modified: geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/main/resources/META-INF/geronimo-application.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/main/resources/META-INF/geronimo-application.xml?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/main/resources/META-INF/geronimo-application.xml (original)
+++ geronimo/server/trunk/testsuite/enterprise-testsuite/jms-tests/jms-ear/src/main/resources/META-INF/geronimo-application.xml Mon Dec 8 15:59:58 2008
@@ -32,7 +32,7 @@
<dep:dependencies>
<dep:dependency>
<dep:groupId>org.apache.geronimo.configs</dep:groupId>
- <dep:artifactId>activemq-broker</dep:artifactId>
+ <dep:artifactId>activemq5-broker</dep:artifactId>
<dep:version>${version}</dep:version>
<dep:type>car</dep:type>
</dep:dependency>
@@ -67,7 +67,7 @@
<connector>TestJMS</connector>
<external-path xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
<dep:groupId>org.apache.geronimo.modules</dep:groupId>
- <dep:artifactId>geronimo-activemq-ra</dep:artifactId>
+ <dep:artifactId>geronimo-activemq5-ra</dep:artifactId>
<dep:type>rar</dep:type>
</external-path>
<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
Modified: geronimo/server/trunk/testsuite/web-testsuite/test-web-references/web-references-ear/src/main/resources/META-INF/geronimo-application.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/web-testsuite/test-web-references/web-references-ear/src/main/resources/META-INF/geronimo-application.xml?rev=724558&r1=724557&r2=724558&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/web-testsuite/test-web-references/web-references-ear/src/main/resources/META-INF/geronimo-application.xml (original)
+++ geronimo/server/trunk/testsuite/web-testsuite/test-web-references/web-references-ear/src/main/resources/META-INF/geronimo-application.xml Mon Dec 8 15:59:58 2008
@@ -32,7 +32,7 @@
</dep:dependency>
<dep:dependency>
<dep:groupId>org.apache.geronimo.configs</dep:groupId>
- <dep:artifactId>activemq-ra</dep:artifactId>
+ <dep:artifactId>activemq5-ra</dep:artifactId>
</dep:dependency>
</dep:dependencies>
</dep:environment>