background image

Field

Description

eventType

Corresponds to the Business Object Name
field of the event record

timeStamp

Corresponds to the Timestamp field of the
event record

eventStatus

Corresponds to the Status field of the event
record

Event detection:

Events detection mechanisms reflect the sources that trigger them: user actions in
the application, batch processes that add or modify application data, or database
administrator actions.

When an event detection mechanism is set up in an application and an application
event associated with a business object occurs, the application must detect the
event and write it to the event store.

Event detection mechanisms are application dependent. Some applications provide
an event detection mechanism for use by clients such as adapters. The event
detection mechanism may include an event store and a prescribed way of inserting
information about application changes into the event store. For example, one type
of implementation uses an event message box that receives messages from the
application when it processes an event of interest to the adapter. The adapter
application-specific component periodically polls the message box for new event
messages.

Other applications have no built-in event detection mechanism but have other
ways of providing information when application entities change. If an application
does not provide an event detection mechanism, you must use whatever
mechanism is available to extract information on entity changes for the adapter.
Among those mechanisms are database triggers, exit calls to programs that write to
event stores, or extracting information from flat files that aggregate application
changes.

In all cases, the event detection mechanism should ensure data integrity between
an application event and the event record written to the event store. For example,
the generation of an event record should not occur until all required data
transactions for the event have completed successfully.

Steps Involved

In general, an application event detection mechanism should take the following
steps:

1.

Detect an event on an application entity.

2.

Create an event record.

To create the record, the event detection mechanism should:

1.

Generate a unique event identifier (ID).

2.

Set the object key to the primary key of the application entity.

3.

Set the verb to the action that occurred in the database.

4.

Set the event timestamp.

WebSphere Adapter development overview

85

Содержание WebSphere Adapters

Страница 1: ...WebSphere Adapters WebSphere Adapter Toolkit User Guide Version 6 Release 2 Version 6 Release 2...

Страница 2: ......

Страница 3: ...WebSphere Adapters WebSphere Adapter Toolkit User Guide Version 6 Release 2 Version 6 Release 2...

Страница 4: ...from you When you send information to IBM you grant IBM a nonexclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you Copyright...

Страница 5: ...adapter 49 Generated code and deployment descriptor 55 Using the Resource Adapter Deployment Descriptor editor 56 Displaying the deployment descriptor 56 Modifying deployment descriptor properties 66...

Страница 6: ...iv WebSphere Adapters WebSphere Adapter Toolkit User Guide...

Страница 7: ...lly by WebSphere Adapters WebSphere Adapters are based on the JCA 1 5 specification These adapters are supported on multiple runtime environments and brokers Implementing a WebSphere adapter allows yo...

Страница 8: ...ation Classes which establish a WebSphere Adapter standard for building resource adapters that conform to the Java 2 Connector Architecture JCA 1 5 specification IBM WebSphere Adapters An IBM WebSpher...

Страница 9: ...WebSphere Process Server WebSphere Enterprise Service Bus and WebSphere Application Server v Connects an application running on WebSphere Process Server with an EIS v Enables data exchange between the...

Страница 10: ...f the whether data is intended for inbound or outbound delivery the resource adapter i e Adapter Foundation Classes plus EIS specific subclasses acts as a conduit for any J2EE application to communica...

Страница 11: ...formation systems EIS facilitating bidirectional data exchange with the EIS The JCA connector component can be driven by the metadata that describes the interaction with the EIS The JCA connector comp...

Страница 12: ...ge interfaces implementing Data Exchange SPI DESPI and various quality of service The adapter foundation classes support all the required JCA contracts for outbound and inbound connectivity For the ou...

Страница 13: ...resentation of the metadata contains the annotations with application specific information ASI that the adapter needs at run time in order to associate objects or individual properties with their equi...

Страница 14: ...n Developer The current tools support generation of SCA and J2EE programming model artifacts and is extensible to also support generation of artifacts for other programming models and server runtimes...

Страница 15: ...ist you in creating custom WebSphere resource adapters New Connector Project wizard overview The wizard installed with the WebSphere Adapter Toolkit guides you through creation of a Connector Project...

Страница 16: ...here Adapter Toolkit provide the foundation services for a custom JCA resource adapter that can run on multiple server runtimes including WebSphere Process Server The New Connector Project wizard uses...

Страница 17: ...ps 1 From the Rational Application Developer for WebSphere Software or WebSphere Integration Developer menu select Help Help Contents 2 Choose Websphere Adapter Toolkit documentation and then select t...

Страница 18: ...oper software before attempting to install IBM WebSphere Adapter Toolkit software plug ins Samples overview When you installed the IBM WebSphere Adapter Toolkit two sample resource adapters were place...

Страница 19: ...mentation of a resource adapter and enterprise metadata discovery v Resource adapter deployment descriptor and source code in Project Interchange Format suitable for importing into WebSphere Integrati...

Страница 20: ...Samples 2 From the viewing pane of the Technology samples window select Import the sample deployable rar This launches the Connector Import window Note You can also import the sample deployable RAR fr...

Страница 21: ...a you provide and generates business objects interfaces and import or export files based on the services discovered Import the deployable RAR file for the sample For the Twine Ball sample you need to...

Страница 22: ...m the New External Service window make sure that Unlisted Adapter is selected and click Next 6 From the Select an Adapter window expand TwineBallConnector IBM 6 2 select CWYAT_TwineBall and click Next...

Страница 23: ...ery Configuration window click Next No connection properties are required 9 From the Object Discovery and Selection window select CUSTOMER from the Discovered objects pane and add it to the Selected o...

Страница 24: ...select Next 11 From the Service Generation and Deployment Configuration window deselect Specify a Java Authentication and Authorization Services JASS alias security credential and click Next 18 WebSph...

Страница 25: ...he New Integration Project window 13 From the New Integration Project window select Create a module project and click Next 14 Enter values in the New Module window and click Finish Your module display...

Страница 26: ...files based on the services discovered Make sure you have done the following v Import the deployable RAR file for the sample into your workspace v Run external service discovery for outbound processin...

Страница 27: ...dow 5 From the New External Service window make sure that Unlisted Adapter is selected and click Next 6 From the Select an Adapter window expand TwineBallConnector IBM 6 2 select CWYAT_TwineBall and c...

Страница 28: ...e Discovery Configuration window click Next No connection properties are required 9 From the Object Discovery and Selection window select CUSTOMER and add it to the Selected objects portion of the win...

Страница 29: ...operties window select Next 11 From the Service Generation and Deployment Configuration window deselect Specify a Java Authentication and Authorization Services JASS alias security credential WebSpher...

Страница 30: ...diagram editor Modify the module Modify the module Modify the sample module by adding a Java component to link to the inbound service You must have created the service before modifying it By adding a...

Страница 31: ...ustomer emitCustomer method public void emitCreateAfterImageCustomer DataObject emitCreateAfterImageCustomerInput System out println Got the event TODO Needs to be implemented 5 Save the module Now yo...

Страница 32: ...your environment so that you can run a sample application The following instructions describe how to use Rational Application Developer to import a deployable RAR file for use in the Twine Ball sampl...

Страница 33: ...to the Java Build path v twine jar v aspectjrt jar v ffdc jar v ffdcsupport jar 14 Right click DemoEJB Java EE Prepare for deployment 15 Right click on Server and add project If you used values from t...

Страница 34: ...ntegration Developer and try to run the external service discovery process again Known issues The following issues regarding working with the Kite String and Twine Ball samples are known issues to dev...

Страница 35: ...phere Integration Developer V6 x This displays the Workspace Launcher dialog Workspace Launcher dialog 2 Enter a workspace directory for your project or click Browse to select a location for your proj...

Страница 36: ...Connector Project and click Next This starts the New Connector Project wizard and displays the Connector Project dialog Connector Project dialog You are ready to describe your project and resource ada...

Страница 37: ...the Configurations The IBM Websphere Adapter configuration contains the IBM WebSphere Adapter Foundation Classes 6 2 J2C Module 1 5 and Java 5 0 Project Facets You can modify these facets by clicking...

Страница 38: ...re IBM WebSphere Adapter displays in the Configurations field and do not change the configuration or deselect any of the project facets The project facets that are preselected are the facets you need...

Страница 39: ...source adapter properties Resource adapter properties are the descriptive properties that you assign to both the adapter and the adapter class You name the adapter and qualify its Java class with a pa...

Страница 40: ...Prefix type the prefix to be used in adapter class names Class Name displays the resulting fully qualified ResourceAdapter class name 5 Click Next This displays the Generation Options window You can...

Страница 41: ...adapter classes and their associated component properties Outbound adapter classes and associated properties Generating outbound adapter classes creates code and in some cases sequence of calls log an...

Страница 42: ...e an outbound adapter with local transaction support see Generating outbound local transaction support methods v XA transaction support Generating outbound adapter classes with XA transaction support...

Страница 43: ...s prefix BaseCommand DeleteCommand extends your package name outbound commandpattern your class prefix BaseCommand NoOperationCommand extends your package name outbound commandpattern your class prefi...

Страница 44: ...guration window The RetryConnectionOnStartup property works with the RetryLimit and RetryInterval properties which specify the number of times the adapter retries the connection and the length of time...

Страница 45: ...l v InboundServiceDescription extends com ibm j2ca extension emd description WBIInboundServiceDescriptionImpl v MetadataDiscovery extends com ibm j2ca extension emd discovery WBIMetadataDiscoveryImpl...

Страница 46: ...ter When you choose to generate outbound adapter classes the wizard creates code and in some cases sequence of calls log and trace messages and comments for the methods that must be implemented to pro...

Страница 47: ...to the adapter if you click Finish to generate the code for this task Review the section on local transaction support in Generating an IBM WebSphere Resource Adapter For more information on transacti...

Страница 48: ...mplementation and returns the wrapper For more information on transaction support see Implementing transaction support 1 Click the Generate Outbound Adapter classes check box and then click on the XAT...

Страница 49: ...ight pane 2 Click Finish Generating inbound adapter classes Generate inbound adapter classes for notifying a business process of an inbound event from the EIS Review the section on inbound adapter cla...

Страница 50: ...our adapter Generating inbound connection pooling support Generate inbound connection pooling support When you choose the connection pooling component property the wizard will create the ActivationSpe...

Страница 51: ...ound adapter classes and the information on inbound event polling support in Generating an IBM WebSphere Resource Adapter When you choose to generate inbound adapter classes for event polling support...

Страница 52: ...ing mechanism used in event notification Review the information on inbound adapter classes and the information on inbound callback event support in Inbound callback event notification When you choose...

Страница 53: ...ntrospect an EIS to create business objects and other artifacts Review the information on enterprise metadata discovery classes in Generating an IBM WebSphere Resource Adapter When you choose to gener...

Страница 54: ...erated from enterprise metadata discovery Review the section on data binding classes in Generating an IBM WebSphere Resource Adapter When you choose to generate data binding classes the wizard generat...

Страница 55: ...he list of JCA 1 5 interfaces that are implemented in your Connector Project when you choose to generate outbound adapter classes is as follows outbound JCA adapter classes v ConnectionFactory impleme...

Страница 56: ...tructure and other data from an EIS The wizard also generates a discovery service xml file The list of JCA interfaces that are implemented in your Connector Project when you choose to generate enterpr...

Страница 57: ...ector discovery MetadataConnection v OutboundConnectionConfiguration implements commonj connector discovery OutboundConnectionConfiguration v OutboundConnectionType implements commonj connector discov...

Страница 58: ...esource runtime TableProperty and javax resource runtime PropertyDescriptor For information on how to generate Enterprise Metadata Discovery classes see Generating JCA Enterprise Metadata Discovery cl...

Страница 59: ...inbound event from the EIS Review the section on inbound JCA resource adapter classes in Generating a JCA resource adapter When you choose to generate inbound adapter classes the wizard creates code...

Страница 60: ...resource adapter When you choose to generate enterprise metadata discovery classes the wizard generates code for the methods needed to produce a service that you can use to glean business object struc...

Страница 61: ...fy options for your resource adapter the wizard generates code and a deployment descriptor in a Connector Project and then switches to the J2EE perspective in the workspace The wizard then automatical...

Страница 62: ...the ra xml file in your Java Connector Project The editor allows you to display and modify all elements of the ra xml file You can also add properties After each modification this file is validated a...

Страница 63: ...he Project Explorer and selecting Open With Deployment Descriptor Editor from the context menu Displaying the descriptor editor from the context menu You can display each of the four views by using th...

Страница 64: ...e License Information section allows you to specify and display license descriptions and requirements if any for the resource adapter The Components section provides navigation links to other panes of...

Страница 65: ...WebSphere Process Server does not make use of these icons Using the Resource Adapter pane The Resource Adapter pane displays information that is stored in the resourceadapter element of the ra xml fi...

Страница 66: ...to the Outbound Adapter and Inbound Adapter panes The Config Properties section allows you to specify resource adapter level configuration properties By default all configuration properties inherited...

Страница 67: ...oyment descriptor The Security Permissions section allows you to specify application server permissions These are the permissions required by the resource adapter to execute within the application ser...

Страница 68: ...r reauthentication is supported The Connection Definitions section allows you to specify an outbound connection definition This connection definition is used by the application server to obtain a phys...

Страница 69: ...Class Once a connection definition is defined all properties inherited by the specified ManangedConnectionFactory are shown in the properties list directly under the ManagedConnectionFactory Class You...

Страница 70: ...apter pane displays information that is stored in the inbound resourceadapter element of the ra xml file You can navigate to this pane by clicking InboundResourceAdapter in the Components section of t...

Страница 71: ...inherited by the specified ActivationSpecWithXid are shown in the properties list directly under the ActivationSpecWithXid Class You can specify default values and descriptions for these inherited pr...

Страница 72: ...guration properties you typically must also add them to the source code as JavaBean properties The Resource Adapter Deployment Descriptor performs this and other tasks automatically v When you add a p...

Страница 73: ...tivationSpecWithXid Editing deployment descriptor source You can view and edit your adapter s deployment descriptor directly Although the Resource Adapter Deployment Descriptor editor provides a fully...

Страница 74: ...you identify the JCA classes for your project generate subclasses of all the corresponding Foundation Classes and then modify or override methods as described in the individual class subsections Subc...

Страница 75: ...lass provide logic for processing requests create retrieve update and delete operations In your WBIConnection subclass simply provide the ability to generate a new WBIInteraction instance 6 Extend WBI...

Страница 76: ...hild business object which can itself contain zero or more child business objects Using a business graph optional Use it to provide a change summary for applying a delta updates to hold metadata about...

Страница 77: ...e unrelated to the verb An example helps illustrate the difference between verbs and operations If you wanted to create a new entity in the EIS using an after image business object you would specify a...

Страница 78: ...ponents such as the relationship management service assume that most adapters support a set of standard create retrieve update and delete operations This leaves a gap for most adapters where the suppo...

Страница 79: ...ption intended to replace RetrieveByContent RetrieveAll should always return a top level container with 0 n matching child business objects It should never return a single top level matching business...

Страница 80: ...rs have historically made a best effort and defaulted to an update in such cases Such adapters attempted to interpret the request and make every effort to complete it ApplyChanges operation The applyC...

Страница 81: ...If key values are not specified in the input business object but the EIS requires them v If the top level verb if provided is not Create assertion optional The EISSystemException exception is thrown...

Страница 82: ...Perform a recursive delete on the entities represented by the input business object starting from the lowest level entities and ascending to the top level entity non contained entities should be left...

Страница 83: ...s object that meets user defined criteria whereas RetrieveAll returns multiple matching business objects For example use Retrieve to find Customer where id abc123 and RetrieveAll to find all Customers...

Страница 84: ...EIS provides native ResultSet support or if it makes sense then adapter developers are encouraged to implement the CCI ResultSet interfaces to provide customers with a high performance alternative to...

Страница 85: ...o that users can either increase their limit or refine their search appropriately EISSystemException is thrown if the EIS reports any unrecoverable errors Custom operations Adapters support custom ope...

Страница 86: ...mation mechanism in the adapter to convert EIS events to WebSphere business objects for use by target business processes Inbound event notification Using the IBM WebSphere Foundation Classes for inbou...

Страница 87: ...thXid is treated as a connection If the user sets MaximumConnections to a value greater than 1 and the delivery type is set to a value other than ORDERED multiple threads will be used in delivery and...

Страница 88: ...ds There are no hard and fast rules governing the structure or content of an event record in the event store The goal is to provide enough information for the EventStore interface implementation to su...

Страница 89: ...re strongly advised against mandating any specific EIS entity name to business object type mapping schemes Business object properties and names are unreliable because they can be modified by users To...

Страница 90: ...event due to one or more problems FAILED Unsubscribed The adapter processed the event but found no interested subscribers UNSUBSCRIBED XID The XAResource uses this string field to track transaction ID...

Страница 91: ...pecific component periodically polls the message box for new event messages Other applications have no built in event detection mechanism but have other ways of providing information when application...

Страница 92: ...requires the most adapter development effort As the location and structure of each event store is application specific the EventStoreWithXid interface provides the Foundation Classes with a common mea...

Страница 93: ...ld return true otherwise it should return false Event getSpecificEvent String eventId This method should reconstruct a complete event object for the event identifier This will most likely require that...

Страница 94: ...ou must create a new separate WebSphere event table there The table then functions as the event store for event records Each column of the table would reflect one of the fields mentioned in Table 1 ea...

Страница 95: ...o TopLevelVerb the function name emitted might be emitDeltaCustomer Error handling for events Event error handling depends on the delivery type and the kind of endpoint involved If the endpoint throws...

Страница 96: ...WAY Request and response callback events A request and response callback event is a synchronous operation in which the EIS sends a callback call to the adapter and waits for the adapter to respond to...

Страница 97: ...of adapter foundation classes common component The CallbackEventSender API is integral to the adapter foundation classes EIS Adapter Callback From EIS Message Delivery with optional return Client sys...

Страница 98: ...d be delivered by calling target method on the inbound listener with ActivationSpecWithXid as additional argument v CallbackEventSender ArrayList ActivationSpecWithXid LogUtils Constructor used for ev...

Страница 99: ...dPointList aSpec logger getLogUtils Refer to the Callback event sender constructors section for more information Note The adapter listener creates the worker threads to take care of calling and gettin...

Страница 100: ...w described in Callback event processing for basic delivery becomes more complex For more complex scenarios CallbackEventSender creates an instance of XA to bring the delivery under a new transaction...

Страница 101: ...nder Here adapterListener decides which method to invoke out of the four defined Lets consider the adapter calls sendEventWithNoReturn as shown in the sequence diagram Once the program control gets in...

Страница 102: ...e one only delivery mechanism During real time event processing if any component of the business integration system fails then the adapter must process the events that are not completed and not proces...

Страница 103: ...cting with any other JCA adapter as described in the JCA specification The basic idea is as follows 1 A CCI client for example an EJB or other business process looks up a connection factory for the ad...

Страница 104: ...hentication mechanism the JCA architecture supports two commonly used mechanisms BasePassword authentication and Kerberos authentication Use the authentication mechanism type element of the resource a...

Страница 105: ...nt accessor pairs e g setValue Integer i rather than setValue int i The accessor pairs get and set EIS specific outbound configuration properties and logic This is the means by which property change e...

Страница 106: ...ife cycle Subclass methods to implement 1 public ManagedConnection WBIManagedConnectionFactory mcf Subject subject WBIConnectionRequestInfo This constructor should connect to the EIS instance and main...

Страница 107: ...The JCA container may need to access the XAResource LocalTransaction or other features of the managed connection for recovery and so on before any client even issues a first request WBIConnectionFacto...

Страница 108: ...c operations WBIInteraction implements an interaction interface to provide implementations for noncritical methods Subclasses implement the execution interfaces Subclass methods to implement Record ex...

Страница 109: ...x resource cci InteractionSpec instance contains properties that identify the operation to perform on the EIS WBIInterationSpec implements InteractionSpec and provides functionName and maxRecords prop...

Страница 110: ...client to demarcate the beginning and end of transactional operations with a single EIS application The two phase commit protocol which is a superset of the one phase protocol enables transactions to...

Страница 111: ...ing transactions or not when modifying the EIS Note When overriding methods do not invoke the super implementations of these methods since the Adapter Foundation Classes simply throw exceptions for th...

Страница 112: ...r construction greatly because the comparison routines can be generic Advantages of the command pattern include v Code Reuse The only code that the adapter developer would need to write would be the E...

Страница 113: ...o the incoming object tree The comparison finds that child B1 is deleted Accordingly the resulting command structure has a Delete command in that position Command Manager Retrieve scenario Note This b...

Страница 114: ...aring the command manager reads the change summary for the intended changes Note that since a child object might be changed without any change to the parent object and since many EIS systems require a...

Страница 115: ...B1 is created and is part of the change summary The resulting command structure will contain a Create command for child B1 and will have NO OPERATION parents linking it back to the top level parent W...

Страница 116: ...anager compares the cursor record structure inside the EIS the before image with that of the incoming after image cursor Based on the comparison the Command Manager constructs a hierarchical represent...

Страница 117: ...l cursor only there is no need to apply the XXX operation to all child cursors As it begins to process children of the root object the Command Manager iterates through the properties for the top level...

Страница 118: ...d to execute Each command has an order associated with it that is set when the command is created The order attribute of each command may be BEFORE_PARENT or AFTER_PARENT If the order attribute of a c...

Страница 119: ...ntire object structure and return it because the input object is unaware of child objects present in the EIS It is a common pattern to have an abstract base command for your EIS and then have the oper...

Страница 120: ...of the JCA CCI interface The interaction class is part of the JCA CCI interface and processes records as input and output This is the API that is exposed for manipulating data in outbound operations...

Страница 121: ...ter enterprise metadata EMD implementation to use the RecordGenerator class Type mappings Bean properties map to the attributes of a given complex type The types of the simple attributes are derived f...

Страница 122: ...ode3 above are all mapped to the java lang Integer type JavaBean Metadata ASI format The metadata is derived mostly from the structure of the bean Other metadata such as containedType and maxLength ar...

Страница 123: ...otation the generator would create an entry in the Map with the name of the element as the key v If the element is a simple type with single cardinality then the value of this element is added to the...

Страница 124: ...ame ErrorDetail minOccurs 0 maxOccurs 1 type string sequence complexType For the above metadata the object level annotations map generated for the JavaBeanRecord would look like the following public s...

Страница 125: ...v Object level metadata This includes the information about what type is being processed v Operation level metadata This is context specific object metadata that is valid for the operation being proce...

Страница 126: ...amespace is the package and the name is the class name Class SDOFactory SDOFactory creates an SDO instance the implementation of which will depend on what version of SDO is in the classpath v DataObje...

Страница 127: ...ct metadata is needed E g for Create operation there is a specific sequence of APIs that have to be executed this set could be different for Update and Delete operations This method returns the metada...

Страница 128: ...in support of multiple brokers The following artifact types are supported by adapter foundation classes 1 Data Bindings Data Binding classes generated by enterprise metadata discovery to support WebSp...

Страница 129: ...ional if property getValue equals EMDConstants DATA_BINDINGS dataDescription setName WBIDataDescriptionImpl convertNamespaceToUri namespace metadataObj getBOName toLowerCase bg metadataObj getBOName B...

Страница 130: ...tion information that characterizes system function and object interactions System Capabilities At the system level the metadata describes the types of information managed by the EIS system This is re...

Страница 131: ...user experience to the tool user Service metadata Service metadata is generated by the adapter as business objects are imported into a service description Service metadata includes the service name an...

Страница 132: ...ion interfaces and metadata edit capabilities Enterprise metadata discovery architecture Note The solid arrows represent the enterprise metadata discovery implementation in the above diagram The compo...

Страница 133: ...the configuration of a resource adapter or a service This interface implementation is provided by the resource adapter provider or a third party discovery service provider Metadata discovery This prim...

Страница 134: ...onnection configuration instance information for outbound and inbound directions ConnectionType is a factory for ConnectionConfiguration instances The enterprise metadata discovery tool uses the insta...

Страница 135: ...nd connection types the mapping of inbound connection is to Activation Specs as many activation specs an adapter supports than many inbound connection types would have to be supported The following in...

Страница 136: ...implementation For example one implementation might display the properties of the nodes or MetadataObject in the MetadataTree model Another implementation might display function parameters as nodes in...

Страница 137: ...perties in MetadataObject that might make fetching of child objects more efficient and usable For example for JDBC if the node represents a schema you might define a filter to fetch tables by name rat...

Страница 138: ...e for this property is the name of Generic Function selector provided by the Adapter Foundation Classes The discovery service can override the default value Function selector The function selector pro...

Страница 139: ...ce of the ManagedConnectionFactory JavaBean that will be used to configure an instance of the ManagedConnectionFactory at run time for creating outbound connections Function descriptions Function desc...

Страница 140: ...is common to inbound and outbound service It includes a definition of the structure and content of adapter business objects that will be passed between the client and adapter at run time Each DataDes...

Страница 141: ...This will reduce the effort for individual discovery service implementations as they do not use XML parsers or general string concatenation functions to prepare the XML schema definitions BusinessObj...

Страница 142: ...plication specific information statement For example WBI v NameSpace Added to application specific information clause v Name value pairs for application specific information properties HashMap For exa...

Страница 143: ...me j2c app name emd LogMessages properties to capture logging and tracing resource bundles The property groups representing resource adapter managed connection factory and the Activation Specification...

Страница 144: ...able with rows and columns Each column is represented by the PropertyDescriptor instance and each cell corresponding to a given row and column is represented by a SingleValuedProperty implementation v...

Страница 145: ...mation from an EIS and building MetadataObject instances you can use the progress monitor While you are running the discovery service the progress monitor can capture information on current processes...

Страница 146: ...that ID or the input ID getMetadatatree This method returns an instance of the WBIMetadataTreeImpl implementation Each enterprise metadata discovery implementation extends the WBIMetadataTreeImpl cla...

Страница 147: ...iption Selected Service Type is Inbound inbound true if inbound description createInboundServiceDescription importSelection selection nameSpace else description createOutboundServiceDescription import...

Страница 148: ...me This way the property group for discovery can display properties needed to perform the discovery and not the entire set of properties describing ResourceAdapter and ManagedConnectionFactory propert...

Страница 149: ...must extend WBIOutboundConnectionConfugurationImpl and an instance of that class should be returned in this method public OutboundConnectionConfiguration createOutboundConnectionConfiguration if conf...

Страница 150: ...below Note that all methods that create instances of property groups should initialize them with the applied properties You can do this with a utility method provided in the EMDUtil class as shown be...

Страница 151: ...MDUtil getPropertyGroup ra catch Exception e throw new NullPointerException e getMessage return adapterProp createManagedConnectionFactoryProperties The createManagedConnectionFactoryProperties method...

Страница 152: ...ve true show it as on display property setDisplayName WBIMetadataDiscoveryImpl getPropertyName Password property setDescription WBIMetadataDiscoveryImpl getPropertyDescription Password credentialPrope...

Страница 153: ...n class The enterprise metadata discovery implementation extends WBIMetadataSelectionImpl and returns an instance of that class in this method public MetadataSelection createMetaDataSelection return n...

Страница 154: ...ific location Each MetadataObject instance that is added to the MetadataTree should have a unique location such that when the tool calls this method the enterprise metadata discovery implementation ca...

Страница 155: ...ies method returns a property group that provides information about the specific object in MetadataTree This helps inform the user about the metadata object instance Implementation should return null...

Страница 156: ...AppliedSelectionProperties null EMDUtil copyValues this getAppliedSelectionProperties propertyGroup typeProp addPropertyChangeListener operationProp catch MetadataException e throw new RuntimeExceptio...

Страница 157: ...tionImpl samples WBIDataDescriptionImpl represents the data description interface This interface maps business object definitions to Java objects prepareChildSchemaFiles The prepareChildSchemaFiles me...

Страница 158: ...to the annotation section for the element definition public WBIMetadata getMetadataForAttribute String attrName WBIMetadata attributeMetadata new WBIMetadata attributeMetadata setSource Constants ASI...

Страница 159: ...urns the XML schema definition type that represents the element or field of the object definition public String getType String attrName if getCardinality attrName Constants N_CARDINALITY return attrNa...

Страница 160: ...e application specific information schema public String getASISchemaName return Constants ASI_TARGET_NAMESPACE getCardinality The getCardinality method returns the cardinality for an elements in the b...

Страница 161: ...ties iterate through the objects for int i 0 i selectedObjects length i WBIMetadataImportConfigurationImpl spec WBIMetadataImportConfigurationImpl selectedObjects i WBIInboundFunctionDescriptionImpl f...

Страница 162: ...igurationImpl importConfiguration WBIMetadataImportConfigurationImpl supportedObjects i WBIOutboundFunctionDescriptionImpl outboundFunctionDescription WBIInteractionSpec interactionSpec TwineBallMetad...

Страница 163: ...technology adapters Version 1 1 of Enterprise Metadata Discovery includes enhancements for configurable data handlers function selectors and data bindings and a way to build service descriptions usin...

Страница 164: ...utStream for accessing raw data and data object for the transformed version exclusively Implement the TransformInto method in a data handler to transform a data object by writing to an output stream s...

Страница 165: ...The data binding can call a data handler to perform low level transformation on an input stream The adapter foundation classes provide a base class named BaseDataBinding that adapters can extend to ha...

Страница 166: ...EditableType implementation for this artifact The EditableType class implements the commonj connector metadata discovery EditableType interface which contains the following methods v PropertyGroup cre...

Страница 167: ...elected operation This is particularly useful for determining whether this is input output the input or output are the same or different v String getDefaultDataBindingClassName This method returns the...

Страница 168: ...folder Here is an example of the discovery service xml file xml version 1 0 encoding utf 8 emd discoveryService xmlns emd commonj connector xmlns j2ee http java sun com xml ns j2ee xmlns xsi http www...

Страница 169: ...actory metadata objectNaming new ObjectNaming objectSerializer new ObjectSerializer objectNaming try objectAnnotations super getMetadata getAnnotations TwineBallConstants METADATA_NAMESPACE catch Exce...

Страница 170: ...name if object null throw new ResourceException Invalid metadata defined for the input Data set the instantiated object would be accessed later this setEISRepresentation object catch Exception e throw...

Страница 171: ...hod public Object clone Build a new record TwineBallStructuredRecord record new TwineBallStructuredRecord try Copying property values record twineBallConnection twineBallConnection record objectNaming...

Страница 172: ...nerated method stub try record new TwineBallStructuredRecord inputBG arg0 DEFactorySDO binding new DEFactorySDO DataObject dataObject arg0 getDataObject WPSServiceHelper getRootBusinessObjectProperty...

Страница 173: ...generated databinding classes described the section DataBinding generator provide the implementation for the abstract methods DataBinding generator To enable the right business object type being made...

Страница 174: ...DataBinding model in that when an exception is thrown by an adapter a fault selector determines that it is a fault and the fault data binding converts the exception to a fault business object and retu...

Страница 175: ...lt Implementing faults As part of the external service discovery process you generate fault business objects and create the method that copies them to your outbound module The following examples show...

Страница 176: ...e parameter For ex an operation may have more than one fault And so the below logic will have to be using conditions if operationName equals CREATE then do this etc JDEXMLListFaultDataDescription fdes...

Страница 177: ...Added for Faults addFaultsToBFDataDescriptionBasedOnOperationName funcDesc operation Added for Faults funcDesc setName operation toLowerCase dataDesc getBOName funcDesc setInputDataDescription dataDes...

Страница 178: ...aultName null public String getFaultName TODO Auto generated method stub return faultName public void setFaultName String faultName this faultName faultName Configuration for fault handling Adapter Fo...

Страница 179: ...ned from a database query exceed the maximum number of records property in the interaction specification MISSING_DATA com ibm j2ca extension emd runtime WBIFaultDataBindingImpl If the business object...

Страница 180: ...ion The JCA 1 5 specification provides minimal support for communicating information to users It defines a single stream to which the adapter writes any and all information As a result without additio...

Страница 181: ...User names Password Environment and Role v The URL used to connect to the The following types of information are not considered potentially sensitive data and will not be hidden v The contents of the...

Страница 182: ...res One of them is informational The other is associated with an exception void traceConfidential Level l String classname String method String msg Object confidentialData void traceConfidential Level...

Страница 183: ...llow users to adjust the level of detail Consult the guidelines shown in the following table to determine which trace level to assign to a trace message Table 5 Trace level indicators Level Indicator...

Страница 184: ...ent identifier of ABCDE and a message number of 0001 The message type E tells you this is an error message The component identifier must be registered with IBM to avoid conflicts between products The...

Страница 185: ...resources Audit A Significant event affecting server state or resources Info I General information outlining overall task progress Writing a log message Use the log method of the LogUtils class to gen...

Страница 186: ...ntial Level l String classname String method String msgKey Object params CBEEngineData engineData In an outbound or inbound scenario to get the LogUtils object instance in WebSphere Integration Develo...

Страница 187: ...d organizes the data into a tree structure v Using Application response measurement ARM to monitor the availability and performance of applications Common Event Infrastructure CEI The Common Event Inf...

Страница 188: ...nt source is an adapter An event source is used to retrieve event points in order to send monitoring events to a CEI logger package com ibm j2ca extension monitoring CEI An event source represents a m...

Страница 189: ...onitoring event It is a convenient method for payloads with list of data elements void fire String names Object values Unique Id The Unique Id interface can be used to uniquely identify event points E...

Страница 190: ...plexType name WBI JCAAdapter Polling STOPPED complexContent extension base wbi WBIMonitoringEvent extension complexContent complexType schema Extending Common Event Infrastructure logging on WebSphere...

Страница 191: ...n applications and the WebSphere Business Integration system itself and publish the results of this observation By using Performance Monitoring Infrastructure PMI you can observe the progress of adapt...

Страница 192: ...vents payload or extended element for each event type that can be emitted for the data elements Content of schema looks like following xml version 1 0 encoding UTF 8 EventSpec xmlns http www ibm com x...

Страница 193: ...abled fire event for Entry Exit and Failure Entry event is fired in the beginning of the method call exit event is fired in the end of the method call and failure event is fired in case of exception F...

Страница 194: ...ction execute method An ARM agent such as Tivoli Composite Application Manager for Response Time Tracking can perform response time collection and analysis To enable extend ARM different brokers need...

Страница 195: ...ARM statistics by calling postInteraction ctx InteractionMetrics RM_ARM_GOOD ispec 7 In case of exception call postInteraction ctx InteractionMetrics RM_ARM_FAILED ispec For details about interaction...

Страница 196: ...e and how to declare a concrete pointcut typically using simple scoping primitive pointcuts Figure 1 illustrates the simple aspect Example_1 that adds FFDC to all classes in the com foo package The ex...

Страница 197: ...it excludes FFDC for class com foo Goo by using the and operators to form a pointcut expression Figure 9 Add FFDC to all classes in the com foo package excluding com foo Goo import com ibm websphere...

Страница 198: ...t call FFDC directly Use FFDCSupport aspect public pointcut dumpException call void Throwable printStackTrace declare warning dumpException ffdcScope Don t dump exceptions to console Use FFDCSupport a...

Страница 199: ...file The developer should log this high level message after raising the exception so that general users can see an explanation of the error in their native language Changing the Java logging API sett...

Страница 200: ...w Module Name in the New Module window Click Finish 5 Open the external service by clicking the File New External Service 6 In the External service window expand Adapters and select the adapter name e...

Страница 201: ...ethods to execute functions Because the goal is to test the adapter in unmanaged mode you must run the adapter outside of a JCA container Validating the adapter in unmanaged mode testing the adapter a...

Страница 202: ...ics 5 Inspect the result of the output by getting the bound object of the data exchange factory of the output record 1 Create a new WBIRecord 2 Create a business object populate it with data and place...

Страница 203: ...nd execute TwineBall JUnit To build and execute TwineBalll JUnit perform the following steps 1 Import in the Twineball or KiteString source code from the samples gallery 2 Find the testcase you want t...

Страница 204: ...r for example on an AIX HP UX or Solaris workstation that is running WebSphere Process Server then you must install this patch The patch is located on the WebSphere Process Server ifix website and con...

Страница 205: ...oke in the top right corner of the Assembly Editor Saving business object data You can use Datapool to save business object data during testing This eliminates the need to reenter business data with e...

Страница 206: ...efault execution trace files have a file extension of wbiexetrace 3 Click Finish The selected execution trace opens in a new instance of the test client 4 Save the execution trace a In the test client...

Страница 207: ...mentation from the first option c Add a wire by clicking the export and dragging it to the component Wiring a component d Click OK in the next window e Right click the component and select Generate Im...

Страница 208: ...ht click and select Test Attach The test client displays the Events window 6 Examine the window for an export monitor 7 Return to the Events tab and click Continue The Deployment Location displays 8 S...

Страница 209: ...universal test client UTC to send data to the adapter 1 Run EMD In Rational Application Developer EMD can be accessed via New Other J2C JavaBean The output of EMD will be JavaBeans for your schema def...

Страница 210: ...alone component 5 Click Finish to generate the code Once the EJB is generated you can send data to the adapter and examine the return values using the UTC 6 Use the UTC to validate that the adapter c...

Страница 211: ...7 Start UTC using the Run universal test client option WebSphere Adapter development overview 205...

Страница 212: ...ebSphere Integration Developer If the target server the server on which you will install the EAR file is not listed in the Servers window of WebSphere Integration Developer you must add it v Steps 3 t...

Страница 213: ...ve console from the menu 3 Export and deploy an EAR file a In the J2EE Perspective right click the adapter EAR file b Select Export EAR file from the pop up menu c When prompted specify the filename w...

Страница 214: ...CCI is closely modeled on the client interface used by Java Database Connectivity JDBC and is similar in its idea of Connections and Interactions The generic CCI classes define the environment in whic...

Страница 215: ...d on the Adapter Foundation Classes IBM WebSphere Process Server Enables deployment of standards based integration applications in a service oriented architecture SOA IBM WebSphere Integration Develop...

Страница 216: ...Sphere business integration applications and the WebSphere business integration system itself and publish the results of this observation Request In a request and response interaction the role perform...

Страница 217: ...ration Licensing 2 31 Roppongi 3 chome Minato ku Tokyo 106 0032 Japan The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with loca...

Страница 218: ...IBM has not tested those products and cannot confirm the accuracy of performance compatibility or any other claims related to non IBM products Questions on the capabilities of non IBM products should...

Страница 219: ...ternational Business Machines Corporation in the United States other countries or both These and other IBM trademarked terms are marked on their first occurrence in this information with the appropria...

Страница 220: ...214 WebSphere Adapters WebSphere Adapter Toolkit User Guide...

Страница 221: ...5 40 classes outbound JCA adapter 49 Client Interface CCI Common 4 command pattern classes 43 Common Client Interface CCI 4 Config Property 67 Connection 49 Connection Definition Property 67 Connectio...

Страница 222: ...re 181 184 Common Event Infrastructure CEI 181 element schema 183 Event point 182 Event source 182 EventSourceContext 181 InboundEventDelivery 185 InboundEventRetrieval 185 interface 181 logging 184 O...

Страница 223: ...WBILocalTransaction 35 WBIManagedConnection 35 100 WBIManagedConnectionFactory 35 99 WBIMetadataDiscoveryImpl 39 139 WBIMetadataEditImpl 39 151 WBIMetadataImportConfigurationImpl 39 150 WBIMetadataObj...

Страница 224: ...218 WebSphere Adapters WebSphere Adapter Toolkit User Guide...

Страница 225: ......

Страница 226: ...Printed in USA...

Отзывы: