Developing JBP Applications


JBP applications do not access the IMS message queue, and therefore you do not need to subclass the IMSFieldMessage class.

JBP applications are similar to JMP applications, except that JBP applications do not receive input messages from the IMS message queue. The program should periodically issue commit calls, except for applications that have the PSB PROCOPT=GO parameter.

Unlike BMP applications, JBP applications must be non-message-driven applications.

Similarly to BMP applications, JBP applications can use symbolic checkpoint and restart calls to restart the application after an abend. The primary methods for symbolic checkpoint and restart are:

  • IMSTransaction().checkpoint()

  • IMSTransaction().restart()

These methods perform analogous functions to the following DL/I system service calls: (symbolic) CHKP and XRST.

Figure 18-3 shows a sample JBP application that connects to a database, makes a restart call, performs database processing, periodically checkpoints, and disconnects from the database at the end of the program.

Figure 18-3. JBP Application Example
 public static void main(String args[]) {     conn = DriverManager.getConnection(...);     //Establish DB connection     IMSTransaction.getTransaction().retart();  //Restart application                                                //after abend from last                                                //checkpoint      repeat {          repeat {              results=statement.executeQuery(...); //Perform DB processing              ...              MessageQueue.insertMessage(...);     //Send output messages              ...          }          IMSTransaction.getTransaction().checkpoint(); //Periodic checkpoints                                                        // divide work      }      conn.close();                             //Close DB connection      return;  } 

Related Reading: For details about the classes you use to develop a JBP application, see the IMS Java API Specification, which is available on the IMS Java Web site. Go to http://www.ibm.com/ims and link to the IMS Java page.



Introduction to IMS. Your Complete Guide to IBM's Information Management System
An Introduction to IMS: Your Complete Guide to IBMs Information Management System
ISBN: 0131856715
EAN: 2147483647
Year: 2003
Pages: 226

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net