INT-1282, Updated licensing information (year), removed bundle activator from 'cafe' sample, added readme.txt and util class to clean up Active MQ to 'jms' sample, other minor polishing

This commit is contained in:
Oleg Zhurakousky
2010-07-27 16:18:35 +00:00
parent 19dc3bb897
commit efff839537
34 changed files with 104 additions and 116 deletions

View File

@@ -0,0 +1,46 @@
/*
* Copyright 2002-2010 the original author or authors.
*
* 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.springframework.integration.samples.jms;
import java.io.File;
/**
* @author Oleg Zhurakousky
*
*/
public class ActiveMqTestUtils {
public static void prepare() {
System.out.println("####### Refreshing ActiveMq ########");
File activeMqTempDir = new File("activemq-data");
deleteDir(activeMqTempDir);
}
/*
*
*/
private static void deleteDir(File directory){
if (directory.exists()){
String[] children = directory.list();
if (children != null){
for (int i=0; i < children.length; i++) {
deleteDir(new File(directory, children[i]));
}
}
}
directory.delete();
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,6 +37,7 @@ public class ChannelAdapterDemo {
public static void main(String[] args) {
ActiveMqTestUtils.prepare();
new ClassPathXmlApplicationContext(configFiles, ChannelAdapterDemo.class);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,6 +40,7 @@ public class GatewayDemo {
public static void main(String[] args) {
ActiveMqTestUtils.prepare();
new ClassPathXmlApplicationContext(configFiles, GatewayDemo.class);
}