Background technology
Oracle enterprise's service bus (Oracle Service Bus, OSB) is the product that the traditional middleware technology is combined with technology such as XML, Web services.OSB provides connection maincenter the most basic in the network, is the essential elements of constructing nervous system of enterprise.The appearance of OSB has changed traditional software architecture, the solution more more cheap than traditional middleware product can be provided, simultaneously it can also eliminate the technological disparity between the different application, allows different application server coordinate operation, has realized communication and integration between the different services.On function, OSB provides the tupe of event-driven and document guiding, and distributed operational management mechanism, and it supports content-based routing and filtration, has possessed the transmittability of complex data, and a series of standard interface can be provided.
BAM (Business Activity Monitoring, BAM) provide the real time access to the Professional performance index, to improve speed and the efficient of professional running.
At present integrated what generally take all is use JCA binding technology scheme for OSB and BAM, utilized before this Oracle JDeveloper to create as requested JCA Adpter, after having created JCA Adpter, can generate three files, and then these three files are imported among the OSB, can generate a WSDL after having imported, then create corresponding business service, agency service according to this WSDL, also need simultaneously XLST of hand-coding, this XLST is that the information distribution that will need to show in the agency service message flow is to BAM.
There are following defective in existing OSB and BAM integrated technology scheme: create importing JCA Adpter and have troublesome operation to OSB, write XLST at every turn and exist difficulty and reusability not high.Each JCA Adpter that creates needs to carry out sequence of operations, and three File Uploads that also need after having created to generate are to the server at OSB place, such operation all too is loaded down with trivial details, also has sizable difficulty according to XSD hand-coding XLST simultaneously at every turn, and reusability is too low.
So, be necessary to provide a kind of new method, remove troublesome operation to be implemented in OSB and the BAM Integrated Solution, the raising interface message is banishd and is put the step reusability.
Summary of the invention
The object of the present invention is to provide a kind of OSB and BAM integrated approach and device, can in OSB and BAM integrated technology, remove and import JCA Adpter to the troublesome operation of OSB, reduce the difficulty of writing XLST, improve its reusability; And the critical field that client utilizes infrastructure service to return recalls information is inquired about needed information, makes things convenient for the client misarrangement.
For solving above technical matters, the invention provides a kind of service bus OSB of oracle enterprise and BAM BAM integrated approach, comprising:
Step 1, OSB receive the request of client simple object access protocol, use Xquery and Xpath language to obtain the service invocation information of SOAP request by pipeline;
Step 2, OSB call the described service invocation information that infrastructure service will get access to and are saved in database table;
Step 3, BAM create data object according to described database table, utilize described data object to create the report that represents that represents demand.
Preferably, in the described step 1, specifically comprise:
1.1, the agency service of OSB receives client SOAP request, by the request pipeline SOAP request is routed to business service;
1.2, business service sends to service end by service end URL with SOAP request;
1.3, service end receives SOAP request, treatment S OAP request returns to client by the response pipeline through business service, agency service with the result.
Preferably, in the route of request pipeline, use Xquery and Xpath language to obtain service invocation information in the SOAP request by various functions, get access to simultaneously after these information and with them and be assigned to variable, carry out information data and preserve.
Preferably, in the described step 2, also further comprise: the critical field of recalls information is also returned in infrastructure service.
Preferably, described step 3 specifically comprises:
3.1, BAM creates data object according to described database table;
3.2, according to representing demand, BAM utilizes described data object to create the report that represents that represents demand.
For solving above technical matters, the present invention also provides a kind of service bus OSB of oracle enterprise and BAM BAM device, comprising: receiver module, and acquisition module, calling module, creation module,
Described receiver module is used for OSB and receives client SOAP request;
Described acquisition module is used for OSB and uses Xquery and Xpath language to obtain the service invocation information of SOAP request by pipeline;
Described calling module is used for OSB and calls the described service invocation information that infrastructure service will get access to and be saved in database table;
Described creation module is used for BAM and creates data object according to described database table, utilizes described data object to create the report that represents that represents demand.
Compared with prior art, a kind of OSB provided by the invention and BAM integrated approach and device, by in the route of request pipeline, use Xquery and Xpath language to obtain the service invocation information in the SOAP request by various functions and be assigned to variable and carry out information data and preserve to getting access to these information, can in the response pipeline, use these information datas; The critical field of recalls information is returned in simultaneously infrastructure service, and client is gone the needed information of inquiry among the bam by critical field afterwards, makes things convenient for the client misarrangement; At the BAM end, set up data object with those tables of infrastructure service data inserting, then according to the demand that represents, create the figure that represents miscellaneous, and create various querying conditions, dwindle query context.By method of the present invention, can in OSB and BAM integrated technology, remove and import JCA Adpter to the OSB troublesome operation, reduce hand-coding XLST difficulty, improve its reusability.
Embodiment
In order to make technical matters to be solved by this invention, technical scheme and beneficial effect clearer, clear, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, is not intended to limit the present invention.
Agency service is a key concept of OSB framework.The service user is connected with the back-end services of trustship via this interface.Agency service is that " service bus " is in the definition of intermediary's Web service of this locality realization.Use the OSB control desk, can be according to the transport-type defining interface of WSDL and use, Configuration Agent service; And in message flow definition and collocation strategy, specify message processing logic.
Because agency service can be given the message route a plurality of business service, so can be independent of business service with agent communication, the interface of Configuration Agent service.In this case, the agency will be configured to the message flow definition, and it gives corresponding business service according to logical routing with the message route, then message data is mapped as the form that the business service interface needs.
The core of agency service is " context ", and context is one group of XML variable, is shared by request stream and response flow.Can dynamically add new variables to context, also can delete variable from context.The predefine context variable comprises the information of relevant information, transmission head, safety philosophy, the metadata of current agency service, and the agency service primary circuit routing service of calling and the metadata of issuing service.Context can be read and be changed by the Xquery expression formula, and upgrades by conversion and suitable renewal operation.
The present invention is in the message flow routed encapsulation of agency service, in route, use Xquery and Xpath language to Simple Object Access Protocol (Simple Object Access Protocol, SOAP) message is carried out various functions and is processed and compile, and at last these information is inserted in the database table.This process was divided into the next stage:
The stage_ValidateMsgHeader stage
This stage is that client SOAP request is carried out just level verification at the system entry end, to avoid invalid request, alleviates the pressure of server end, rationally utilizes the server end resource.Obtain SOURCE_SYSTEM_ID, SOURCE_SYSTEM_NAME, the several parameters such as USER_ID, USER_NAME of Msgheader during checking, and judge whether above parameter value exists or whether be empty, if there is no or be empty, receive interpolation initiation faulty operation interrupt request and directly return to client, can return miscue to client simultaneously.
The stage_InputForReport stage
This stage is to collect the solicited message that BAM need to show.By Xquery and Xpath language, use various functions to obtain service invocation information and be saved in the variable, otherwise these information will be lost in the response pipeline, and the service invocation information of obtaining comprises the address of service call time, service call IP, service call etc.
The stage_OutputForReport stage
This stage is that the service invocation information that the service side returns is saved in the variable, such as the success of the service call that returns identifier, service call successful information, call the information such as example ID, and by infrastructure service these information is stored in the database table.
This stage is stored information in the database into except calling infrastructure service after exhibition information will being compiled, and also receives simultaneously the information that infrastructure service is returned.
The stage_ReplaceOutput stage
This stage is stored record into the crucial ID of the information on services in the database, by using replacement method that crucial ID is returned to client, so that when client is made mistakes at service call, the details when using these crucial ID to go query calls among the BAM, convenient service misarrangement.
As shown in Figure 1.The invention provides a kind of OSB and BAM integrated approach, may further comprise the steps:
Step 1, OSB receive client SOAP request, use Xquery and Xpath language to obtain the service invocation information of SOAP request by pipeline.Specifically comprise:
1.1, the agency service of OSB receives client SOAP request, by the request pipeline SOAP request is routed to business service;
1.2, business service sends to service end by service end URL with SOAP request;
1.3, service end receives SOAP request, treatment S OAP request returns to client by the response pipeline through business service, agency service with the result.
Wherein, in the route of request pipeline, use Xquery and Xpath language to obtain service invocation information in the SOAP request by various functions, such as calling end IP, calling the information such as end time, invocation target address; Get access to simultaneously after these information and with them and be assigned to variable, carry out information data and preserve, in order to use these information datas in the response pipeline, otherwise these information datas are lost in the response pipeline.
Step 2, OSB call the described service invocation information that infrastructure service will get access to and are saved in database table.Specifically comprise:
2.1, OSB calls the described service invocation information that infrastructure service will get access in the pipeline in response and stores in the default database table.
2.2, infrastructure service returns the critical field of recalls information, make things convenient for client to go the needed information of inquiry among the bam by critical field afterwards, and make things convenient for the client misarrangement.
Step 3, BAM create data object according to described database table, utilize described data object to create the report that represents that represents demand.Specifically comprise:
3.1, BAM creates data object according to described database table;
3.2, according to representing demand, BAM utilizes described data object to create the report that represents that represents demand, such as creating the figures that represent miscellaneous such as 3D bar chart, broken line graph, constitutional diagram, gauging table, Excel.Create simultaneously various querying conditions, such as calling end IP, allocating time, Service name etc., dwindle query context by these querying conditions.
As shown in Figure 2.The invention provides a kind of OSB and BAM integrating device, comprising: receiver module 10, acquisition module 20, calling module 30, creation module 40.Wherein,
Receiver module 10 is used for OSB and receives client SOAP request.
Acquisition module 20 is used for OSB and uses Xquery and Xpath language to obtain the service invocation information of SOAP request by pipeline.
Calling module 30 is used for OSB and calls the described service invocation information that infrastructure service will get access to and be saved in database table.
Creation module 40 is used for BAM and creates data object according to described database table, utilizes described data object to create the report that represents that represents demand.
A kind of OSB provided by the invention and BAM integrated approach and device, OSB is after receiving client-requested, by in the routed encapsulation of request pipeline, use Xquery and Xpath language to obtain the service invocation information in the SOAP request by various functions and be assigned to variable and carry out information data and preserve to getting access to these information, by calling infrastructure service these information are write in the database table again; Then BAM creates data object take this database table as the basis, then sets up to represent report with recalls information with various pattern exhibitions out.By method of the present invention, can in OSB and BAM integrated technology, remove and import JCA Adpter to the troublesome operation of OSB, reduce the difficulty of hand-coding XLST, improve its reusability.
Above-mentioned explanation illustrates and has described a preferred embodiment of the present invention, but as previously mentioned, be to be understood that the present invention is not limited to the disclosed form of this paper, should not regard the eliminating to other embodiment as, and can be used for various other combinations, modification and environment, and can in invention contemplated scope described herein, change by technology or the knowledge of above-mentioned instruction or association area.And the change that those skilled in the art carry out and variation do not break away from the spirit and scope of the present invention, then all should be in the protection domain of claims of the present invention.