[jboss-svn-commits] JBL Code SVN: r6275 - labs/jbossesb/workspace/tfennelly/product/docs/samples/trailblazer/bankloanbrokerdemo/java/src/org/jboss/soa/esb/samples/loanbroker/actions
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Sep 18 11:28:23 EDT 2006
Author: tfennelly
Date: 2006-09-18 11:28:21 -0400 (Mon, 18 Sep 2006)
New Revision: 6275
Removed:
labs/jbossesb/workspace/tfennelly/product/docs/samples/trailblazer/bankloanbrokerdemo/java/src/org/jboss/soa/esb/samples/loanbroker/actions/ProcessBanksFileResponse.java
labs/jbossesb/workspace/tfennelly/product/docs/samples/trailblazer/bankloanbrokerdemo/java/src/org/jboss/soa/esb/samples/loanbroker/actions/ProcessBanksJMSResponse.java
Log:
removed
Deleted: labs/jbossesb/workspace/tfennelly/product/docs/samples/trailblazer/bankloanbrokerdemo/java/src/org/jboss/soa/esb/samples/loanbroker/actions/ProcessBanksFileResponse.java
===================================================================
--- labs/jbossesb/workspace/tfennelly/product/docs/samples/trailblazer/bankloanbrokerdemo/java/src/org/jboss/soa/esb/samples/loanbroker/actions/ProcessBanksFileResponse.java 2006-09-18 15:22:45 UTC (rev 6274)
+++ labs/jbossesb/workspace/tfennelly/product/docs/samples/trailblazer/bankloanbrokerdemo/java/src/org/jboss/soa/esb/samples/loanbroker/actions/ProcessBanksFileResponse.java 2006-09-18 15:28:21 UTC (rev 6275)
@@ -1,87 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt 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 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. 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.esb.samples.loanbroker.actions;
-
-import java.io.Serializable;
-
-import org.jboss.soa.esb.actions.AbstractFileAction;
-import org.jboss.soa.esb.common.SystemProperties;
-import org.jboss.soa.esb.helpers.DomElement;
-import org.jboss.soa.esb.jboss.loanbroker.util.FileUtil;
-import org.jboss.soa.esb.samples.loanbroker.domain.Customer;
-import org.jboss.soa.esb.samples.loanbroker.domain.LoanOffer;
-import org.jboss.soa.esb.services.IpersistHandler;
-import org.jboss.soa.esb.services.PersistHandlerFactory;
-
-public class ProcessBanksFileResponse extends AbstractFileAction {
-
- public ProcessBanksFileResponse(DomElement p_oP, Object p_oCurr) {
- super(p_oP, p_oCurr);
- }
-
- @Override
- public void processCurrentObject() throws Exception {
- m_oLogger.info("processObject was called with <<"
- +m_oCurr.toString()+">>");
-
-// File file = getInputFile();
- String message = FileUtil.readTextFile(getWorkFile());
- String[] messagePart = message.split(",");
- long uid = Long.parseLong(messagePart[3]);
-
-// get handle to the JBossESB Event object store
- IpersistHandler esbHandler = PersistHandlerFactory.getPersistHandler("remote",
- SystemProperties.getJndiServerType(),
- SystemProperties.getJndiServerURL());
-
- Customer customer = (Customer) esbHandler.getObject(org.jboss.soa.esb.samples.loanbroker.domain.Customer.class, uid);
- m_oLogger.info(this.getClass().getSimpleName() + " -- Business Object BEFORE Loan Offer is added: \n" + customer.toDTO().toXml());
-// now update this Customer with a LoanOffer based on the response from the Bank
- LoanOffer offer = new LoanOffer((String)null);
- offer.setField(LoanOffer.ATTRIB.interestRate, messagePart[0]);
- offer.setField(LoanOffer.ATTRIB.quoteId, messagePart[1]);
- offer.setField(LoanOffer.ATTRIB.errorCode, messagePart[2]);
- customer.addOffer(offer);
- esbHandler.rplObject(customer); //update the object store
- m_oLogger.info(this.getClass().getSimpleName() + " -- Business Object AFTER Loan Offer is added: \n" + customer.toDTO().toXml());
-
- if (customer.getOfferCount() >= 2) //no more quotes expected so send an email
- {
- ProcessEmail email = new ProcessEmail(customer);
- email.sendEmail();
- }
-
- }
-
- @Override
- public Serializable getOkNotification() {
- return "OK NOTIF: " + this.getClass();
- }
-
- @Override
- public Serializable getErrorNotification() {
- return "ERR NOTIFICATION: "+this.getClass();
- }
-
-}
Deleted: labs/jbossesb/workspace/tfennelly/product/docs/samples/trailblazer/bankloanbrokerdemo/java/src/org/jboss/soa/esb/samples/loanbroker/actions/ProcessBanksJMSResponse.java
===================================================================
--- labs/jbossesb/workspace/tfennelly/product/docs/samples/trailblazer/bankloanbrokerdemo/java/src/org/jboss/soa/esb/samples/loanbroker/actions/ProcessBanksJMSResponse.java 2006-09-18 15:22:45 UTC (rev 6274)
+++ labs/jbossesb/workspace/tfennelly/product/docs/samples/trailblazer/bankloanbrokerdemo/java/src/org/jboss/soa/esb/samples/loanbroker/actions/ProcessBanksJMSResponse.java 2006-09-18 15:28:21 UTC (rev 6275)
@@ -1,113 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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 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. 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.esb.samples.loanbroker.actions;
-
-import java.io.Serializable;
-
-import javax.jms.TextMessage;
-
-import org.jboss.soa.esb.actions.AbstractAction;
-import org.jboss.soa.esb.common.SystemProperties;
-import org.jboss.soa.esb.helpers.DomElement;
-import org.jboss.soa.esb.listeners.GpListener;
-import org.jboss.soa.esb.samples.loanbroker.adapters.CustomerAdapter;
-import org.jboss.soa.esb.samples.loanbroker.banks.BanksQuoteResponse;
-import org.jboss.soa.esb.samples.loanbroker.domain.Customer;
-import org.jboss.soa.esb.samples.loanbroker.domain.LoanOffer;
-import org.jboss.soa.esb.services.IpersistHandler;
-import org.jboss.soa.esb.services.PersistHandlerFactory;
-
-public class ProcessBanksJMSResponse extends AbstractAction {
-
- private BanksQuoteResponse bankResponse;
-
- public ProcessBanksJMSResponse(DomElement p_oP, Object p_oCurr) {
- super(p_oP, p_oCurr);
- }
-
- @Override
- public void processCurrentObject() throws Exception {
- m_oLogger.info("processObject was called with <<"
- +m_oCurr.toString()+">>");
-
- if (! (m_oCurr instanceof TextMessage))
- throw new Exception("Message must be a TextMessage");
-
- String sVal = (String)((TextMessage)m_oCurr).getText();
- bankResponse = CustomerAdapter.bankQuoteFromXML(sVal);
-// get handle to the JBossESB Event object store
- IpersistHandler esbHandler = PersistHandlerFactory.getPersistHandler("remote",
- SystemProperties.getJndiServerType(),
- SystemProperties.getJndiServerURL());
-
- Customer customer = (Customer) esbHandler.getObject(org.jboss.soa.esb.samples.loanbroker.domain.Customer.class, bankResponse.customerUID);
- m_oLogger.info(this.getClass().getSimpleName() + " -- Business Object BEFORE Loan Offer is added: \n" + customer.toDTO().toXml());
-
- //now update this Customer with a LoanOffer based on the response from the Bank
- LoanOffer offer = new LoanOffer((String)null);
- offer.setField(LoanOffer.ATTRIB.interestRate, (bankResponse.interestRate).toString());
- offer.setField(LoanOffer.ATTRIB.quoteId, bankResponse.quoteId);
- offer.setField(LoanOffer.ATTRIB.errorCode, Integer.toString(bankResponse.errorCode));
-//
- customer.addOffer(offer);
- esbHandler.rplObject(customer); //update the object store
- m_oLogger.info(this.getClass().getSimpleName() + " -- Business Object AFTER Loan Offer is added: \n" + customer.toDTO().toXml());
-
-
- if (customer.getOfferCount() >= 2) //no more quotes expected so send an email
- {
- ProcessEmail email = new ProcessEmail(customer);;
- email.sendEmail();
- }
-
- }
-
- @Override
- public Serializable getOkNotification() {
- return "OK NOTIF: " + this.getClass().getSimpleName();
- }
-
- @Override
- public Serializable getErrorNotification() {
- return "ERR NOTIFICATION: "+this.getClass().getSimpleName();
- }
-
- public void run()
- {
- try
- {
- processCurrentObject();
- GpListener.notifyOK(m_oParms,getOkNotification());
- }
- catch (Exception e)
- {
- GpListener.notifyError(m_oParms,e,getErrorNotification());
- }
- finally
- { setChanged();
- notifyObservers(new Integer(-1));
- }
- } //________________________________
-
-}
More information about the jboss-svn-commits
mailing list