Revised use case for creating and governing JBOSS ESB based
jervisliu Jun 30, 2009 11:05 PMHi, posted below is a revised use case for creating and governing JBOSS ESB based web service (EBWS). What I have to confess is that I do not have a lot experiences on using JBOSS products to develop real projects in a real production environment. The use case I posted below can be very wrong. That is reason why I asked for everyone's input. These use cases will be served as a PRD to decide what features we want to include for our first release of SOA Repo. So please, your comments and suggestions will be highly appreciated.
Use Case : Creating And Governing JBOSS ESB Based Web Service (EBWS)
Step 1: Creating a service.
Repository Explorer -> Services -> Create New Service -> Add JBOSS ESB based Web Services
For version 1, we provide options of creating following service types:
a. SOAP service(=EBWS)
b. JBOSS ESB service
c. Generic service.
In this use case, we create a JBOSS ESB based Web Service(EBWS) named AirlineBookingService.
Step 2: Viewing and editing the service from Service Editor.
Once the service is created successfully, double click the AirlineBookingService icon from Repository Explorer -> Services -> AirlineBookingService. This will bring out a service editor for AirlineBookingService. The service editor is consisted with following sections:
a. "Artifact Summary" section
b. "Artifact MetaData" section
c. "Artifact LifeCycle" section
d. "Artifact Dependencies" section.
e. "WhatDependsOnMe" section.
f. "Comments" section.
g. "History" section.
At the very top of Service editor is the "Artifact Summary" section, it contains information as below:
a. The feed: The feed icon provides an Atom/Pub subscription to this artifact's version tree.
b. Description: click the "edit" icon, you will be able to edit the description field.
c. Type: For this use case, the type is JBWS.
d. Version: Every change to the artifact will make a new version.
e. Perm link: This link is a permanent link to this particular version of service. For example, a Perm link to version 3 of test.wsdl is "http://localhost:8080/guvnor-web/repository/jbossesb/test.wsdl?version=3". A Perm link to the latest version of test.wsdl is "http://localhost:8080/guvnor-web/repository/jbossesb/test.wsdl". Clicking the Perm link will download the actual artifact (through HTTP Get, served by Atom/Pub server).
f. "New Version" button: Clicking the "New version" button will bring up a wizard to upload a new version of artifact.
g. "Delete" button: Clicking the "delete" button will delete the current version of artifact from the version history tree.
NOTE: The downloading function (Perm link) and New version function can only apply to these artifacts that have concrete representation formats, for example a xsd file or .esb file. Not sure what should return if a user click the Perm link of AirlineBookingService as its just a container or holder, there is nothing concrete to download.
Step 3: Add artifacts that the service may depend on – Add XSDs
Repository Explorer -> Schemas -> Create New Schema -> Add New XSD
In this use case, we upload three XSD files called AirlineBookingInMessage.xsd, AirlineBookingOutMessage.xsd and AirlineBookingFaultMessage.xsd.
Step 4: Add artifacts that the service may depend on – Add WSDL file
Repository Explorer -> Contract -> Create New Contract -> Add New WSDL
When a JBOSS ESB based Web Service gets deployed, a WSDL file is generated. Save the WSDL file on local disk (name this file AirlineBookingService .wsdl) then upload AirlineBookingService .wsdl into the repository.
NOTE. For known artifact types, we can extract metadata automatically during the uploading process. For example, when AirlineBookingService .wsdl gets added into repository, its port name, service name, port type etc will be extracted from the WSDL file and added as metadata automatically.
Step 5: Add artifacts that the service may depend on – Add a document.
Repository Explorer -> Document -> Create New Document -> Add New Document
User can attach a document to the service at any stage.
In this use case, we upload a Word file called AirlineBookingMessagePRD.odt.
Step 6: Add artifacts that the service may depend on – Add arbitrary files.
Repository Explorer -> Generic artifacts -> Create New Artifact -> Add New Artifact
User can add any arbitrary type files into the repository.
Step 7: Add dependencies.
7.1 Add AirlineBookingInMessage.xsd as AirlineBookingService's dependency: Open AirlineBookingMessage.xsd editor, copy the URL from perm link. Open AirlineBookingService editor, add a new dependency whose URL is the perm link of AirlineBookingMessage.xsd
7.2 Add AirlineBookingService .wsdl as dependency
7.3. Add AirlineBookingMessagePRD.odt as dependency
Step 8: Add MetaData
8.1 From Repository Explorer -> Administration -> MetaData Types, add a new Metadata type called ReleaseForVersion whose type is metadata_type_multi_value.
8.2 From Repository Explorer -> Services -> AirlineBookingService, add a new metadata type named ReleaseForVersion which we created in step 8.1 to AirlineBookingService.
8.3 Edit the value of ReleaseForVersion metadata from AirlineBookingService Service editor.
Step 9: Manage the lifecycle.
9.1 From Repository Explorer -> Administration -> Life Cycles, add a new lifecycle type called MyLifeCycle. MyLifeCycle will have three phases: "ServiceOrientiedDesign; ServiceOrientiedTest; ServiceOrientiedProduction"
9.2 From AirlineBookingService service editor, choose the lifecycle type MyLifeCycle which we created in step 9.1 as the lifecycle type for AirlineBookingService.
9.3 Move the lifecycle phase forward from ServiceOrientiedDesign to ServiceOrientiedTest.
Step 10: Add a comment
The comments section is a JIRA comment like area.
Step 11: Versioning/History
Evey change to AirlineBookingService will make a new version on its version tree. This History section lists all available version names, checkin comments and the link for this specific version. Click the version link, will bring out a service editor for that specific version (though all the information on that service editor will be read only)
Step 12: Search/Query
Step 13: Atom/Pub support.
REST support has been built into the core of SOA Repository. For every feature that is available from GWT GUI, it is also available from Atom/Pub and JAX-RS (JSR-311) interface. For example, the perm Link on Service editor ( eg, http://localhost:8080/guvnor-web/repository/jbossesb/test.wsdl?version=3)
is actually served by the atom/pub server over Http transport instead of using GWT RPC.
Step 14: Deploy AirlineBookingService to a testing or production environment.
SOA Repository does not provide any tools or helps to actually develop a JBWS, and it is not designed to do this. A service developer can always develop and build the service from command line using whatever editor and building tool or from an IDE eg JBOSS Eclipse developer studio. Lets take JBOSS Eclipse studio as an example, the interactions between Eclipse and SOA Repository is as below:
1.Java source code of AirlineBookingService is created and developed through Eclipse.
2.Jboss-esb.xml file and other configuration files that are needed by JBOSS ESB service are also generated and updated through Eclipse.
3.AirlineBookingInMessage.xsd and other xsd files are created by service developers.
4.AirlineBookingMessage.wsdl file is generated by ESB server during the deployment process. This wsdl file is saved to local file system manually by developers.
5.All other files that are needed by JBOSS ESB service are also maintained from Eclipse.
6.A service called AirlineBookingService is created in SOA Repo. Its nothing but an empty holder.
7.Jboss-esb.xml, AirlineBookingInMessage.xsd, wsdl files etc are added into SOA Repo from Eclipse project (or from the local file system). In SOA Repo, these files are called service artifacts, and they are associated with AirlineBookingService. From this point on, the SOA Repo is the "single source of truth" for these artifacts (eg, Jboss-esb.xml, AirlineBookingInMessage.xsd etc). Of course, it is possible that these files are also stored in a source control system like SVN. But the SOA Repo is the only authority for publishing the actual content of these files as well as any other information associated with these files.
8.If the AirlineBookingInMessage.xsd file is updated later on by developers using Eclipse, the developer need to upload the new version of AirlineBookingInMessage.xsd file to SOA repository. This will create a new version of AirlineBookingInMessage.xsd in SOA Repo.
9.Other developers can download AirlineBookingInMessage.xsd from SOA repository to their Eclipse project or local file system. If they change the xsd file, they need to upload it back to SOA Repo as well.
10.So the most common interaction between SOA Repo and Eclipse (or the local file sytem where the service project stays) is the sync of files between SOA Repo and Eclipse.
11.When the service project is ready for testing or production, developer generates a .esb deployment bundle using ant or from Eclipse.
NOTE: once .esb file is generated, I am not sure if we want to add this .esb file to the repository. The .esb file can be one of artifacts that the service depends on.
12.At the moment, there is no function offered in SOA Repo to do the deployment and un-deployment.