Chapter 6. Post-migration activities 173
For the accountStatementServerOp.snippets.state3, add the need to import
class code on top:
import com.ibm.btt.services.jdbcjournalservice.JDBCJournal;
import com.ibm.btt.services.jdbcjournalservice.Journal;
In execute() method add code:
try{
Journal journal;
journal = (Journal)getService("JournalService");
journal.addRecord(getContext(), " afterRecJournalFmt ");//$NON-NLS-1$
journal.releaseServiceRequester();
}catch(Exception e){
e.printStackTrace();
}
Change "return 0" to" return 1".
For the source code, please refer to the Appendix (Appendix A, “Branch
Transformation Toolkit development and runtime requirements” on page 477
and Appendix B, “Setting up a Branch Transformation Toolkit sample
application” on page 493).
15.Modify the BPEL file for accountStatementServerOp business process.
Find the package named accountStatementServerOp, and double-click
accountStatementServerOp.bpel to edit.
Select accountStatementServerOp. It’s properties are displayed in the
lower panel. Select Environment, and change the ContextMode to remote,
and add "TrxReplyCode, accountStatementDetails, TrxErrorMessage" to the
MapList. See Figure 6-40 on page 174.
174 IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines
Figure 6-40 Modify environment properties for accountStatementServerOp.bpel
In the editor, select initial Implementation. Delete the second line of the
code.
In the same way, select state2 Implementation. Delete the second line of
the code.
Save and close the BPEL file.
16.Modify the wsdl file for the accountStatementServerOp business process.
In the same package, open accountStatementServerOpInterface.wsdl with
Source Editor. Add a new line in the message tag named InputMessage:
<part name="AccountNumber" type="xsd:string" />
Save and close accountStatementServerOpInterface.wsdl.
17.Deploy the BP codes. For the four BPEL files modified, right-click in the J2EE
perspective and select Enterprise Services Generate Deploy Code.
Chapter 6. Post-migration activities 175
Click OK in the pop-up window. All the four BPEL files should be deployed
separately. See Figure 6-41.
Figure 6-41 Generate BPEL deploy code
18.After the deployment, a new project named BaseSampleProcessEAR is
created automatically. Copy the following JAR files from the BaseSample
project into BaseSampleProcessEAR.
bttbase.jar
bttevent.jar
bttfmt.jar
bttjdbjsvc.jar
bttjdbtsvc.jar
bttsvcinfra.jar
bttsvrbean.jar
bttsvrflow.jar
–sn0dummy.jar
Since BaseSampleProcessEJB needs these jar files, remove the compile
error needed to copy these jar files.
19.Open the application.xml file in the META-INF folder of the BaseSample
project in the J2EE perspective. In the Module tab, click Add to include
BaseSampleProcessEJB and BaseSampleProcessWeb projects. Save and
close the file. See Figure 6-42 on page 176
176 IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines
Figure 6-42 Add modules to the application
20.Add the services' properties files to BaseSampleProcessEJB project.
Get BTTJavaSample.ear from BTT5.1 installpackaging's path such as
C:\IBM\WebSphere Studio\Branch Transformation Toolkit 5.1\
samples\JavaSampleApplication\StandAlone.
Extract BTTJavaSampleEJB.jar in BTTJavaSample.ear and copy the
following properties files:
DummyJournal.properties
LocalJava.properties
RemoteEJB.properties
ServiceRequesterIDs.properties
WSIFEJB.properties
WSIFSoap.properties
sampleapplserver.properties
In the J2EE perspective, paste the properties files into the ejbModule folder of
the BaseSampleProcessEJB project.
Configuring Single Action EJBs
1. Right-click the BaseSampleEJB project. In the pop-up menu, select
Properties. Select Java JAR Dependencies, and add the following JARs as
dependencies.
bttbase.jar
bttfmt.jar
bttsvcinfra.jar
bttsvrbean.jar
UserDefineJar.jar
Chapter 6. Post-migration activities 177
Click OK. See Figure 6-43.
Figure 6-43 Add Java JAR dependencies
2. Open the ejb-jar.xml file in the META-INF folder. In the Beans tab, choose
startupServerOp and edit its Environment Variables. Select
sessionCtxName from the variables list and click Edit. Then change its value
to javaSessionCtx. Click Finish, and save and close the file. See Figure 6-44
on page 178.

Get IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.