Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ Invoking the REST endpoint of the application will write a message with the data
- Java SE 17 or later on the workstation
- An Eclipse development environment on the workstation (optional)
- Either Gradle or Apache Maven on the workstation (optional if using Wrappers)
- IBM MQ V8.0 or later on z/OS
- IBM MQ Resource Adapter for WebSphere Application Server Liberty, available from https://www.ibm.com/support/pages/node/489235
- IBM MQ V9.3 or later on z/OS (V9.3+ required for the Jakarta JMS resource adapter)
- IBM MQ Jakarta JMS Resource Adapter (`wmq.jakarta.jmsra.rar`), available from https://www.ibm.com/support/pages/obtaining-ibm-mq-resource-adapter-websphere-application-server-liberty-profile

## Reference

Expand Down Expand Up @@ -157,8 +157,7 @@ Ensure you have the following features defined in your Liberty `server.xml`:

- `servlet-6.0` (required for Spring Boot 3.x and Jakarta EE 10)
- `concurrent-3.0`
- `messaging-3.1`
- `wmqJmsClient-2.0`
- `wmqMessagingClient-3.0` (IBM MQ Jakarta JMS client — requires MQ 9.3+ with the Jakarta RAR)
- `jndi-1.0`

Also add the JMS MQ Connection Factory configuration to `server.xml`. Substitute the *channel*, *hostname*, *port*, and *queueManager* values for your installation, and set the MQ RAR location to the path on zFS where you downloaded the resource adapter:
Expand All @@ -169,7 +168,7 @@ Also add the JMS MQ Connection Factory configuration to `server.xml`. Substitute
queueManager="yourQueueManager" transportType="CLIENT"/>
<connectionManager maxPoolSize="10" minPoolSize="0"/>
</jmsConnectionFactory>
<variable name="wmqJmsClient.rar.location" value="/wmq.jmsra-9.0.4.0.rar"/>
<variable name="wmqJmsClient.rar.location" value="/usr/lpp/mqm/V9R4M4/java/lib/jca/wmq.jakarta.jmsra.rar"/>
```

> **Note:** The value of `10` on `maxPoolSize` is an example only. Set it to the maximum number of concurrent users of the connection factory.
Expand Down Expand Up @@ -281,7 +280,7 @@ This project is licensed under [Eclipse Public License - v 2.0](LICENSE).
- [CICS TS Documentation](https://www.ibm.com/docs/en/cics-ts)
- [Spring Boot Java applications for CICS, Part 5: JMS](https://developer.ibm.com/tutorials/spring-boot-java-applications-for-cics-part-5-jms/)
- [Spring Integration JMS Documentation](https://docs.spring.io/spring-integration/reference/jms.html)
- [IBM MQ Resource Adapter download](https://www.ibm.com/support/pages/node/489235)
- [IBM MQ Jakarta JMS Resource Adapter](https://www.ibm.com/support/pages/obtaining-ibm-mq-resource-adapter-websphere-application-server-liberty-profile)

## Contributing

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.JmsException;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import org.springframework.web.bind.annotation.PathVariable;


/**
* REST endpoint using the JmsTemplate class to send JMS messages.
Expand Down Expand Up @@ -57,8 +57,10 @@ public String root()
* @param jmsq, path variable for JMS queue name
* @return, the JMS message to send to the MQ destination
*/
@RequestMapping("/send/{jmsq}")
public String send(@RequestParam(value = "data") String inputStr, @PathVariable String jmsq)
@RequestMapping(value = "/send/{jmsq}", produces = MediaType.TEXT_PLAIN_VALUE)
public String send(
@RequestParam("data") String inputStr,
@PathVariable("jmsq") String jmsq)
{
try
{
Expand Down
10 changes: 4 additions & 6 deletions etc/config/liberty/server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
<feature>servlet-6.0</feature>
<!-- Required for Spring @Async with CICS-enabled threads -->
<feature>concurrent-3.0</feature>
<!-- JMS messaging support -->
<feature>messaging-3.1</feature>
<!-- IBM MQ JMS resource adapter -->
<feature>wmqJmsClient-2.0</feature>
<!-- IBM MQ Jakarta JMS client (requires MQ 9.3+ with Jakarta RAR) -->
<feature>wmqMessagingClient-3.0</feature>
<!-- JNDI lookup for JMS connection factory -->
<feature>jndi-1.0</feature>
</featureManager>
Expand All @@ -25,8 +23,8 @@
<connectionManager maxPoolSize="10" minPoolSize="0" />
</jmsConnectionFactory>

<!-- MQ JMS resource adapter location -->
<!-- IBM MQ Jakarta JMS resource adapter location (MQ 9.4.4) -->
<variable name="wmqJmsClient.rar.location"
value="/usr/lpp/mqm/V9R0M0/java/lib/jca/wmq.jmsra.rar" />
value="/usr/lpp/mqm/V9R4M4/java/lib/jca/wmq.jakarta.jmsra.rar" />

</server>
Loading