Chapter 6
Implementing the JDBC/ODBC eWay Sample Projects
Sample code from the jcdInsert Includes:
package prjJDBC_JCDjcdALL;
public class jcdInsert
{
public com.stc.codegen.logger.Logger logger;
public com.stc.codegen.alerter.Alerter alerter;
public com.stc.codegen.util.CollaborationContext collabContext;
public com.stc.codegen.util.TypeConverter typeConverter;
public void receive( com.stc.connector.appconn.file.FileTextMessage
input, com.stc.connector.appconn.file.FileApplication FileClient_1,
dtd.otdInputDTD_1394195520.DBemployees otdInputDTD_DBemployees_1,
dtd.otdOutputDTD882991309.DBemployee otdOutputDTD_DBemployee_1,
otdJDBC.OtdJDBCOTD otdJDBC_1 )
throws Throwable
{
\\ Writes out a message stating records are being inserted.
table .." );
FileClient_1.write();
\\ Unmarshals data from the input XML data into the
otdInputDTD_DBEmployees OTD.
input.getText() );
\\ Calls the otdJDBC OTD, and inserts multiple records into the
database via a For Loop. The first insert() method opens the table
ResultSet for insert operations, while the insertRow() method inserts
records into the table ResultSet.
otdInputDTD_DBemployees_1.countX_sequence_A(); i1 += 1) {
typeConverter.stringToShort(
JDBC/ODBC eWay Adapter User's Guide
Figure 32 jcdInsert Business Rules
FileClient_1.setText( "Inserting records into db_employee
otdInputDTD_DBemployees_1.unmarshalFromString(
for (int i1 = 0; i1 <
otdJDBC_1.getInsert_Ps().setEmp_no(
Building and Deploying the prjJDBC_JCD Sample Project
82
Section 6.5
Sun Microsystems, Inc.
Need help?
Do you have a question about the eWay JDBC/ODBC Adapter and is the answer not in the manual?
Questions and answers