Skip to content

Commit 27056a9

Browse files
authored
fix for issue#613 (#618)
* rename TEQ to TxEventQ * rename TEQ to TxEventQ * rename TEQ to TxEventQ * Update setup.sh
1 parent fd37487 commit 27056a9

File tree

7 files changed

+47
-47
lines changed

7 files changed

+47
-47
lines changed

workshops/oracleAQ/qJava/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
<relativePath /> <!-- lookup parent from repository -->
1111
</parent>
1212
<groupId>com.examples</groupId>
13-
<artifactId>aqJava</artifactId>
13+
<artifactId>qJava</artifactId>
1414
<version>0.0.1-SNAPSHOT</version>
1515
<name>java</name>
16-
<description>AQ workshop </description>
16+
<description>AQ/TxEventQ java workshop </description>
1717
<properties>
1818
<java.version>8</java.version>
1919
<version.lib.ojdbc>21.1.0.0</version.lib.ojdbc>

workshops/oracleAQ/qJava/src/main/java/com/examples/config/ConstantName.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class ConstantName {
88

99
//AQ- Point to Point
1010
public String aq_createTable = "JAVA_QUEUE_TABLE";
11-
public String aq_creaTxEventQueue = "JAVA_QUEUE";
11+
public String aq_createQueue = "JAVA_QUEUE";
1212

1313
public String aq_enqueueDequeueTable= "JAVA_ENQUEUE_DEQUEUE_QUEUE_TABLE";
1414
public String aq_enqueueDequeueQueue= "JAVA_ENQUEUE_DEQUEUE_QUEUE";
@@ -22,8 +22,8 @@ public class ConstantName {
2222
public String aq_pubSubSubscriber1 = "JAVA_AQ_PUBSUB_SUBSCRIBER1";
2323

2424
//TxEventQ- PUBSUB
25-
public String TxEventQ_pubSubQueue = "JAVA_TxEventQ_PUBSUB_QUEUE";
26-
public String TxEventQ_pubSubSubscriber1 = "JAVA_TxEventQ_PUBSUB_SUBSCRIBER1";
25+
public String txEventQ_pubSubQueue = "JAVA_TxEventQ_PUBSUB_QUEUE";
26+
public String txEventQ_pubSubSubscriber1 = "JAVA_TxEventQ_PUBSUB_SUBSCRIBER1";
2727

2828
//AQ- WORKFLOW
2929
public String aq_userQueueTable = "JAVA_AQ_USER_QUEUE_TABLE";
@@ -42,17 +42,17 @@ public class ConstantName {
4242
public String aq_applicationDelivererSubscriber = "JAVA_AQ_APPLICATION_DELIVERER_SUBS";
4343

4444
//TxEventQ- WORKFLOW
45-
public String TxEventQ_userQueueName = "JAVA_TxEventQ_USER_QUEUE";
46-
public String TxEventQ_userApplicationSubscriber = "JAVA_TxEventQ_USER_APPLICATION_SUBS";
47-
public String TxEventQ_userDelivererSubscriber = "JAVA_TxEventQ_USER_DELIVERER_SUBS";
45+
public String txEventQ_userQueueName = "JAVA_TxEventQ_USER_QUEUE";
46+
public String txEventQ_userApplicationSubscriber = "JAVA_TxEventQ_USER_APPLICATION_SUBS";
47+
public String txEventQ_userDelivererSubscriber = "JAVA_TxEventQ_USER_DELIVERER_SUBS";
4848

49-
public String TxEventQ_delivererQueueName = "JAVA_TxEventQ_DELIVERER_QUEUE";
50-
public String TxEventQ_delivererApplicationSubscriber= "JAVA_TxEventQ_DELIVERER_APPLICATION_SUBS";
51-
public String TxEventQ_delivererUserSubscriber = "JAVA_TxEventQ_DELIVERER_USER_SUBS";
49+
public String txEventQ_delivererQueueName = "JAVA_TxEventQ_DELIVERER_QUEUE";
50+
public String txEventQ_delivererApplicationSubscriber= "JAVA_TxEventQ_DELIVERER_APPLICATION_SUBS";
51+
public String txEventQ_delivererUserSubscriber = "JAVA_TxEventQ_DELIVERER_USER_SUBS";
5252

53-
public String TxEventQ_applicationQueueName = "JAVA_TxEventQ_APPLICATION_QUEUE";
54-
public String TxEventQ_applicationUserSubscriber = "JAVA_TxEventQ_APPLICATION_USER_SUBS";
55-
public String TxEventQ_applicationDelivererSubscriber= "JAVA_TxEventQ_APPLICATION_DELIVERER_SUBS";
53+
public String txEventQ_applicationQueueName = "JAVA_TxEventQ_APPLICATION_QUEUE";
54+
public String txEventQ_applicationUserSubscriber = "JAVA_TxEventQ_APPLICATION_USER_SUBS";
55+
public String txEventQ_applicationDelivererSubscriber= "JAVA_TxEventQ_APPLICATION_DELIVERER_SUBS";
5656

5757

5858
}

workshops/oracleAQ/qJava/src/main/java/com/examples/controller/OracleAQController.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
import org.springframework.web.bind.annotation.RestController;
1111

1212
import com.examples.enqueueDequeueAQ.EnqueueDequeueAQ;
13-
import com.examples.enqueueDequeueTEQ.EnqueueDequeueTEQ;
13+
import com.examples.enqueueDequeueTxEventQ.EnqueueDequeueTxEventQ;
1414
import com.examples.workflowAQ.WorkflowAQ;
15-
import com.examples.workflowTEQ.WorkflowTEQ;
15+
import com.examples.workflowTxEventQ.WorkflowTxEventQ;
1616

1717
@RequestMapping("/oracleAQ")
1818
@RestController
@@ -23,13 +23,13 @@ public class OracleAQController {
2323
EnqueueDequeueAQ enqueueDequeueAQ;
2424

2525
@Autowired(required = true)
26-
EnqueueDequeueTEQ enqueueDequeueTEQ;
26+
EnqueueDequeueTxEventQ enqueueDequeueTxEventQ;
2727

2828
@Autowired(required = true)
2929
WorkflowAQ workflowAQ;
3030

3131
@Autowired(required = true)
32-
WorkflowTEQ workflowTEQ;
32+
WorkflowTxEventQ workflowTxEventQ;
3333

3434
@GetMapping(value = "/pointToPointAQ")
3535
public Map<String, Object> pointToPointAQ() throws Exception {
@@ -67,21 +67,21 @@ public Map<String, Object> pubSubAQ() throws Exception {
6767
return response;
6868
}
6969

70-
@GetMapping(value = "/pubSubTEQ")
71-
public Map<String, Object> pubSubTEQ() throws Exception {
70+
@GetMapping(value = "/pubSubTxEventQ")
71+
public Map<String, Object> pubSubTxEventQ() throws Exception {
7272
Map<String, Object> response = new HashMap();
73-
Map<Integer, String> responseBody= enqueueDequeueTEQ.pubSubTEQ();
73+
Map<Integer, String> responseBody= enqueueDequeueTxEventQ.pubSubTxEventQ();
7474

7575
if (responseBody != null) {
7676
response.put("ResponseCode", "200");
77-
response.put("ResponseText", "TEQ PubSub execution SUCCESS ...!!!");
77+
response.put("ResponseText", "TxEventQ PubSub execution SUCCESS ...!!!");
7878
response.put("ResponseBody", responseBody);
7979

8080
} else {
8181
response.put("ResponseCode", "300");
82-
response.put("ResponseText", "TEQ PubSub execution FAILED ...!!!");
82+
response.put("ResponseText", "TxEventQ PubSub execution FAILED ...!!!");
8383
}
84-
System.out.println("TEQ PubSub response:" + response);
84+
System.out.println("TxEventQ PubSub response:" + response);
8585
return response;
8686
}
8787

@@ -103,19 +103,19 @@ public Map<String, Object> workflowAQ() throws Exception {
103103
return response;
104104
}
105105

106-
@GetMapping(value = "/workflowTEQ")
107-
public Map<String, Object> workflowTEQ() throws Exception {
106+
@GetMapping(value = "/workflowTxEventQ")
107+
public Map<String, Object> workflowTxEventQ() throws Exception {
108108
Map<String, Object> response = new HashMap();
109-
Map<Integer, String> responseBody= workflowTEQ.pubSubWorkflowTEQ();
109+
Map<Integer, String> responseBody= workflowTxEventQ.pubSubWorkflowTxEventQ();
110110

111111
if (responseBody != null) {
112112
response.put("ResponseCode", "200");
113-
response.put("ResponseText", "TEQ Enqueue and Dequeue execution SUCCESS ...!!!");
113+
response.put("ResponseText", "TxEventQ Enqueue and Dequeue execution SUCCESS ...!!!");
114114
response.put("ResponseBody", responseBody);
115115

116116
} else {
117117
response.put("ResponseCode", "300");
118-
response.put("ResponseText", "TEQ Enqueue and Dequeue execution FAILED ...!!!");
118+
response.put("ResponseText", "TxEventQ Enqueue and Dequeue execution FAILED ...!!!");
119119
}
120120
System.out.println("AQ Enqueue and Dequeue response:" + response);
121121
return response;

workshops/oracleAQ/qJava/src/main/java/com/examples/enqueueDequeueTEQ/EnqueueDequeueTEQ.java renamed to workshops/oracleAQ/qJava/src/main/java/com/examples/enqueueDequeueTxEventQ/EnqueueDequeueTxEventQ.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.examples.enqueueDequeueTEQ;
1+
package com.examples.enqueueDequeueTxEventQ;
22

33
import java.sql.SQLException;
44
import java.util.HashMap;
@@ -18,7 +18,7 @@
1818

1919

2020
@Service
21-
public class EnqueueDequeueTEQ {
21+
public class EnqueueDequeueTxEventQ {
2222

2323
@Autowired(required=true)
2424
private pubSubUtil pubSubUtil;
@@ -29,13 +29,13 @@ public class EnqueueDequeueTEQ {
2929
@Autowired(required = true)
3030
private ConstantName constantName;
3131

32-
public Map<Integer,String> pubSubTEQ() throws JsonProcessingException, ClassNotFoundException, SQLException, JMSException {
32+
public Map<Integer,String> pubSubTxEventQ() throws JsonProcessingException, ClassNotFoundException, SQLException, JMSException {
3333
Map<Integer,String> response = new HashMap();
3434

3535
TopicSession session = configData.topicDataSourceConnection();
3636
response.put(1, "Topic Connection created.");
3737

38-
pubSubUtil.pubSub(session, constantName.teq_pubSubSubscriber1, constantName.teq_pubSubQueue, "Sample text message");
38+
pubSubUtil.pubSub(session, constantName.txEventQ_pubSubSubscriber1, constantName.txEventQ_pubSubQueue, "Sample text message");
3939
response.put(2, "Topic pubSub executed.");
4040

4141
return response;

workshops/oracleAQ/qJava/src/main/java/com/examples/util/pubSubUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class pubSubUtil {
3535

3636
ObjectMapper mapper = new ObjectMapper();
3737

38-
public UserDetails pubSubWorkflowTEQ(TopicSession session, String subscriberName, String queueName, UserDetails user)
38+
public UserDetails pubSubWorkflowTxEventQ(TopicSession session, String subscriberName, String queueName, UserDetails user)
3939
throws JsonProcessingException, ClassNotFoundException, SQLException, JMSException {
4040

4141
Topic topic = ((AQjmsSession) session).getTopic(username, queueName);

workshops/oracleAQ/qJava/src/main/java/com/examples/workflowTEQ/WorkflowTEQ.java renamed to workshops/oracleAQ/qJava/src/main/java/com/examples/workflowTxEventQ/WorkflowTxEventQ.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.examples.workflowTEQ;
1+
package com.examples.workflowTxEventQ;
22

33
import java.sql.SQLException;
44
import java.util.HashMap;
@@ -33,7 +33,7 @@
3333
import oracle.ucp.jdbc.PoolDataSourceFactory;
3434

3535
@Service
36-
public class WorkflowTEQ {
36+
public class WorkflowTxEventQ {
3737

3838
@Autowired
3939
UserDetailsDao userDetailsDao;
@@ -59,7 +59,7 @@ public class WorkflowTEQ {
5959
UserDetails applicationToUser_message;
6060
UserDetails applicationToDeliverer_message;
6161

62-
public Map<Integer,String> pubSubWorkflowTEQ() throws JMSException, SQLException, ClassNotFoundException, JsonMappingException, JsonProcessingException, AQException {
62+
public Map<Integer,String> pubSubWorkflowTxEventQ() throws JMSException, SQLException, ClassNotFoundException, JsonMappingException, JsonProcessingException, AQException {
6363

6464
String deliveryStatus;
6565
Map<Integer,String> response = new HashMap();
@@ -68,13 +68,13 @@ public Map<Integer,String> pubSubWorkflowTEQ() throws JMSException, SQLException
6868
response.put(1, "Topic Connection created.");
6969

7070
/* 1: USER PLACED OREDER ON APPLICATION */
71-
userToApplication_message = pubSubUtil.pubSubWorkflowTEQ(session, constantName.teq_userApplicationSubscriber, constantName.teq_userQueueName,new UserDetails(rnd.nextInt(99999), "DBUSER", 0, "Pending", "US"));
71+
userToApplication_message = pubSubUtil.pubSubWorkflowTxEventQ(session, constantName.txEventQ_userApplicationSubscriber, constantName.txEventQ_userQueueName,new UserDetails(rnd.nextInt(99999), "DBUSER", 0, "Pending", "US"));
7272
response.put(2,"USER ORDER MESSAGE - ORDERID: " + userToApplication_message.getOrderId() + ", OTP: "
7373
+ userToApplication_message.getOtp() + ", DeliveryStatus: "
7474
+ userToApplication_message.getDeliveryStatus());
7575

7676
/* 2: APPLICATION SHARES OTP TO USER */
77-
applicationToUser_message = pubSubUtil.pubSubWorkflowTEQ(session, constantName.teq_applicationUserSubscriber, constantName.teq_applicationQueueName,
77+
applicationToUser_message = pubSubUtil.pubSubWorkflowTxEventQ(session, constantName.txEventQ_applicationUserSubscriber, constantName.txEventQ_applicationQueueName,
7878
new UserDetails(userToApplication_message.getOrderId(), userToApplication_message.getUsername(),
7979
rnd.nextInt(9999), userToApplication_message.getDeliveryStatus(),
8080
userToApplication_message.getDeliveryLocation()));
@@ -88,22 +88,22 @@ public Map<Integer,String> pubSubWorkflowTEQ() throws JMSException, SQLException
8888
response.put(4,"APPLICATION ADDED USER ORDER INTO RECORD");
8989

9090
/* 4: APPLICATION SHARES DELIVERY DETAILS TO DELIVERER */
91-
applicationToDeliverer_message = pubSubUtil.pubSubWorkflowTEQ(session, constantName.teq_applicationDelivererSubscriber, constantName.teq_applicationQueueName,
91+
applicationToDeliverer_message = pubSubUtil.pubSubWorkflowTxEventQ(session, constantName.txEventQ_applicationDelivererSubscriber, constantName.txEventQ_applicationQueueName,
9292
new UserDetails(userToApplication_message.getOrderId(), userToApplication_message.getUsername(), 0,
9393
userToApplication_message.getDeliveryStatus(),
9494
userToApplication_message.getDeliveryLocation()));
9595
response.put(5,"APPLICATION TO DELIVERER MESSAGE- ORDERID: "+ applicationToDeliverer_message.getOrderId() + ", OTP: " + applicationToDeliverer_message.getOtp()+ ", DeliveryStatus: " + applicationToDeliverer_message.getDeliveryStatus());
9696

9797
/* 5: USER SHARES OTP TO DELIVERER */
98-
userToDeliverer_message = pubSubUtil.pubSubWorkflowTEQ(session, constantName.teq_userDelivererSubscriber, constantName.teq_userQueueName,
98+
userToDeliverer_message = pubSubUtil.pubSubWorkflowTxEventQ(session, constantName.txEventQ_userDelivererSubscriber, constantName.txEventQ_userQueueName,
9999
new UserDetails(applicationToUser_message.getOrderId(), applicationToUser_message.getUsername(),
100100
applicationToUser_message.getOtp(), applicationToUser_message.getDeliveryStatus(),
101101
applicationToUser_message.getDeliveryLocation()));
102102
response.put(6, "USER TO DELIVERER MESSAGE - ORDERID: " + userToDeliverer_message.getOrderId()+ ", OTP: " + userToDeliverer_message.getOtp() + ", DeliveryStatus: "+ userToDeliverer_message.getDeliveryStatus());
103103
System.out.println();
104104

105105
/* 6: DELIVERER TO APPLICATION FOR OTP VERIFICATION */
106-
delivererToApplication_message = pubSubUtil.pubSubWorkflowTEQ(session, constantName.teq_delivererApplicationSubscriber, constantName.teq_delivererQueueName,
106+
delivererToApplication_message = pubSubUtil.pubSubWorkflowTxEventQ(session, constantName.txEventQ_delivererApplicationSubscriber, constantName.txEventQ_delivererQueueName,
107107
new UserDetails(userToDeliverer_message.getOrderId(), userToDeliverer_message.getUsername(),
108108
userToDeliverer_message.getOtp(), userToDeliverer_message.getDeliveryStatus(),
109109
userToDeliverer_message.getDeliveryLocation()));
@@ -128,12 +128,12 @@ public Map<Integer,String> pubSubWorkflowTEQ() throws JMSException, SQLException
128128

129129
UserDetails updatedData = userDetailsDao.getUserDetails(delivererToApplication_message.getOrderId());
130130
/* 8: APPLICATION UPDATE DELIVERER TO DELIVER ORDER */
131-
applicationToDeliverer_message = pubSubUtil.pubSubWorkflowTEQ(session, constantName.teq_applicationDelivererSubscriber, constantName.teq_applicationQueueName,
131+
applicationToDeliverer_message = pubSubUtil.pubSubWorkflowTxEventQ(session, constantName.txEventQ_applicationDelivererSubscriber, constantName.txEventQ_applicationQueueName,
132132
new UserDetails(delivererToApplication_message.getOrderId(), delivererToApplication_message.getUsername(), delivererToApplication_message.getOtp(), updatedData.getDeliveryStatus(), delivererToApplication_message.getDeliveryLocation()));
133133
response.put(9, "UPDATE DELIVERER MESSAGE - ORDERID: " + applicationToDeliverer_message.getOrderId()+ ", OTP: " + applicationToDeliverer_message.getOtp() + ", DeliveryStatus: "+ applicationToDeliverer_message.getDeliveryStatus());
134134

135135
/* 9: APPLICATION UPDATE USER FOR DELIVERED ORDER */
136-
applicationToUser_message = pubSubUtil.pubSubWorkflowTEQ(session, constantName.teq_applicationUserSubscriber, constantName.teq_applicationQueueName,
136+
applicationToUser_message = pubSubUtil.pubSubWorkflowTxEventQ(session, constantName.txEventQ_applicationUserSubscriber, constantName.txEventQ_applicationQueueName,
137137
new UserDetails(delivererToApplication_message.getOrderId(), delivererToApplication_message.getUsername(), delivererToApplication_message.getOtp(), updatedData.getDeliveryStatus(), delivererToApplication_message.getDeliveryLocation()));
138138
response.put(10, "UPDATE USER MESSAGE - ORDERID: " + applicationToUser_message.getOrderId() + ", OTP: "+ applicationToUser_message.getOtp() + ", DeliveryStatus: "+ applicationToUser_message.getDeliveryStatus());
139139

workshops/oracleAQ/setup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export ORACLEAQ_PYTHON_TxEventQ=${ORACLEAQ_HOME}/qPython/txEventQ
1919
export ORACLEAQ_NODE_AQ=${ORACLEAQ_HOME}/qNode/aq
2020
export ORACLEAQ_NODE_TxEventQ=${ORACLEAQ_HOME}/qNode/txEventQ
2121

22-
export ORACLEAQ_JAVA=${ORACLEAQ_HOME}/aqJava
22+
export ORACLEAQ_JAVA=${ORACLEAQ_HOME}/qJava
2323

2424
export TNS_ADMIN=$ORACLEAQ_HOME/wallet
2525
export USER_DEFINED_WALLET=${TNS_ADMIN}/user_defined_wallet
@@ -216,11 +216,11 @@ export JDBC_URL=jdbc:oracle:thin:@${DB_ALIAS}?TNS_ADMIN=${TNS_ADMIN_FOR_JAVA}
216216

217217
#Build java code
218218
cd ../
219-
cd aqJava
219+
cd $ORACLEAQ_JAVA
220220
{
221221
mvn clean install -Dmaven.wagon.http.ssl.insecure=true -Dmaven.test.skip=true
222222
cd target
223-
nohup java -jar aqJava-0.0.1-SNAPSHOT.jar &
223+
nohup java -jar qJava-0.0.1-SNAPSHOT.jar &
224224
} &>/dev/null
225225
echo "Java setup completed."
226226

0 commit comments

Comments
 (0)