The application of Java multithreading in the test of transaction middleware

Source: Internet
Author: User
Tags range

Introduction

With the increasingly complicated structure of information system and the enlargement of scale, the application of transaction middleware in complex system is more and more extensive. Transaction middleware as a middle-tier system, when receiving client requests, it is usually necessary to do some load control and user caching functions. For software testers, the test transaction middleware can not avoid the simulation of the client in the high load situation of some regular or random behavior. These tests are sometimes functional validation tests (functional verification test) and sometimes performance tests (performance test).

This article describes how to write a multithreaded automated test script using the Java language, and uses a thread pool to simulate some special, regular test scenarios.

This paper will first introduce the concept of transaction middleware and Java multithreaded programming. Then the problems encountered in the project are raised. Then the problem, using Java multithreading technology to simulate test scenarios. After solving this problem, this paper puts forward the idea of popularizing the similar problems.

Prerequisites for this example

Java multi-threaded application of a wide range of transaction middleware there are many kinds. The version of this JDK is JDK5 because of the rich multithreaded concurrency tools that are added to JDK5. Currently, the latest version of the JDK is JDK7, which adds a number of tools including Phaser, Threadlocalrandom, Forkjoinpool, and transferqueue, but if you have a JDK5 multithreaded tool, the JDK7 tool It must be a stranger.

The transaction middleware in this paper is an example of the TM of IBM information Management System (IMS), an example of which is to create a learning scenario for you, and of course Java has a wide range of multi-threaded applications, not limited to this kind of transaction middleware. In the promotion section of this paper, we also assume a scene and implement it.

If you also need to test with IMS TM, be sure to provide the following test environment.

Software that needs to be installed on Windows:

JDK 1.5 (or newer version)

Rational functional Tester V7.0 (or newer version)

Environments that need to be installed on IBM z/OS:

IMS version 9 (or later)

IMS Connect version 9 (or newer version)

Otma

Tcp / ip

Concept Introduction

Transaction middleware

There are many kinds of middleware products, according to the role of middleware in the system and the use of technology is different, roughly divided into five categories: Database middleware (DB MIDDLEWARE,DM), remote process call middleware (remotely Procedure calls, RPC), Object-based request proxies (object requests broker, ORB), middleware and transaction middleware (Transaction processing Monitor, TPM, also known as transaction processing middleware).

Transaction middleware is a kind of complex middleware product, which is usually implemented by using the speed and reliability of distributed application under the load environment. Transaction middleware provides users with a range of services, including communication services, logging services, system services and transaction services.

Transaction middleware communication is mainly based on TCP/IP socket technology and based on message delivery and queuing mechanism, the communication process as shown in Figure 1:

Figure 1. Transaction Middleware Communication Process

The transaction middleware side usually has a listening method that listens for a client's connection request, returns a connection, and generates a corresponding customer service process. After receiving the data from the client, the data is segmented, encrypted, and encapsulated into a message packet. Then do the distribution, team, send and other operations.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.