Author: objectiser
Date: 2008-10-06 07:26:36 -0400 (Mon, 06 Oct 2008)
New Revision: 364
Modified:
cdl/trunk/distribution/src/main/release/samples/jbossesb/purchasing/store/.classpath
cdl/trunk/samples/jbossesb/client/src/com/acme/services/buyer/BuyerClient.java
cdl/trunk/samples/jbossesb/purchasing/store/src/main/resources/jbmq-queue-service.xml
Log:
Updates to reflect change from the 'broker' to 'store' in purchasing
sample, and change of jbossesb CDL jar name in classpath for Eclipse project.
Modified:
cdl/trunk/distribution/src/main/release/samples/jbossesb/purchasing/store/.classpath
===================================================================
---
cdl/trunk/distribution/src/main/release/samples/jbossesb/purchasing/store/.classpath 2008-10-06
09:38:38 UTC (rev 363)
+++
cdl/trunk/distribution/src/main/release/samples/jbossesb/purchasing/store/.classpath 2008-10-06
11:26:36 UTC (rev 364)
@@ -4,6 +4,6 @@
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/rosetta.jar"/>
<classpathentry kind="lib" path="lib/log4j.jar"/>
- <classpathentry kind="lib" path="lib/jbossesb.jar"/>
+ <classpathentry kind="lib" path="lib/cdl-jbossesb.jar"/>
<classpathentry kind="output" path="classes"/>
</classpath>
Modified: cdl/trunk/samples/jbossesb/client/src/com/acme/services/buyer/BuyerClient.java
===================================================================
---
cdl/trunk/samples/jbossesb/client/src/com/acme/services/buyer/BuyerClient.java 2008-10-06
09:38:38 UTC (rev 363)
+++
cdl/trunk/samples/jbossesb/client/src/com/acme/services/buyer/BuyerClient.java 2008-10-06
11:26:36 UTC (rev 364)
@@ -1,82 +1,82 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2008,
- */
-package com.acme.services.buyer;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.format.MessageFactory;
-import org.jboss.soa.esb.message.format.MessageType;
-import org.jboss.soa.esb.client.ServiceInvoker;
-import org.jboss.soa.esb.common.Configuration;
-
-/**
- * @author gary
- */
-public class BuyerClient {
-
- private static Logger logger = Logger.getLogger(BuyerClient.class);
-
- private ServiceInvoker brokerInvoker;
-
- public BuyerClient() {
-
- String regClass = Configuration.getRegistryFactoryClass();
- System.setProperty("javax.xml.registry.ConnectionFactoryClass", regClass);
-
- try {
- brokerInvoker = new ServiceInvoker("PurchaseGoods.Broker",
"Broker.main");
- } catch (Exception e) {
- e.printStackTrace();
- throw new RuntimeException("Failed to create ServiceInvoker", e);
- }
- }
-
- public void run() {
-
- String buyReq="<BuyRequest id=\"5\"
></BuyRequest>";
-
- Message mesg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
- mesg.getBody().add(buyReq);
-
mesg.getProperties().setProperty("org.jboss.soa.esb.exceptionOnDeliverFailure",
"true");
-
- try {
- System.out.println("=========================================");
- System.out.println("Request: "+mesg.getBody().get());
- Message reply=brokerInvoker.deliverSync(mesg, 20000);
-
- if (reply != null) {
- System.out.println("Reply: "+reply.getBody().get());
- } else {
- System.err.println("NO REPLY");
- }
- System.out.println("=========================================");
- } catch (Exception e) {
- logger.error(e);
- e.printStackTrace();
- }
- }
-
- public static void main(String[] args) {
- BuyerClient client=new BuyerClient();
-
- client.run();
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package com.acme.services.buyer;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.message.format.MessageType;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.common.Configuration;
+
+/**
+ * @author gary
+ */
+public class BuyerClient {
+
+ private static Logger logger = Logger.getLogger(BuyerClient.class);
+
+ private ServiceInvoker storeInvoker;
+
+ public BuyerClient() {
+
+ String regClass = Configuration.getRegistryFactoryClass();
+ System.setProperty("javax.xml.registry.ConnectionFactoryClass", regClass);
+
+ try {
+ storeInvoker = new ServiceInvoker("PurchaseGoods.Store",
"Store.main");
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new RuntimeException("Failed to create ServiceInvoker", e);
+ }
+ }
+
+ public void run() {
+
+ String buyReq="<BuyRequest id=\"5\"
></BuyRequest>";
+
+ Message mesg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
+ mesg.getBody().add(buyReq);
+
mesg.getProperties().setProperty("org.jboss.soa.esb.exceptionOnDeliverFailure",
"true");
+
+ try {
+ System.out.println("=========================================");
+ System.out.println("Request: "+mesg.getBody().get());
+ Message reply=storeInvoker.deliverSync(mesg, 20000);
+
+ if (reply != null) {
+ System.out.println("Reply: "+reply.getBody().get());
+ } else {
+ System.err.println("NO REPLY");
+ }
+ System.out.println("=========================================");
+ } catch (Exception e) {
+ logger.error(e);
+ e.printStackTrace();
+ }
+ }
+
+ public static void main(String[] args) {
+ BuyerClient client=new BuyerClient();
+
+ client.run();
+ }
+
+}
Modified:
cdl/trunk/samples/jbossesb/purchasing/store/src/main/resources/jbmq-queue-service.xml
===================================================================
---
cdl/trunk/samples/jbossesb/purchasing/store/src/main/resources/jbmq-queue-service.xml 2008-10-06
09:38:38 UTC (rev 363)
+++
cdl/trunk/samples/jbossesb/purchasing/store/src/main/resources/jbmq-queue-service.xml 2008-10-06
11:26:36 UTC (rev 364)
@@ -1,59 +1,59 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
-
-<mbean code="org.jboss.mq.server.jmx.Queue"
- name="jboss.esb.gen.destination:service=Queue,name=esb-broker">
- <depends optional-attribute-name="DestinationManager">
- jboss.mq:service=DestinationManager
- </depends>
-</mbean>
-<mbean code="org.jboss.mq.server.jmx.Queue"
- name="jboss.esb.gen.destination:service=Queue,name=esb-broker_reply">
- <depends optional-attribute-name="DestinationManager">
- jboss.mq:service=DestinationManager
- </depends>
-</mbean>
-<mbean code="org.jboss.mq.server.jmx.Queue"
- name="jboss.esb.gen.destination:service=Queue,name=esb-broker1">
- <depends optional-attribute-name="DestinationManager">
- jboss.mq:service=DestinationManager
- </depends>
-</mbean>
-<mbean code="org.jboss.mq.server.jmx.Queue"
- name="jboss.esb.gen.destination:service=Queue,name=esb-broker2">
- <depends optional-attribute-name="DestinationManager">
- jboss.mq:service=DestinationManager
- </depends>
-</mbean>
-<mbean code="org.jboss.mq.server.jmx.Queue"
- name="jboss.esb.gen.destination:service=Queue,name=esb-broker3">
- <depends optional-attribute-name="DestinationManager">
- jboss.mq:service=DestinationManager
- </depends>
-</mbean>
-<mbean code="org.jboss.mq.server.jmx.Queue"
- name="jboss.esb.gen.destination:service=Queue,name=esb-broker4">
- <depends optional-attribute-name="DestinationManager">
- jboss.mq:service=DestinationManager
- </depends>
-</mbean>
-<mbean code="org.jboss.mq.server.jmx.Queue"
- name="jboss.esb.gen.destination:service=Queue,name=esb-broker5">
- <depends optional-attribute-name="DestinationManager">
- jboss.mq:service=DestinationManager
- </depends>
-</mbean>
-<mbean code="org.jboss.mq.server.jmx.Queue"
- name="jboss.esb.gen.destination:service=Queue,name=esb-broker6">
- <depends optional-attribute-name="DestinationManager">
- jboss.mq:service=DestinationManager
- </depends>
-</mbean>
-<mbean code="org.jboss.mq.server.jmx.Queue"
- name="jboss.esb.gen.destination:service=Queue,name=esb-broker7">
- <depends optional-attribute-name="DestinationManager">
- jboss.mq:service=DestinationManager
- </depends>
-</mbean>
-
-</server>
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-store">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-store_reply">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-store1">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-store2">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-store3">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-store4">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-store5">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-store6">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.gen.destination:service=Queue,name=esb-store7">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+</mbean>
+
+</server>