Skip to content

Commit 00c86b4

Browse files
committed
Add method: receiveCommon() .. for usual receive process.
1 parent 6c47942 commit 00c86b4

File tree

3 files changed

+43
-4
lines changed

3 files changed

+43
-4
lines changed

.github/workflows/maven.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ jobs:
3434
env:
3535
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
3636
with:
37-
tag_name: d20210125a
38-
release_name: Release-2.0.1a
37+
tag_name: d20210413a
38+
release_name: Release-2.0.2a
3939

4040
- name: Upload Release Asset
4141
id: upload-release-asset
@@ -44,7 +44,7 @@ jobs:
4444
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4545
with:
4646
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
47-
asset_path: target/jmsClient-2.0.1.jar
47+
asset_path: target/jmsClient-2.0.2.jar
4848
asset_name: jmsClient.jar
4949
asset_content_type: application/java-archive
5050

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.stupica.base</groupId>
88
<artifactId>jmsClient</artifactId>
9-
<version>2.0.1</version>
9+
<version>2.0.2</version>
1010
<packaging>jar</packaging>
1111
<name>jmsClientBase</name>
1212
<organization>

src/main/java/com/stupica/queue/JmsClientBase.java

+39
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33

44
import com.stupica.ConstGlobal;
5+
import com.stupica.GlobalVar;
56

67
import javax.jms.*;
78
import javax.jms.Queue;
@@ -481,6 +482,44 @@ public synchronized Message receive(int aiQueueWaitTime) {
481482
return objMessage;
482483
}
483484

485+
/**
486+
* Method: receiveCommon
487+
*
488+
* Read ..
489+
*
490+
* @return Message objMessage notNull = AllOK;
491+
*/
492+
public Message receiveCommon(int aiQueueWaitTime) {
493+
// Local variables
494+
int iResult;
495+
Message objMessage = null;
496+
497+
// Initialization
498+
iResult = ConstGlobal.RETURN_OK;
499+
500+
objMessage = receive(aiQueueWaitTime);
501+
if (GlobalVar.bIsModeVerbose) {
502+
if (objMessage == null) {
503+
logger.info("receiveCommon(): No data received! Continue ..");
504+
} else {
505+
logger.info("receiveCommon(): Data received. Continue ..");
506+
}
507+
}
508+
if (objMessage != null) {
509+
if (GlobalVar.bIsModeVerbose) {
510+
try {
511+
System.out.println("= Message Receive - type: " + objMessage.getJMSType());
512+
} catch (Exception ex) {
513+
iResult = ConstGlobal.RETURN_ERROR;
514+
logger.severe("receiveCommon(): Error at message operation!"
515+
+ " Operation: getJMSType()"
516+
+ "; Msg.: " + ex.getMessage());
517+
}
518+
}
519+
}
520+
return objMessage;
521+
}
522+
484523

485524
/**
486525
* Method: recover

0 commit comments

Comments
 (0)