WO2017049912A1 - 一种jslee容器的业务处理方法及系统 - Google Patents

一种jslee容器的业务处理方法及系统 Download PDF

Info

Publication number
WO2017049912A1
WO2017049912A1 PCT/CN2016/081753 CN2016081753W WO2017049912A1 WO 2017049912 A1 WO2017049912 A1 WO 2017049912A1 CN 2016081753 W CN2016081753 W CN 2016081753W WO 2017049912 A1 WO2017049912 A1 WO 2017049912A1
Authority
WO
WIPO (PCT)
Prior art keywords
thread
service
jslee
event
execution
Prior art date
Application number
PCT/CN2016/081753
Other languages
English (en)
French (fr)
Inventor
曹迎春
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017049912A1 publication Critical patent/WO2017049912A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/2876Pairs of inter-processing entities at each side of the network, e.g. split proxies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/56Routing software
    • H04L45/563Software download or update
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Definitions

  • This document relates to, but is not limited to, the field of communications, and in particular to a service processing method and system for a JSLEE container.
  • JSLEE Service Logic Execution Environment
  • the JSLEE specification defines how events are routed to different services, and does not indicate the isolation of the business runtime, so that multiple services run in the JSLEE container and have an impact on each other. For example, the processing of the service A is relatively slow, the execution thread in the container is processing the logic of running the service A, and the processing of the service B itself takes a short time, but the waiting time is long, which affects the processing time of the service B.
  • the embodiment of the invention provides a JSLEE container business processing method and system, which can reduce the mutual influence between the services of the JSLEE container during multi-service execution and reduce the waiting time.
  • a service processing method of a JSLEE container where the service processing method includes:
  • Java Network Java Application Programming Interface Business Logic Execution Environment The resource adapter of the JSLEE container initiates each event and notifies the JSLEE container of each of the initiated events.
  • the router finds a thread pool corresponding to each of the events, wherein the different services correspond to different thread pools;
  • the execution thread in the thread pool is obtained from the thread pool corresponding to each of the found events, and the processing thread is executed by the execution thread for the service execution block SBB corresponding to each event.
  • the service processing method further includes: before the resource adapter of the JSLEE container initiates each event,
  • the management client of the JSLEE container configures different thread pools for different services corresponding to each event.
  • the finding, by the thread pool corresponding to each of the events includes:
  • the router finds the thread pool corresponding to each of the events respectively.
  • the service processing method further includes: after determining whether the service corresponding to each event is configured with a thread pool, the method includes:
  • the execution thread is configured to execute an event corresponding to the service, and the session of the resource adapter corresponding to the event processes other events of the session by the execution thread.
  • the service processing method further includes: before the execution thread executes the processing logic on the service execution block SBB corresponding to each event,
  • the JSLEE container startup monitoring thread scans the execution thread to determine whether the time for the execution thread to process the event exceeds a preset maximum execution time; if the execution thread processes the event for more than a preset maximum execution time, the record office The time to execute the thread.
  • the service processing method further includes:
  • the JSLEE container activates the service corresponding to each event, if the service configures the thread pool, the thread pool is created;
  • the JSLEE container deactivates the service corresponding to each event, if the service configures the thread pool, the thread pool is stopped and deleted.
  • a JSLEE container system comprising: a resource adapter, a router, and a processing unit;
  • the resource adapter is configured to initiate each event and notify the router of each event initiated;
  • the router is configured to: in the case that each of the events corresponds to a different service, the thread pool corresponding to each of the events is found, where the different services correspond to different thread pools;
  • the processing unit is configured to acquire, from the thread pool corresponding to each of the found events, an execution thread in the thread pool, and the service execution block corresponding to each event by the execution thread (Service Building Block, referred to as SBB) executes processing logic.
  • SBB Service Building Block
  • the JSLEE container system further includes a management client
  • the management client is configured to: configure different thread pools for different services corresponding to each event.
  • the JSLEE container system further includes a thread pool monitoring unit
  • the thread pool monitoring unit is configured to start a monitoring thread, scan the execution thread, and determine whether the time that the execution thread processes the event exceeds a preset maximum execution time, and if the execution thread processes the event for more than a preset time Maximum execution time, recording the time of the execution thread.
  • the JSLEE container system further includes a thread pool processing unit, which is set to:
  • the JSLEE container system activates the service corresponding to each event, if the service configures the thread pool, the thread pool is created;
  • the JSLEE container system deactivates the service corresponding to each event, if the service configures the thread pool, the thread pool is stopped and deleted.
  • the resource adapter of the Java Network Application Programming Interface Business Logic Execution Environment (JSLEE) container of the intelligent network initiates each event and will initiate each event.
  • the router notifying the router of the JSLEE container, in the case that each event corresponds to a different service, the router finds a thread pool corresponding to each event respectively, wherein the different services correspond to different thread pools, from each found In the thread pool corresponding to an event, the execution thread in the thread pool is obtained, and the execution logic of the business execution block (SBB) corresponding to the event in each event is executed by the execution thread, thereby solving the mutual influence between the JSLEE container multi-service execution services and The problem of long waiting time shortens the waiting time and reduces the impact between businesses.
  • JSLEE Java Network Application Programming Interface Business Logic Execution Environment
  • FIG. 1 is a flowchart of a service processing method of a JSLEE container according to an embodiment of the present invention
  • FIG. 2 is a block diagram showing the structure of a JSLEE container system according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a JSLEE routing architecture according to the related art
  • FIG. 4 is a schematic diagram of a JSLEE routing architecture for service isolation according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a process flow of routing according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a service processing method of a JSLEE container according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
  • Step 102 The Java network application programming interface business logic execution environment (JSLEE) container resource adapter of the intelligent network initiates each event, and notifies the JSLEE container of each event initiated;
  • JSLEE Java network application programming interface business logic execution environment
  • Step 104 In the case that each event corresponds to a different service, the router finds a thread pool corresponding to each event respectively; wherein different services correspond to different thread pools;
  • Step 106 Acquire an execution thread in the thread pool from the thread pool corresponding to each event found, and execute processing logic for the service execution block (SBB) corresponding to each event by executing the thread.
  • SBB service execution block
  • the resource adapter of the JSLEE container of the intelligent network initiates each event, and notifies the router of the JSLEE container for each event.
  • the router finds a thread corresponding to each event respectively. a pool; wherein different services correspond to different thread pools, and the execution threads in the thread pool are obtained, and the execution logic of the SBB corresponding to each event is executed by the execution thread, thereby solving the multi-service execution of the JSLEE container, and the interaction between the services and The problem of long waiting time shortens the waiting time and reduces the impact between businesses.
  • the management client of the JSLEE container configures a different thread pool for different services corresponding to each event.
  • JSLEE container management client is invoked through the JMX interface, and the thread pool size of different services corresponding to each event can be configured.
  • the router finds the thread pool corresponding to each event separately, including: determining whether the service corresponding to each event configures a thread pool, wherein, in the case of determining the service configuration thread pool, the router The router then finds the thread pool corresponding to each of the events.
  • determining whether the service corresponding to the event configures the thread pool belongs to the technical means of those skilled in the art, including: determining, according to the time and the time, the service, whether the service is configured with the thread from the information of the thread pool configured by the service. Pool.
  • the execution thread is obtained from the thread of the router; wherein the executed execution thread Used to execute the event corresponding to the service, the session of the resource adapter corresponding to the event processes other events of the session by executing the thread.
  • the JSLEE container before executing the processing logic by the thread executing the SBB corresponding event in each event, the JSLEE container starts monitoring the thread scan execution thread, and determines whether the execution thread processes the event for more than a preset maximum time. Execution time, if the execution thread processes the event for more than the preset maximum execution time, the time of the execution thread is recorded.
  • the embodiment of the present invention further includes:
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the service processing of the JSLEE container.
  • FIG. 2 is a structural block diagram of a JSLEE container system according to an embodiment of the present invention.
  • the device includes a resource adapter 22 and a router. 24, and processing unit 26;
  • the resource adapter is set to initiate each event and notify the router of each event initiated;
  • the router is configured to find a thread pool corresponding to each event when each event corresponds to a different service; wherein different services correspond to different thread pools;
  • the processing unit is configured to obtain an execution thread in the thread pool from the thread pool corresponding to each event found, and execute processing logic by executing a thread for a service building block (SBB) corresponding to each event.
  • SBB service building block
  • the JSLEE container system further includes a management client 28; the management client 28 is configured to configure different thread pools for different services corresponding to each event.
  • the JSLEE container system further includes a thread pool monitoring unit 210.
  • the thread pool monitoring unit 210 is configured to start a monitoring thread, scan the execution thread, and determine whether the execution thread processes the event for more than a preset. The maximum execution time, if the execution thread processes the event for more than the preset maximum execution time, the time of the execution thread is recorded.
  • the JSLEE container system further includes a thread pool processing unit 212.
  • a thread pool processing unit 212 Set to: when the JSLEE container system activates the service corresponding to each event, if the service configures the thread pool, create a thread pool;
  • the JSLEE container system deactivates the service corresponding to each event, if the service configures the thread pool, the thread pool is stopped and deleted.
  • the JSLEE of the present invention is an architecture and system for implementing network convergence openness. It is based on the implementation of the JSLEE standard specification, and JSLEE is a message-driven business execution environment, which adapts resources through an event router (Resource Adaptor, referred to as The event sent by the resource adapter is routed to the corresponding Service Building Block (SBB) for processing.
  • SBB Service Building Block
  • FIG. 3 is a schematic diagram of a JSLEE routing architecture according to the related art. As shown in FIG. 3, the execution of each service is in the same router thread pool, and the operation of different services will affect each other.
  • FIG. 4 is a schematic diagram of a JSLEE routing architecture for service isolation according to an embodiment of the present invention.
  • the present invention improves router running logic, so that a router thread finds a corresponding service thread pool for each event, and then drops the event.
  • the business thread pool executes the business SBB processing logic for the event, so that the SBB processing logic of different services is executed in different service thread pools, and does not affect each other, thereby realizing the isolation of service execution.
  • JSLEE container provides JMX (Java Management Extensions) interface, which enables the management client to configure the thread pool size of a certain service; when the JSLEE container activates the service, it finds that if the service is configured with a thread pool, Then create a thread pool of the configured size.
  • JMX Java Management Extensions
  • FIG. 5 is a schematic flowchart of processing of a route according to an embodiment of the present invention.
  • a resource adapter (RA, ResourceAdaptor) initiates an event on a session, if it is the first event on the session ( Initialization event), indicating that the session has not been assigned an execution thread at this time (in order to ensure that events on the same session are processed in order, each session needs to be assigned an execution thread, and all events are processed in this execution thread)
  • the router finds the Root SBB that cares about this event according to the event (root SBB, the JSLEE specification defines that each service must specify a Root SBB), and then obtains the service corresponding to the Root SBB, and determines whether the service is configured.
  • the thread pool if configured, obtains an execution thread from the thread pool of the service. If the service does not have a thread pool configured, an execution thread is obtained from the router thread, and the execution thread is saved to the session. The current event is thrown to this execution thread so that the first event on the session is processed. Subsequently if the RA initiates an event on the session, the router directly retrieves the previously saved execution thread from the session, whereby the execution thread processes the event.
  • Business thread pool monitoring Start a monitoring thread, it will scan all the execution threads in all the business thread pools in the container regularly, and see if the execution thread processing event has exceeded the preset maximum execution time. If it is exceeded, it will be recorded in the log. The execution time of the business execution thread.
  • the JSLEE container determines whether the service is configured with a service thread pool. If the service thread pool is configured, the thread pool is destroyed.
  • the method of installing and configuring the service A in the management interface and processing the service A in the JSLEE container includes the following steps:
  • Step 1 Install the service A into the JSLEE container, and install the DU (Deploy Unit) package of the service A through the management interface.
  • Step 2 Configure the thread pool size (the number of threads) of the service A, set the number of threads of the service A, and the maximum execution time through the management interface.
  • the JSLEE container stores the correspondence between the service ID and the number of threads of the service A.
  • Step 3 Activate the service A through the configuration interface.
  • the JSLEE container finds the thread pool size configuration of the corresponding service according to the ID of the activation service, and creates a thread pool of the service A of the corresponding size, and saves the service ID of the service A and the same.
  • Step 4 Routing of the event, when the router in the JSLEE container processes the event, it finds that the event needs to trigger the service A, finds its corresponding thread pool according to the service unique code (ID) of the service A, and throws the event to the thread pool. Processing, the router processing is completed, and the next event continues to be routed;
  • ID service unique code
  • Step 5 The operation of the service, the service A thread pool receives the event, and invokes the corresponding SBB processing logic of the service A;
  • Step 6 the service is deactivated, and the service is deactivated through the management interface.
  • the JSLEE container finds a corresponding service thread pool according to the service ID of the deactivated service, and then stops and destroys the thread pool;
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of various embodiments of the present invention.
  • each of the above modules may be implemented by software or hardware.
  • the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the modules are located in multiple In the processor.
  • Embodiments of the present invention also provide a storage medium.
  • the storage medium may be configured to store program code for performing the method steps of the above embodiment:
  • the storage medium is further arranged to store program code for performing the method steps of the above-described embodiments:
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • the processor performs the method steps of the foregoing embodiments according to the stored program code in the storage medium.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种JSLEE容器的业务处理方法及系统,包括:智能网的爪哇(Java)应用编程接口业务逻辑执行环境(JSLEE)容器的资源适配器发起每一个事件,并将该每一个事件通知JSLEE容器的路由器,在每一个事件对应不同的业务的情况下,路由器找到与每一个事件分别对应的线程池,其中,不同的业务对应不同的线程池,获取线程池中的执行线程,通过执行线程对每一个事件对应的业务执行块(SBB)执行处理逻辑,解决了JSLEE容器多业务执行,业务之间互相影响和等待时间长的问题,缩短了等待时间,减少了业务之间的影响。

Description

一种JSLEE容器的业务处理方法及系统 技术领域
本文涉及但不限于通信领域,尤其涉及一种JSLEE容器的业务处理方法及系统。
背景技术
基于智能网的Java应用编程接口(Java APIs for Integrated Networks,简称为JAIN)业务逻辑执行环境(Service Logic Execution Environment,简称为SLEE)技术(简称为JSLEE)实现网络融合的一种开放架构与系统。JSLEE定义了一种开发的系统架构规范,所有厂商开发的业务只要是遵循JSLEE规范,就可以运行在JSLEE容器中。
JSLEE规范定义了事件如何路由给不同的业务,并没有说明业务运行时的相互隔离,这样多个业务在JSLEE容器中运行,彼此会产生影响。比如业务A处理比较慢,容器中的执行线程都在处理运行业务A的逻辑,而业务B本身处理花费时间很短,但等待执行的时间很长,从而影响了业务B的处理时间。
针对相关技术中,JSLEE容器多业务执行,业务之间互相影响和等待时间长的问题,目前还没有有效的解决方案。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本发明实施例提供一种JSLEE容器的业务处理方法及系统,能够减少JSLEE容器多业务执行时业务之间的互相影响、和降低等待时长。
根据本发明实施例的一个方面,提供了一种JSLEE容器的业务处理方法,业务处理方法包括:
智能网的爪哇Java应用编程接口业务逻辑执行环境JSLEE容器的资源适配器发起每一个事件,并将发起的所述每一个事件通知所述JSLEE容器的路 由器;
在所述每一个事件对应不同的业务的情况下,所述路由器找到与每一个所述事件分别对应的线程池,其中,所述不同的业务对应不同的所述线程池;
从找到的所述每一个事件对应的线程池中,获取所述线程池中的执行线程,通过所述执行线程对每一个事件对应的业务执行块SBB执行处理逻辑。
可选地,所述业务处理方法还包括:所述JSLEE容器的资源适配器发起每一个事件之前,
所述JSLEE容器的管理客户端对所述每一个事件对应的不同的业务,配置不同的线程池。
可选地,所述找到与所述每一个事件分别对应的所述线程池包括:
判断每一个事件对应的业务是否配置线程池;
判定所述业务配置线程池的情况下,确定所述路由器找到与所述每一个事件分别对应的所述线程池。
可选地,所述业务处理方法还包括:所述判断每一个事件对应的业务是否配置线程池之后,包括:
在判定所述业务没有配置线程池的情况下,从所述路由器的线程中获取执行线程;
其中,所述执行线程用于执行所述业务对应的事件,所述事件对应的所述资源适配器的会话通过所述执行线程处理所述会话的其他事件。
可选地,所述业务处理方法还包括,通过所述执行线程对所述每一个事件对应的业务执行块SBB执行处理逻辑之前,
所述JSLEE容器启动监控线程扫描所述执行线程,判断所述执行线程处理所述事件的时间是否超过预设最大执行时间;若执行线程处理所述事件的时间超过预设最大执行时间,记录所述执行线程的时间。
可选地,所述业务处理方法还包括:
在所述JSLEE容器激活所述每一个事件对应的业务时,若所述业务配置了所述线程池,创建所述线程池;
在所述JSLEE容器去激活所述每一个事件对应的业务时,若所述业务配置了所述线程池,停止并删除所述线程池。
根据本发明实施例的另一个方面,还提供了一种JSLEE容器系统,所述JSLEE容器系统包括:资源适配器,路由器,以及处理单元;
所述资源适配器设置为,发起每一个事件,并将发起的每一个事件通知所述路由器;
所述路由器设置为,在所述每一个事件对应不同的业务的情况下,找到与所述每一个事件分别对应的所述线程池,其中,所述不同的业务对应不同的所述线程池;
处理单元设置为,从找到的所述每一个事件对应的线程池中,获取所述线程池中的执行线程,通过所述执行线程对每一个事件对应的业务执行块(Service Building Block,简称为SBB)执行处理逻辑。
可选地,所述JSLEE容器系统还包括管理客户端;
所述管理客户端设置为:对每一个事件对应的不同的业务,配置不同的线程池。
可选地,所述JSLEE容器系统还包括线程池监控单元;
所述线程池监控单元,设置为启动监控线程,扫描所述执行线程,判断所述执行线程处理所述事件的时间是否超过预设最大执行时间,若执行线程处理所述事件的时间超过预设最大执行时间,记录所述执行线程的时间。
可选地,JSLEE容器系统还包括线程池处理单元,设置为:
在所述JSLEE容器系统激活所述每一个事件对应的业务时,若所述业务配置了所述线程池,创建所述线程池;
在所述JSLEE容器系统去激活所述每一个事件对应的业务时,若所述业务配置了所述线程池,停止并删除所述线程池。
通过本发明实施例,智能网的爪哇(Java)应用编程接口业务逻辑执行环境(JSLEE)容器的资源适配器发起每一个事件,并将发起的每一个事件 通知该JSLEE容器的路由器,在该每一个事件对应不同的业务的情况下,该路由器找到与每一个事件分别对应的线程池,其中,该不同的业务对应不同的该线程池,从找到的每一个事件对应的线程池中,获取线程池中的执行线程,通过执行线程对每一个事件中对应事件的业务执行块(SBB)执行处理逻辑,解决了JSLEE容器多业务执行业务之间互相影响和等待时间长的问题,缩短了等待时间,减少了业务之间的影响。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1是根据本发明实施例的一种JSLEE容器的业务处理方法的流程图;
图2是根据本发明实施例的一种JSLEE容器系统的结构框图;
图3是根据相关技术中JSLEE路由架构示意图;
图4是根据本发明实施例的业务隔离的JSLEE路由架构示意图;
图5是根据本发明实施例的路由的处理流程示意图。
本发明的实施方式
下文中将结合附图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
本发明的实施例提供了一种JSLEE容器的业务处理方法,图1是根据本发明实施例的一种JSLEE容器的业务处理方法的流程图,如图1所示,该流程包括如下步骤:
步骤102,智能网的爪哇(Java)应用编程接口业务逻辑执行环境(JSLEE)容器的资源适配器发起每一个事件,并将发起的每一个事件通知JSLEE容器的路由器;
步骤104,在每一个事件对应不同的业务的情况下,路由器找到与每一个事件分别对应的线程池;其中,不同的业务对应不同的该线程池;
步骤106,从找到的每一个事件对应的线程池中,获取线程池中的执行线程,通过执行线程对每一个事件对应的业务执行块(SBB)执行处理逻辑。
通过上述步骤,智能网的JSLEE容器的资源适配器发起每一个事件,并将每一个事件通知JSLEE容器的路由器,在每一个事件对应不同的业务的情况下,路由器找到与每一个事件分别对应的线程池;其中,不同的业务对应不同的该线程池,获取线程池中的执行线程,通过执行线程对每一个事件对应的SBB执行处理逻辑,解决了JSLEE容器多业务执行,业务之间互相影响和等待时间长的问题,缩短了等待时间,减少了业务之间的影响。
可选的,在本实施例中,JSLEE容器的资源适配器发起每一个事件之前,JSLEE容器的管理客户端对每一个事件对应的不同的业务,配置不同的线程池。
需要说明的是,JSLEE容器管理客户端通过JMX接口调用,可以实现配置每一个事件对应的不同的业务的线程池大小。
可选的,在本实施例中,路由器找到与每一个事件分别对应的该线程池包括:判断每一个事件对应的业务是否配置线程池,其中,在判定该业务配置线程池的情况下,该路由器再去找到与该各个事件分别对应的该线程池。
需要说明的是,判断事件对应的业务是否配置线程池属于本领域技术人员的惯用技术手段,包括:根据时间、查找时间对于的业务,从业务配置的线程池的信息中判断业务是否配置了线程池。
可选的,在本实施例中,判断每一个事件对应的业务是否配置线程池之后,在判定该业务没有配置线程池的情况下,从路由器的线程中获取执行线程;其中,获取的执行线程用于执行该业务对应的事件,事件对应的资源适配器的会话通过执行线程处理该会话的其他事件。
可选的,在本实施例中,通过执行线程对每一个事件中对应事件的SBB执行处理逻辑之前,该JSLEE容器启动监控线程扫描执行线程,判断执行线程处理该事件的时间是否超过预设最大执行时间,若执行线程处理所述事件的时间超过预设最大执行时间,记录执行线程的时间。
可选的,在本实施例中,本发明实施例还包括:
在JSLEE容器激活每一个事件对应的业务时,若业务配置了线程池,创建线程池;
在该JSLEE容器去激活每一个事件对应的业务时,若业务配置了线程池,停止并删除线程池。
本发明实施例还提供一种计算机存储介质,计算机存储介质中存储有计算机可执行指令,计算机可执行指令用于执行上述JSLEE容器的业务处理的方法。
在本发明的另一个实施例中,还提供了一种JSLEE容器系统,图2是根据本发明实施例的一种JSLEE容器系统的结构框图,如图2所示,包括:资源适配器22,路由器24,以及处理单元26;
资源适配器设置为,发起每一个事件,并将发起的每一个事件通知路由器;
路由器设置为,在每一个事件对应不同的业务的情况下,找到与每一个事件分别对应的线程池;其中,不同的业务对应不同的线程池;
处理单元设置为,从找到的每一个事件对应的线程池中,获取线程池中的执行线程,通过执行线程对每一个事件对应的业务执行块(Service Building Block,简称为SBB)执行处理逻辑。
通过上述JSLEE容器系统,解决了JSLEE容器多业务执行,业务之间互相影响和等待时间长的问题,缩短了等待时间,减少了业务之间的影响。
可选的,在本实施例中,JSLEE容器系统还包括管理客户端28;管理客户端28设置为,对每一个事件对应的不同的业务,配置不同的线程池。
可选的,在本实施例中,JSLEE容器系统还包括线程池监控单元210;线程池监控单元210设置为,启动监控线程,扫描该执行线程,判断执行线程处理该事件的时间是否超过预设最大执行时间,若执行线程处理所述事件的时间超过预设最大执行时间,记录执行线程的时间。
可选的,在本实施例中,JSLEE容器系统还包括线程池处理单元212, 设置为:在JSLEE容器系统激活每一个事件对应的业务时,若该业务配置了线程池,创建线程池;
在该JSLEE容器系统去激活每一个事件对应的业务时,若该业务配置了线程池,停止并删除该线程池。
下面结合可选实施例和实施方式对本发明进行详细说明。
本发明的JSLEE是为了实现网络融合开放的架构与系统,它是基于JSLEE标准规范的实现,同时JSLEE是一个基于消息驱动的业务执行环境,它通过事件路由器把资源适配(Resource Adaptor,简称为资源适配器)发出的事件路由给相应的业务执行块(Service Building Block,简称为SBB)处理。
图3是根据相关技术中JSLEE路由架构示意图,如图3所示,原先每一个业务的执行都是在同一个路由器线程池中,不同业务的运行会对彼此产生影响。
图4是根据本发明实施例的业务隔离的JSLEE路由架构示意图,如图4所示,本发明对路由器运行逻辑进行改进,使得路由器线程为每一个事件找到相应的业务线程池,然后把事件丢给业务线程池,由业务线程池执行业务SBB对事件的处理逻辑,这样不同业务的SBB处理逻辑在不同的业务线程池中执行,相互之间不会影响,从而实现了业务执行的隔离。
业务线程池创建:JSLEE容器提供JMX(Java管理扩展,Java Management Extensions)接口,使管理客户端可以配置某个业务的线程池大小;当JSLEE容器激活业务时,发现如果该业务配置了线程池,则创建所配置大小的线程池。
路由处理:图5是根据本发明实施例的路由的处理流程示意图,如图5所示,资源适配器(RA,ResourceAdaptor)在一个会话上发起一个事件,如果是该会话上的第一个事件(初始化事件),说明该会话此时还没有分配执行线程(为了保证同一个会话上的事件按顺序的被处理,每个会话需要分配一个执行线程,所有的事件都是在这个执行线程中处理),此时路由器根据事件找到关心此事件的Root SBB(根SBB,JSLEE规范定义每个业务必须指定一个Root SBB),再获取该Root SBB对应的业务,判断该业务是否配置 了线程池,如果配置了就从该业务的线程池中获取一个执行线程,如果该业务没有配置线程池,则从路由器线程中获取一个执行线程,并把该执行线程保存到此会话上,同时把当前事件丢给此执行线程处理,这样会话上的第一个事件处理完成。后续如果RA在该会话上再发起事件,路由器直接从该会话上获取之前保存的执行线程,由此执行线程处理该事件。
业务线程池监控:启动一个监控线程,会定时扫描容器中所有业务线程池中的所有执行线程,看执行线程处理事件的时间有没有超过预先设置的最大执行时间,如果超过了则在日志中记录下该业务执行线程执行时间。
业务线程池销毁:当业务被去激活时,JSLEE容器判断该业务是否配置了业务线程池,如果配置了业务线程池,则销毁此线程池。
下面结合应用场景对本发明进行详细说明。
在管理界面安装、配置业务A,并在JSLEE容器中对业务A进行处理方法的方法包括如下步骤:
步骤1,安装业务A到JSLEE容器中,通过管理界面安装业务A的DU(Deploy Unit:部署单元)包;
步骤2,配置业务A的线程池大小(线程个数),通过管理界面设置业务A的线程数、最大执行时间,配置完成后,JSLEE容器会保存下业务A的业务ID与线程数的对应关系;
步骤3,通过配置界面激活业务A,此时JSLEE容器会根据激活业务的ID找到对应业务的线程池大小配置,并创建对应大小的业务A的线程池,同时保存下业务A的业务ID与此线程池的对应关系;
步骤4,事件的路由,JSLEE容器中路由器在处理事件时,发现该事件需要触发业务A,根据业务A的业务唯一编码(ID)找到其对应的线程池,并把该事件丢给该线程池处理,路由器处理完成,继续路由下一个事件;
步骤5,业务的运行,业务A线程池收到事件,调用业务A相应的SBB处理逻辑;
步骤6,业务去激活,通过管理界面去激活业务,JSLEE容器根据去激活业务的业务ID找到对应的业务线程池,然后停止并销毁该线程池;
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例该的方法。
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述模块分别位于多个处理器中。
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行上述实施例的方法步骤的程序代码:
可选地,存储介质还被设置为存储用于执行上述实施例的方法步骤的程序代码:
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行上述实施例的方法步骤。
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
以上所述仅为本发明的可选实施例而已,并不用于限制本发明,对于本 领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
工业实用性
上述技术方案缩短了等待时间,减少了业务之间的影响。

Claims (10)

  1. 一种JSLEE容器的业务处理方法,所述业务处理方法包括:
    智能网的爪哇Java应用编程接口业务逻辑执行环境JSLEE容器的资源适配器发起每一个事件,并将发起的所述每一个事件通知所述JSLEE容器的路由器;
    在所述每一个事件对应不同的业务的情况下,所述路由器找到与每一个所述事件分别对应的线程池,其中,所述不同的业务对应不同的所述线程池;
    从找到的所述每一个事件对应的线程池中,获取所述线程池中的执行线程,通过所述执行线程对每一个事件对应的业务执行块SBB执行处理逻辑。
  2. 根据权利要求1所述的业务处理方法,所述业务处理方法还包括:所述JSLEE容器的资源适配器发起每一个事件之前,
    所述JSLEE容器的管理客户端对所述每一个事件对应的不同的业务,配置不同的线程池。
  3. 根据权利要求1所述的业务处理方法,所述找到与所述每一个事件分别对应的所述线程池包括:
    判断每一个事件对应的业务是否配置线程池;
    判定所述业务配置线程池的情况下,确定所述路由器找到与所述每一个事件分别对应的所述线程池。
  4. 根据权利要求3所述的业务处理方法,所述业务处理方法还包括:所述判断每一个事件对应的业务是否配置线程池之后,包括:
    在判定所述业务没有配置线程池的情况下,从所述路由器的线程中获取执行线程;
    其中,获取的所述执行线程用于执行所述业务对应的事件,所述事件对应的所述资源适配器的会话通过所述执行线程处理所述会话的其他事件。
  5. 根据权利要求1所述的业务处理方法,所述业务处理方法还包括,通过所述执行线程对所述每一个事件对应的业务执行块SBB执行处理逻辑之前,
    所述JSLEE容器启动监控线程扫描所述执行线程,判断所述执行线程处理所述事件的时间是否超过预设最大执行时间;若执行线程处理所述事件的时间超过预设最大执行时间,记录所述执行线程的时间。
  6. 根据权利要求1至5任一项所述的业务处理方法,所述业务处理方法还包括:
    在所述JSLEE容器激活所述每一个事件对应的业务时,若所述业务配置了所述线程池,创建所述线程池;
    在所述JSLEE容器去激活所述每一个事件对应的业务时,若所述业务配置了所述线程池,停止并删除所述线程池。
  7. 一种爪哇Java应用编程接口业务逻辑执行环境JSLEE容器系统,所述JSLEE容器系统包括:资源适配器,路由器,以及处理单元;
    所述资源适配器设置为,发起每一个事件,并将发起的每一个事件通知所述路由器;
    所述路由器设置为,在所述每一个事件对应不同的业务的情况下,找到与所述每一个事件分别对应的所述线程池,其中,所述不同的业务对应不同的所述线程池;
    处理单元设置为,从找到的所述每一个事件对应的线程池中,获取所述线程池中的执行线程,通过所述执行线程对每一个事件对应的业务执行块SBB执行处理逻辑。
  8. 根据权利要求7所述的JSLEE容器系统,所述JSLEE容器系统还包括管理客户端;
    所述管理客户端设置为:对每一个事件对应的不同的业务,配置不同的线程池。
  9. 根据权利要求7所述的JSLEE容器系统,所述JSLEE容器系统还包括线程池监控单元;
    所述线程池监控单元,设置为启动监控线程,扫描所述执行线程,判断所述执行线程处理所述事件的时间是否超过预设最大执行时间,若执行线程处理所述事件的时间超过预设最大执行时间,记录所述执行线程的时间。
  10. 根据权利要求7至9任一项所述的JSLEE容器系统,JSLEE容器系统还包括线程池处理单元,设置为:
    在所述JSLEE容器系统激活所述每一个事件对应的业务时,若所述业务配置了所述线程池,创建所述线程池;
    在所述JSLEE容器系统去激活所述每一个事件对应的业务时,若所述业务配置了所述线程池,停止并删除所述线程池。
PCT/CN2016/081753 2015-09-25 2016-05-11 一种jslee容器的业务处理方法及系统 WO2017049912A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510627271.4A CN106559447A (zh) 2015-09-25 2015-09-25 Jslee容器的业务处理方法及系统
CN201510627271.4 2015-09-25

Publications (1)

Publication Number Publication Date
WO2017049912A1 true WO2017049912A1 (zh) 2017-03-30

Family

ID=58385818

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/081753 WO2017049912A1 (zh) 2015-09-25 2016-05-11 一种jslee容器的业务处理方法及系统

Country Status (2)

Country Link
CN (1) CN106559447A (zh)
WO (1) WO2017049912A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108881345A (zh) * 2017-05-12 2018-11-23 国基电子(上海)有限公司 消息推送方法及路由设备
CN109634738A (zh) * 2018-10-19 2019-04-16 深圳平安财富宝投资咨询有限公司 基于微服务的异步处理方法、服务器、存储介质及装置
CN111897643A (zh) * 2020-08-05 2020-11-06 深圳鼎盛电脑科技有限公司 线程池配置系统、方法、装置和存储介质
CN112015523A (zh) * 2020-08-03 2020-12-01 北京奇艺世纪科技有限公司 事件防丢失方法、装置、电子设备及存储介质
CN113282373A (zh) * 2021-06-03 2021-08-20 青岛海尔科技有限公司 用于分布式并发应用服务的方法、装置和设备

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035190A (zh) 2019-06-03 2020-12-04 中兴通讯股份有限公司 业务sbb的业务数据管理方法、装置、设备及存储介质
CN110781008B (zh) * 2019-11-04 2023-05-05 重庆邮电大学 一种5g终端模拟系统中随机接入的实现方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101826987A (zh) * 2010-04-27 2010-09-08 北京邮电大学 一种基于融合开放网络的混合服务支撑系统及方法
CN102043675A (zh) * 2010-12-06 2011-05-04 北京华证普惠信息股份有限公司 一种基于任务处理请求任务量大小的线程池管理方法
US20120317164A1 (en) * 2009-12-30 2012-12-13 Zte Corporation Services Cloud System and Service Realization Method
CN103412786A (zh) * 2013-08-29 2013-11-27 苏州科达科技股份有限公司 一种高性能服务器架构系统及数据处理方法
CN103455377A (zh) * 2013-08-06 2013-12-18 北京京东尚科信息技术有限公司 用于管理业务线程池的系统和方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102262564A (zh) * 2011-08-16 2011-11-30 天津市天祥世联网络科技有限公司 视频监控平台系统的线程池结构及实现方法
CN103455356B (zh) * 2013-09-05 2017-02-08 中国计量学院 多核移动设备上3d模型的并发加载及渲染方法
CN104793999A (zh) * 2014-01-21 2015-07-22 航天信息股份有限公司 伺服服务器架构系统
CN105068859B (zh) * 2015-07-29 2017-12-15 上海谐桐信息技术有限公司 一种跨虚拟机的多服务调用方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120317164A1 (en) * 2009-12-30 2012-12-13 Zte Corporation Services Cloud System and Service Realization Method
CN101826987A (zh) * 2010-04-27 2010-09-08 北京邮电大学 一种基于融合开放网络的混合服务支撑系统及方法
CN102043675A (zh) * 2010-12-06 2011-05-04 北京华证普惠信息股份有限公司 一种基于任务处理请求任务量大小的线程池管理方法
CN103455377A (zh) * 2013-08-06 2013-12-18 北京京东尚科信息技术有限公司 用于管理业务线程池的系统和方法
CN103412786A (zh) * 2013-08-29 2013-11-27 苏州科达科技股份有限公司 一种高性能服务器架构系统及数据处理方法

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108881345A (zh) * 2017-05-12 2018-11-23 国基电子(上海)有限公司 消息推送方法及路由设备
CN108881345B (zh) * 2017-05-12 2020-12-01 国基电子(上海)有限公司 消息推送方法及路由设备
CN109634738A (zh) * 2018-10-19 2019-04-16 深圳平安财富宝投资咨询有限公司 基于微服务的异步处理方法、服务器、存储介质及装置
CN112015523A (zh) * 2020-08-03 2020-12-01 北京奇艺世纪科技有限公司 事件防丢失方法、装置、电子设备及存储介质
CN112015523B (zh) * 2020-08-03 2023-09-01 北京奇艺世纪科技有限公司 事件防丢失方法、装置、电子设备及存储介质
CN111897643A (zh) * 2020-08-05 2020-11-06 深圳鼎盛电脑科技有限公司 线程池配置系统、方法、装置和存储介质
CN113282373A (zh) * 2021-06-03 2021-08-20 青岛海尔科技有限公司 用于分布式并发应用服务的方法、装置和设备

Also Published As

Publication number Publication date
CN106559447A (zh) 2017-04-05

Similar Documents

Publication Publication Date Title
WO2017049912A1 (zh) 一种jslee容器的业务处理方法及系统
WO2019184164A1 (zh) 自动部署Kubernetes从节点的方法、装置、终端设备及可读存储介质
US10275258B2 (en) Systems and methods for enhancing the availability of multi-tier applications on cloud computing platforms
US9015710B2 (en) Deployment system for multi-node applications
WO2017170470A1 (ja) ネットワーク機能仮想化管理オーケストレーション装置と方法とプログラム
WO2019184116A1 (zh) 自动搭建Kubernetes主节点的方法、装置、终端设备及可读存储介质
US20200097310A1 (en) Multi-tenant support on virtual machines in cloud computing networks
EP3913859A1 (en) Vnf life cycle management method and apparatus
US20220075610A1 (en) Node selection method and apparatus
JP6101360B2 (ja) アプリケーションの状態を設定するための方法、装置、プログラム及び記録媒体
WO2017041649A1 (zh) 一种应用部署方法及设备
US20210297504A1 (en) Software-specific auto scaling
CN111262908A (zh) 基于jenkins的任务构建方法及系统
US20160253501A1 (en) Method for Detecting a Unified Extensible Firmware Interface Protocol Reload Attack and System Therefor
CN106708573B (zh) 一种用于Hadoop集群自动安装的系统及方法
CN104020999A (zh) 一种应用程序的管理方法和系统
WO2022095844A1 (zh) 一种云硬盘挂载方法及其装置
US7882232B2 (en) Rapid resource provisioning with automated throttling
US20200310828A1 (en) Method, function manager and arrangement for handling function calls
US9244736B2 (en) Thinning operating systems
US20230315505A1 (en) System and method for deploying a software-defined data center based on desired state specification from virtualization software
US10635467B1 (en) Deployable console-based virtual application deployment and configuration systems and methods
CN114443295B (zh) 一种异构云资源管理调度方法、装置及系统
WO2015184902A1 (zh) 一种智能分屏的并发处理方法及相应的智能终端
US20220405104A1 (en) Cross platform and platform agnostic accelerator remoting service

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16847794

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16847794

Country of ref document: EP

Kind code of ref document: A1