Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 723E918DCF for ; Wed, 29 Jul 2015 21:22:11 +0000 (UTC) Received: (qmail 24504 invoked by uid 500); 29 Jul 2015 21:22:11 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 24376 invoked by uid 500); 29 Jul 2015 21:22:11 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 22607 invoked by uid 99); 29 Jul 2015 21:22:08 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jul 2015 21:22:08 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 72813E682D; Wed, 29 Jul 2015 21:22:08 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: clebertsuconic@apache.org To: commits@activemq.apache.org Date: Wed, 29 Jul 2015 21:22:28 -0000 Message-Id: In-Reply-To: <063ef87492064bc7b8b78a910fba59d0@git.apache.org> References: <063ef87492064bc7b8b78a910fba59d0@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [22/24] activemq-artemis git commit: ARTEMIS-178 Refactor examples to use CLI http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/ActiveMQBootstrap.java ---------------------------------------------------------------------- diff --git a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/ActiveMQBootstrap.java b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/ActiveMQBootstrap.java deleted file mode 100644 index 35f38da..0000000 --- a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/ActiveMQBootstrap.java +++ /dev/null @@ -1,270 +0,0 @@ -/* - * 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.activemq.artemis.server; - -import java.io.File; -import java.lang.management.ManagementFactory; -import java.util.HashMap; -import java.util.Map; -import java.util.Timer; -import java.util.TimerTask; - -import org.apache.activemq.artemis.core.config.Configuration; -import org.apache.activemq.artemis.core.config.FileDeploymentManager; -import org.apache.activemq.artemis.core.config.HAPolicyConfiguration; -import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl; -import org.apache.activemq.artemis.core.config.impl.FileConfiguration; -import org.apache.activemq.artemis.core.config.impl.FileSecurityConfiguration; -import org.apache.activemq.artemis.core.config.impl.SecurityConfiguration; -import org.apache.activemq.artemis.core.server.ActiveMQServer; -import org.apache.activemq.artemis.core.server.JournalType; -import org.apache.activemq.artemis.core.server.NodeManager; -import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl; -import org.apache.activemq.artemis.core.server.impl.InVMNodeManager; -import org.apache.activemq.artemis.jms.server.JMSServerManager; -import org.apache.activemq.artemis.jms.server.config.JMSConfiguration; -import org.apache.activemq.artemis.jms.server.config.impl.JMSConfigurationImpl; -import org.apache.activemq.artemis.jms.server.config.impl.FileJMSConfiguration; -import org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl; -import org.apache.activemq.artemis.maven.InVMNodeManagerServer; -import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManager; -import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManagerImpl; - -/** - * This will bootstrap the HornetQ Server and also the naming server if required - */ -public class ActiveMQBootstrap -{ - private final String configurationDir; - - private final Boolean waitOnStart; - - private final String nodeId; - - private static Map managerMap = new HashMap(); - - private boolean spawned = false; - - private ActiveMQServer server; - - private Configuration configuration; - - private JMSConfiguration jmsFileConfiguration; - - private SecurityConfiguration securityConfiguration; - - private JMSServerManager manager; - - private ActiveMQSecurityManager securityManager; - - - public ActiveMQBootstrap(String configurationDir, Boolean waitOnStart, String nodeId, ActiveMQSecurityManager securityManager) - { - this.configurationDir = configurationDir; - this.waitOnStart = waitOnStart; - this.nodeId = nodeId; - this.securityManager = securityManager; - } - - public ActiveMQBootstrap(String[] args) - { - this.configurationDir = args[0]; - this.waitOnStart = Boolean.valueOf(args[1]); - this.nodeId = args[2]; - spawned = true; - } - - public void execute() throws Exception - { - try - { - if (configurationDir != null) - { - //extendPluginClasspath(configurationDir); - configuration = new FileConfiguration(); - File file = new File(new File(configurationDir), "broker.xml"); - jmsFileConfiguration = new FileJMSConfiguration(); - FileDeploymentManager deploymentManager = new FileDeploymentManager(file.toURI().toString()); - deploymentManager.addDeployable((FileConfiguration)configuration); - deploymentManager.addDeployable((FileJMSConfiguration) jmsFileConfiguration); - - securityConfiguration = new FileSecurityConfiguration(new File(configurationDir, "artemis-users.properties").toURI().toString(), - new File(configurationDir, "artemis-roles.properties").toURI().toString(), - "guest", - false, - null); - ((FileSecurityConfiguration)securityConfiguration).start(); - deploymentManager.readConfiguration(); - } - else - { - configuration = new ConfigurationImpl(); - configuration.setJournalType(JournalType.NIO); - jmsFileConfiguration = new JMSConfigurationImpl(); - securityConfiguration = new SecurityConfiguration(); - } - - createServer(configuration, jmsFileConfiguration); - - if (waitOnStart) - { - String dirName = System.getProperty("activemq.config.dir", "."); - final File file = new File(dirName + "/STOP_ME"); - if (file.exists()) - { - file.delete(); - } - - while (!file.exists()) - { - Thread.sleep(500); - } - - manager.stop(); - file.delete(); - } - else - { - String dirName = configurationDir != null ? configurationDir : "."; - final File stopFile = new File(dirName + "/STOP_ME"); - if (stopFile.exists()) - { - stopFile.delete(); - } - final File killFile = new File(dirName + "/KILL_ME"); - if (killFile.exists()) - { - killFile.delete(); - } - final File restartFile = new File(dirName + "/RESTART_ME"); - if (restartFile.exists()) - { - restartFile.delete(); - } - final Timer timer = new Timer("ActiveMQ Artemis Server Shutdown Timer", false); - timer.scheduleAtFixedRate(new ServerStopTimerTask(stopFile, killFile, restartFile, timer), 500, 500); - } - } - catch (Exception e) - { - e.printStackTrace(); - throw new Exception(e.getMessage()); - } - } - - private void createServer(Configuration configuration, JMSConfiguration jmsFileConfiguration) throws Exception - { - if (nodeId != null && !nodeId.equals("") && !nodeId.equals("null")) - { - InVMNodeManager nodeManager = (InVMNodeManager) managerMap.get(nodeId); - if (nodeManager == null) - { - boolean replicatedBackup = configuration.getHAPolicyConfiguration().getType() == HAPolicyConfiguration.TYPE.REPLICA; - nodeManager = new InVMNodeManager(replicatedBackup, configuration.getJournalLocation()); - managerMap.put(nodeId, nodeManager); - } - server = new InVMNodeManagerServer(configuration, ManagementFactory.getPlatformMBeanServer(), - securityManager != null ? securityManager : new ActiveMQSecurityManagerImpl(securityConfiguration), nodeManager); - } - else - { - server = new ActiveMQServerImpl(configuration, ManagementFactory.getPlatformMBeanServer(), - securityManager != null ? securityManager : new ActiveMQSecurityManagerImpl(securityConfiguration)); - } - - manager = new JMSServerManagerImpl(server, jmsFileConfiguration); - manager.start(); - } - - private class ServerStopTimerTask extends TimerTask - { - private final File stopFile; - private final Timer timer; - private final File killFile; - private final File restartFile; - - public ServerStopTimerTask(File stopFile, File killFile, File restartFile, Timer timer) - { - this.stopFile = stopFile; - this.killFile = killFile; - this.restartFile = restartFile; - this.timer = timer; - } - - @Override - public void run() - { - if (stopFile.exists()) - { - try - { - timer.cancel(); - } - finally - { - try - { - if (manager != null) - { - manager.stop(); - manager = null; - } - server = null; - stopFile.delete(); - } - catch (Exception e) - { - e.printStackTrace(); - } - } - if (spawned) - { - Runtime.getRuntime() - .halt(666); - } - } - else if (killFile.exists()) - { - try - { - manager.getActiveMQServer() - .stop(true); - manager.stop(); - manager = null; - server = null; - killFile.delete(); - } - catch (Exception e) - { - e.printStackTrace(); - } - } - else if (restartFile.exists()) - { - try - { - createServer(configuration, jmsFileConfiguration); - restartFile.delete(); - } - catch (Exception e) - { - e.printStackTrace(); - } - } - } - } -} http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/SpawnedActiveMQBootstrap.java ---------------------------------------------------------------------- diff --git a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/SpawnedActiveMQBootstrap.java b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/SpawnedActiveMQBootstrap.java deleted file mode 100644 index c7829d8..0000000 --- a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/SpawnedActiveMQBootstrap.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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.activemq.artemis.server; - -/** - * This class will be spawned in a new vm and will call the bootstrap - */ -public class SpawnedActiveMQBootstrap -{ - public static void main(final String[] args) - { - ActiveMQBootstrap bootstrap; - try - { - bootstrap = new ActiveMQBootstrap(args); - bootstrap.execute(); - System.out.println("STARTED::"); - } - catch (Throwable e) - { - System.out.println("FAILED::" + e.getMessage()); - } - } -} http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/SpawnedVMSupport.java ---------------------------------------------------------------------- diff --git a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/SpawnedVMSupport.java b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/SpawnedVMSupport.java deleted file mode 100644 index f67fa35..0000000 --- a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/SpawnedVMSupport.java +++ /dev/null @@ -1,252 +0,0 @@ -/* - * 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.activemq.artemis.server; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; - -import org.apache.maven.artifact.Artifact; - -public class SpawnedVMSupport -{ - public static Process spawnVM(List arts, - final String logName, - final String className, - final Properties properties, - final boolean logOutput, - final String success, - final String failure, - final String workDir, - final String configDir, - boolean debug, - final String... args) throws Exception - { - StringBuffer sb = new StringBuffer(); - - sb.append("java") - .append(' '); - StringBuffer props = new StringBuffer(); - if (properties != null) - { - for (Map.Entry entry : properties.entrySet()) - { - props.append("-D") - .append(entry.getKey()) - .append("=") - .append(entry.getValue()) - .append(" "); - } - } - String vmarg = props.toString(); - String osName = System.getProperty("os.name"); - osName = (osName != null) ? osName.toLowerCase() : ""; - boolean isWindows = osName.contains("win"); - if (isWindows) - { - vmarg = vmarg.replaceAll("/", "\\\\"); - } - sb.append(vmarg) - .append(" "); - String pathSeparater = System.getProperty("path.separator"); - StringBuilder classpath = new StringBuilder(); - for (Artifact artifact : arts) - { - classpath.append(artifact.getFile() - .getAbsolutePath()) - .append(pathSeparater); - } - classpath.append(configDir) - .append(pathSeparater); - - if (isWindows) - { - sb.append("-cp") - .append(" \"") - .append(classpath.toString()) - .append("\" "); - } - else - { - sb.append("-cp") - .append(" ") - .append(classpath.toString()) - .append(" "); - } - - // FIXME - not good to assume path separator - String libPath = "-Djava.library.path=" + System.getProperty("java.library.path", "./native/bin"); - if (isWindows) - { - libPath = libPath.replaceAll("/", "\\\\"); - libPath = "\"" + libPath + "\""; - } - sb.append("-Djava.library.path=") - .append(libPath) - .append(" "); - if (debug) - { - sb.append("-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 "); - } - - sb.append(className) - .append(' '); - - for (String arg : args) - { - sb.append(arg) - .append(' '); - } - - String commandLine = sb.toString(); - - //SpawnedVMSupport.log.trace("command line: " + commandLine); - - Process process = Runtime.getRuntime() - .exec(commandLine, null, new File(workDir)); - - //SpawnedVMSupport.log.trace("process: " + process); - - CountDownLatch latch = new CountDownLatch(1); - - ProcessLogger outputLogger = new ProcessLogger(logOutput, - process.getInputStream(), - logName, - false, - success, - failure, - latch); - outputLogger.start(); - - // Adding a reader to System.err, so the VM won't hang on a System.err.println as identified on this forum thread: - // http://www.jboss.org/index.html?module=bb&op=viewtopic&t=151815 - ProcessLogger errorLogger = new ProcessLogger(true, - process.getErrorStream(), - logName, - true, - success, - failure, - latch); - errorLogger.start(); - - if (!latch.await(60, TimeUnit.SECONDS)) - { - process.destroy(); - throw new RuntimeException("Timed out waiting for server to start"); - } - - if (outputLogger.failed || errorLogger.failed) - { - try - { - process.destroy(); - } - catch (Throwable e) - { - } - throw new RuntimeException("server failed to start"); - } - return process; - } - - /** - * Redirect the input stream to a logger (as debug logs) - */ - static class ProcessLogger extends Thread - { - private final InputStream is; - - private final String logName; - - private final boolean print; - - private final boolean sendToErr; - - private final String success; - - private final String failure; - - private final CountDownLatch latch; - - boolean failed = false; - - ProcessLogger(final boolean print, - final InputStream is, - final String logName, - final boolean sendToErr, - final String success, - final String failure, - final CountDownLatch latch) throws ClassNotFoundException - { - this.is = is; - this.print = print; - this.logName = logName; - this.sendToErr = sendToErr; - this.success = success; - this.failure = failure; - this.latch = latch; - setDaemon(false); - } - - @Override - public void run() - { - try - { - InputStreamReader isr = new InputStreamReader(is); - BufferedReader br = new BufferedReader(isr); - String line; - while ((line = br.readLine()) != null) - { - if (line.startsWith(success)) - { - failed = false; - latch.countDown(); - } - else if (line.startsWith(failure)) - { - failed = true; - latch.countDown(); - } - if (print) - { - if (sendToErr) - { - System.err.println(logName + " err:" + line); - } - else - { - System.out.println(logName + " out:" + line); - } - } - } - } - catch (IOException e) - { - // ok, stream closed - } - - } - } -} http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/aerogear/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/aerogear/pom.xml b/examples/jms/aerogear/pom.xml index 1e7bfe9..f99707b 100644 --- a/examples/jms/aerogear/pom.xml +++ b/examples/jms/aerogear/pom.xml @@ -31,6 +31,7 @@ under the License. + 2.2.1 ${project.basedir}/../../.. @@ -40,13 +41,46 @@ under the License. - org.apache.activemq.examples.jms - common + org.apache.activemq + artemis-cli ${project.version} + + + + org.apache.maven + maven-artifact + ${mavenVersion} + + + org.apache.maven + maven-plugin-api + ${mavenVersion} + + + org.apache.maven + maven-project + ${mavenVersion} + + + org.apache.maven + maven-model + ${mavenVersion} + + + org.apache.maven + maven-core + ${mavenVersion} + - org.apache.geronimo.specs - geronimo-jms_2.0_spec + org.apache.maven + maven-artifact-manager + ${mavenVersion} + + + org.apache.maven + maven-repository-metadata + ${mavenVersion} @@ -60,29 +94,39 @@ under the License. artemis-maven-plugin + create + + create + + + + + + org.apache.activemq:artemis-aerogear-integration:${project.version} + org.jboss.aerogear:unifiedpush-java-client:1.0.0 + net.iharder:base64:2.3.8 + com.fasterxml.jackson.core:jackson-annotations:2.3.0 + com.fasterxml.jackson.core:jackson-core:2.3.0 + org.jboss.resteasy:resteasy-jackson-provider:2.3.2.Final + org.codehaus.jackson:jackson-core-asl:1.8.5 + org.codehaus.jackson:jackson-mapper-asl:1.8.5 + org.codehaus.jackson:jackson-jaxrs:1.8.5 + org.codehaus.jackson:jackson-xc:1.8.5 + + + + start - start + cli - - - data.dir - ${basedir}/target/ - - - endpoint - ${endpoint} - - - applicationid - ${applicationid} - - - mastersecret - ${mastersecret} - - + true + true + + + run + @@ -93,15 +137,20 @@ under the License. org.apache.activemq.artemis.jms.example.AerogearExample - tcp://localhost:61616 + ${basedir}/target/server0 stop - stop + cli + + + stop + + @@ -110,45 +159,7 @@ under the License. artemis-jms-aerogear-example ${project.version} - - org.apache.activemq - artemis-core-client - ${project.version} - - - org.apache.activemq - artemis-server - ${project.version} - - - org.apache.activemq - artemis-jms-client - ${project.version} - - - org.apache.activemq - artemis-jms-server - ${project.version} - - - org.apache.activemq - artemis-aerogear-integration - ${project.version} - - - io.netty - netty-all - ${netty.version} - - - org.apache.geronimo.specs - geronimo-jms_2.0_spec - - - false - ${basedir}/target/classes/activemq/server0 - http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/aerogear/src/main/java/org/apache/activemq/artemis/jms/example/AerogearExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/aerogear/src/main/java/org/apache/activemq/artemis/jms/example/AerogearExample.java b/examples/jms/aerogear/src/main/java/org/apache/activemq/artemis/jms/example/AerogearExample.java index c22b0da..346b8a1 100644 --- a/examples/jms/aerogear/src/main/java/org/apache/activemq/artemis/jms/example/AerogearExample.java +++ b/examples/jms/aerogear/src/main/java/org/apache/activemq/artemis/jms/example/AerogearExample.java @@ -19,27 +19,17 @@ package org.apache.activemq.artemis.jms.example; import javax.jms.Connection; import javax.jms.ConnectionFactory; import javax.jms.Message; -import javax.jms.MessageConsumer; import javax.jms.MessageProducer; import javax.jms.Queue; import javax.jms.Session; -import javax.jms.TextMessage; import javax.naming.InitialContext; -import org.apache.activemq.artemis.common.example.ActiveMQExample; - /** * A simple JMS Queue example that creates a producer and consumer on a queue and sends then receives a message. */ -public class AerogearExample extends ActiveMQExample +public class AerogearExample { - public static void main(final String[] args) - { - new AerogearExample().run(args); - } - - @Override - public boolean runExample() throws Exception + public static void main(final String[] args) throws Exception { Connection connection = null; InitialContext initialContext = null; @@ -75,8 +65,6 @@ public class AerogearExample extends ActiveMQExample System.out.println("now check your mobile app and press enter"); System.in.read(); - - return true; } finally { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/aerogear/src/main/resources/activemq/server0/artemis-roles.properties ---------------------------------------------------------------------- diff --git a/examples/jms/aerogear/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/aerogear/src/main/resources/activemq/server0/artemis-roles.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/aerogear/src/main/resources/activemq/server0/artemis-roles.properties +++ /dev/null @@ -1,17 +0,0 @@ -## --------------------------------------------------------------------------- -## 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. -## --------------------------------------------------------------------------- -guest=guest \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/aerogear/src/main/resources/activemq/server0/artemis-users.properties ---------------------------------------------------------------------- diff --git a/examples/jms/aerogear/src/main/resources/activemq/server0/artemis-users.properties b/examples/jms/aerogear/src/main/resources/activemq/server0/artemis-users.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/aerogear/src/main/resources/activemq/server0/artemis-users.properties +++ /dev/null @@ -1,17 +0,0 @@ -## --------------------------------------------------------------------------- -## 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. -## --------------------------------------------------------------------------- -guest=guest \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/aerogear/src/main/resources/activemq/server0/broker.xml ---------------------------------------------------------------------- diff --git a/examples/jms/aerogear/src/main/resources/activemq/server0/broker.xml b/examples/jms/aerogear/src/main/resources/activemq/server0/broker.xml index 8645df4..90c93e6 100644 --- a/examples/jms/aerogear/src/main/resources/activemq/server0/broker.xml +++ b/examples/jms/aerogear/src/main/resources/activemq/server0/broker.xml @@ -29,13 +29,13 @@ under the License. - ${data.dir}/server0/data/messaging/bindings + ${data.dir:../data}/bindings - ${data.dir}/server0/data/messaging/journal + ${data.dir:../data}/journal - ${data.dir}/server0/data/messaging/largemessages + ${data.dir:../data}/largemessages - ${data.dir}/server0/data/messaging/paging + ${data.dir:../data}/paging @@ -52,7 +52,7 @@ under the License. - org.apache.activemq.integration.aerogear.AeroGearConnectorServiceFactory + org.apache.activemq.artemis.integration.aerogear.AeroGearConnectorServiceFactory http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/application-layer-failover/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/application-layer-failover/pom.xml b/examples/jms/application-layer-failover/pom.xml index 797cbe6..9f4abb5 100644 --- a/examples/jms/application-layer-failover/pom.xml +++ b/examples/jms/application-layer-failover/pom.xml @@ -57,23 +57,22 @@ under the License. artemis-maven-plugin - start0 + create - start + create - ${basedir}/target/classes/activemq/server0 + ${basedir}/target/server0 - start1 + create2 - start + create - ${basedir}/target/classes/activemq/server1 - INFO: AMQ221001 - true + ${basedir}/target/server1 + 1 @@ -84,33 +83,9 @@ under the License. org.apache.activemq.artemis.jms.example.ApplicationLayerFailoverExample - tcp://localhost:61616 - tcp://localhost:61617 + ${basedir}/target/server0 + ${basedir}/target/server1 - - - exampleConfigDir - ${basedir}/target/classes/activemq - - - - - - stop0 - - stop - - - ${basedir}/target/classes/activemq/server0 - - - - stop1 - - stop - - - ${basedir}/target/classes/activemq/server1 @@ -120,41 +95,7 @@ under the License. artemis-jms-application-layer-failover-example ${project.version} - - org.apache.activemq - artemis-core-client - ${project.version} - - - org.apache.activemq - artemis-server - ${project.version} - - - org.apache.activemq - artemis-jms-client - ${project.version} - - - org.apache.activemq - artemis-jms-server - ${project.version} - - - io.netty - netty-all - ${netty.version} - - - org.apache.geronimo.specs - geronimo-jms_2.0_spec - ${geronimo.jms.2.spec.version} - - - false - ${basedir}/target/classes/activemq/server0 - http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/application-layer-failover/src/main/java/org/apache/activemq/artemis/jms/example/ApplicationLayerFailoverExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/application-layer-failover/src/main/java/org/apache/activemq/artemis/jms/example/ApplicationLayerFailoverExample.java b/examples/jms/application-layer-failover/src/main/java/org/apache/activemq/artemis/jms/example/ApplicationLayerFailoverExample.java index 46900f2..ca916ee 100644 --- a/examples/jms/application-layer-failover/src/main/java/org/apache/activemq/artemis/jms/example/ApplicationLayerFailoverExample.java +++ b/examples/jms/application-layer-failover/src/main/java/org/apache/activemq/artemis/jms/example/ApplicationLayerFailoverExample.java @@ -99,7 +99,11 @@ public class ApplicationLayerFailoverExample extends ActiveMQExample System.out.println("Killing the server"); - killServer(0, 1); + killServer(0); + + // this utility method will wait for the server1 to be activated + waitForServerStart(1, 20000); + // Step 6. Wait for the client side to register the failure and reconnect http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/application-layer-failover/src/main/resources/activemq/server0/artemis-roles.properties ---------------------------------------------------------------------- diff --git a/examples/jms/application-layer-failover/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/application-layer-failover/src/main/resources/activemq/server0/artemis-roles.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/application-layer-failover/src/main/resources/activemq/server0/artemis-roles.properties +++ /dev/null @@ -1,17 +0,0 @@ -## --------------------------------------------------------------------------- -## 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. -## --------------------------------------------------------------------------- -guest=guest \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/application-layer-failover/src/main/resources/activemq/server0/artemis-users.properties ---------------------------------------------------------------------- diff --git a/examples/jms/application-layer-failover/src/main/resources/activemq/server0/artemis-users.properties b/examples/jms/application-layer-failover/src/main/resources/activemq/server0/artemis-users.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/application-layer-failover/src/main/resources/activemq/server0/artemis-users.properties +++ /dev/null @@ -1,17 +0,0 @@ -## --------------------------------------------------------------------------- -## 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. -## --------------------------------------------------------------------------- -guest=guest \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/application-layer-failover/src/main/resources/activemq/server0/broker.xml ---------------------------------------------------------------------- diff --git a/examples/jms/application-layer-failover/src/main/resources/activemq/server0/broker.xml b/examples/jms/application-layer-failover/src/main/resources/activemq/server0/broker.xml deleted file mode 100644 index 74270c7..0000000 --- a/examples/jms/application-layer-failover/src/main/resources/activemq/server0/broker.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - tcp://localhost:61616 - - - - - - - - - - - - - - - - - target/data/journal - target/data/bindings - target/data/large-messages - - http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/application-layer-failover/src/main/resources/activemq/server1/artemis-roles.properties ---------------------------------------------------------------------- diff --git a/examples/jms/application-layer-failover/src/main/resources/activemq/server1/artemis-roles.properties b/examples/jms/application-layer-failover/src/main/resources/activemq/server1/artemis-roles.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/application-layer-failover/src/main/resources/activemq/server1/artemis-roles.properties +++ /dev/null @@ -1,17 +0,0 @@ -## --------------------------------------------------------------------------- -## 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. -## --------------------------------------------------------------------------- -guest=guest \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/application-layer-failover/src/main/resources/activemq/server1/artemis-users.properties ---------------------------------------------------------------------- diff --git a/examples/jms/application-layer-failover/src/main/resources/activemq/server1/artemis-users.properties b/examples/jms/application-layer-failover/src/main/resources/activemq/server1/artemis-users.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/application-layer-failover/src/main/resources/activemq/server1/artemis-users.properties +++ /dev/null @@ -1,17 +0,0 @@ -## --------------------------------------------------------------------------- -## 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. -## --------------------------------------------------------------------------- -guest=guest \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/application-layer-failover/src/main/resources/activemq/server1/broker.xml ---------------------------------------------------------------------- diff --git a/examples/jms/application-layer-failover/src/main/resources/activemq/server1/broker.xml b/examples/jms/application-layer-failover/src/main/resources/activemq/server1/broker.xml deleted file mode 100644 index bc5ad71..0000000 --- a/examples/jms/application-layer-failover/src/main/resources/activemq/server1/broker.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - tcp://localhost:61617 - - - - - - - - - - - - - - - - - target/data/journal - target/data/bindings - target/data/large-messages - - http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/bridge/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/bridge/pom.xml b/examples/jms/bridge/pom.xml index db872de..f1dd547 100644 --- a/examples/jms/bridge/pom.xml +++ b/examples/jms/bridge/pom.xml @@ -62,59 +62,37 @@ under the License. artemis-maven-plugin - start0 + create - start + create - ${basedir}/target/classes/activemq/server0 + ${basedir}/target/server0 + ${basedir}/target/classes/activemq/server0 - start1 + create2 - start + create - ${basedir}/target/classes/activemq/server1 - true + ${basedir}/target/server1 + ${basedir}/target/classes/activemq/server1 + 1 runClient - runClient + client org.apache.activemq.artemis.jms.example.BridgeExample - tcp://localhost:61616 - tcp://localhost:61617 + ${basedir}/target/server0 + ${basedir}/target/server1 - - - exampleConfigDir - ${basedir}/target/classes/activemq - - - - - - stop0 - - stop - - - ${basedir}/target/classes/activemq/server0 - - - - stop1 - - stop - - - ${basedir}/target/classes/activemq/server1 @@ -131,20 +109,10 @@ under the License. org.apache.activemq - artemis-server - ${project.version} - - - org.apache.activemq artemis-jms-client ${project.version} - org.apache.activemq - artemis-jms-server - ${project.version} - - io.netty netty-all ${netty.version} @@ -155,15 +123,6 @@ under the License. ${geronimo.jms.2.spec.version} - - false - - - data.dir - ${basedir}/target/ - - - http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/bridge/src/main/java/org/apache/activemq/artemis/jms/example/BridgeExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/bridge/src/main/java/org/apache/activemq/artemis/jms/example/BridgeExample.java b/examples/jms/bridge/src/main/java/org/apache/activemq/artemis/jms/example/BridgeExample.java index 520c529..4346c32 100644 --- a/examples/jms/bridge/src/main/java/org/apache/activemq/artemis/jms/example/BridgeExample.java +++ b/examples/jms/bridge/src/main/java/org/apache/activemq/artemis/jms/example/BridgeExample.java @@ -16,8 +16,6 @@ */ package org.apache.activemq.artemis.jms.example; -import java.util.Hashtable; - import javax.jms.Connection; import javax.jms.ConnectionFactory; import javax.jms.Message; @@ -26,6 +24,7 @@ import javax.jms.MessageProducer; import javax.jms.Queue; import javax.jms.Session; import javax.naming.InitialContext; +import java.util.Hashtable; import org.apache.activemq.artemis.common.example.ActiveMQExample; http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/bridge/src/main/resources/activemq/server0/artemis-roles.properties ---------------------------------------------------------------------- diff --git a/examples/jms/bridge/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/bridge/src/main/resources/activemq/server0/artemis-roles.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/bridge/src/main/resources/activemq/server0/artemis-roles.properties +++ /dev/null @@ -1,17 +0,0 @@ -## --------------------------------------------------------------------------- -## 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. -## --------------------------------------------------------------------------- -guest=guest \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/bridge/src/main/resources/activemq/server0/artemis-users.properties ---------------------------------------------------------------------- diff --git a/examples/jms/bridge/src/main/resources/activemq/server0/artemis-users.properties b/examples/jms/bridge/src/main/resources/activemq/server0/artemis-users.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/bridge/src/main/resources/activemq/server0/artemis-users.properties +++ /dev/null @@ -1,17 +0,0 @@ -## --------------------------------------------------------------------------- -## 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. -## --------------------------------------------------------------------------- -guest=guest \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/bridge/src/main/resources/activemq/server1/artemis-roles.properties ---------------------------------------------------------------------- diff --git a/examples/jms/bridge/src/main/resources/activemq/server1/artemis-roles.properties b/examples/jms/bridge/src/main/resources/activemq/server1/artemis-roles.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/bridge/src/main/resources/activemq/server1/artemis-roles.properties +++ /dev/null @@ -1,17 +0,0 @@ -## --------------------------------------------------------------------------- -## 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. -## --------------------------------------------------------------------------- -guest=guest \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/bridge/src/main/resources/activemq/server1/artemis-users.properties ---------------------------------------------------------------------- diff --git a/examples/jms/bridge/src/main/resources/activemq/server1/artemis-users.properties b/examples/jms/bridge/src/main/resources/activemq/server1/artemis-users.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/bridge/src/main/resources/activemq/server1/artemis-users.properties +++ /dev/null @@ -1,17 +0,0 @@ -## --------------------------------------------------------------------------- -## 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. -## --------------------------------------------------------------------------- -guest=guest \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/browser/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/browser/pom.xml b/examples/jms/browser/pom.xml index 6f86c76..530f66b 100644 --- a/examples/jms/browser/pom.xml +++ b/examples/jms/browser/pom.xml @@ -57,9 +57,10 @@ under the License. artemis-maven-plugin - start + create + verify - start + create @@ -70,16 +71,10 @@ under the License. org.apache.activemq.artemis.jms.example.QueueBrowserExample - tcp://localhost:61616 + ${basedir}/target/server0 - - stop - - stop - - @@ -87,47 +82,7 @@ under the License. artemis-jms-browser-example ${project.version} - - org.apache.activemq - artemis-core-client - ${project.version} - - - org.apache.activemq - artemis-server - ${project.version} - - - org.apache.activemq - artemis-jms-client - ${project.version} - - - org.apache.activemq - artemis-jms-server - ${project.version} - - - io.netty - netty-all - ${netty.version} - - - org.apache.geronimo.specs - geronimo-jms_2.0_spec - ${geronimo.jms.2.spec.version} - - - false - ${basedir}/target/classes/activemq/server0 - - - data.dir - ${basedir}/target/ - - - http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/browser/src/main/java/org/apache/activemq/artemis/jms/example/QueueBrowserExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/browser/src/main/java/org/apache/activemq/artemis/jms/example/QueueBrowserExample.java b/examples/jms/browser/src/main/java/org/apache/activemq/artemis/jms/example/QueueBrowserExample.java index d57f34a..8e8e422 100644 --- a/examples/jms/browser/src/main/java/org/apache/activemq/artemis/jms/example/QueueBrowserExample.java +++ b/examples/jms/browser/src/main/java/org/apache/activemq/artemis/jms/example/QueueBrowserExample.java @@ -16,8 +16,6 @@ */ package org.apache.activemq.artemis.jms.example; -import java.util.Enumeration; - import javax.jms.Connection; import javax.jms.ConnectionFactory; import javax.jms.MessageConsumer; @@ -27,6 +25,7 @@ import javax.jms.QueueBrowser; import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; +import java.util.Enumeration; import org.apache.activemq.artemis.common.example.ActiveMQExample; http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/browser/src/main/resources/activemq/server0/artemis-roles.properties ---------------------------------------------------------------------- diff --git a/examples/jms/browser/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/browser/src/main/resources/activemq/server0/artemis-roles.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/browser/src/main/resources/activemq/server0/artemis-roles.properties +++ /dev/null @@ -1,17 +0,0 @@ -## --------------------------------------------------------------------------- -## 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. -## --------------------------------------------------------------------------- -guest=guest \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/browser/src/main/resources/activemq/server0/artemis-users.properties ---------------------------------------------------------------------- diff --git a/examples/jms/browser/src/main/resources/activemq/server0/artemis-users.properties b/examples/jms/browser/src/main/resources/activemq/server0/artemis-users.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/browser/src/main/resources/activemq/server0/artemis-users.properties +++ /dev/null @@ -1,17 +0,0 @@ -## --------------------------------------------------------------------------- -## 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. -## --------------------------------------------------------------------------- -guest=guest \ No newline at end of file http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/browser/src/main/resources/activemq/server0/broker.xml ---------------------------------------------------------------------- diff --git a/examples/jms/browser/src/main/resources/activemq/server0/broker.xml b/examples/jms/browser/src/main/resources/activemq/server0/broker.xml deleted file mode 100644 index 5003991..0000000 --- a/examples/jms/browser/src/main/resources/activemq/server0/broker.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - ${data.dir}/server0/data/messaging/bindings - - ${data.dir}/server0/data/messaging/journal - - ${data.dir}/server0/data/messaging/largemessages - - ${data.dir}/server0/data/messaging/paging - - - - tcp://localhost:61616 - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/client-kickoff/pom.xml ---------------------------------------------------------------------- diff --git a/examples/jms/client-kickoff/pom.xml b/examples/jms/client-kickoff/pom.xml index c141afb..22d511c 100644 --- a/examples/jms/client-kickoff/pom.xml +++ b/examples/jms/client-kickoff/pom.xml @@ -62,35 +62,13 @@ under the License. artemis-maven-plugin - start + create - start + create - - true - - - data.dir - ${basedir}/target/ - - - com.sun.management.jmxremote - - - - com.sun.management.jmxremote.port - 3000 - - - com.sun.management.jmxremote.ssl - false - - - com.sun.management.jmxremote.authenticate - false - - + + -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=3000 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false @@ -101,16 +79,10 @@ under the License. org.apache.activemq.artemis.jms.example.ClientKickoffExample - tcp://localhost:61616 + ${basedir}/target/server0 - - stop - - stop - - @@ -118,41 +90,7 @@ under the License. artemis-jms-client-kickoff-example ${project.version} - - org.apache.activemq - artemis-core-client - ${project.version} - - - org.apache.activemq - artemis-server - ${project.version} - - - org.apache.activemq - artemis-jms-client - ${project.version} - - - org.apache.activemq - artemis-jms-server - ${project.version} - - - io.netty - netty-all - ${netty.version} - - - org.apache.geronimo.specs - geronimo-jms_2.0_spec - ${geronimo.jms.2.spec.version} - - - false - ${basedir}/target/classes/activemq/server0 - http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/client-kickoff/src/main/java/org/apache/activemq/artemis/jms/example/ClientKickoffExample.java ---------------------------------------------------------------------- diff --git a/examples/jms/client-kickoff/src/main/java/org/apache/activemq/artemis/jms/example/ClientKickoffExample.java b/examples/jms/client-kickoff/src/main/java/org/apache/activemq/artemis/jms/example/ClientKickoffExample.java index 597ea5f..eb5db60 100644 --- a/examples/jms/client-kickoff/src/main/java/org/apache/activemq/artemis/jms/example/ClientKickoffExample.java +++ b/examples/jms/client-kickoff/src/main/java/org/apache/activemq/artemis/jms/example/ClientKickoffExample.java @@ -16,9 +16,6 @@ */ package org.apache.activemq.artemis.jms.example; -import java.util.HashMap; -import java.util.concurrent.atomic.AtomicReference; - import javax.jms.ExceptionListener; import javax.jms.JMSException; import javax.jms.QueueConnection; @@ -30,6 +27,8 @@ import javax.management.remote.JMXConnector; import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXServiceURL; import javax.naming.InitialContext; +import java.util.HashMap; +import java.util.concurrent.atomic.AtomicReference; import org.apache.activemq.artemis.api.core.management.ActiveMQServerControl; import org.apache.activemq.artemis.api.core.management.ObjectNameBuilder; http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/client-kickoff/src/main/resources/activemq/server0/artemis-roles.properties ---------------------------------------------------------------------- diff --git a/examples/jms/client-kickoff/src/main/resources/activemq/server0/artemis-roles.properties b/examples/jms/client-kickoff/src/main/resources/activemq/server0/artemis-roles.properties deleted file mode 100644 index 4e2d44c..0000000 --- a/examples/jms/client-kickoff/src/main/resources/activemq/server0/artemis-roles.properties +++ /dev/null @@ -1,17 +0,0 @@ -## --------------------------------------------------------------------------- -## 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. -## --------------------------------------------------------------------------- -guest=guest \ No newline at end of file