After the J2C service migration process is completed, you
may need to perform some post-migration tasks.
Before you begin
Depending on the type of program you are migrating, some post-migration
steps may be required.
Procedure
- User Customization Code: Since the migration tool
does not migration user customization code, you need to retrofit this
code into the new project.
- Message Format Handler: If you are using message
format handler in your client application code, you need to replace
references to formatHandler. Instead, you need to use the generated
input or output bean to get the bytesize directly. The following code
provides an example:
// ---------------------------------------------------
// Populate the IMS transaction input message with
// data. Use the input message format handler method
// getSize() to set the LL field of the input message.
// ---------------------------------------------------
//INPUTMSGFormatHandler inFmtHndlr =new INPUTMSGFormatHandler();
//INPUTMSG input = (INPUTMSG) inFmtHndlr.getObjectPart();
// input.setIn__ll((short) inFmtHndlr.getSize());
//new J2C code
INPUTMSG input = new INPUTMSG();
input.setIn__ll((short) input.getSize());
// ---------------------------------------------------
// Retrieve the multi-segment output message as a
// byte array using the output message format
// handler method getBytes().
// ---------------------------------------------------
// OutMsgFormatHandler outFmtHndlr =
// (OutMsgFormatHandler) output._getFormatHandler();
// segBytes = outFmtHndlr.getBytes();
//new J2C code
segBytes = output.getBytes();
//-----old wsadie code----------------------------------------------
// Create and populate segment object from byte array.
//-------------------------------------------------------------------------
//OUTPUTSEG1FormatHandler outSeg1FH =
//new OUTPUTSEG1FormatHandler();
// outSeg1FH.setBytes(buff);
//OUTPUTSEG1 S1 =
//(OUTPUTSEG1) outSeg1FH.getObjectPart();
//new J2C code
OUTPUTSEG1 S1 = new OUTPUTSEG1();
S1.setBytes(buff);
- Additional artifacts: If you want to generate additional
artifacts like JSPs, EJBs or Web Services, you can do so by invoking
the Web Page, Web Service, EJBs from J2C Java™ Bean wizard.