diff --git a/activemq-gbean-management/src/main/java/org/activemq/gbean/ActiveMQBroker.java b/activemq-gbean-management/src/main/java/org/activemq/gbean/ActiveMQBroker.java deleted file mode 100644 index 70cb1c13df..0000000000 --- a/activemq-gbean-management/src/main/java/org/activemq/gbean/ActiveMQBroker.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * - * Copyright 2004 Protique Ltd - * - * Licensed 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.activemq.gbean; - -import org.apache.geronimo.management.geronimo.JMSBroker; - -/** - * The management interface for the ActiveMQ broker GBean. - * This is separate from ActiveMQContainer because that interface has hard - * links to code in activemq-core, yet we still want to be able to - * distinguish ActiveMQ brokers from non-ActiveMQ JMS brokers. - * - * @version $Revision: 1.0$ - */ -public interface ActiveMQBroker extends JMSBroker { -} diff --git a/activemq-gbean-management/src/main/java/org/activemq/gbean/ActiveMQConnector.java b/activemq-gbean-management/src/main/java/org/activemq/gbean/ActiveMQConnector.java deleted file mode 100644 index 44c4c4f03f..0000000000 --- a/activemq-gbean-management/src/main/java/org/activemq/gbean/ActiveMQConnector.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * - * Copyright 2004 Protique Ltd - * - * Licensed 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.activemq.gbean; - -import org.apache.geronimo.management.geronimo.JMSConnector; - -/** - * The GBean interface for the ActiveMQ network connector GBean - * - * @version $Revision: 1.0$ - */ -public interface ActiveMQConnector extends JMSConnector { - public final static String CONNECTOR_J2EE_TYPE = "JMSConnector"; - - // Additional stuff you can add to an ActiveMQ connector URI - public String getPath(); - public void setPath(String path); - public String getQuery(); - public void setQuery(String query); -} diff --git a/activemq-gbean-management/src/main/java/org/activemq/gbean/ActiveMQManager.java b/activemq-gbean-management/src/main/java/org/activemq/gbean/ActiveMQManager.java deleted file mode 100644 index 8563cfd0ca..0000000000 --- a/activemq-gbean-management/src/main/java/org/activemq/gbean/ActiveMQManager.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * - * Copyright 2004 Protique Ltd - * - * Licensed 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.activemq.gbean; - -import org.apache.geronimo.management.geronimo.JMSManager; - -/** - * The GBean interface for the ActiveMQ management GBean. This defines the - * features that should be available to the management interface at runtime. - * - * @version $Revision: 1.0$ - */ -public interface ActiveMQManager extends JMSManager { -} diff --git a/activemq-gbean-management/src/main/java/org/apache/activemq/gbean/ActiveMQBroker.java b/activemq-gbean-management/src/main/java/org/apache/activemq/gbean/ActiveMQBroker.java new file mode 100644 index 0000000000..7b0e08f1a0 --- /dev/null +++ b/activemq-gbean-management/src/main/java/org/apache/activemq/gbean/ActiveMQBroker.java @@ -0,0 +1,30 @@ +/** + * + * Copyright 2005-2006 The Apache Software Foundation + * + * Licensed 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.activemq.gbean; + +import org.apache.geronimo.management.geronimo.JMSBroker; + +/** + * The management interface for the ActiveMQ broker GBean. + * This is separate from ActiveMQContainer because that interface has hard + * links to code in activemq-core, yet we still want to be able to + * distinguish ActiveMQ brokers from non-ActiveMQ JMS brokers. + * + * @version $Revision: 1.0$ + */ +public interface ActiveMQBroker extends JMSBroker { +} diff --git a/activemq-gbean-management/src/main/java/org/apache/activemq/gbean/ActiveMQConnector.java b/activemq-gbean-management/src/main/java/org/apache/activemq/gbean/ActiveMQConnector.java new file mode 100644 index 0000000000..7afb11d3b9 --- /dev/null +++ b/activemq-gbean-management/src/main/java/org/apache/activemq/gbean/ActiveMQConnector.java @@ -0,0 +1,34 @@ +/** + * + * Copyright 2005-2006 The Apache Software Foundation + * + * Licensed 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.activemq.gbean; + +import org.apache.geronimo.management.geronimo.JMSConnector; + +/** + * The GBean interface for the ActiveMQ network connector GBean + * + * @version $Revision: 1.0$ + */ +public interface ActiveMQConnector extends JMSConnector { + public final static String CONNECTOR_J2EE_TYPE = "JMSConnector"; + + // Additional stuff you can add to an ActiveMQ connector URI + public String getPath(); + public void setPath(String path); + public String getQuery(); + public void setQuery(String query); +} diff --git a/activemq-gbean-management/src/main/java/org/apache/activemq/gbean/ActiveMQManager.java b/activemq-gbean-management/src/main/java/org/apache/activemq/gbean/ActiveMQManager.java new file mode 100644 index 0000000000..316269383d --- /dev/null +++ b/activemq-gbean-management/src/main/java/org/apache/activemq/gbean/ActiveMQManager.java @@ -0,0 +1,28 @@ +/** + * + * Copyright 2005-2006 The Apache Software Foundation + * + * Licensed 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.activemq.gbean; + +import org.apache.geronimo.management.geronimo.JMSManager; + +/** + * The GBean interface for the ActiveMQ management GBean. This defines the + * features that should be available to the management interface at runtime. + * + * @version $Revision: 1.0$ + */ +public interface ActiveMQManager extends JMSManager { +} diff --git a/activemq-gbean-management/src/main/java/org/activemq/gbean/package.html b/activemq-gbean-management/src/main/java/org/apache/activemq/gbean/package.html similarity index 100% rename from activemq-gbean-management/src/main/java/org/activemq/gbean/package.html rename to activemq-gbean-management/src/main/java/org/apache/activemq/gbean/package.html diff --git a/activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java b/activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java index 25d948ccfc..44f925c2c2 100755 --- a/activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java +++ b/activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java @@ -36,18 +36,10 @@ public class BrokerServiceGBeanImpl implements GBeanLifecycle, BrokerServiceGBea private Log log = LogFactory.getLog(getClass().getName()); private String brokerName; - private final URI brokerUri; + private String brokerUri; private BrokerService brokerService; public BrokerServiceGBeanImpl() { - brokerName = null; - brokerUri=null; - } - - public BrokerServiceGBeanImpl(String brokerName, URI brokerUri) { - assert brokerName != null; - this.brokerName = brokerName; - this.brokerUri=brokerUri; } public synchronized BrokerService getBrokerContainer() { @@ -69,7 +61,7 @@ public class BrokerServiceGBeanImpl implements GBeanLifecycle, BrokerServiceGBea protected BrokerService createContainer() throws Exception { if( brokerUri!=null ) { - BrokerService answer = BrokerFactory.createBroker(brokerUri); + BrokerService answer = BrokerFactory.createBroker(new URI(brokerUri)); brokerName = answer.getBrokerName(); return answer; } else { @@ -104,9 +96,9 @@ public class BrokerServiceGBeanImpl implements GBeanLifecycle, BrokerServiceGBea static { GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("ActiveMQ Message Broker", BrokerServiceGBeanImpl.class, "JMSServer"); infoFactory.addAttribute("brokerName", String.class, true); - infoFactory.addAttribute("brokerUri", URI.class, true); + infoFactory.addAttribute("brokerUri", String.class, true); infoFactory.addInterface(BrokerServiceGBean.class); - infoFactory.setConstructor(new String[]{"brokerName, brokerUri"}); + // infoFactory.setConstructor(new String[]{"brokerName, brokerUri"}); GBEAN_INFO = infoFactory.getBeanInfo(); } @@ -121,9 +113,17 @@ public class BrokerServiceGBeanImpl implements GBeanLifecycle, BrokerServiceGBea return brokerName; } - public URI getBrokerUri() { + public String getBrokerUri() { return brokerUri; } + public void setBrokerName(String brokerName) { + this.brokerName = brokerName; + } + + public void setBrokerUri(String brokerUri) { + this.brokerUri = brokerUri; + } + } \ No newline at end of file diff --git a/project.properties b/project.properties index 43045676d6..268e57db45 100755 --- a/project.properties +++ b/project.properties @@ -14,6 +14,8 @@ activemq-ra/project.xml,\ activemq-web/project.xml,\ activemq-console/project.xml,\ activemq-optional/project.xml,\ +activemq-gbean/project.xml,\ +activemq-gbean-management/project.xml,\ assembly/project.xml #activeio/project.xml,\ #activemq-systest/project.xml,\