org.osesb.transporthandlers.test.deployabletestpackage2.soaptransporthandler.ejb20
Class ProcessLoanApplicationBusinessServiceBean

java.lang.Object
  extended by org.osesb.transporthandlers.TransportHandlerBase
      extended by org.osesb.transporthandlers.soap.ejb20.SOAPXMLMessageTransportHandlerBean
          extended by org.osesb.transporthandlers.test.deployabletestpackage2.soaptransporthandler.ejb20.ProcessLoanApplicationBusinessServiceBean
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

public class ProcessLoanApplicationBusinessServiceBean
extends SOAPXMLMessageTransportHandlerBean

The processLoanApplication business service is configured with a static messageType, which is defined using the 'messageTypeNamespaceURI' and the 'messageTypeLocalPart' environment properties in ejb.jar.

This means that all messages sent to processLoanApplication() are processed by the same MessagePipeline. The MessagePipeline is configured by transporthandler-config/processloanapplication-message-pipeline-config.xml.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.osesb.transporthandlers.soap.ejb20.SOAPXMLMessageTransportHandlerBean
jaxrpcWSAddressingConfiguration, messageFactoryClassName, onExceptionSendBrokerErrorMessage, propagateSecurityCredentials, requestMessageType, securityProfile, serviceFactoryClassName, sessionContext, soapConnectionFactoryClassName, soapFactoryClassName
 
Fields inherited from class org.osesb.transporthandlers.TransportHandlerBase
debugFlag, echoMessageAsAcknowledgement, log, messageRouterPoolInstance, transportHandlerMessageType, transportHandlerName, verbose
 
Constructor Summary
ProcessLoanApplicationBusinessServiceBean()
           
 
Method Summary
 void ejbCreate()
          ejbCreate().
 int getCreditRating()
          The getCreditRating() service is invoked by an alternate branch of the MessagePipeline that fulfills the processLoanApplication service when the customer credit limit was not defined in the customer table of the JDBCTEST database.
 java.lang.String processLoanApplication(java.lang.String loanApplicationRequest)
          Process a LoanApplicationRequest using the configured MessagePipeline.
 
Methods inherited from class org.osesb.transporthandlers.soap.ejb20.SOAPXMLMessageTransportHandlerBean
constructBrokerAcknowledgementMessage, constructBrokerErrorMessage, ejbActivate, ejbPassivate, ejbRemove, getMessagePipelineResult, getSessionContext, getSOAPRequestAttachments, getWSAddressingSOAPHeaderEntries, getWSSecuritySOAPHeaderEntries, logMessage, receiveAsynchronousMessage, receiveMessage, receiveSynchronousMessage, sendReply, sendReplyUsingJAXRPCClient, sendReplyUsingSOAPConnection, setSessionContext, testWSAddressingReplyReceiver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessLoanApplicationBusinessServiceBean

public ProcessLoanApplicationBusinessServiceBean()
Method Detail

processLoanApplication

public java.lang.String processLoanApplication(java.lang.String loanApplicationRequest)
                                        throws java.lang.Exception
Process a LoanApplicationRequest using the configured MessagePipeline.

The processLoanApplication business service is configured with a static messageType, which is defined using the 'messageTypeNamespaceURI' and the 'messageTypeLocalPart' environment properties in ejb.jar.

This means that all messages sent to processLoanApplication() are processed by the same MessagePipeline. The MessagePipeline is configured by transporthandler-config/processloanapplication-message-pipeline-config.xml.

Parameters:
loanApplicationRequest - A loan application as a XML message.
Throws:
java.lang.Exception - if an error occurs during message processing.

getCreditRating

public int getCreditRating()
                    throws java.lang.Exception
The getCreditRating() service is invoked by an alternate branch of the MessagePipeline that fulfills the processLoanApplication service when the customer credit limit was not defined in the customer table of the JDBCTEST database.

This is a test method that generates a random number between 1 and 5 for the credit rating.

Returns:
A credit rating as an Integer between 1 and 5.
Throws:
java.lang.Exception - if a credit rating cannot be determined.

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
ejbCreate().

Overrides:
ejbCreate in class SOAPXMLMessageTransportHandlerBean
Throws:
javax.ejb.CreateException