IBM WebSphere Adapter Toolkit User Manual

Manual is about: Version 6 Release 2

Summary of WebSphere Adapter Toolkit

  • Page 1

    Websphere ® adapters websphere adapter toolkit user guide version 6 release 2 version 6 release 2.

  • Page 3

    Websphere ® adapters websphere adapter toolkit user guide version 6 release 2 version 6 release 2.

  • Page 4

    Note before using this information and the product it supports, read the information in “notices” on page 211. December 2008 this edition applies to version 6, release 2, modification 0 of and to all subsequent releases and modifications until otherwise indicated in new editions. To send us your com...

  • Page 5: Contents

    Contents websphere adapter toolkit . . . . . . 1 ibm websphere adapter toolkit technology overviews . . . . . . . . . . . . . . . 2 ibm websphere adapters . . . . . . . . . 2 architectural overview . . . . . . . . . . 4 how metadata is used at build time and run time 7 using enterprise metadata disc...

  • Page 6

    Iv websphere adapters: websphere adapter toolkit user guide.

  • Page 7: Websphere Adapter Toolkit

    Websphere adapter toolkit the ibm ® websphere ® adapter toolkit provides the development tools, libraries and sample code to assist you in creating jca resource adapters. With the toolkit you may create either of the following: v a resource adapter based on the interfaces defined by the jca resource...

  • Page 8

    The development process using the ibm websphere adapter toolkit includes the following as shown in the illustration: 1. Run the new jca resource adapter project wizard. The wizard generates a resource adapter deployment descriptor and code. The code can include sequence of calls, log and trace messa...

  • Page 9

    Inbound event notification complements outbound request processing, enabling adapters to provide bidirectional communication between business processes and eis applications. The ibm websphere adapter portfolio of adapters is based on the java 2 platform, enterprise edition (j2ee) standard. Jca is a ...

  • Page 10

    Websphere adapters utilize a format-independent data model for representing data objects. In a websphere process server or websphere enterprise service bus runtime environment, websphere adapters use an extension of the service data objects (sdo) for representing data objects. Architectural overview...

  • Page 11

    Processing performed by each component (and subcomponent) in the model is described in sections that follow the illustration. The component model allows for a single architecture for adapter development and evolution. It uses recognized standards but extends them as necessary, for example with high ...

  • Page 12

    The connectivity subcomponent interacts with the target enterprise information system’s specific libraries and functionality. The subcomponent is exposed to the application interface component through standard jca cci interfaces, which include connection, connectionfactory, interaction and interacti...

  • Page 13

    The appropriate programming model. It is responsible for mapping the specific invocation to the invocation of the connector component through the jca common client interface (cci). The component developer who has knowledge of the connector invocation interfaces and the runtime programming model, del...

  • Page 14

    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 using these configured artifacts and existing schemas. For information on implementing interfaces for technology-style ada...

  • Page 15

    – the new connector project wizard - prompts you to specify information about the resource adapter you wish to develop, and then generates code and a deployment descriptor. The code generated by the wizard can include sequence of calls, log and trace messages and comments. – resource adapter deploym...

  • Page 16

    V generate a resource adapter deployment descriptor you can view and edit this deployment descriptor using the resource adapter deployment descriptor editor. Resource adapter deployment descriptor editor overview this multi-page editor allows you to display, configure, and validate the resource adap...

  • Page 17

    Ibm websphere adapter toolkit tasks the tasks range from installing the toolkit, samples, and adapter foundation classes (using the eclipse update manager in websphere integration developer) to implementing and validating your code. Table 1. Websphere adapter toolkit tasks task task description vali...

  • Page 18

    Operating system versions windows 2000 windows 2000 professional (sp4) windows 2000 server (sp4) windows 2000 advanced server (sp 4) windows xp windows xp sp 2 windows 2003 windows server 2003 standard windows server 2003 enterprise hardware requirements the table shows the hardware requirements for...

  • Page 19

    This documentation describes how to run the twine ball sample only. However, you can apply the instructions for running and testing the twine ball sample to the kite string sample. The sample instructions accommodate creating an adapter for the twine ball sample using websphere integration developer...

  • Page 20

    This launches the samples. C. From the samples navigation pane, select technology samples and expand java and websphere adapters so that the twine ball and kite string samples display. D. Click twine ball to display a description of the twine ball sample in the viewing pane of the technology samples...

  • Page 21

    C. Optional: deselect the add project to an ear check box. 4. Click finish. A dialog prompts you to open the j2ee perspective. Click yes to finish the process of importing the deployable rar file for the twine ball sample into your workspace. Now you can perform external service discovery for the tw...

  • Page 22

    4. Click next to launch the new external service window. 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 click next. 16 websphere adapters: websp...

  • Page 23

    7. From the processing direction window, select outbound and click next. 8. From the discovery 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 objec...

  • Page 24

    10. From the configure composite properties window, 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 websphere adapters: websphere adapter toolkit us...

  • Page 25

    12. From the service location properties window, click new. This launches the 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 displays in the project ex...

  • Page 26

    15. Click finish from the service location properties window to add the outbound interface to the module. 16. You are prompted on whether you want to update the model, select yes. Run the external service discovery process again to add the inbound interface to the module. Run external service discov...

  • Page 27

    4. Click next to launch the new external service window. 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 click next. Websphere adapter developmen...

  • Page 28

    7. From the processing direction window, select inbound and click next. 8. From the 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 window then clic...

  • Page 29

    10. From the configure composite properties window select next. 11. From the service generation and deployment configuration window, deselect specify a java authentication and authorization services (jass) alias security credential . Websphere adapter development overview 23.

  • Page 30

    12. From the service location properties window, click finish to add the inbound interface to the module. 13. You are prompted on whether you want to update the model, select yes. You should see the inbound and outbound interfaces in the viewing area of the assembly diagram editor: modify the module...

  • Page 31

    A. In the viewing pane of the assembly diagram, right click and select add → java to add a java component to the diagram 2. Add a wire from the inbound interface to the new java component. A window displays to inform you that your actions will allow the service to be used in other modules. Click ok....

  • Page 32

    4. Run the administrative console and verify the module is installed and running. 5. Test the module by performing the following steps: a. Change to the business integration perspective b. Right click on the module and select test → test module c. Populate the customer object fields with data. D. Cl...

  • Page 33

    6. In java creation and deployment configuration, make the following selections: v select create new project name and enter a name for the project, for example, demo. V enter a name in the create new package name field, for example pckg v provide an interface name in the interface name field, for ex...

  • Page 34

    6. On left side select ejbsessionbean1 and click customer createcustomer(customer) enter input customer parameters troubleshooting the samples you may need to troubleshoot issues that arise when creating or running the samples. Errors the following errors may result when working with the sample code...

  • Page 35

    Launching the new connector project wizard you launch the wizard from ibm websphere integration developer. Make sure you have met all of the installation requirements and that you have successfully installed websphere integration developer and the websphere adapter toolkit plug-ins. Launch the new c...

  • Page 36

    Select a wizard dialog 5. Start the wizard. Expand thejava ee folder, choose 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 adapter properties. 30 ...

  • Page 37

    Specify project properties you name your connector project, optionally adding it to an enterprise application project. You also specify the configuration used for developing the resource adapter. You perform all of these tasks from the connector project dialog. Connector project dialog 1. Name your ...

  • Page 38

    Specify project facets as part of the process of creating a project, you specify project facets. A project facet represents a unit of functionality in the project. Project facets define characteristics and requirements for projects. When you add a facet to a project, that project is configured to pe...

  • Page 39

    2. Click next to advance to the resource adapter properties page. Now you are ready to set the properties for the resource adapter. Specify resource adapter properties resource adapter properties are the descriptive properties that you assign to both the adapter and the adapter class. You name the a...

  • Page 40

    1. In adapter name, type the name of the adapter. 2. In adapter shortname, type a one- to four-character short name for the adapter. The short name is used to create the component name that is used in the log and trace files as follows: shortname + the characters “ra” + the value of the adapter id p...

  • Page 41

    For information on the characteristics of an ibm websphere resource adapter and a j2c resource adapter, see introduction to jca. Generation options dialog from the adapter specification drop-down, choose the type of adapter you want to create: v choose ibm websphere resource adapter in the adapter s...

  • Page 42

    You can select the following properties when generating outbound adapter classes: v local transaction support generating outbound adapter classes with local transaction support means that the transaction is managed and performed by the eis. Localtransaction indicates the ibm websphere adapter suppor...

  • Page 43

    /** * does the eis support xa transaction? * get the xaresource from your eis and return the wrapper. * * @return new instance of wbixaresourcewrapper * @see javax.Resource.Spi.Managedconnection#getxaresource() */ public xaresource getxaresource() throws resourceexception { return new wbixaresourcew...

  • Page 44

    When you choose the connection pooling component property the wizard will create the activationspecwithxid class that extends wbiactivationspecforpooling . For information on how to generate inbound connection pooling support, see generating inbound connection pooling support. V event polling suppor...

  • Page 45

    Com.Ibm.J2ca.Extension.Databinding.Wbidatabindinggenerator for information on how to generate data binding classes, see generating data binding classes. Enterprise metadata discovery classes there are no properties associated with enterprise metadata discovery classes. Generating enterprise metadata...

  • Page 46

    V stringcasechanger this is a utility that you can use format the business object or attribute name properly. For information on how to generate enterprise metadata discovery classes, see generating enterprise metadata discovery classes . Generating outbound adapter classes generate outbound adapter...

  • Page 47

    Generating outbound local transaction support methods: with local transaction support, the transaction is managed and performed by the eis. Localtransaction indicates the ibm websphere adapter supports local transactions. Local transaction support methods provide a localtransaction implementation an...

  • Page 48

    Generating outbound xa transaction support methods: with xa transaction support, the transaction spans multiple heterogeneous systems. It uses global or two-phase-commit protocol. If a transaction manager coordinates a transaction, that transaction is considered a global transaction. Review the sect...

  • Page 49

    Review the section on command pattern classes in generating an ibm websphere resource adapter. The command pattern classes allow you to break down a hierarchical update into a series of nodes and then generate a collection of sub-commands to manage the nodes. An interpreter processes the sub-command...

  • Page 50

    2. Review the available component property options associated with inbound adapter classes. Each of the component property options are described in the sections that follow. Generate the inbound adapter classes for the component property selected. Note: before deploying your adapter to websphere pro...

  • Page 51

    2. Click finish. Now, you can generate inbound event polling support. Generating inbound event polling support: event polling refers to an adapter’s capability to poll the event records from the event store at regular intervals. In each poll call, a number of events are processed by the adapter. Rev...

  • Page 52

    2. When you are finished choosing generation options, click finish. Now, you can generate inbound callback event classes. Generating inbound callback event support: inbound callback event support alerts business processes to changes in, or new information about, an eis. The phrase callback refers to...

  • Page 53

    2. When you are finished choosing generation options, click finish. Now you can generate enterprise metadata discovery classes. Generating enterprise metadata discovery classes the enterprise metadata discovery classes are used by the external service discovery tool in websphere integration develope...

  • Page 54

    2. When you are finished choosing generation options, click finish. Generate data binding classes. Generating data binding classes you can generate data binding classes separate from the data binding classes that are generated from enterprise metadata discovery. Review the section on data binding cl...

  • Page 55

    2. When you are finished choosing generation options, click finish. Learn how to generate a jca resource adapter. Generating a jca resource adapter you use the wizard to generate adapter classes that correspond to the properties and options you specify. The following sections describe the j2ee resou...

  • Page 56

    V managedconnectionfactory implements javax.Resource.Spi.Resourceadapterassociation, javax.Validatingmanagedconnectionfactory, managedconnectionfactory v mangedconnection implements javax.Resource.Spi.Dissasociatablemanagedconnection, managedconnection v managedconnectionmetadata implements managedc...

  • Page 57

    V editabletype implements commonj.Connector.Discoveryeditabletype v metadatadiscovery implements commonj.Connector.Discovery.Metadatadiscovery v metadataedit implements commonj.Connector.Discovery.Metadataedit v metadataimportconfiguration implements commonj.Connector.Discovery.Metadataimportconfigu...

  • Page 58

    Implements javax.Resource.Runtime.Singletypedproperty and javax.Resource.Runtime.Propertydescriptor v singlevaluedproperty implements javax.Resource.Runtime.Singlevaledproperty and javax.Resource.Runtime.Propertydescriptor v propertygroup implements javax.Resource.Runtime.Propertygroup and javax.Res...

  • Page 59

    2. When you are finished choosing generation options, click finish. Generate inbound jca adapter classes. Generating inbound jca adapter classes the inbound adapter classes are responsible for notifying a business process of an inbound event from the eis. Review the section on inbound jca resource a...

  • Page 60

    2. When you are finished choosing generation options, click finish. Generate jca enterprise metadata discovery classes. Generating jca enterprise metadata discovery classes the enterprise metadata discovery classes are used by the external service discovery tool in websphere integration developer to...

  • Page 61

    2. When you are finished choosing generation options, click finish. Generated code and deployment descriptor the generated artifacts reflect the adapter classes with the properties and options you specified. After you specify options for your resource adapter, the wizard generates code and a deploym...

  • Page 62

    Using the resource adapter deployment descriptor editor the resource adapter deployment descriptor editor provides an easy and convenient way to configure your resource adapter. Resource adapter deployment descriptor editor you configure the resource adapter by using a deployment descriptor. The dep...

  • Page 63

    Deployment descriptor overview pane alternatively, you can view the deployment descriptor in the editor by highlighting the file in the project explorer and selecting open with → deployment descriptor editor from the context menu. Displaying the descriptor editor from the context menu you can displa...

  • Page 64

    Using the overview pane the overview pane provides access to general information about your resource adapter. You can display it at any time by clicking the overview tab at the bottom of this pane. In addition to providing general information about your resource adapter, you can generate components ...

  • Page 65

    Add component dialog the icons section of the overview pane allows you to associate icons with the resource adapter. You can specify a large or small icon in jpg or gif format. To fit into the allotted area, the large icons must be 32 x 32 pixels and the small icon 16 x 16 pixels. Websphere process ...

  • Page 66

    Resource adapter pane the general information section allows you to specify deployment descriptor values for the entire resource adapter. This section displays the name of the resourceadapter class with which this deployment descriptor is associated. This class must directly or indirectly implement ...

  • Page 67

    Add config property dialog when you add, modify, or delete user-defined properties in this section, the editor creates (or removes) the corresponding java bean properties in your code. For more information, see modifying properties. The admin objects section allows you to specify administered object...

  • Page 68

    The sections of the outbound adapter pane are described below. Outbound resource adapter pane the general information section allows you to specify deployment descriptor values associated with the outbound resource adapter. You can specify the level of transaction support, if any, and whether reauth...

  • Page 69

    Add connection definition dialog a connection definition requires the following information: v connectionfactory interface v connecitonfactory implementaion class v connection interface v connection implementation class v connectionrequestinfo class v managedconnectionfactory class once a connection...

  • Page 70

    Add config property dialog when you add, modify, or delete user-defined properties in this section, the editor creates (or removes) the corresponding java bean properties in your code. For more information, see modifying properties. The authentication mechanisms section allows you to specify the aut...

  • Page 71

    Class. Clicking the add button under the list of message listeners on the left side of the editor displays the following dialog box. Add message listener dialog once a message listener is defined all properties inherited by the specified activationspecwithxid are shown in the properties list directl...

  • Page 72

    Add required config property dialog when you add, modify, or delete user-defined properties in this section, the editor creates (or removes) the corresponding java bean properties in your code. For more information, see modifying properties. Modifying deployment descriptor properties when you modify...

  • Page 73

    Generated bean properties the editor maps resource adapter properties to class code. When you modify the resource adapter, the editor performs automatic source code updates. The table shows the generated code affected when you add, delete, or modify a configuration property: class code affected by c...

  • Page 74

    You can now view or modify the raw ra.Xml file using the default editor provided by websphere integration developer. When you use this editor to save this file, the file is automatically validated against the resource adapter xml schema definition (or .Xsd) file. Any errors are displayed in the prob...

  • Page 75

    B. Identify configuration properties suitable for use by a client for a specific outbound connection instance (for example, username, password, language). C. Identify configuration properties for inbound event processing in general–this will probably be a combination of those you’ve defined in 1a an...

  • Page 76

    V a full, working implementation, as opposed to the cci record model that simply defines interfaces that must be implemented by the adapter developer. V a built-in support for tracking changes at both the object and property levels, which allows for improved efficiency in processing and reduced band...

  • Page 77

    Changes. For outbound requests, the adapter must interpret the change summary, making all applicable changes to the data. For example, if an order_line has been added to an order object, the order_line will appear as created in the change summary. The adapter is responsible for finding that order, a...

  • Page 78

    Convert business object names from eis-assigned formats to a camel case format (remove separators such as spaces or underscores and capitalize first letter of each word). For example, convert the eis name, order_line_item, to orderlineitem. As described in the websphere business object specification...

  • Page 79

    Outbound operation signatures notes applychanges create update delete these operations can handle delta or after-image business objects. The assumption is that the adapter can consume either type of object or, if not, can convert after-image and delta as required by the business object structure. Fo...

  • Page 80

    V adapters should follow strict conventions in processing business objects. This includes failing if an entity is marked as updated in the input business object but does not exist in the eis (rather than attempting to create the entity in the eis). Isset property: websphere business objects support ...

  • Page 81

    2. If the eis does not generate its own primary key (or keys), insert the key values from the input business object into the appropriate key column (or columns) of the eis entity. 3. Update the output business object to reflect the values of the newly created eis entity; this includes any eis-genera...

  • Page 82

    Operation return value note: when writing the output values to the output cursor, be sure to include any generated keys or other side effects. Error handling error handling behavior includes any and all exceptions thrown by create and delete operations plus the following: recordnotfoundexception is ...

  • Page 83

    The invalidrequestexception exception is thrown if input to the operation is not supported. The eissystemexception exception is thrown if the eis reports any unrecoverable errors. Retrieve: this operation rebuilds the complete business object hierarchy. The adapter ensures that the returned hierarch...

  • Page 84

    Cci clients of resource adapters that support batch results must be capable of recognizing a top-level container and iterating through the child objects that represent the results of the query. The client can then extract any individual business object in the container and deliver it to the rest of ...

  • Page 85

    Note: the retrieveall operation always returns a result set regardless of how many (if any) matches are found. Processing overview retrieveall processing is as follows: retrieveall should make the adapter ready to return multiple objects. For each of the objects that will be returned, the ″getnext()...

  • Page 86

    Eis applications. Depending on the underlying eis, the business events an adapter generates may span the set of changes that have occurred to a given entity in the eis, such a customer changing the quantity in their order from 10 to 100, to a complete document or binary payload such as an insurance ...

  • Page 87

    Event store requirements 1. Event data must be persistent. Once detected in the event store, an event should remain available there until deleted by the adapter regardless of connection failure or time elapsed. 2. The event store must allow the adapter to both identify and change the state of event ...

  • Page 88

    During recovery, websphere application server calls the resource adapter, queries it for xaresources, and then performs transaction recovery as follows: v transactions that the j2ee container rolls back have not been delivered and are marked new. V transactions that the j2ee container commits have b...

  • Page 89

    Generate a timestamp to identify an event, producing an identifier such as myadaptername_06139833001005. Object key each event should contain enough key information to enable the adapter event-retrieval mechanism to locate and retrieve the full entity in the eis for which this event was originally r...

  • Page 90

    Status the event status is used to track the state of an event. It allows the foundation classes to distinguish among events that are new from those in process or ineligible. The adapter must support five different event status values as described in the table below. All events generated by the even...

  • Page 91

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

  • Page 92

    5. Set the name of the websphere business object complextype that corresponds to this application entity 6. Set the event status to new. Implementing event retrieval in the adapter the careful work of implementing event retrieval in the adapter uses two foundation classes interfaces. The goals are s...

  • Page 93

    Method description arraylist getevents(int quantity, int eventstatus, string[] typefilter) this method enables the adapter to determine if there are any new events available or old events that need re-sending. Implement this method to query the event store and return a list of event instances (up to...

  • Page 94

    Eventstore transaction control methods method description boolean istransactional() is the event store transactional? If so, this method should return true. Void commitwork() this method should commit the pending transaction. It is required only if transactions are supported. Void rollbackwork() thi...

  • Page 95

    Function selector: function selectors map resource adapter events to corresponding sca export function names. The websphere adapter component that exposes resource adapters as sca components requires what is known as a function selector. This selector maps events generated by resource adapters to a ...

  • Page 96

    When you enable inbound callback event notification, business processes are alerted to changes in, or new information about, an eis. The phrase callback refers to the ability of the eis system to directly notify the adapter or business processes of a change, as opposed to the polling mechanism used ...

  • Page 97

    Using the ibm websphere adapter foundation classes for inbound callback event processing the adapter foundation classes can automatically track endpoints (the consumers of events) for the adapter, control the event pick up and delivery of events, handle recovery of events if the adapter unexpectedly...

  • Page 98

    The sendwithreturn methods invoke onmessage on the inboundlistener. This method delivers the record it received from the listener thread. Here the difference is the onmessage method will be invoked on the inboundlistener to deliver the record to the endpoint. The method would return ″record″ as retu...

  • Page 99

    Public endpointpair(messageendpointfactory mef, activationspec activationspec) { this.Mef = mef; this.Activationspec = activationspec; } public boolean equals(object o) { if (!(o instanceof endpointpair)) { return false; } endpointpair other = (endpointpair) o; return other.Mef.Equals(this.Mef) && o...

  • Page 100

    Callback event processing for event delivery with xa transaction to provide data integrity and to make sure events are not delivered more than once, which would cause errors in the downstream system in the integration scenario, the invention provides a mechanism to achieve once-and-only delivery and...

  • Page 101

    When the adapter signals that it has completed delivery, the transaction manager will then call ″end″, ″prepare″, and ″commit″ to complete the requirements outlined in the xa transaction protocol. When the ″prepare″ call is made, the xa implementation will call ″settransactionid″ on the eventpersist...

  • Page 102

    Callback event processing for event recovery when there is a failure in the event processing as part of system recovery, the adapter is able to recover the unprocessed events by implementing the once-one-only delivery mechanism. During real time event processing if any component of the business inte...

  • Page 103

    When the container starts, it calls the getxaresources() method on the adapter to get all the associated xa resources. The adapter then instantiates the appropriate xa resource and returns it back to the container. The jca container now calls the recover() method on the returned xaresourceimpl to ge...

  • Page 104

    Application sign-on the adapter foundation classes can use either container-managed or component-managed authentication or sign-on. The process of connecting to a back-end application, such an eis, usually requires some type of authentication. In a jca environment, application authentication is know...

  • Page 105

    7. The connectionmanager may call getconnection(subject, connectionrequestinfo) on a managedconnection where the passed connectionrequestinfo does not match the connectionrequestinfo already associated with the managedconnection. The default implementation of this method performs a property-for-prop...

  • Page 106

    Public object createconnectionfactory(connectionmanager connmgr) throws resourceexception { return new twineballconnectionfactory(connmgr, this); } 2. Managedconnection createmanagedconnection(subject, connectionrequestinfo) this method is used by the jca container to acquire a physical connection t...

  • Page 107

    Best practices v each managedconnection instance should encapsulate at most one connection to the eis. V since there may be more than one connection instance for each managedconnection instance, resource adapter developers should implement private contracts between their wbimanagedconnection subclas...

  • Page 108

    Public interaction createinteraction() throws resourceexception { return new twineballinteraction(this); } note: if you want to provide your own implementation of connectionmetadata, you must override method wbiconnection#getmetadata. Javax.Resource.Cci.Connectionspec: clients use a javax.Resource.C...

  • Page 109

    This.Connection.Getresourceadapter(); objectnaming objectnaming = new objectnaming(resourceadapter); factory = new twineballcommandfactory(objectnaming); commandmanager = new commandmanager(factory, this.Connection.Geteisconnection(), this.Getlogutils()); } public record execute(interactionspec ispe...

  • Page 110

    Properties should not change the configuration of the eis. Javax.Resource.Cci.Connectionmetadata: a javax.Resource.Cci.Connectionmetadata instance provides information to the client components about the underlying eis of a resource adapter. Client components can use the javax.Resource.Cci.Connection...

  • Page 111

    3. Override method wbimanagedconnection.Getlocaltransaction() and, if xa support is provided, method wbimanagedconnection.Getxaresource(). Wrap either or both of the localtransaction or xaresource instances returned by these methods with a wbilocaltransactionwrapper or wbixatransacxtionwrapper insta...

  • Page 112

    Adapters are responsible for creating, updating, retrieving, and deleting (crud) records in the eis system based on the structure described by the incoming metadata and the content in the incoming cursor. The command pattern approach is recommended for handling the generic processing of crud operati...

  • Page 113

    Consider the following scenario: child b1 is in the eis, but is not in the incoming structure. Child b1, then, must be deleted. The command manager will execute a retrieve command to build the structure as it appears in the eis, then compare this structure to the incoming object tree. The comparison...

  • Page 114

    Command manager delete delta objects delta processing is only relevant for service data objects (sdo). The command manager functions in a similar way when processing delta objects. Instead of retrieving and comparing, the command manager reads the change summary for the intended changes. Note that s...

  • Page 115

    Suppose, as in the example below, that child 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. Websphere adapter development overview 109.

  • Page 116

    Command manager create when it processes this structure, the interpreter will execute the no-op commands as well as the create command. In general, the no-op commands should not modify data in the eis system. After-image processing: the command manager, based on the commandmanager api, implements th...

  • Page 117

    Command manager simplifies before and after comparisons as shown in the upper portion of the figure, the input to the command manager is a before image and an after image. The command manager creates a top-level command representing the operation for the top-level incoming cursor. As processing cont...

  • Page 118

    The command manager processes delta structures in a manner analogous to that of after-image data. The difference is that, for delta objects, comparative data is extracted from service data object change summaries. When the input service data object (sdo) represents an update operation with a delta s...

  • Page 119

    You will need to implement the following: 1. Command implementations for each command type ( ″retrieve″, ″retrieveall″, ″create″, ″update″, ″delete″, and ″nooperation″). 2. A command factory implementation that will create instances of these eis-specific commands. 3. An implementation of interaction...

  • Page 120

    If (functionname.Equals(nodeleveloperations.Create_node)) { command = new twineballcreatecommand(); } else if (functionname.Equals(nodeleveloperations.Delete_node)) { command = new twineballdeletecommand(); } else if (functionname.Equals(nodeleveloperations.Update_node)) { command = new twineballupd...

  • Page 121

    Data and metadata adapter foundation classes (afc) implement despi apis and support two data formats, service data objects (sdo) and javabeans. The data format-specific implementations are provided in the afc and are abstracted from the adapters which use the despi apis to process data in a format-i...

  • Page 122

    Table 2. Mapping between built-in xsd schema and javabean properties (continued) header header anysimpletype string any string there are cases in which a simple xml data type must be mapped to the corresponding java wrapper class for the java primitive type: v an element declaration with the nillabl...

  • Page 123

    The notion of whether or not a property is set is critical to processing null values or values that have not been set in the adapter. If a property has been explicitly set to null, the adapter must be able to detect this and set the associated property to null in the eis. If the property has not bee...

  • Page 124

    As defined in the sapbapibusinessobjecttypemetadata schema ″operation″ is an n-cardinality complex type. The ″methodname″ element of the operation type is a simple type with multiple cardinality: for the above metadata, the object level annotations map generated for the javabeanrecord would look lik...

  • Page 125

    Objectannotationsmap objectname wbi_customer_ci operation operationslist createoperationsmap name create methodname methodnamelist operationlist updateoperationmap createoperationmap methodnamelist wbicustomercreate the metadata api advanced implementations of adapters are metadata-driven. This impl...

  • Page 126

    These interfaces may contain more helper methods than are listed here, please see the javadoc for the additional helpers. Factory classes class typefactory: typefactory creates an instance of an implementation of type. The typefactory is also capable of detecting whether sdo version 2, sdo version 1...

  • Page 127

    Property getproperty(string propertyname) returns the property object for this property name. Map getannotations(string source) returns the object-level annotations for this type. You must pass in the "source" of the annotations, which corresponds to the "source" attribute of the "appinfo" tag of th...

  • Page 128

    Boolean iscontainment() returns whether or not the property contains a type (complex object). Boolean ismany() returns whether or not the property contains a list or array. Int getmaxlength() returns the max length of the property. Map getannotations(string source) returns the annotations for this p...

  • Page 129

    Support for generatedrecords artifact type: websphere adapters may support javabeanrecord data representation along with sdo 1.0 and sdo 2.0 data objects. As part of the support for javabean data representation, the adapter foundation classes provides a javabeans record generator class that can gene...

  • Page 130

    The enterprise metadata discovery component is analogous to the object discovery agent of websphere business integration adapters. In addition to generating business object definitions, however, the enterprise metadata discovery also generates service component architecture artifacts such as an impo...

  • Page 131

    Business object structures these are the business objects used by jca adapters. They describe the structure and content of arguments to functions on the eis client interface or the business objects accessed through the eis client interface. Communication configuration the communications configuratio...

  • Page 132

    Service metadata enterprise metadata discovery architecture the enterprise metadata discovery tooling includes runtime, discovery, and service generation interfaces and metadata edit capabilities. Enterprise metadata discovery architecture note: the solid arrows represent the enterprise metadata dis...

  • Page 133

    These interfaces extend the cci interfaces defined in the jca specification to support invocation of services discovered with enterprise metadata discovery. These interface implementations are provided by the resource adapter provider or a third party discovery service provider. These are the data b...

  • Page 134

    For multiple back-end eis assets. Ibm websphere recommends a single adaptertype for each enterprise metadata discovery implementation. The following information must be provided for this class by a discovery service implementation. V id (for example, peoplesoft) v description (for example, peoplesof...

  • Page 135

    Copy matching properties from metadata connection to runtime connection. For more information, see the wbioutboundconnectiontypeimpl in the javadocs. The following information must be provided for this class by a discovery service implementation: v id (for example, peoplesoft) v display name (for ex...

  • Page 136

    Metadataconnection the metadataconnection object represents the connection to eis or eis repository. This interface is implemented by the adapter foundation classes only and does not require any implementation from discovery service instances. Metadataconnection uses the managed connection factory t...

  • Page 137

    In addition to object selection, metadataselection also holds properties that are applicable for the selected objects. Such properties include the following: v specification of service type: inbound or outbound v namespace for use by business object definitions v connectiontype that for use at run t...

  • Page 138

    The import. The adapter foundation classes provide an implementation for servicedescription as abstract classes. Discovery service implementations should extend these classes and implement the abstract methods inbound service descriptions enterprise metadata discovery service implementations should ...

  • Page 139

    You must provide eis connection descriptions for the enterprise metadata discovery service. Adapter foundation classes contain interface implementations to help you get started. Like servicedescription, connectiondescription can be either inbound or outbound service. Adapter foundation classes provi...

  • Page 140

    Outbound function description the following information has to be filled in by the discovery service implementations: v name - e.G. Createcustomer, applychangescustomer v interactionspec - instance of interaction spec which has function name specified that represents this method description. E.G. Fo...

  • Page 141

    Note: to limit confusion, custom operation names should not conflict with the standard operation names mentioned above. Note: in cases where the mapping of eis operations to create, retrieve, update and delete is equivalent except for naming conventions–for example, peoplesoft has a find operation t...

  • Page 142

    V name – for example, vendorid v type – for example, string v cardinality – 1 or n v required – boolean v objecttypename – for cases where an attribute maps to an object for example, porecord:porecord. V max length v metadata – the metadataobject representing attribute-level application-specific inf...

  • Page 143

    Bootstrap: websphere integration developer performs a bootstrap step to identify a resource adapter that has been enabled for enterprise metadata discovery service. To identify a resource adapter that is enabled for metadata discovery service, websphere integration developer launches a bootstrap ste...

  • Page 144

    V propertygroup – a collection of properties including single and multi types and propertygroup itself. For example, outboundconnectionconfiguration allows three property groups in one main property group: userconfiguration that includes username and password; machineconfiguration that includes host...

  • Page 145

    A propertychange() method should be implemented if a property needs to listen for changes on some other property. Check the twineball sample for servicetypesingleproperty . To enable the function of both vetoablechange and propertychange, the instance of the property should be added to the propertyc...

  • Page 146

    Public twineballmetadatadiscovery() throws metadataexception { super("com.Ibm.J2ca.Sample.Twineball.Emd"); } the wbiadaptertypeimpl constructor requires the following parameters: 1. The name of the class representing the resourceadapter class. This is used to create property groups for resourceadapt...

  • Page 147

    Discovery and the one that used for run time. The copy is based on names. For example, if a property name username exists in the configuration used for discovery and that used for run time, the username value is copied. Public servicedescription createservicedescription (metadataselection importsele...

  • Page 148

    Public twineballadaptertype()throws metadataexception{ super(constants.Resource_adapter_bean_name, 2, 1); setid(constants.Adapter_name); setdisplayname(constants.Adapter_name); setdescription(wbimetadatadiscoveryimpl.Getpropertydescription (adaptertype_property)); setvendor(vendor); setversion(versi...

  • Page 149

    The managed connection factory types that are supported by the adapter. Each managed connection factory maps to an instance of outbound connection types. Each enterprise metadata discovery implementation should extend wbioutboundconnectiontypeimpl and implement the methods described below. Construct...

  • Page 150

    Setdescription(wbimetadatadiscoveryimpl.Getpropertydescription ("connectiontype")); setid("twineball"); setdisplayname(wbimetadatadiscoveryimpl.Getpropertyname ("connectiontype")); } createinboundconnectionconfiguration the createinboundconnectionconfiguration() method returns an instance of inbound...

  • Page 151

    Twineballconfigurationproperties.Gettwineballconfigurationproperties(); twineballresourceadapter ra = new twineballresourceadapter(); wbipropertygroupimpl adapterprop = (wbipropertygroupimpl) emdutil.Getpropertygroup(ra); propgroup.Addproperty(adapterprop); if (getappliedproperties() != null) emduti...

  • Page 152

    This class is similar to wbioutboundconnectionconfigurationimpl except instead of managedconnectionfactory, wbiinboundconnectionconfigurationimpl handles the activationspecwithxid bean class. You must extend the methods described below. Public propertygroup createactivationspecproperties() { wbiprop...

  • Page 153

    Constructor the constructor takes metadataconnection as an argument. The constructor can also return properties from metadataconnection that were used to start the discovery service; for example, prefix, directory name, and those properties that populate the metadataobject nodes in the tree. Public ...

  • Page 154

    (constants.Servicetype)); propertygroup.Addproperty(typeprop); wbisinglevaluedpropertyimpl namespaceprop = new wbisinglevaluedpropertyimpl (constants.Namespace, string.Class); namespaceprop.Setdefaultvalue(constants.Tb_default_namespace); propertygroup.Addproperty(namespaceprop); namespaceprop.Setdi...

  • Page 155

    Arraylist objects = gettoplevelobjects(); response.Setobjects(objects); return response; } wbimetadataobjectimpl samples: wbimetadataobjectimpl represents the nodes of the tree that websphere integration developer displays during enterprise metadata discovery. In most cases these nodes map to object...

  • Page 156

    Createselectionproperties the createselectionproperties() method returns a property group that is used to capture inputs from users. These inputs include business object namespace, supported operations, and the relative path in the module project where xml schema definitions should be saved. Public ...

  • Page 157

    The enterprise metadata discovery service uses wbimetadataeditimpl to acquire connectiontypes , which contains editable properties forresourceadapter, managedconnectionfactory , or activationspecwithxid. The enterprise metadata discovery tooling creates an instance of wbimetadataeditimpl during the ...

  • Page 158

    Datadesc.Preparechildschemafiles(); wbimetadatadiscoveryimpl.Getlogutils().Trace(level.Finer, classname, "preparingchildschemafiles", "preparing schemafile for " + bo.Getdisplayname()); datadesc.Prepareschemafiles(); schemadefinition[] schemafiles = datadesc.Getschemadefinitions(); for (int j = 0; j...

  • Page 159

    Bometadata.Setnamespace(namespace); bometadata.Setobjectnamespace(constants.Bus_obj_appinfo_asi_type_tag); bometadata.Setasi(constants.Asi_objectname, this.Getmetadataobject().Getdisplayname()); wbimetadatadiscoveryimpl.Getlogutils().Tracemethodexit (classname, "getmetadataforbusinessobject"); retur...

  • Page 160

    Wbimetadatadiscoveryimpl.Getlogutils().Tracemethodexit (classname, "getimportnamespaces"); return list; } getnamespaces the getnamespaces() method returns the namespaces listed in the xml schema definition. Typically these are application specific information schema definition namespaces. Note that ...

  • Page 161

    Getchildlist the getchildlist() method returns the iterator for the child objects of the datadescription . Public iterator getchildlist() throws metadataexception { return (this.Getmetadataobject().Getchildren(null)).Getobjectiterator(); } wbiinboundservicedescriptionimpl samples: wbiinboundserviced...

  • Page 162

    Functiondescription[] funcarray = new functiondescription[functiondescriptions.Size()]; functiondescriptions.Toarray(funcarray); super.Setfunctiondescriptions(funcarray); } wbioutboundservicedescriptionimpl samples: wbioutboundservicedescriptionimpl represents the object that populates function desc...

  • Page 163

    Datadescription.Setmetadataobject(metadataobj); datadescription.Populateschemadefinitions(); datadescription.Setrelativepath(location); datadescription.Setname(getnamespace() + "/" + metadataobj.Getboname().Tolowercase() + "container", metadataobj.Getboname() + "container"); outboundfunctiondescript...

  • Page 164

    Creating services that use technology-style adapters relies on being able to implement the interfaces in the commonj.Connector.Metadata.Build.* package or by extending the adapter foundation classes in com.Ibm.J2ca.Extension.Emd.Build.* package, or a combination thereof. Building configurable artifa...

  • Page 165

    Processed. A custom function selector can use the information in the inboundinteractionspec to generate a native function. For a custom adapter, you can create either a smart function selector that utilizes the data or metadata to perform function selection, with or without configuration; or you can...

  • Page 166

    To access the binding configuration, do context.Get(bindingcontext.Binding_configuration) to access the expected type, do context.Get (bindingcontext.Expected_type) function selectors, data handlers, and data bindings are all configurable. This configuration can be quite rich, providing single and m...

  • Page 167

    V wbimetadatabuild v wbifunctionbuilder v wbimetadatatype (optional) when you extend wbimetadatabuild, you will need to implement the following methods: v functionbuilder createfunctionbuilder(string functionselector) createfunctionbuilder returns your functionbuilder instance. V string[] getconnect...

  • Page 168

    Extend wbimetadatatype if your adapter needs a simple wrapper object around a payload object, similar to the ibm websphere adapter for flat files and the ibm websphere adapter for ftp. The wbimetadatatype interface allows you to select a payload type, and optionally generate a business graph structu...

  • Page 169

    Initialize input method this method resolves the type of the metadata if it’s a javabean or sdo type and initializes the metadata interfaces appropriately. Public void initializeinput(dataexchangefactory databinding, object metadata) throws despiexception . Purpose of the initialize input method imp...

  • Page 170

    Set managed connection method this method passes the managedconnection handle to the record implementation, allowing the record to get access to the physical connection to the backend application to perform processing.Public void setmanagedconnection( managedconnection managedconnection) throws reso...

  • Page 171

    The retriveall operation could return ″n″ records from the backend application, for each call to the getnext() method the implementation should fill in data of one record from the backend application into outputcursors/accessors. It should keep track of which record it needs to do next so in subsequ...

  • Page 172

    The method should first extract the value from backend object representation defined through xpath and use outputcursor and outputaccessor interfaces to populate values in runtime data structure. Sample data binding implementation adapters must provide implementations for databinding interface in or...

  • Page 173

    For operations where getnext() should be invoked multiple times like retrieveall, the databinding should call getnext() multiple times add the built businessobject to the list of businessobjects within the container bo. Getrecord public record getrecord() throws databindingexception this method shou...

  • Page 174

    V when wbistructuredrecord is initialized with data that contains bidi annotations, cursors and accessors that are associated with that structured record will automatically translate the content into or from the bidi format specified in the annotations, via special cursors and accessors that wrap th...

  • Page 175

    How to support fault handling: understand the following concepts for implementing fault handling into your adapter. Before you define faults, review adapter processing to determine which error conditions can be categorized as faults, rather than as exceptions. You will likely be able to apply at lea...

  • Page 176

    //added for faults funcdesc.Setname(operation.Tolowercase() + querydatadesc.Getboname()); getlogutils().Trace(loglevel.Finest, classname, "getxmllistfunctions", "setting input data description to: " + querydatadesc.Getname().Tostring() + " for function: " + funcdesc.Getname()); //$non-nls-1$ funcdes...

  • Page 177

    Public class jdexmllistfaultdatadescription implements faultdatadescription { public jdexmllistfaultdatadescription() { super(); // todo auto-generated constructor stub } private string faultname = null; public string getfaultname() { // todo auto-generated method stub return faultname; } public voi...

  • Page 178

    Fdesc2.Setgenericdatabindingclassname("com.Ibm.J2ca.Extension.Emd.Runtime.Wbifaultdatabindingimpl"); fdesc2.Setfaultname(faultboutil.Matches_exceeded_limit_name); faultdatadescription desc[] = new faultdatadescription[] {fdesc1, fdesc2}; funcdesc.Setfaultselectorclassname("com.Ibm.J2ca.Extension.Emd...

  • Page 179

    Table 4. Fault name and configured fault binding (continued) fault name configured fault binding invalid_request com.Ibm.J2ca.Extension.Emd.Runtime.Wbifaultdatabindingimpl when input to the operation does not have the required characteristics, the adapter throws this fault. Specific errors that can ...

  • Page 180

    You can use the faultboutil to define the fault business object, as long as either no attributes or only simple attributes are added. This should amount to a few lines of code, see implementing faults for an example. Note: the model for fault classes and fault business objects is a 1-to-1 relationsh...

  • Page 181

    – they provide information on the state of the adapter for use by monitor tooling – represented as common base event data at run time, event messages can be included in the extended logutils.Log method signatures support for protecting sensitive user data in log and trace files websphere adapter too...

  • Page 182

    Writing a trace message you use the trace method of the logutils class to generate a trace message. This method has two signatures. One of them is informational. The other is associated with an exception. Void trace (level l, string classname, string method, string msg) void trace (level l, string c...

  • Page 183

    "getrecordforevent()", "test"); return null; } } example of trace message for the outbound scenario with confidential tracing property enabled public helloworldconnectionfactory(connectionmanager connmgr, wbimanagedconnectionfactory mcf) { super(connmgr, mcf); getlogutils().Traceconfidential(level.F...

  • Page 184

    Tracing assists developers and troubleshooters. Due to the significant performance cost incurred by tracing, however, many customers disable it in production environments. When developing or troubleshooting, it is good practice to check whether tracing is enabled before building to generate trace me...

  • Page 185

    Message types there are two message types for adapters, adapter_rbundle. The base_rbundle is reserved for the adapter foundation classes. The message types are used to distinguish between the adapter and the base classes message file. The default value of message type field is adapter_rbundle. You u...

  • Page 186

    Translated text. Values that are language-independent, such as key values or object names, are appropriate as log message parameters. Similarly to trace messages, parameters in a log message can contain data from the customer’s eis. Because a customer might be unwilling to send a log file that conta...

  • Page 187

    Example of log message for the inbound scenario with confidential tracing property enabled public javax.Resource.Cci.Record getrecordforevent(com.Ibm.J2ca.Extension.Eventmanagement.Event event) throws javax.Resource.Resourceexception, javax.Resource.Spi.Commexception { logger.Logconfidential(level.I...

  • Page 188

    Public interface eventsourcecontext { /** * returns an event source for a monitored element. * @param elementkind an artifact kind that can be monitored e.G resourceadapter. * @param elementname the name of the monitored element * @return the event source object that encapsulates the element to be m...

  • Page 189

    * the client of an event point needs to know the payload of the fired events. */ public interface eventpoint { /** *return the name of the event point */ string getname(); /** * checks if an event needs to be fired for this event point. This method minimizes the * overhead of inactive monitoring * p...

  • Page 190

    Xmlns="http://www.Ibm.Com/xmlns/prod/websphere/monitoring/6.1/mes" xmlns:eis="http://www.Ibm.Com/xmlns/prod/websphere/scdl/eis/6.0.0:jcaadapter" shortname="resourceadapter"> cei xmlns="http://www.Ibm.Com/xmlns/prod/websphere/monitoring/6.1/mes" xmlns:eis="http://www.Ibm.Com/xmlns/prod/websphere/scdl...

  • Page 191

    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" > "status" situationcategory="reportsituation" reasoningscope="external" parent="wbi.Monitoringevent"> "status" situationcategory="re...

  • Page 192

    Purpose 1. Monitorable element schema (.Mes) file changes defines the element type within an adapter where monitoring can be attached. The element type is specified using the qname of the element type from the schema, which defines the structure of the artifact itself. It also defines the natures (e...

  • Page 193

    D. If eventpoint is enabled, then fire event for entry, exit and failure is invoked. 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. For example we can invoke failure event by following api c...

  • Page 194

    V is a transaction (and the application) hung, or are transactions failing? V what is the response time? V are service level commitments being met? V who uses the application and how many of each transaction are used? The resource adapters are instrumented with the application response measurement a...

  • Page 195

    Statistics and data for each managedconnection, which can be used to assess and troubleshoot performance related problems. In order for resource adapters to participate in various websphere requestmetric tools for outbound, diagnostic tools, etc, you will need to follow these steps: 1. Import com.Ib...

  • Page 196

    Ffdc processing overview instead of explicitly instrumenting catch blocks by calling ffdc directly, either manually or by using a tool, you can write a simple aspect using the aspectj language, which encapsulates the ffdc policy for your code. The ffdcsupport aspect is abstract. Like an abstract cla...

  • Page 197

    If you use the ffdcsupport aspect, you can ensure a consistent ffdc policy for your application by adding declare warning or error advice to your aspects while this capability is not explicitly provided by the ffdcsupport aspect, you can leverage the use of aspectj and follow a standard pattern of e...

  • Page 198

    When using ffdcsupport aspect you can control the data gathered. Two template methods getsourceid and getprobeid are provided to you for this purpose. For example, you may want to limit the length of the source id strings. In figure 7, aspect example_7 illustrates how to override the getsourceid met...

  • Page 199

    Exception messages exception messages, like trace messages, convey information about problems. The difference is that exception messages are tailored more directly to support teams familiar with adapter source code, and therefore need not be translated. Treat text included in exception messages as y...

  • Page 200

    To test the enterprise metadata discovery (emd) implementation for the developed resource adapter, complete the following steps: 1. From the ibm websphere adapters foundation classes library, copy the following three dependent jars into the connectormodule connector project: v commonj.Connector.Jar ...

  • Page 201

    Junit: an open source framework for unit testing junit is becoming the standard tool for unit testing in java development environments. Junit allows you to quickly and easily integrate automated regression testing into your coding and build processes. With junit, an open source unit test framework, ...

  • Page 202

    Your adapter may or may not be dependant on ″live″ data inside the eis. If so, you must either return the data to a known state after every test, or create a mock implementation of the eis api so that eis data remains untouched. Setup() in the setup method for outbound, perform the following step: 1...

  • Page 203

    Setup() the setup() method for inbound is very similar to that for outbound. You may, however, not need an outbound connection through the adapter. Accordingly, you need only perform the following tasks: 1. Create an adapter instance and set its properties 2. Start the resource adapter. Test the tes...

  • Page 204

    For information on testing the adapter in managed mode in websphere application server, see validating code with rational application developer / websphere application server. Installing the test client to test your adapter in a runtime environment, you must first install a test client on the target...

  • Page 205

    Test module configuration 3. Select the testing mode and click finish to start the test. On the deployment location screen, select a websphere process server to test in managed mode (optionally you can select eclipse to test in unmanaged mode). In addition, you select run or debug mode. If you selec...

  • Page 206

    Adding a value to the datapool this adds the data to datapool. When you want to use this input data again, select use value from pool. Using an execution trace the test client you installed provides you with a trace of the execution and the data path of the test. You can optionally load any previous...

  • Page 207

    After you have created and exported an adapter ear file with the service type set to inbound, you can test inbound functionality. 1. Edit your module using the assembly editor, connecting the export to a java component. A. Double-click on the module to start the assembly editor. B. Create a new comp...

  • Page 208

    Selecting the java package g. Save the module. 2. Publish the application to websphere process server. 3. Open the administration console for the websphere process server and configure the application’s activation specifications so that it can process inbound requests. 4. Restart the inbound applica...

  • Page 209

    Validating code with rational application developer and websphere application server to test the adapter in the websphere application server environment, use the javabean generation capability of emd to generate records and a java proxy interface to the adapter. Then generate a session bean that wil...

  • Page 210

    4. In the resource adapter deployment panel, choose how to deploy the adapter. You can deploy the adapter with the ear or you can deploy the adapter as a stand-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 val...

  • Page 211

    7. Start utc using the run universal test client option. Websphere adapter development overview 205.

  • Page 212

    8. Once the utc comes up, use the jndi explorer to find your ejb. Look for your session ejb under ejb beans. Now, you can test your adapter via the ejb interface. You can create a session bean using the home interface (create), then invoke business methods on the remote interface, providing the appr...

  • Page 213

    Note: external service discovery is equivalent to enterprise metadata discovery. F. Select the appropriate external service. G. Specify the connection properties, metadata, and service functions. H. On the saving properties pane, save the properties to the module you created in step d. I. Save the f...

  • Page 214

    Reference terminology the terminology presented are of terms that are used frequently in the documentation. Adapter foundation classes (afc) sometimes referred to as base classes, the adapter foundation classes are a common set of services for all ibm websphere resource adapters. The adapter foundat...

  • Page 215

    Eclipse an open source infrastructure for building tools such as an integrated development environment (ide). The toolkit’s wizard and editor are eclipse plug-ins. Eclipse plug-in a module that extends the functionality of the eclipse platform editor a component in eclipse that allows data to be edi...

  • Page 216

    Outbound outbound is a description of the direction in which data and messages pass from a j2ee client application to the eis. Adapters support both inbound and outbound data flow. Performance monitoring infrastructure (pmi) a set of packages and libraries assigned to gather, deliver, process, and d...

  • Page 217: Notices

    Notices this information was developed for products and services offered in the u.S.A. Ibm may not offer the products, services, or features discussed in this document in other countries. Consult your local ibm representative for information on the products and services currently available in your a...

  • Page 218

    Licensees of this program who wish to have information about it for the purpose of enabling: (i) the exchange of information between independently created programs and other programs (including this one) and (ii) the mutual use of the information which has been exchanged, should contact: ibm corpora...

  • Page 219

    This code are derived from ibm corp. Sample programs. (c) copyright ibm corp. _enter the year or years_. All rights reserved. If you are viewing this information softcopy, the photographs and color illustrations may not appear. Programming interface information programming interface information, if ...

  • Page 220

    214 websphere adapters: websphere adapter toolkit user guide.

  • Page 221: Index

    Index special characters .Wbioutboundservicedescriptionimpl 39 (cci), common client interface 4 (ear) project, enterprise application archive 31 (ear), enterprise application archive 2 (rar), resource adapter archive 2 numerics 1.5 specification, java 2 connector architecture jca 10 2 connector arch...

  • Page 222

    G generation options 35 h hardware requirements 12 i implementation overview 68 inbound callback event notification 90, 91, 92, 94 callback event sender 91 callback event sender constructors 92 event notification 79 one way callback events 90 operations 72 request and response callback events 90 sta...

  • Page 223

    V verbs usage business graph 71 w wbiactivationspec 37 wbiadaptertypeimpl 39, 141 wbiconnection 35, 102 wbiconnectionfactory 35, 101 wbiconnectionrequestinfo 104 wbidatabindinggenerator 38 wbidatadescriptionimpl 39, 151 wbiinboundconnectionconfigurationimpl 39, 146 wbiinboundconnectiontypeimpl 39, 1...

  • Page 224

    218 websphere adapters: websphere adapter toolkit user guide.

  • Page 226

    Printed in usa.