Skip to content

Commit

Permalink
Merge remote-tracking branch 'OpenMAMA-6.2.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
fquinner committed Aug 5, 2018
2 parents 9df5fce + 042025a commit 5142684
Show file tree
Hide file tree
Showing 42 changed files with 289 additions and 83 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ set (LIBEVENT_ROOT "${DEFAULT_LIBEVENT_ROOT}" CACHE PATH "Libevent dependency in
set (PROTON_ROOT "${DEFAULT_PROTON_ROOT}" CACHE PATH "Qpid dependency install directory (for qpid middleware and payload bridges)")
set (APR_ROOT "${DEFAULT_APR_ROOT}" CACHE PATH "Apache APR dependency install directory (for core MAMA)")
set (GTEST_ROOT "${DEFAULT_GTEST_ROOT}" CACHE PATH "Google test framework dependency install directory (for unit tests)")
set (OEA_ROOT "${DEFAULT_OEA_ROOT}" CACHE PATH "OEA dependency install directory (for ef ENTITLEMENTS is set to oea)")

# Install / post-compilation options
set (INSTALL_RUNTIME_DEPENDENCIES true CACHE BOOL "Whether or not to include dependent .so or .dll files in the installation package")
Expand Down
3 changes: 3 additions & 0 deletions common/c_cpp/src/c/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ osname = env['host']['os']
if osname == 'Linux':
includePath.append('./linux')
includePath.append('./linux/wombat')
InstWomPlatformHeaders = Glob('linux/wombat/*.h')
elif osname == 'Darwin':
includePath.append('./darwin')
includePath.append('./darwin/wombat')
InstWomPlatformHeaders = Glob('darwin/wombat/*.h')

includePath.append('./wombat')

Expand Down Expand Up @@ -57,4 +59,5 @@ lib = env.StaticLibrary('libwombatcommon', objects)
Alias('install', env.Install('$libdir', lib))
Alias('install', env.Install('$incdir', InstHeaders))
Alias('install', env.Install('$incdir/wombat', InstWomHeaders))
Alias('install', env.Install('$incdir/wombat', InstWomPlatformHeaders))

3 changes: 1 addition & 2 deletions mama/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ add_definitions(-DOPENMAMA_INTEGRATION)
get_component_version(${CMAKE_CURRENT_LIST_DIR} MAMA)

add_subdirectory (c_cpp/src/c)
add_subdirectory (c_cpp/src/c/entitlement/noop)
add_subdirectory (c_cpp/src/c/dqstrategyplugin)

if(WITH_CPP)
Expand Down Expand Up @@ -69,4 +68,4 @@ endif ()

if (WITH_CSHARP)
add_subdirectory (dotnet/src/cs)
endif()
endif()
2 changes: 1 addition & 1 deletion mama/VERSION.scons
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mama 6.2.2
mama 6.2.3
6 changes: 6 additions & 0 deletions mama/c_cpp/src/c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ if(DEFINED ENTITLEMENTS)
string(REPLACE "," ";" ENT_LIST ${ENTITLEMENTS})
foreach(ENT ${ENT_LIST})
set(ENTITLEMENT_BRIDGES "${ENTITLEMENT_BRIDGES}\"${ENT}\", ")
if(${ENT} STREQUAL "noop")
add_subdirectory (entitlement/noop)
endif()
if(${ENT} STREQUAL "oea")
add_subdirectory (entitlement/oea)
endif()
endforeach()
endif()
set(ENTITLEMENT_BRIDGES "${ENTITLEMENT_BRIDGES}NULL")
Expand Down
24 changes: 24 additions & 0 deletions mama/c_cpp/src/c/entitlement/oea/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
if(NOT DEFINED OEA_ROOT OR "${OEA_ROOT}" STREQUAL "")
message(SEND_ERROR "OEA_ROOT is undefined")
endif()

include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${OEA_ROOT}/include/oea
)

add_definitions(-DBRIDGE)

add_library(mamaentoea
MODULE oea.c
)
target_link_libraries(mamaentoea mama wombatcommon)
set_target_properties(mamaentoea PROPERTIES OUTPUT_NAME "mamaentoea${OPENMAMA_LIBRARY_SUFFIX}")

if (MSVC)
install(FILES $<TARGET_PDB_FILE:mamaentoea> DESTINATION bin OPTIONAL)
endif()
install(TARGETS mamaentoea
RUNTIME DESTINATION bin
LIBRARY DESTINATION bin
ARCHIVE DESTINATION lib)
2 changes: 1 addition & 1 deletion mama/c_cpp/src/c/generateMamaSourceFiles.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set BUILD_DIR=%1
set VERSION_MAJOR=6
set VERSION_MINOR=2
set VERSION_RELEASE=2
set VERSION_RELEASE=3
set RC_VERSION_NUMERICAL=1
set RC_VERSION_STRING=1
set MAMACDLL=libmamacmdd.dll
Expand Down
35 changes: 35 additions & 0 deletions mama/c_cpp/src/c/mama/subscription.h
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,23 @@ mamaSubscription_getReceivedInitial(
mamaSubscription subscription,
int *receivedInitial);

/**
* @brief Whether the specified subscription will attempt to recover from sequence
* number gaps.
*
* @param[in] subscription The subscription
* @param[out] doesRecover 0 - does not recover, 1 - does attempt to recover
*
* @return mama_status return code can be one of:
* MAMA_STATUS_NULL_ARG
* MAMA_STATUS_OK
*/
MAMAExpDLL
extern mama_status
mamaSubscription_getRecoverGaps (
mamaSubscription subscription,
int *doesRecover);

/**
* @brief Returns a value of 1 or 0 indicating whether this subscription is
* interested in initial values.
Expand Down Expand Up @@ -1147,6 +1164,24 @@ mamaSubscription_setPreIntitialCacheSize(
mamaSubscription subscription,
int cacheSize);

/**
* @brief Whether a subscription should attempt to recover from
* sequence number gaps.
*
* @param[in] subscription The subscription
* @param[out] doesRecover 0 indicates not to recover. 1 The subscription will
* attempt to recover via a recap request.
*
* @return mama_status return code can be one of:
* MAMA_STATUS_NULL_ARG
* MAMA_STATUS_OK
*/
MAMAExpDLL
extern mama_status
mamaSubscription_setRecoverGaps (
mamaSubscription subscription,
int doesRecover);

/**
* @brief Whether an initial value is required for the specified subscription.
*
Expand Down
12 changes: 12 additions & 0 deletions mama/c_cpp/src/c/subscription.c
Original file line number Diff line number Diff line change
Expand Up @@ -1122,13 +1122,25 @@ mamaSubscription_hasWildcards (mamaSubscription subscription)
(self->mSubscBridge);
}

mama_status
mamaSubscription_setRecoverGaps (mamaSubscription subscription, int doesRecover)
{
return dqStrategy_setRecoverGaps(mamaSubscription_getDqStrategy(subscription), doesRecover);
}

mama_status
mamaSubscription_setGroupSizeHint (mamaSubscription subscription, int groupSizeHint)
{
self->mGroupSizeHint = groupSizeHint;
return MAMA_STATUS_OK;
}

mama_status
mamaSubscription_getRecoverGaps (mamaSubscription subscription, int* result)
{
return dqStrategy_getRecoverGaps(mamaSubscription_getDqStrategy(subscription), result);
}

SubjectContext *
mamaSubscription_getSubjectContext (mamaSubscription subscription,
const mamaMsg msg)
Expand Down
4 changes: 2 additions & 2 deletions mama/dotnet/src/cs/MamaVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public class MamaVersion
{
public static int MAMADOTNET_VERSION_MAJOR = 6;
public static int MAMADOTNET_VERSION_MINOR = 2;
public static string MAMADOTNET_VERSION_RELEASE = "2";
public static string MAMADOTNET_VERSION = "mamadotnet 6.2.2;
public static string MAMADOTNET_VERSION_RELEASE = "3";
public static string MAMADOTNET_VERSION = "mamadotnet 6.2.3";
}
}
73 changes: 72 additions & 1 deletion mama/jni/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'

if (!project.hasProperty('legacyNaming')) {
group = "org.openmama"
archivesBaseName = "openmama"
version = "6.2.2-1"
}

repositories {
mavenCentral()
Expand All @@ -10,4 +18,67 @@ dependencies {

test {
environment "PATH", "C:\\Users\\fquinn\\SourceExternal\\github\\fquinner\\OpenMAMA\\openmama_install_6.2.1\\bin\\dynamic"
}
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}

task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}

artifacts {
archives javadocJar, sourcesJar
}

signing {
sign configurations.archives
}

uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

pom.project {
name 'OpenMAMA'
packaging 'jar'
// optionally artifactId can be defined here
description 'OpenMAMA is a high performance vendor neutral lightweight wrapper that provides a common API interface to different middleware and messaging solutions across a variety of platforms and languages.'
url 'https://www.openmama.org'

scm {
connection 'scm:https://github.com/OpenMAMA/OpenMAMA.git'
developerConnection 'scm:git@github.com:OpenMAMA/OpenMAMA.git'
url 'https://github.com/OpenMAMA/OpenMAMA'
}

licenses {
license {
name 'GNU LESSER GENERAL PUBLIC LICENSE 2.1'
url 'https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html'
}
}

developers {
developer {
id 'fquinner'
name 'Frank Quinn'
email 'fquinn@cascadium.io'
}
}
}
}
}
}
2 changes: 1 addition & 1 deletion mama/jni/build.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<project name="mama-jni" default="dist" basedir=".">
<property name="product" value="mamajni"></property>
<property name="base" value="mamajni"></property>
<property name="version" value="6.2.2"></property>
<property name="version" value="6.2.3"></property>
<property name="base.release" value="${base}_${version}"></property>
<property name="release" value="${product}_${version}"></property>
<property name="build" location="${user.dir}/classes"></property>
Expand Down
6 changes: 6 additions & 0 deletions mama/jni/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
signing.keyId=
signing.password=
signing.secretKeyRingFile=

ossrhUsername=
ossrhPassword=
2 changes: 1 addition & 1 deletion mama/jni/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ endforeach()
ExternalProject_Add(mamajnijava
SOURCE_DIR "."
BUILD_COMMAND ""
CONFIGURE_COMMAND ${BIN_GRADLE} --no-daemon -PbuildDir=${MAMAJNI_JAVA_BUILD_DIR} -b ${CMAKE_CURRENT_SOURCE_DIR}/../build.gradle jar testClasses
CONFIGURE_COMMAND ${BIN_GRADLE} --no-daemon -PlegacyNaming -PbuildDir=${MAMAJNI_JAVA_BUILD_DIR} -b ${CMAKE_CURRENT_SOURCE_DIR}/../build.gradle jar testClasses
INSTALL_COMMAND ""
LOG_BUILD 1)

Expand Down
4 changes: 2 additions & 2 deletions mama/jni/src/main/java/com/wombat/mama/MamaDateTime.java
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public native void setDate (
* Get the date and time as microseconds since the Epoch, (using the UTC timezone).
*
* @return The number of microseconds since the Epoch.
* @exception com.wombat.mama MamaException thrown if the underlying JNI object has been destroyed.
* @exception com.wombat.mama.MamaException thrown if the underlying JNI object has been destroyed.
* @exception com.wombat.common.WombatException for other general MAMA errors.
*/
public long getEpochTimeMicroseconds ()
Expand Down Expand Up @@ -282,7 +282,7 @@ public double getEpochTimeSeconds (MamaTimeZone tz)
* threads concurrently to avoid contention in strftime.
*
* @return The number of seconds, (including partial seconds), since the Epoch.
* @exception com.wombat.mama MamaException thrown if the underlying JNI object has been destroyed.
* @exception com.wombat.mama.MamaException thrown if the underlying JNI object has been destroyed.
* @exception com.wombat.common.WombatException for other general MAMA errors.
*/
public native double getEpochTimeSecondsWithCheck ();
Expand Down
2 changes: 1 addition & 1 deletion mama/jni/src/main/java/com/wombat/mama/MamaError.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class MamaError
/**
Get a stringified representation of the error.
@param quality A valid quality short value.
@param error The error code to stringify.
@return The string representation of the quality.
*/
public static String toString (int error)
Expand Down
15 changes: 8 additions & 7 deletions mama/jni/src/main/java/com/wombat/mama/MamaMsg.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,25 @@
/**
* Wrapper class for the native C mama msg structure.
*
* <p/>
* Field identifiers must be >=0. A field identifier of 0 indicates that there
* is no unique FID and multiple fields with the same name may have FID == 0.
* <p/>
* <p>
* Field identifiers must be greater than or equal to 0. A field identifier
* of 0 indicates that there is no unique FID and multiple fields with the
* same name may have FID == 0.
* </p>
* <p>
* Field lookup proceeds in the following manner.
* <ol>
* <li>
* If the fid supplied is non-zero, search for a field with the
* specified fid and return the field if it exists (the name is not validated).
* Otherwise return null.
* </li>
* <p/>
* <li>
* If the fid supplied is 0, return the first field encountered with the
* supplied name or null if no such field exists.
* </li>
* </ol>
* <p/>
* <p>
* Get methods for numeric values may result in loss of information through
* either rounding or truncation when a larger data type is accessed as a
* smaller one. The result may be the same as the result of casting the larger
Expand All @@ -54,7 +55,7 @@
* might return <code>Short.MIN_VALUE</code>. It is also valid to throw a
* <code>ClassCastException</code> or other appropriate
* <code>RuntimeException</code>.
* <p/>
* </p>
* Since some message implementations may not natively support all data types,
* the behaviour may vary substantially. In creating and accessing messages the
* Wombat APIs assume that the underlying values are stored in the smallest
Expand Down
4 changes: 2 additions & 2 deletions mama/jni/src/main/java/com/wombat/mama/MamaPrice.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public void setHints (MamaPriceHints hints)
* This function obtains the double value of the price rounded to zero precision.
*
* @return The rounded value.
* @exception com.wombat.mama MamaException thrown if the underlying JNI object has been destroyed.
* @exception com.wombat.mama.MamaException thrown if the underlying JNI object has been destroyed.
* @exception com.wombat.common.WombatException for other general MAMA errors.
*/
public double getRoundedValue ()
Expand All @@ -169,7 +169,7 @@ public double getRoundedValue ()
*
* @param precision The precision to use for rounding.
* @return The rounded value.
* @exception com.wombat.mama MamaException thrown if the underlying JNI object has been destroyed.
* @exception com.wombat.mama.MamaException thrown if the underlying JNI object has been destroyed.
* @exception com.wombat.common.WombatException for other general MAMA errors.
*/
public double getRoundedValue (MamaPricePrecision precision)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public String toString ()

/**
* Return the appropriate precision for a given number of
* decimal places. If places > 10 return Unknown.
* decimal places. If places is greater than 10 return Unknown.
*/
public static MamaPricePrecision decimals2Precision (int places)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@
*
* java com.wombat.mama.MamaListen -S SOURCE -s MSFT.ISLD
*
* 3. Subscribing to top-of-book MSFT & ORCL from Island ITCH feed
* 3. Subscribing to top-of-book MSFT and ORCL from Island ITCH feed
* (specific fields):
*
* java com.wombat.mama.MamaListen -s MSFT.ISLD -s ORCL.ISLD wBidPrice wBidSize wAskPrice wAskSize wTradePrice wTradeVolume wTotalVolume
*
* 4. Subscribing to a list of symbols from a file (all fields):
*
* java com.wombat.mama.MamaListen -S WOMABT -f file
* <pre>
* </pre>
*/
public class MamaListen
{
Expand Down
Loading

0 comments on commit 5142684

Please sign in to comment.