Author: alex.guizar(a)jboss.com
Date: 2009-11-18 02:27:22 -0500 (Wed, 18 Nov 2009)
New Revision: 278
Modified:
trunk/samples/quickstart/purchase/build.xml
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/InvoiceCallbackBean.java
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingCallbackBean.java
trunk/samples/quickstart/purchase/war/resources/WEB-INF/jboss-web.xml
trunk/samples/quickstart/purchase/war/resources/WEB-INF/web.xml
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ComputePricePT_Impl.java
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/SchedulingPT_Impl.java
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingPT_Impl.java
Log:
RIFTSAW-34: correct endpoint class names in web.xml
fix environment references in jboss-web.xml
change file headers to LGPL text
Modified: trunk/samples/quickstart/purchase/build.xml
===================================================================
--- trunk/samples/quickstart/purchase/build.xml 2009-11-18 06:30:12 UTC (rev 277)
+++ trunk/samples/quickstart/purchase/build.xml 2009-11-18 07:27:22 UTC (rev 278)
@@ -19,7 +19,8 @@
<property name="ejb.build.dir" location="build/ejb/classes"
/>
<path id="compile-classpath">
- <fileset dir="${org.jboss.as.home}/client" includes="*.jar"
/>
+ <pathelement
location="${org.jboss.as.home}/common/lib/servlet-api.jar"/>
+ <pathelement location="${org.jboss.as.home}/client/jboss-javaee.jar"/>
</path>
<target name="deployq">
Modified:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/InvoiceCallbackBean.java
===================================================================
---
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/InvoiceCallbackBean.java 2009-11-18
06:30:12 UTC (rev 277)
+++
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/InvoiceCallbackBean.java 2009-11-18
07:27:22 UTC (rev 278)
@@ -1,16 +1,23 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag.
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
- * under the terms of the JBPM BPEL PUBLIC LICENSE AGREEMENT as
- * published by JBoss Inc.; either version 1.0 of the License, or
- * (at your option) any later version.
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
package org.jboss.soa.bpel.samples.quickstart.purchase;
Modified:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingCallbackBean.java
===================================================================
---
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingCallbackBean.java 2009-11-18
06:30:12 UTC (rev 277)
+++
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingCallbackBean.java 2009-11-18
07:27:22 UTC (rev 278)
@@ -1,16 +1,23 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag.
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
- * under the terms of the JBPM BPEL PUBLIC LICENSE AGREEMENT as
- * published by JBoss Inc.; either version 1.0 of the License, or
- * (at your option) any later version.
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
package org.jboss.soa.bpel.samples.quickstart.purchase;
Modified: trunk/samples/quickstart/purchase/war/resources/WEB-INF/jboss-web.xml
===================================================================
--- trunk/samples/quickstart/purchase/war/resources/WEB-INF/jboss-web.xml 2009-11-18
06:30:12 UTC (rev 277)
+++ trunk/samples/quickstart/purchase/war/resources/WEB-INF/jboss-web.xml 2009-11-18
07:27:22 UTC (rev 278)
@@ -4,19 +4,18 @@
<jboss-web>
- <!-- Invoice Service -->
<resource-ref>
- <res-ref-name>jms/connectionFactory</res-ref-name>
+ <res-ref-name>connectionFactory</res-ref-name>
<jndi-name>java:ConnectionFactory</jndi-name>
</resource-ref>
<message-destination-ref>
-
<message-destination-ref-name>jms/invoiceQueue</message-destination-ref-name>
+
<message-destination-ref-name>invoiceQueue</message-destination-ref-name>
<jndi-name>queue/InvoiceQueue</jndi-name>
</message-destination-ref>
<message-destination-ref>
-
<message-destination-ref-name>jms/shippingQueue</message-destination-ref-name>
+
<message-destination-ref-name>shippingQueue</message-destination-ref-name>
<jndi-name>queue/ShippingQueue</jndi-name>
</message-destination-ref>
Modified: trunk/samples/quickstart/purchase/war/resources/WEB-INF/web.xml
===================================================================
--- trunk/samples/quickstart/purchase/war/resources/WEB-INF/web.xml 2009-11-18 06:30:12
UTC (rev 277)
+++ trunk/samples/quickstart/purchase/war/resources/WEB-INF/web.xml 2009-11-18 07:27:22
UTC (rev 278)
@@ -6,33 +6,17 @@
<!-- Invoice Service -->
<servlet>
<servlet-name>invoiceServlet</servlet-name>
- <servlet-class>org.jbpm.bpel.tutorial.invoice.ComputePricePT_Impl</servlet-class>
+ <servlet-class>org.jboss.soa.bpel.samples.quickstart.purchase.ComputePricePT_Impl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>invoiceServlet</servlet-name>
<url-pattern>/invoiceService</url-pattern>
</servlet-mapping>
- <resource-ref>
- <description>The single factory from which endpoint implementation beans
- obtain JMS connections.</description>
- <res-ref-name>jms/connectionFactory</res-ref-name>
- <res-type>javax.jms.ConnectionFactory</res-type>
- <res-auth>Container</res-auth>
- <res-sharing-scope>Shareable</res-sharing-scope>
- </resource-ref>
-
- <message-destination-ref>
- <description>The target for invoice messages.</description>
- <message-destination-ref-name>jms/invoiceQueue</message-destination-ref-name>
- <message-destination-type>javax.jms.Queue</message-destination-type>
- <message-destination-usage>Produces</message-destination-usage>
- </message-destination-ref>
-
<!-- Shipping Service -->
<servlet>
<servlet-name>shippingServlet</servlet-name>
- <servlet-class>org.jbpm.bpel.tutorial.shipping.ShippingPT_Impl</servlet-class>
+ <servlet-class>org.jboss.soa.bpel.samples.quickstart.purchase.ShippingPT_Impl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>shippingServlet</servlet-name>
@@ -46,17 +30,10 @@
<env-entry-value>10.95</env-entry-value>
</env-entry>
- <message-destination-ref>
- <description>The target for shipping messages.</description>
- <message-destination-ref-name>jms/shippingQueue</message-destination-ref-name>
- <message-destination-type>javax.jms.Queue</message-destination-type>
- <message-destination-usage>Produces</message-destination-usage>
- </message-destination-ref>
-
<!-- Production Scheduling Process -->
<servlet>
<servlet-name>schedulingServlet</servlet-name>
- <servlet-class>org.jbpm.bpel.tutorial.scheduling.SchedulingPT_Impl</servlet-class>
+ <servlet-class>org.jboss.soa.bpel.samples.quickstart.purchase.SchedulingPT_Impl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>schedulingServlet</servlet-name>
Modified:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ComputePricePT_Impl.java
===================================================================
---
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ComputePricePT_Impl.java 2009-11-18
06:30:12 UTC (rev 277)
+++
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ComputePricePT_Impl.java 2009-11-18
07:27:22 UTC (rev 278)
@@ -1,16 +1,23 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag.
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
- * under the terms of the JBPM BPEL PUBLIC LICENSE AGREEMENT as
- * published by JBoss Inc.; either version 1.0 of the License, or
- * (at your option) any later version.
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
package org.jboss.soa.bpel.samples.quickstart.purchase;
@@ -26,6 +33,7 @@
import javax.jms.Queue;
import javax.jms.Session;
import javax.jws.WebService;
+import javax.servlet.ServletContext;
import javax.xml.ws.WebServiceContext;
import javax.xml.ws.handler.MessageContext;
@@ -55,10 +63,12 @@
public void initiatePriceCalculation(CustomerInfo customerInfo,
PurchaseOrder purchaseOrder) {
MessageContext messageContext = serviceContext.getMessageContext();
- messageContext.put(ORDER_ID_ATTR, purchaseOrder.getOrderId());
+ ServletContext servletContext =
+ (ServletContext) messageContext.get(MessageContext.SERVLET_CONTEXT);
+ servletContext.setAttribute(ORDER_ID_ATTR, purchaseOrder.getOrderId());
// In our system the part number is also the unit price!
- messageContext.put(LINE_PRICE_ATTR, purchaseOrder.getQuantity()
- * purchaseOrder.getPartNumber());
+ servletContext.setAttribute(LINE_PRICE_ATTR,
+ (float) purchaseOrder.getQuantity() * purchaseOrder.getPartNumber());
}
public void sendShippingPrice(ShippingInfo shippingInfo) {
@@ -72,8 +82,10 @@
protected void sendInvoiceMessage(float shippingPrice) throws JMSException {
MessageContext messageContext = serviceContext.getMessageContext();
- Integer orderId = (Integer) messageContext.get(ORDER_ID_ATTR);
- Integer linePrice = (Integer) messageContext.get(LINE_PRICE_ATTR);
+ ServletContext servletContext =
+ (ServletContext) messageContext.get(MessageContext.SERVLET_CONTEXT);
+ Integer orderId = (Integer) servletContext.getAttribute(ORDER_ID_ATTR);
+ Float linePrice = (Float) servletContext.getAttribute(LINE_PRICE_ATTR);
float amount = linePrice + shippingPrice;
// create a connection
Modified:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/SchedulingPT_Impl.java
===================================================================
---
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/SchedulingPT_Impl.java 2009-11-18
06:30:12 UTC (rev 277)
+++
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/SchedulingPT_Impl.java 2009-11-18
07:27:22 UTC (rev 278)
@@ -1,16 +1,23 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag.
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
- * under the terms of the JBPM BPEL PUBLIC LICENSE AGREEMENT as
- * published by JBoss Inc.; either version 1.0 of the License, or
- * (at your option) any later version.
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
package org.jboss.soa.bpel.samples.quickstart.purchase;
Modified:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingPT_Impl.java
===================================================================
---
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingPT_Impl.java 2009-11-18
06:30:12 UTC (rev 277)
+++
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingPT_Impl.java 2009-11-18
07:27:22 UTC (rev 278)
@@ -1,16 +1,23 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag.
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
- * under the terms of the JBPM BPEL PUBLIC LICENSE AGREEMENT as
- * published by JBoss Inc.; either version 1.0 of the License, or
- * (at your option) any later version.
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
package org.jboss.soa.bpel.samples.quickstart.purchase;
@@ -41,7 +48,7 @@
@Resource
private ConnectionFactory connectionFactory;
@Resource
- private float shippingPrice;
+ private Float shippingPrice;
private final Logger logger =
Logger.getLogger(ShippingPT_Impl.class.getName());