background image

targetNamespace="http://www.ibm.com/xmlns/prod/websphere/scdl/eis/6.0.0:JCAAdapter"

xmlns:er="http://www.ibm.com/xmlns/prod/websphere/recovery/6.0.0/es/eventpayloads"

>
<Event name="ResourceAdapter.Polling.STARTED" situationType=
"STATUS" situationCategory="ReportSituation"
reasoningScope="EXTERNAL" parent="WBI.MonitoringEvent">

<Payload>

<Data name="PollFrequency" type="int" minOccurs="0" maxOccurs="1"/>
<Data name="PollQuantity" type="int" minOccurs="0" maxOccurs="1"/>

</Payload>

</Event>

3.

Invoke Events

import com.ibm.j2ca.extension.logging.internal.cbe.EngineData;

...

CBEEngineData engineData = CBEEngineDataFactory.getEngineDataForEventType("Polling");
//This will instantiate the EngineData class for user defined event e.g "Polling".
engineData.setValue("EventAction","STARTED");
//This will set the user defined action e.g. "Started"
engineData.setValue("PollFrequency", activationSpec.getPollPeriod());
//This will set the user defined arg
engineData.setValue("PollQuantity", activationSpec.getPollQuantity());
//This will set the user defined arg

Performance monitoring infrastructure (PMI) for resource adapters:

The Performance Monitoring Infrastructure (PMI) is the underlying framework in
WebSphere Application Server that gathers performance data from various runtime
resources such as adapters.

The purpose of monitoring is to observe the progress of execution of WebSphere
Business Integration 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 adapters running in the
server runtime environment and other business integration applications, and
publish the results. PMI collects data, such as average response time and total
number of requests, from various components in the server, and organizes the data
into a

tree structure

. You can observe data through the

Tivoli Performance Viewer

,

a graphical monitoring tool that is included with WebSphere Application Server..

You can monitor the performance of the adapters by having PMI collect data at the
following points:

v

v

InboundEventRetrieval:
Will monitor performance of retrieving events from the EIS. It enables
monitoring of entering, exiting, failing of the EventManager.getEvents() method.

v

InboundEventDelivery:
Will monitor the performance when resource adapter deliver data to the
endpoint, which conveys changes in or general information from the EIS. It
enables monitoring of entering, exiting, failing of the EventSender.doSendEvent()
method.

v

Outbound:
Will monitor the performance of outbound processing of a resource adapter. It
enables monitoring of entering, exiting, failing of the WBIInteraction.execute()
method.

Extending PMI on WebSphere Process Server:

To add a user-defined element or method into the list of monitorable components
you need to modify code and schema files.

WebSphere Adapter development overview

185

Summary of Contents for WebSphere Adapter Toolkit

Page 1: ...WebSphere Adapters WebSphere Adapter Toolkit User Guide Version 6 Release 2 Version 6 Release 2...

Page 2: ......

Page 3: ...WebSphere Adapters WebSphere Adapter Toolkit User Guide Version 6 Release 2 Version 6 Release 2...

Page 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...

Page 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...

Page 6: ...iv WebSphere Adapters WebSphere Adapter Toolkit User Guide...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 45: ...l v InboundServiceDescription extends com ibm j2ca extension emd description WBIInboundServiceDescriptionImpl v MetadataDiscovery extends com ibm j2ca extension emd discovery WBIMetadataDiscoveryImpl...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 57: ...ector discovery MetadataConnection v OutboundConnectionConfiguration implements commonj connector discovery OutboundConnectionConfiguration v OutboundConnectionType implements commonj connector discov...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 129: ...ional if property getValue equals EMDConstants DATA_BINDINGS dataDescription setName WBIDataDescriptionImpl convertNamespaceToUri namespace metadataObj getBOName toLowerCase bg metadataObj getBOName B...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 147: ...iption Selected Service Type is Inbound inbound true if inbound description createInboundServiceDescription importSelection selection nameSpace else description createOutboundServiceDescription import...

Page 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...

Page 149: ...must extend WBIOutboundConnectionConfugurationImpl and an instance of that class should be returned in this method public OutboundConnectionConfiguration createOutboundConnectionConfiguration if conf...

Page 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...

Page 151: ...MDUtil getPropertyGroup ra catch Exception e throw new NullPointerException e getMessage return adapterProp createManagedConnectionFactoryProperties The createManagedConnectionFactoryProperties method...

Page 152: ...ve true show it as on display property setDisplayName WBIMetadataDiscoveryImpl getPropertyName Password property setDescription WBIMetadataDiscoveryImpl getPropertyDescription Password credentialPrope...

Page 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...

Page 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...

Page 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...

Page 156: ...AppliedSelectionProperties null EMDUtil copyValues this getAppliedSelectionProperties propertyGroup typeProp addPropertyChangeListener operationProp catch MetadataException e throw new RuntimeExceptio...

Page 157: ...tionImpl samples WBIDataDescriptionImpl represents the data description interface This interface maps business object definitions to Java objects prepareChildSchemaFiles The prepareChildSchemaFiles me...

Page 158: ...to the annotation section for the element definition public WBIMetadata getMetadataForAttribute String attrName WBIMetadata attributeMetadata new WBIMetadata attributeMetadata setSource Constants ASI...

Page 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...

Page 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...

Page 161: ...ties iterate through the objects for int i 0 i selectedObjects length i WBIMetadataImportConfigurationImpl spec WBIMetadataImportConfigurationImpl selectedObjects i WBIInboundFunctionDescriptionImpl f...

Page 162: ...igurationImpl importConfiguration WBIMetadataImportConfigurationImpl supportedObjects i WBIOutboundFunctionDescriptionImpl outboundFunctionDescription WBIInteractionSpec interactionSpec TwineBallMetad...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 169: ...actory metadata objectNaming new ObjectNaming objectSerializer new ObjectSerializer objectNaming try objectAnnotations super getMetadata getAnnotations TwineBallConstants METADATA_NAMESPACE catch Exce...

Page 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...

Page 171: ...hod public Object clone Build a new record TwineBallStructuredRecord record new TwineBallStructuredRecord try Copying property values record twineBallConnection twineBallConnection record objectNaming...

Page 172: ...nerated method stub try record new TwineBallStructuredRecord inputBG arg0 DEFactorySDO binding new DEFactorySDO DataObject dataObject arg0 getDataObject WPSServiceHelper getRootBusinessObjectProperty...

Page 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...

Page 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...

Page 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...

Page 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...

Page 177: ...Added for Faults addFaultsToBFDataDescriptionBasedOnOperationName funcDesc operation Added for Faults funcDesc setName operation toLowerCase dataDesc getBOName funcDesc setInputDataDescription dataDes...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 190: ...plexType name WBI JCAAdapter Polling STOPPED complexContent extension base wbi WBIMonitoringEvent extension complexContent complexType schema Extending Common Event Infrastructure logging on WebSphere...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 211: ...7 Start UTC using the Run universal test client option WebSphere Adapter development overview 205...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 220: ...214 WebSphere Adapters WebSphere Adapter Toolkit User Guide...

Page 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...

Page 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...

Page 223: ...WBILocalTransaction 35 WBIManagedConnection 35 100 WBIManagedConnectionFactory 35 99 WBIMetadataDiscoveryImpl 39 139 WBIMetadataEditImpl 39 151 WBIMetadataImportConfigurationImpl 39 150 WBIMetadataObj...

Page 224: ...218 WebSphere Adapters WebSphere Adapter Toolkit User Guide...

Page 225: ......

Page 226: ...Printed in USA...

Reviews: