[jboss-svn-commits] JBL Code SVN: r7970 - labs/jbossesb/trunk/product/samples/trailblazer2/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Nov 29 22:41:07 EST 2006
Author: daniel.brum at jboss.com
Date: 2006-11-29 22:41:05 -0500 (Wed, 29 Nov 2006)
New Revision: 7970
Modified:
labs/jbossesb/trunk/product/samples/trailblazer2/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/LoanBroker.java
Log:
Modified: labs/jbossesb/trunk/product/samples/trailblazer2/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/LoanBroker.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer2/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/LoanBroker.java 2006-11-30 03:40:39 UTC (rev 7969)
+++ labs/jbossesb/trunk/product/samples/trailblazer2/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/LoanBroker.java 2006-11-30 03:41:05 UTC (rev 7970)
@@ -28,6 +28,7 @@
import org.jboss.soa.esb.addressing.EPR;
import org.jboss.soa.esb.addressing.eprs.JMSEpr;
import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.couriers.Courier;
import org.jboss.soa.esb.couriers.CourierFactory;
import org.jboss.soa.esb.couriers.CourierTimeoutException;
import org.jboss.soa.esb.couriers.CourierUtil;
@@ -75,6 +76,13 @@
//uses 2way courier for a response TODO: figure out why this does not work!
sendToCreditAgency(customer);
+ try {
+ Thread.sleep(5000);
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
//step 2 - send to JMS Bank - async
sendToJMSBank(customer);
@@ -145,6 +153,7 @@
message.getBody().setContents(customer.getCSV().getBytes());
try {
+ logger.debug("sending to credit agency");
//registry setup stuff
Registry registry = RegistryFactory.getRegistry();
String serviceCategoryName = ModulePropertyManager.getPropertyManager(MODULE_NAME).getProperty(SERVICE_CAT);
@@ -159,23 +168,24 @@
toEPR = (JMSEpr)registry.findEPR(serviceCategoryName, serviceName);
//use a 2-way courier so we can grab the response
- TwoWayCourier courier = CourierFactory.getCourier(toEPR, null);
+// TwoWayCourier courier = CourierFactory.getCourier(toEPR, null);
+ Courier courier = CourierFactory.getCourier(toEPR);
- if (message.getHeader().getCall()==null) {
- Call call = new Call();
- message.getHeader().setCall(call);
- }
+// if (message.getHeader().getCall()==null) {
+// Call call = new Call();
+// message.getHeader().setCall(call);
+// }
if (null == courier) {
logger.info("could not get a valid courier to deliver the message");
throw new ActionProcessingException("could not find a courier to deliver the message for the serrvice " +
"(category-name: " + serviceCategoryName +"-" + serviceCategoryName); }
- replyEPR = CourierUtil.getTemporaryReplyToEpr(toEPR);
- message.getHeader().getCall().setReplyTo(replyEPR);
+// replyEPR = CourierUtil.getTemporaryReplyToEpr(toEPR);
+// message.getHeader().getCall().setReplyTo(replyEPR);
if (courier.deliver(message)) {
- courier.setReplyToEpr(replyEPR);
- replyMessage = courier.pickup(5000); //TODO: replace with a time value from Config
+// courier.setReplyToEpr(replyEPR);
+// replyMessage = courier.pickup(5000); //TODO: replace with a time value from Config
if (replyMessage !=null) {
logger.debug("received reply from creditAgency action");
logger.debug("message received: " + replyMessage.getBody().getContents());
@@ -188,8 +198,8 @@
- }catch(CourierTimeoutException ex1) {
- logger.error("timeout occured waiting for creditAgency response - " + ex1);
+// }catch(CourierTimeoutException ex1) {
+// logger.error("timeout occured waiting for creditAgency response - " + ex1);
}catch (Exception ex2) {
logger.error("exception occured: " + ex2);
ex2.printStackTrace();
More information about the jboss-svn-commits
mailing list