EJB application cross-platform conversion method and device based on application server

By identifying and converting the deployment description information of the EJB application to adapt to the information description type of the target application server, the problem of cumbersome and error-prone modification of the EJB application migration configuration in the prior art is solved, and simple and efficient application migration deployment is achieved.

CN119512646APending Publication Date: 2025-02-25SHANDONG CVICSE MIDDLEWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411538204.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

When migrating EJB applications to a new application server, the existing technology requires reconfiguration and modification. The process is cumbersome, which increases development and maintenance costs, and is prone to errors, resulting in the application configuration being different from the previous one, which cannot meet the usage requirements or cannot be used.

Method used

A cross-platform conversion method of EJB application based on an application server is provided. By identifying the type of the target application, detecting the deployment description information, determining the information description type, and converting the deployment description information according to the mapping rules to adapt it to the information description type of the target application server, thereby realizing the automated migration and deployment of the application.

Benefits of technology

Simplifies the migration and deployment process of EJB applications, reduces the complexity of configuration modification and the possibility of errors, reduces development and maintenance costs, and ensures that the application can run normally on the new server and meets usage needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512646A_ABST
    Figure CN119512646A_ABST
Patent Text Reader

Abstract

The invention discloses an EJB application cross-platform conversion method and device based on an application server, and the method comprises the steps: recognizing the type of a current target application when the current target application is migrated and deployed to a target application server; if the current target application is the EJB application, detecting deployment description information of the current target application from a deployment file of the current target application; determining an information description type of deployment description information of the current target application and an information description type corresponding to a target application server; according to the descriptor of the information description type of the deployment description information of the current target application and the mapping rule of the information description type corresponding to the target application server, the deployment description information of the current target application is converted into information of the information description type corresponding to the target application server, and conversion description information of the current target application is obtained; and finishing migration and deployment of the current target application to the target application server by utilizing the conversion description information of the current target application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of application migration, and in particular to a method and device for cross-platform conversion of EJB applications based on an application server. Background Art

[0002] EJB applications refer to applications that can be deployed in EJB containers. The EJB container is part of the Java EE server and is mainly responsible for managing the life cycle of EJBs, providing resources, handling transactions and security, etc. When deploying EJB applications, in order to enable the EJB applications to meet the corresponding requirements, it is necessary to configure the EJB application information through deployment descriptors.

[0003] Since EJB applications usually require customized deployment descriptor configuration for specific application servers, such as transaction attributes, security constraints, resource references, etc., which usually exist in the form of XML files. Different manufacturers or models of servers have different interpretations and processing methods for these configuration information. Therefore, when migrating EJB applications to a new application server, the new application server to be migrated must be reconfigured to adapt to the new application server.

[0004] However, reconfiguring and modifying the migrated new application server is not only cumbersome, increasing the development and maintenance costs, but also prone to errors, making the application configuration different from the previous one, resulting in failure to meet usage requirements or unavailability. Summary of the invention

[0005] Based on the above-mentioned deficiencies of the prior art, the present application provides an EJB application cross-platform conversion method and device based on an application server, an electronic device, and a storage medium to solve the problem that the prior art is relatively cumbersome and prone to errors.

[0006] In order to achieve the above objectives, this application provides the following technical solutions:

[0007] The first aspect of the present application provides an EJB application cross-platform conversion method based on an application server, comprising:

[0008] When migrating and deploying the current target application to the target application server, identifying the type of the current target application;

[0009] If it is identified that the current target application is an EJB application, detecting the deployment description information of the current target application from the deployment file deployed by the current target application;

[0010] Determine the information description type to which the deployment description information of the current target application belongs and the information description type corresponding to the target application server;

[0011] According to the descriptor of the information description type to which the deployment description information of the current target application belongs and the mapping rule of the information description type corresponding to the target application server, the deployment description information of the current target application is converted into information of the information description type corresponding to the target application server to obtain the converted description information of the current target application;

[0012] The conversion description information of the current target application is used to complete the migration and deployment of the current target application to the target application server.

[0013] Optionally, in the above-mentioned EJB application cross-platform conversion method based on application server, the identifying the type of the current target application includes:

[0014] Scan each subfile in the deployment file of the current target application deployment;

[0015] Determine whether each standard specification file of the EJB application exists in each sub-file of the scanned deployment file of the current target application deployment;

[0016] If it is determined that each subfile in the scanned deployment file of the current target application deployment contains each standard specification file of the EJB application, then it is determined that the current target application is an EJB application;

[0017] If it is determined that each standard specification file of the EJB application does not exist in each sub-file in the scanned deployment file of the current target application deployment, it is determined that the current target application belongs to a WEB application.

[0018] Optionally, in the above-mentioned cross-platform conversion method of EJB applications based on application servers, the conversion of the deployment description information of the current target application into information of the information description type corresponding to the target application server according to a mapping rule between a descriptor of the information description type to which the deployment description information of the current target application belongs and a descriptor of the information description type corresponding to the target application server, to obtain the conversion description information of the current target application, includes:

[0019] According to the information description type to which the deployment description information of the current target application belongs and the information description type corresponding to the target application server, the target mapping rule is searched out from the conversion rule library; wherein the target mapping rule is a mapping rule between the descriptor of the information description type to which the deployment description information of the current target application belongs and the descriptor of the information description type corresponding to the target application server;

[0020] Parsing the deployment description information of the current target application to obtain each descriptor to be converted in the deployment description information of the current target application;

[0021] Find out conversion information corresponding to each of the to-be-converted descriptors from the target mapping rules respectively;

[0022] Each of the to-be-converted descriptors is converted into a corresponding descriptor in the corresponding conversion information, so as to obtain conversion description information of the current target application.

[0023] Optionally, in the above-mentioned cross-platform conversion method of EJB applications based on application servers, before using the conversion description information of the current target application to complete the migration and deployment of the current target application to the target application server, it also includes:

[0024] Detecting compatibility of the conversion description information of the current target application with the target application server;

[0025] If it is detected that the conversion description information of the current target application is compatible with the target application server, the conversion description information of the current target application is used to complete the migration and deployment of the current target application to the target application server;

[0026] If it is detected that the conversion description information of the current target application is incompatible with the target application server, prompt information is fed back.

[0027] Optionally, in the above-mentioned cross-platform conversion method of EJB applications based on application servers, the detecting the compatibility of the conversion description information of the current target application with the target application server includes:

[0028] Detecting whether there is a descriptor that has not been successfully converted in the conversion description information of the current target application;

[0029] If it is detected that any unsuccessfully converted descriptor exists in the conversion description information of the current target application, it is determined that the conversion description information of the current target application is incompatible with the target application server;

[0030] If it is detected that there is no descriptor that has not been successfully converted in the conversion description information of the current target application, it is determined that the conversion description information of the current target application is compatible with the target application server.

[0031] The second aspect of the present application provides an EJB application cross-platform conversion device based on an application server, comprising:

[0032] A type identification unit, used to identify the type of the current target application when the current target application is migrated and deployed to the target application server;

[0033] An information detection unit, configured to detect deployment description information of the current target application from a deployment file deployed by the current target application when identifying that the current target application belongs to an EJB application;

[0034] A type determination unit, used to determine the information description type to which the deployment description information of the current target application belongs and the information description type corresponding to the target application server;

[0035] an information conversion unit, configured to convert the deployment description information of the current target application into information of the information description type corresponding to the target application server according to a mapping rule between a descriptor of the information description type to which the deployment description information of the current target application belongs and an information description type corresponding to the target application server, so as to obtain conversion description information of the current target application;

[0036] The migration unit is used to complete the migration and deployment of the current target application to the target application server by using the conversion description information of the current target application.

[0037] Optionally, in the above-mentioned EJB application cross-platform conversion device based on application server, the type identification unit includes:

[0038] A file scanning unit, used to scan each sub-file in the deployment file of the current target application deployment;

[0039] A file determination unit, used to determine whether each standard specification file of the EJB application exists in each sub-file of the scanned deployment file of the current target application deployment;

[0040] A first type determination unit is used to determine that the current target application is an EJB application when it is determined that each standard specification file of the EJB application exists in each sub-file of the scanned deployment file of the current target application deployment;

[0041] The second type determination unit is used to determine that the current target application belongs to a WEB application when it is determined that each standard specification file of the EJB application does not exist in each sub-file in the scanned deployment file of the current target application deployment.

[0042] Optionally, in the above-mentioned EJB application cross-platform conversion device based on application server, the information conversion unit includes:

[0043] A rule search unit, configured to search for a target mapping rule from a conversion rule library according to an information description type to which the deployment description information of the current target application belongs and an information description type corresponding to the target application server; wherein the target mapping rule is a mapping rule between a descriptor of the information description type to which the deployment description information of the current target application belongs and a descriptor of the information description type corresponding to the target application server;

[0044] A parsing unit, configured to parse the deployment description information of the current target application to obtain each descriptor to be converted in the deployment description information of the current target application;

[0045] An information searching unit, used for searching the conversion information corresponding to each of the descriptors to be converted from the target mapping rules respectively;

[0046] The replacement unit is used to convert each of the to-be-converted descriptors into a corresponding descriptor in the corresponding conversion information, so as to obtain the conversion description information of the current target application.

[0047] Optionally, in the above-mentioned EJB application cross-platform conversion device based on application server, it also includes:

[0048] A compatibility detection unit, used to detect the compatibility of the conversion description information of the current target application with the target application server; wherein, if it is detected that the conversion description information of the current target application is compatible with the target application server, the migration unit executes the step of utilizing the conversion description information of the current target application to complete the migration and deployment of the current target application to the target application server;

[0049] The prompt unit is used to feed back prompt information when detecting that the conversion description information of the current target application is incompatible with the target application server.

[0050] Optionally, in the above-mentioned EJB application cross-platform conversion device based on the application server, the compatibility detection unit includes:

[0051] A compatibility detection subunit detects whether there are any descriptors that have not been successfully converted in the conversion description information of the current target application; wherein, if it is detected that there are any descriptors that have not been successfully converted in the conversion description information of the current target application, it is determined that the conversion description information of the current target application is incompatible with the target application server; if it is detected that there are no descriptors that have not been successfully converted in the conversion description information of the current target application, it is determined that the conversion description information of the current target application is compatible with the target application server.

[0052] A third aspect of the present application provides an electronic device, including:

[0053] Memory and processor;

[0054] Wherein, the memory is used to store programs;

[0055] The processor is used to execute the program. When the program is executed, it is specifically used to implement the cross-platform conversion method of EJB application based on application server as described in any one of the above.

[0056] A fourth aspect of the present application provides a computer storage medium for storing a computer program, wherein when the computer program is executed by a processor, the computer program is used to implement the cross-platform conversion method of an EJB application based on an application server as described in any one of the above.

[0057] The present application provides a cross-platform conversion method for EJB applications based on an application server. When the current target application is migrated and deployed to the target application server, the type of the current target application is first identified so that the EJB application can be migrated and deployed in a targeted manner. Therefore, if it is identified that the current target application belongs to an EJB application, the deployment description information of the current target application is detected from the deployment file deployed by the current target application. Then the information description type to which the deployment description information of the current target application belongs and the information description type corresponding to the target application server are determined. And according to the descriptor of the information description type to which the deployment description information of the current target application belongs and the mapping rule of the information description type corresponding to the target application server, the deployment description information of the current target application is converted into the information of the information description type corresponding to the target application server, and the conversion description information of the current target application is obtained, thereby realizing the adaptive conversion of the deployment description information of the current target application into the information adapted to the target application. Finally, the conversion description information of the current target application can be used to complete the migration and deployment of the current target application to the target application server, thereby realizing a simple method for migration and deployment of EJB applications, which not only makes EJB applications convenient, but also avoids errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0059] Figure 1 A flowchart of a cross-platform conversion method for EJB applications based on an application server provided in an embodiment of the present application;

[0060] Figure 2A flowchart of a method for identifying the type of a current target application provided in an embodiment of the present application;

[0061] Figure 3 A flowchart of a method for converting deployment description information provided in an embodiment of the present application;

[0062] Figure 4 A schematic diagram of the architecture of an EJB application cross-platform conversion device based on an application server provided in an embodiment of the present application;

[0063] Figure 5 A schematic diagram of the architecture of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0065] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0066] The present application embodiment provides a cross-platform conversion method for EJB applications based on an application server, such as Figure 1 As shown, the specific steps include:

[0067] S101 . When migrating and deploying a current target application to a target application server, identify the type of the current target application.

[0068] The current target application refers to any application that needs to be migrated currently, and the target application server is the server of the migration destination.

[0069] It should be noted that applications can be divided into WEB applications and EJB applications. Since the architectures of the two applications are different, the specific operations during migration are also different. The application migration method provided in this application is mainly for EJB applications, which can be ".jar" type applications or ".ear" type applications. Therefore, in order to perform corresponding migration operations on EJB applications, when there is a current target application that needs to be migrated and deployed, it is necessary to first identify the type of the current target application.

[0070] Specifically, the migration deployment of the current target application can be started by using the application server management console or the external interface provided by the application server, and the type of the current target application will be identified at this time.

[0071] Optionally, the judgment may be made based on the output information of the current target application, or directly based on the deployment file of the current target application, so that no other additional operations are required. Of course, other methods may also be used for judgment.

[0072] Optionally, in another embodiment of the present application, a specific implementation of step S101 is as follows: Figure 2 As shown, the following steps are included:

[0073] S201, scanning each sub-file in the deployment file of the current target application deployment.

[0074] Optionally, the deployment file of the current application deployed to the target application server may be parsed to obtain each sub-file therein, and then the name and type of each sub-file of the deployment file may be scanned.

[0075] S202: Determine whether each standard specification file of the EJB application exists in each sub-file in the scanned deployment file of the current target application deployment.

[0076] It should be noted that for EJB applications, there must be some corresponding standard specification files, which are different from files of other applications, such as "META-INF / ejb-jar.xml" and "sun-ejb-jar.xml", etc. Therefore, in the implementation of this application, based on the information of each sub-file in the scanned deployment file, it is determined whether there are various standard specification files of the EJB application in each sub-file in the deployment. Among them, if it is determined that there are various standard specification files of the EJB application in each sub-file in the scanned deployment file deployed by the current target application, step S203 is executed. If it is determined that there are no various standard specification files of the EJB application in each sub-file in the scanned deployment file deployed by the current target application, it means that it does not belong to an EJB application, but a WEB application, and step S204 is executed at this time.

[0077] S203: Determine whether the current target application is an EJB application.

[0078] S204: Determine whether the current target application is a WEB application.

[0079] S102: Determine whether the type of the identified target application is an EJB application.

[0080] If it is determined that the type of the identified target application is an EJB application, that is, if it is identified that the current target application belongs to an EJB application, step S103 is executed.

[0081] S103: Detect deployment description information of the current target application from the deployment file of the current target application deployment.

[0082] It should be noted that since this solution is mainly to achieve adaptive conversion of deployment description information of EJB application during migration and deployment, it is necessary to obtain its deployment description information first before conversion. Therefore, it is necessary to detect the deployment description information of the current target application from the deployment file of the current target application deployment.

[0083] Specifically, the deployment file may be scanned to detect key configuration files belonging to the EJB application in the current target application, and the deployment description information of the current target application may be read therefrom.

[0084] S104: Determine the information description type to which the deployment description information of the current target application belongs and the information description type corresponding to the target application server.

[0085] Optionally, the information description type corresponding to the deployment description information required by each type of server can be configured in advance for the interpretation and processing methods of each type of server, that is, the information description type corresponding to each type of server can be obtained. The types of servers can be divided according to information such as manufacturers and models.

[0086] Therefore, the type of the target application server can be obtained first, and then the information description type corresponding to the target application server can be determined based on the type of the target application server. As for the information description type to which the deployment description information of the current target application belongs, the server type of the current target application before migration can be determined first, and then the information description type corresponding to the server type can be determined. Since the deployment description information of the current target application is adapted to the server before migration, the information description type corresponding to the server is the information description type to which the deployment description information of the current target application belongs.

[0087] Of course, the correspondence between each information description type and the format of its deployment description information may also be configured in advance, so that the information description type to which the deployment description information of the current target application belongs can be directly determined according to the format of the deployment description information of the current target application.

[0088] S105. According to the descriptor of the information description type to which the deployment description information of the current target application belongs and the mapping rule of the information description type corresponding to the target application server, the deployment description information of the current target application is converted into information of the information description type corresponding to the target application server to obtain the converted description information of the current target application.

[0089] It should be noted that in the embodiment of the present application, the mapping relationship between each descriptor between each information description type is pre-configured, so it is possible to directly convert each descriptor in the deployment description information of the current target application into a descriptor of the information description type corresponding to the target application server according to the mapping rule between the descriptor of the information description type to which the deployment description information of the current target application belongs and the information description type corresponding to the target application server, thereby obtaining the converted description information of the current target application.

[0090] Optionally, in another embodiment of the present application, a specific implementation of step S105 is as follows: Figure 3 As shown, the following steps are included:

[0091] S301: Find a target mapping rule from a conversion rule library according to the information description type to which the deployment description information of the current target application belongs and the information description type corresponding to the target application server.

[0092] The target mapping rule is a mapping rule between the descriptor of the information description type to which the deployment description information of the current target application belongs and the descriptor of the information description type corresponding to the target application server.

[0093] S302: Parse the deployment description information of the current target application to obtain each descriptor to be converted in the deployment description information of the current target application.

[0094] S303: Find out conversion information corresponding to each to-be-converted descriptor from the target mapping rule.

[0095] S304: Convert each descriptor to be converted into a corresponding descriptor in its corresponding conversion information to obtain conversion description information of the current target application.

[0096] S106: Using the conversion description information of the current target application, complete the migration and deployment of the current target application to the target application server.

[0097] Specifically, after obtaining the conversion description information of the current target application, the conversion description information of the current target application can be directly deployed to the target application server. The conversion description information of the current target application conforms to the information description type corresponding to the target application server, so the work of migrating the current target application to the target application server can be directly realized.

[0098] Optionally, in order to ensure that the current target application is available after being migrated to the target application server, in another embodiment of the present application, before executing step S106, the following may be further performed:

[0099] Check the compatibility of the conversion description information of the current target application with the target application server.

[0100] If it is detected that the conversion description information of the current target application is compatible with the target application server, it means that the conversion description information of the current target application is migrated to the target application server and is available, so the current target application can be used normally on the target application server. Therefore, step S106 is executed at this time.

[0101] If it is detected that the conversion description information of the current target application is incompatible with the target application server, a prompt message is fed back.

[0102] The prompt information is mainly used to prompt that the conversion description information of the current target application is incompatible with the target application server, and may also include incompatible information and reasons.

[0103] Optionally, in another embodiment of the present application, a specific implementation method of detecting the compatibility of the conversion description information of the current target application with the target application server includes:

[0104] Check whether there are descriptors that have not been successfully converted in the conversion description information of the current target application.

[0105] It should be noted that the main reason for incompatibility is that there is information in the conversion description information of the current target application that does not belong to the information description type corresponding to the target application server. Since the information format conversion was previously performed, it means that there are descriptors that have not been successfully converted. Usually, it is because there are erroneous descriptors in the deployment description information of the current target application, so it is impossible to determine the descriptors that need to be converted, and then the conversion cannot be performed. Of course, it may also be due to problems in the conversion program, resulting in the possibility of conversion failure. Therefore, by detecting whether there are descriptors that have not been successfully converted in the conversion description information of the current target application, it is determined whether the conversion description information of the current target application is compatible with the target application server.

[0106] Optionally, when performing descriptor conversion, the status of each descriptor conversion is recorded respectively. If the conversion is successful, the status is set to the status of successful conversion, so that it can be determined whether there are descriptors that have not been successfully converted according to the status of each description, and each descriptor that has not been successfully converted can be determined so that targeted processing can be performed. Of course, it is also possible to detect whether there are descriptors that have not been successfully converted in the conversion description information of the current target application by comparing before and after the conversion, or by performing format judgment.

[0107] Therefore, if it is detected that there is any descriptor that has not been successfully converted in the conversion description information of the current target application, it is determined that the conversion description information of the current target application is incompatible with the target application server.

[0108] If it is detected that there is no descriptor that has not been successfully converted in the conversion description information of the current target application, it is determined that the conversion description information of the current target application is compatible with the target application server.

[0109] The embodiment of the present application provides a cross-platform conversion method for EJB applications based on an application server. When the current target application is migrated and deployed to the target application server, the type of the current target application is first identified so that the EJB application can be migrated and deployed in a targeted manner. Therefore, if it is identified that the current target application belongs to an EJB application, the deployment description information of the current target application is detected from the deployment file deployed by the current target application. Then the information description type to which the deployment description information of the current target application belongs and the information description type corresponding to the target application server are determined. And according to the descriptor of the information description type to which the deployment description information of the current target application belongs and the mapping rule of the information description type corresponding to the target application server, the deployment description information of the current target application is converted into the information of the information description type corresponding to the target application server, and the conversion description information of the current target application is obtained, thereby realizing the adaptive conversion of the deployment description information of the current target application into the information adapted to the target application. Finally, the conversion description information of the current target application can be used to complete the migration and deployment of the current target application to the target application server, thereby realizing a simple method for migration and deployment of EJB applications, which not only makes EJB applications convenient, but also avoids errors.

[0110] Another embodiment of the present application provides an EJB application cross-platform conversion device based on an application server, such as Figure 4 As shown, including:

[0111] The type identification unit 401 is used to identify the type of the current target application when the current target application is migrated and deployed to the target application server.

[0112] The information detection unit 402 is used to detect the deployment description information of the current target application from the deployment file deployed by the current target application when it is identified that the current target application belongs to an EJB application.

[0113] The type determination unit 403 is used to determine the information description type to which the deployment description information of the current target application belongs and the information description type corresponding to the target application server.

[0114] The information conversion unit 404 is used to convert the deployment description information of the current target application into information of the information description type corresponding to the target application server according to the descriptor of the information description type to which the deployment description information of the current target application belongs and the mapping rule of the information description type corresponding to the target application server, so as to obtain the converted description information of the current target application.

[0115] The migration unit 405 is used to complete the migration and deployment of the current target application to the target application server by using the conversion description information of the current target application.

[0116] Optionally, in the EJB application cross-platform conversion device based on the application server provided in another embodiment of the present application, the type identification unit includes:

[0117] The file scanning unit is used to scan each sub-file in the deployment file of the current target application deployment.

[0118] The file determination unit is used to determine whether each standard specification file of the EJB application exists in each sub-file of the scanned deployment file of the current target application deployment.

[0119] The first type determination unit is used to determine that the current target application is an EJB application when it is determined that each standard specification file of the EJB application exists in each sub-file in the scanned deployment file of the current target application deployment.

[0120] The second type determination unit is used to determine that the current target application belongs to a WEB application when it is determined that each standard specification file of the EJB application does not exist in each sub-file in the scanned deployment file of the current target application deployment.

[0121] Optionally, in the EJB application cross-platform conversion device based on the application server provided in another embodiment of the present application, the information conversion unit includes:

[0122] The rule search unit is used to search for a target mapping rule from a conversion rule base according to the information description type to which the deployment description information of the current target application belongs and the information description type corresponding to the target application server. The target mapping rule is a mapping rule between the descriptor of the information description type to which the deployment description information of the current target application belongs and the descriptor of the information description type corresponding to the target application server.

[0123] The parsing unit is used to parse the deployment description information of the current target application to obtain each descriptor to be converted in the deployment description information of the current target application.

[0124] The information search unit is used to search for conversion information corresponding to each to-be-converted descriptor from the target mapping rule.

[0125] The replacement unit is used to convert each descriptor to be converted into a corresponding descriptor in the corresponding conversion information to obtain the conversion description information of the current target application.

[0126] Optionally, in the EJB application cross-platform conversion device based on the application server provided in another embodiment of the present application, it also includes:

[0127] The compatibility detection unit is used to detect the compatibility between the conversion description information of the current target application and the target application server. If it is detected that the conversion description information of the current target application is compatible with the target application server, the migration unit executes the step of using the conversion description information of the current target application to complete the migration and deployment of the current target application to the target application server.

[0128] The prompt unit is used to feedback prompt information when detecting that the conversion description information of the current target application is incompatible with the target application server.

[0129] Optionally, in the EJB application cross-platform conversion device based on the application server provided in another embodiment of the present application, the compatibility detection unit includes:

[0130] The compatibility detection subunit detects whether there are descriptors that have not been successfully converted in the conversion description information of the current target application.

[0131] If it is detected that any unsuccessfully converted descriptor exists in the conversion description information of the current target application, it is determined that the conversion description information of the current target application is incompatible with the target application server. If it is detected that no unsuccessfully converted descriptor exists in the conversion description information of the current target application, it is determined that the conversion description information of the current target application is compatible with the target application server.

[0132] Another embodiment of the present application provides an electronic device, such as Figure 5 As shown, including:

[0133] Memory 501 and processor 502 .

[0134] The memory 501 is used to store programs.

[0135] The processor 502 is used to execute the program stored in the memory 501. When the program is executed, it is specifically used to implement the cross-platform conversion method of EJB application based on the application server as provided in any one of the above embodiments.

[0136] Another embodiment of the present application provides a computer storage medium for storing a computer program. When the computer program is executed by a processor, it is used to implement the cross-platform conversion method of EJB applications based on an application server as provided in any of the above embodiments.

[0137] Computer storage media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0138] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0139] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A cross-platform conversion method for EJB applications based on an application server, characterized in that: include: When migrating and deploying the current target application to the target application server, identifying the type of the current target application; If it is identified that the current target application is an EJB application, detecting the deployment description information of the current target application from the deployment file deployed by the current target application; Determine the information description type to which the deployment description information of the current target application belongs and the information description type corresponding to the target application server; According to the descriptor of the information description type to which the deployment description information of the current target application belongs and the mapping rule of the information description type corresponding to the target application server, the deployment description information of the current target application is converted into information of the information description type corresponding to the target application server to obtain the converted description information of the current target application; The conversion description information of the current target application is used to complete the migration and deployment of the current target application to the target application server.

2. The method according to claim 1, characterized in that: The identifying the type of the current target application includes: Scan each subfile in the deployment file of the current target application deployment; Determine whether each standard specification file of the EJB application exists in each sub-file of the scanned deployment file of the current target application deployment; If it is determined that each subfile in the scanned deployment file of the current target application deployment contains each standard specification file of the EJB application, then it is determined that the current target application is an EJB application; If it is determined that each standard specification file of the EJB application does not exist in each sub-file in the scanned deployment file of the current target application deployment, it is determined that the current target application belongs to a WEB application.

3. The method according to claim 1, characterized in that The step of converting the deployment description information of the current target application into information of the information description type corresponding to the target application server according to a mapping rule between a descriptor of the information description type to which the deployment description information of the current target application belongs and a descriptor of the information description type corresponding to the target application server, to obtain the converted description information of the current target application, comprises: According to the information description type to which the deployment description information of the current target application belongs and the information description type corresponding to the target application server, the target mapping rule is searched out from the conversion rule library; wherein the target mapping rule is a mapping rule between the descriptor of the information description type to which the deployment description information of the current target application belongs and the descriptor of the information description type corresponding to the target application server; Parsing the deployment description information of the current target application to obtain each descriptor to be converted in the deployment description information of the current target application; Find out conversion information corresponding to each of the to-be-converted descriptors from the target mapping rules respectively; Each of the to-be-converted descriptors is converted into a corresponding descriptor in the corresponding conversion information, so as to obtain conversion description information of the current target application.

4. The method according to claim 1, characterized in that: Before completing the migration and deployment of the current target application to the target application server by using the conversion description information of the current target application, the method further includes: Detecting compatibility of the conversion description information of the current target application with the target application server; If it is detected that the conversion description information of the current target application is compatible with the target application server, the conversion description information of the current target application is used to complete the migration and deployment of the current target application to the target application server; If it is detected that the conversion description information of the current target application is incompatible with the target application server, prompt information is fed back.

5. The method according to claim 4, characterized in that The detecting the compatibility of the conversion description information of the current target application with the target application server includes: Detecting whether there is a descriptor that has not been successfully converted in the conversion description information of the current target application; If it is detected that any unsuccessfully converted descriptor exists in the conversion description information of the current target application, it is determined that the conversion description information of the current target application is incompatible with the target application server; If it is detected that there is no descriptor that has not been successfully converted in the conversion description information of the current target application, it is determined that the conversion description information of the current target application is compatible with the target application server.

6. An EJB application cross-platform conversion device based on an application server, characterized in that: include: A type identification unit, used to identify the type of the current target application when the current target application is migrated and deployed to the target application server; An information detection unit, configured to detect deployment description information of the current target application from a deployment file deployed by the current target application when identifying that the current target application belongs to an EJB application; A type determination unit, used to determine the information description type to which the deployment description information of the current target application belongs and the information description type corresponding to the target application server; an information conversion unit, configured to convert the deployment description information of the current target application into information of the information description type corresponding to the target application server according to a mapping rule between a descriptor of the information description type to which the deployment description information of the current target application belongs and an information description type corresponding to the target application server, so as to obtain conversion description information of the current target application; The migration unit is used to complete the migration and deployment of the current target application to the target application server by using the conversion description information of the current target application.

7. The device according to claim 6, characterized in that The type identification unit comprises: A file scanning unit, used to scan each sub-file in the deployment file of the current target application deployment; A file determination unit, used to determine whether each standard specification file of the EJB application exists in each sub-file of the scanned deployment file of the current target application deployment; A first type determination unit is used to determine that the current target application is an EJB application when it is determined that each standard specification file of the EJB application exists in each sub-file of the scanned deployment file of the current target application deployment; The second type determination unit is used to determine that the current target application belongs to a WEB application when it is determined that each standard specification file of the EJB application does not exist in each sub-file in the scanned deployment file of the current target application deployment.

8. The device according to claim 6, characterized in that The information conversion unit comprises: A rule search unit, configured to search for a target mapping rule from a conversion rule library according to an information description type to which the deployment description information of the current target application belongs and an information description type corresponding to the target application server; wherein the target mapping rule is a mapping rule between a descriptor of the information description type to which the deployment description information of the current target application belongs and a descriptor of the information description type corresponding to the target application server; A parsing unit, configured to parse the deployment description information of the current target application to obtain each descriptor to be converted in the deployment description information of the current target application; An information searching unit, used for searching the conversion information corresponding to each of the descriptors to be converted from the target mapping rules respectively; The replacement unit is used to convert each of the to-be-converted descriptors into a corresponding descriptor in the corresponding conversion information, so as to obtain the conversion description information of the current target application.

9. An electronic device, characterized in that: include: Memory and processor; Wherein, the memory is used to store programs; The processor is used to execute the program. When the program is executed, it is specifically used to implement the EJB application cross-platform conversion method based on the application server as described in any one of claims 1 to 5.

10. A computer storage medium, characterized in that: Used to store computer programs, which, when executed by a processor, are used to implement the EJB application cross-platform conversion method based on an application server as described in any one of claims 1 to 5.