summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2012-06-07 17:34:24 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2012-06-07 17:34:24 +0000
commit902ed04d2ffb6a897dd8a395273df1fe6647a407 (patch)
tree8a1b6998e8a9d0dbcc6dd4156d8516d301e9e7df
parent5e04a943ac3b6eef436d1bbdde45b918428d4e63 (diff)
downloadqpid-python-902ed04d2ffb6a897dd8a395273df1fe6647a407.tar.gz
QPID-4027 Added JNILayerException to communicate errors occuring in the JNI code.
Added Apache License to the files missing the header. Adding the updated qpid_cpp_jni.jar git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/address-refactor2@1347724 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppConnection.java17
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppConnectionFactory.java5
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppReceiver.java17
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppSender.java17
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppSession.java17
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppTest.java19
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/JNILayerException.java28
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/TextMessage.java17
-rw-r--r--qpid/java/lib/qpid_cpp_jni.jarbin22280 -> 25216 bytes
9 files changed, 135 insertions, 2 deletions
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppConnection.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppConnection.java
index a131ebe2fc..7103af1083 100644
--- a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppConnection.java
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppConnection.java
@@ -1,3 +1,20 @@
+/* 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.messaging.cpp;
import org.apache.qpid.messaging.Connection;
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppConnectionFactory.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppConnectionFactory.java
index 3339c29563..5e606cdc23 100644
--- a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppConnectionFactory.java
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppConnectionFactory.java
@@ -19,12 +19,17 @@ package org.apache.qpid.messaging.cpp;
import org.apache.qpid.messaging.Connection;
import org.apache.qpid.messaging.ConnectionFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class CppConnectionFactory extends ConnectionFactory
{
+ private static final Logger _logger = LoggerFactory.getLogger(CppConnectionFactory.class);
+
static
{
System.loadLibrary("cqpid_java");
+ _logger.info("native qpid library was loaded sucessfully");
}
public CppConnectionFactory()
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppReceiver.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppReceiver.java
index baf3c13e41..102820850f 100644
--- a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppReceiver.java
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppReceiver.java
@@ -1,3 +1,20 @@
+/* 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.messaging.cpp;
import org.apache.qpid.messaging.Message;
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppSender.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppSender.java
index 54389e8bcd..acbfb8397b 100644
--- a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppSender.java
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppSender.java
@@ -1,3 +1,20 @@
+/* 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.messaging.cpp;
import org.apache.qpid.messaging.Message;
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppSession.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppSession.java
index fd59aae323..503e07f8c0 100644
--- a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppSession.java
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppSession.java
@@ -1,3 +1,20 @@
+/* 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.messaging.cpp;
import org.apache.qpid.messaging.Address;
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppTest.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppTest.java
index e74cba908d..c4caf11975 100644
--- a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppTest.java
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/CppTest.java
@@ -1,3 +1,20 @@
+/* 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.messaging.cpp;
import org.apache.qpid.messaging.Connection;
@@ -11,8 +28,6 @@ public class CppTest
{
public static void main(String[] args)
{
- System.out.println(System.getProperty("sys.path"));
-
Connection con = ConnectionFactory.get().createConnection("localhost:5672");
con.open();
Session ssn = con.createSession("hello");
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/JNILayerException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/JNILayerException.java
new file mode 100644
index 0000000000..f5a210256c
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/JNILayerException.java
@@ -0,0 +1,28 @@
+/* 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.messaging.cpp;
+
+public class JNILayerException extends RuntimeException
+{
+
+ public JNILayerException(String message)
+ {
+ super(message);
+ }
+
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/TextMessage.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/TextMessage.java
index 7700f2460e..1a6644b77c 100644
--- a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/TextMessage.java
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/cpp/TextMessage.java
@@ -1,3 +1,20 @@
+/* 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.messaging.cpp;
import java.util.Map;
diff --git a/qpid/java/lib/qpid_cpp_jni.jar b/qpid/java/lib/qpid_cpp_jni.jar
index 52ea2dea47..f607fd0460 100644
--- a/qpid/java/lib/qpid_cpp_jni.jar
+++ b/qpid/java/lib/qpid_cpp_jni.jar
Binary files differ