From 0d690e6837b96f02c4663183bacef7d0700f5a60 Mon Sep 17 00:00:00 2001 From: Andrew Donald Kennedy Date: Mon, 31 Oct 2011 17:20:53 +0000 Subject: QPID-3558: Add broker Maven and OSGi artifacts to build git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1195572 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/bin/release.sh | 3 + qpid/java/bdbstore/build.xml | 6 +- .../berkeleydb/testclient/BackupTestClient.java | 120 --------------------- .../berkeleydb/testclient/BackupTestClient.java | 120 +++++++++++++++++++++ qpid/java/broker/build.xml | 3 +- qpid/java/broker/src/main/java/broker.bnd | 26 +++++ qpid/java/lib/poms/je-4.0.103.xml | 22 ++++ qpid/java/management/common/build.xml | 3 +- 8 files changed, 178 insertions(+), 125 deletions(-) delete mode 100644 qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/testclient/BackupTestClient.java create mode 100644 qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/testclient/BackupTestClient.java create mode 100755 qpid/java/broker/src/main/java/broker.bnd create mode 100644 qpid/java/lib/poms/je-4.0.103.xml diff --git a/qpid/bin/release.sh b/qpid/bin/release.sh index 104fb077a0..decc1cdd75 100755 --- a/qpid/bin/release.sh +++ b/qpid/bin/release.sh @@ -222,6 +222,9 @@ if [ "JAVA" == "$JAVA" ] ; then # copy the Maven artifacts cp -a qpid-${VER}/java/client/release/maven artifacts/ cp -a qpid-${VER}/java/common/release/maven artifacts/ + cp -a qpid-${VER}/java/broker/release/maven artifacts/ + cp -a qpid-${VER}/java/bdbstore/release/maven artifacts/ + cp -a qpid-${VER}/java/management/common/release/maven artifacts/ fi if [ "TOOLS" = "$TOOLS" ] ; then diff --git a/qpid/java/bdbstore/build.xml b/qpid/java/bdbstore/build.xml index 9355358e6c..e4bc721930 100644 --- a/qpid/java/bdbstore/build.xml +++ b/qpid/java/bdbstore/build.xml @@ -17,8 +17,9 @@ - under the License. --> - - + + + @@ -80,5 +81,4 @@ http://www.oracle.com/technetwork/database/berkeleydb/downloads/jeoslicense-0868 - diff --git a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/testclient/BackupTestClient.java b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/testclient/BackupTestClient.java deleted file mode 100644 index f6344b3d7d..0000000000 --- a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/testclient/BackupTestClient.java +++ /dev/null @@ -1,120 +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.qpid.server.store.berkeleydb.testclient; - -import org.apache.log4j.Logger; - -import org.apache.qpid.ping.PingDurableClient; -import org.apache.qpid.server.store.berkeleydb.BDBBackup; -import org.apache.qpid.util.CommandLineParser; - -import java.util.Properties; - -/** - * BackupTestClient extends {@link PingDurableClient} with an action that takes a BDB backup when a configurable - * message count is reached. This enables a test user to restore this beackup, knowing how many committed but undelivered - * messages were in the backup, in order to check that all are re-delivered when the backup is retored. - * - *

- *
CRC Card
Responsibilities Collaborations - *
Perform BDB Backup on configurable message count. - *
- */ -public class BackupTestClient extends PingDurableClient -{ - /** Used for debugging. */ - private static final Logger log = Logger.getLogger(BackupTestClient.class); - - /** Holds the from directory to take backups from. */ - private String fromDir; - - /** Holds the to directory to store backups in. */ - private String toDir; - - /** - * Default constructor, passes all property overrides to the parent. - * - * @param overrides Any property overrides to apply to the defaults. - * - * @throws Exception Any underlying exception is allowed to fall through. - */ - BackupTestClient(Properties overrides) throws Exception - { - super(overrides); - } - - /** - * Starts the ping/wait/receive process. From and to directory locations for the BDB backups must be specified - * on the command line: - * - *

- *
Command Line
Option Comment - *
-fromdir The path to the directory to back the bdb log file from. - *
-todir The path to the directory to save the backed up bdb log files to. - *
- * - * @param args The command line arguments. - */ - public static void main(String[] args) - { - try - { - // Use the same command line format as BDBBackup utility, (compulsory from and to directories). - Properties options = - CommandLineParser.processCommandLine(args, new CommandLineParser(BDBBackup.COMMAND_LINE_SPEC), - System.getProperties()); - BackupTestClient pingProducer = new BackupTestClient(options); - - // Keep the from and to directories for backups. - pingProducer.fromDir = options.getProperty("fromdir"); - pingProducer.toDir = options.getProperty("todir"); - - // Create a shutdown hook to terminate the ping-pong producer. - Runtime.getRuntime().addShutdownHook(pingProducer.getShutdownHook()); - - // Ensure that the ping pong producer is registered to listen for exceptions on the connection too. - // pingProducer.getConnection().setExceptionListener(pingProducer); - - // Run the test procedure. - int sent = pingProducer.send(); - pingProducer.waitForUser("Press return to begin receiving the pings."); - pingProducer.receive(sent); - - System.exit(0); - } - catch (Exception e) - { - System.err.println(e.getMessage()); - log.error("Top level handler caught execption.", e); - System.exit(1); - } - } - - /** - * Supplies a triggered action extension, based on message count. This action takes a BDB log file backup. - */ - public void takeAction() - { - BDBBackup backupUtil = new BDBBackup(); - backupUtil.takeBackupNoLock(fromDir, toDir); - System.out.println("Took backup of BDB log files from directory: " + fromDir); - } -} diff --git a/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/testclient/BackupTestClient.java b/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/testclient/BackupTestClient.java new file mode 100644 index 0000000000..f6344b3d7d --- /dev/null +++ b/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/testclient/BackupTestClient.java @@ -0,0 +1,120 @@ +/* + * + * 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.qpid.server.store.berkeleydb.testclient; + +import org.apache.log4j.Logger; + +import org.apache.qpid.ping.PingDurableClient; +import org.apache.qpid.server.store.berkeleydb.BDBBackup; +import org.apache.qpid.util.CommandLineParser; + +import java.util.Properties; + +/** + * BackupTestClient extends {@link PingDurableClient} with an action that takes a BDB backup when a configurable + * message count is reached. This enables a test user to restore this beackup, knowing how many committed but undelivered + * messages were in the backup, in order to check that all are re-delivered when the backup is retored. + * + *

+ *
CRC Card
Responsibilities Collaborations + *
Perform BDB Backup on configurable message count. + *
+ */ +public class BackupTestClient extends PingDurableClient +{ + /** Used for debugging. */ + private static final Logger log = Logger.getLogger(BackupTestClient.class); + + /** Holds the from directory to take backups from. */ + private String fromDir; + + /** Holds the to directory to store backups in. */ + private String toDir; + + /** + * Default constructor, passes all property overrides to the parent. + * + * @param overrides Any property overrides to apply to the defaults. + * + * @throws Exception Any underlying exception is allowed to fall through. + */ + BackupTestClient(Properties overrides) throws Exception + { + super(overrides); + } + + /** + * Starts the ping/wait/receive process. From and to directory locations for the BDB backups must be specified + * on the command line: + * + *

+ *
Command Line
Option Comment + *
-fromdir The path to the directory to back the bdb log file from. + *
-todir The path to the directory to save the backed up bdb log files to. + *
+ * + * @param args The command line arguments. + */ + public static void main(String[] args) + { + try + { + // Use the same command line format as BDBBackup utility, (compulsory from and to directories). + Properties options = + CommandLineParser.processCommandLine(args, new CommandLineParser(BDBBackup.COMMAND_LINE_SPEC), + System.getProperties()); + BackupTestClient pingProducer = new BackupTestClient(options); + + // Keep the from and to directories for backups. + pingProducer.fromDir = options.getProperty("fromdir"); + pingProducer.toDir = options.getProperty("todir"); + + // Create a shutdown hook to terminate the ping-pong producer. + Runtime.getRuntime().addShutdownHook(pingProducer.getShutdownHook()); + + // Ensure that the ping pong producer is registered to listen for exceptions on the connection too. + // pingProducer.getConnection().setExceptionListener(pingProducer); + + // Run the test procedure. + int sent = pingProducer.send(); + pingProducer.waitForUser("Press return to begin receiving the pings."); + pingProducer.receive(sent); + + System.exit(0); + } + catch (Exception e) + { + System.err.println(e.getMessage()); + log.error("Top level handler caught execption.", e); + System.exit(1); + } + } + + /** + * Supplies a triggered action extension, based on message count. This action takes a BDB log file backup. + */ + public void takeAction() + { + BDBBackup backupUtil = new BDBBackup(); + backupUtil.takeBackupNoLock(fromDir, toDir); + System.out.println("Took backup of BDB log files from directory: " + fromDir); + } +} diff --git a/qpid/java/broker/build.xml b/qpid/java/broker/build.xml index e733474ef0..0731e08103 100644 --- a/qpid/java/broker/build.xml +++ b/qpid/java/broker/build.xml @@ -19,10 +19,10 @@ - --> - + @@ -84,4 +84,5 @@ + diff --git a/qpid/java/broker/src/main/java/broker.bnd b/qpid/java/broker/src/main/java/broker.bnd new file mode 100755 index 0000000000..36c7d1a5b3 --- /dev/null +++ b/qpid/java/broker/src/main/java/broker.bnd @@ -0,0 +1,26 @@ +# +# 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. +# + +ver: 0.13.0 + +Bundle-SymbolicName: qpid-broker +Bundle-Version: ${ver} +Export-Package: *;version=${ver} +Bundle-RequiredExecutionEnvironment: J2SE-1.5 + diff --git a/qpid/java/lib/poms/je-4.0.103.xml b/qpid/java/lib/poms/je-4.0.103.xml new file mode 100644 index 0000000000..20d09d3451 --- /dev/null +++ b/qpid/java/lib/poms/je-4.0.103.xml @@ -0,0 +1,22 @@ + + + + com.sleepycat + je + 4.0.103 + diff --git a/qpid/java/management/common/build.xml b/qpid/java/management/common/build.xml index ce2ec3a106..1a0520b1e3 100644 --- a/qpid/java/management/common/build.xml +++ b/qpid/java/management/common/build.xml @@ -19,8 +19,9 @@ - --> - + + -- cgit v1.2.1