Skip to content

Commit 21c5293

Browse files
Fix the FETPAPI DLL name to load in Java example
1 parent 79c1074 commit 21c5293

6 files changed

Lines changed: 13 additions & 10 deletions

File tree

cmake/FetpapiClientUsingFesapi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Licensed to the Apache Software Foundation (ASF) under one
1616
specific language governing permissions and limitations
1717
under the License.
1818
-----------------------------------------------------------------------*/
19-
package com.f2i_consulting.fetpapi.client;
19+
package com.f2i_consulting.example;
2020

2121
import java.util.Optional;
2222
import java.util.UUID;

cmake/swigEtp1_2Include.i.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ typedef long long time_t;
299299
%include "std_array.i"
300300

301301
%typemap(javaimports) SWIGTYPE %{
302-
import com.f2i_consulting.fetpapi.*;
302+
import com.f2i_consulting.fetpapi.*;
303303
%}
304304

305305
namespace Energistics {
@@ -2134,7 +2134,7 @@ namespace ETP_NS
21342134
bool validateUri(const std::string& uri);
21352135

21362136
/**
2137-
* @Validate an ETP dataobject URI
2137+
* Validate an ETP dataobject URI
21382138
*/
21392139
bool validateDataObjectUri(const std::string& uri);
21402140
}
@@ -2217,7 +2217,7 @@ namespace ETP_NS
22172217

22182218
#ifdef WITH_FESAPI
22192219
%typemap(javaimports) FesapiHdfProxyFactory %{
2220-
import com.f2i_consulting.fesapi.common.HdfProxyFactory;
2220+
import com.f2i_consulting.fesapi.common.HdfProxyFactory;
22212221
%}
22222222
%typemap(csimports) FesapiHdfProxyFactory %{
22232223
using F2iConsulting.Fesapi.common;

java/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ file (REMOVE_RECURSE ${CMAKE_SOURCE_DIR}/java/src/com/f2i_consulting/fetpapi/etp
2020
# The assembly name is used to load the debug vs release FETPAPI library in the Java example
2121
if (WIN32)
2222
if (SWIG_LINKED_TO_RELEASE)
23-
set (ASSEMBLY_NAME ${PROJECT_NAME}${CMAKE_RELEASE_POSTFIX}.${Fetpapi_VERSION})
23+
set (ASSEMBLY_NAME ${PROJECT_NAME}${CMAKE_RELEASE_POSTFIX}-${Fetpapi_VERSION_MAJOR}.${Fetpapi_VERSION_MINOR})
2424
else (SWIG_LINKED_TO_RELEASE)
25-
set (ASSEMBLY_NAME ${PROJECT_NAME}${CMAKE_DEBUG_POSTFIX}.${Fetpapi_VERSION})
25+
set (ASSEMBLY_NAME ${PROJECT_NAME}${CMAKE_DEBUG_POSTFIX}-${Fetpapi_VERSION_MAJOR}.${Fetpapi_VERSION_MINOR})
2626
endif (SWIG_LINKED_TO_RELEASE)
2727
else (WIN32)
2828
if (SWIG_LINKED_TO_RELEASE)

src/etp/EtpHelpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ namespace ETP_NS
6565
FETPAPI_DLL_IMPORT_OR_EXPORT bool validateUri(const std::string& uri);
6666

6767
/**
68-
* @Validate an ETP dataobject URI
68+
* Validate an ETP dataobject URI
6969
*/
7070
FETPAPI_DLL_IMPORT_OR_EXPORT bool validateDataObjectUri(const std::string& uri);
7171

src/etp/fesapi/FesapiHdfProxy.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,16 +333,19 @@ void FesapiHdfProxy::writeArrayNdSlab(
333333

334334
auto t_start = std::chrono::high_resolution_clock::now();
335335
while (!stillProcessingMsgIds.empty()) {
336+
std::vector<int64_t> idsToErase;
336337
for (int64_t msgId : stillProcessingMsgIds) {
337338
if (!session_->isMessageStillProcessing(msgId)) {
338-
stillProcessingMsgIds.erase(msgId);
339+
idsToErase.push_back(msgId);
339340
}
340341
}
342+
for (int64_t msgId : idsToErase) {
343+
stillProcessingMsgIds.erase(msgId);
344+
}
341345
if (std::chrono::duration<double, std::milli>(std::chrono::high_resolution_clock::now() - t_start).count() > session_->getTimeOut()) {
342346
throw std::runtime_error("Time out waiting for a writeArrayNdSlab response");
343347
}
344348
}
345-
std::cerr << "writeArrayNdSlab Response got in " << std::chrono::duration<double, std::milli>(std::chrono::high_resolution_clock::now() - t_start).count() << " ms" << std::endl;
346349
}
347350

348351
std::set<int64_t> FesapiHdfProxy::async_writeArrayNdSlab(

src/etp/fesapi/FesapiHdfProxy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace ETP_NS
3737
*/
3838
FesapiHdfProxy(AbstractSession* session, COMMON_NS::DataObjectRepository * repo, const std::string & guid, const std::string & title, const std::string & packageDirAbsolutePath, const std::string & externalFilePath, COMMON_NS::DataObjectRepository::openingMode hdfPermissionAccess) :
3939
EML2_NS::AbstractHdfProxy(packageDirAbsolutePath, externalFilePath, hdfPermissionAccess), session_(session), compressionLevel(0) {
40-
xmlNs_ = repo->getDefaultEmlVersion() == COMMON_NS::DataObjectRepository::EnergisticsStandard::EML2_0 ? "eml20" : "eml23";
40+
xmlNs_ = repo->getDefaultEmlVersion() == COMMON_NS::DataObjectRepository::EnergisticsStandard::EML2_3 ? "eml23" : "eml20";
4141
initGsoapProxy(repo, guid, title, 20);
4242
}
4343

0 commit comments

Comments
 (0)