<Insert Picture Here>Building custom JCA adapters to integrate 3rd partysystems with Oracle Fusion MiddlewareDmitry Nefedk...
ISV Migration Center Team     • Who we Are ISV Migration Center Team is a team of senior technical consultants       based...
Agenda        • Why are you might be interested in developing a        <Insert Picture Here>          custom JCA adapter? ...
Why are you might be                            interested in developing a                            custom JCA adapter?©...
Oracle Fusion Middleware for integration          Flexible architecture                        Worklist   Process Portal  ...
Application integration          What might be hidden under the covers                                                    ...
Application integration          Benefits of using JCA Adapters for Integration with EIS            • JCA API - unified in...
Java Connector Architecture                            (JCA) overview© 2010 Oracle Corporation                            ...
Java EE Connector Architecture Specification          Versions History        Specification       JSR#      Final release ...
Java EE Connector Architecture          Overview                                          Container-                      ...
Resource Adapter          Characteristics              • Supplied types of communication between application              ...
Resource Adapter          Implementation Steps – outbound adapter              • Implement system contracts (SPI):        ...
Resource Adapter          Implementation Steps – inbound adapter              • Implement system contracts (SPI):         ...
System Contract Implementation (SPI)          Lifecycle management                                   Adapter developer    ...
System Contract Implementation (SPI + CCI)          Connection          management        Interfaces in yellow boxes      ...
System Contract Implementation (SPI)          Security Contract           • JCA security is based on JAAS           • Mana...
System Contract Implementation (SPI)          Transaction          management       2 Methods in       ManagedConnection  ...
Transaction Management          Local vs Distributed Transactions         • Local Transaction            • A transaction t...
System Contract Implementation (SPI)          Message Inflow Contract (inbound adapters)© 2010 Oracle Corporation         ...
System Contract Implementation (SPI)          Work management          contract     •       Adapter running in the        ...
Common Client Interface (CCI)          Calling JCA Adapter from applications              CCI defines a standard client AP...
Common Client Interface (CCI)          Class          Diagram of          most          important          interfaces© 201...
Deployment descriptors          Describe your JCA adapter              • 2 types of descriptors:                  • Standa...
Deployment descriptors          ra.xml example  <connector xmlns=http://java.sun.com/xml/ns/j2ee xmlns:xsi="http://www.w3....
Deployment descriptors          Vendor-specific descriptor              • Allows to define the adapter properties that are...
Deployment descriptors          weblogic-ra.xml example  <weblogic-connector xmlns:xsi="http://www.w3.org/2001/XMLSchema-i...
Resource Adapter Packaging          Prepare your adapter for the distribution           A resource adapter must be package...
JCA Adapters for Oracle                            Fusion Middleware –                            distinctive features© 20...
Distinctive Features: Adapter                            implementation© 2010 Oracle Corporation                          ...
Oracle Adapter Framework          What’s this?                  • Has been created initially for Oracle BPEL PM 10g to    ...
Oracle Adapter Framework – what are the          differences in adapter implementation? (Part 1)          Task            ...
Oracle Adapter Framework – what are the          differences in adapter implementation? (Part 2)          Task            ...
Distinctive Features:                            Developing Adapter                            Configuration Wizard for   ...
Custom Adapter Configuration          Oracle JDeveloper 11g SOA Composite Editor • SOA Composite Editor has   Java API to ...
Custom Adapter Configuration           Settings to display adapter on the component palette• Adapter configuration setting...
Developing the adapter configuration wizard          Class diagram                                          SCAEndpoint   ...
Classes and Interfaces to be implemented            Text and graphical resources for the wizard       • Resource bundle fo...
Classes and Interfaces to be implemented            Developing a wizard for creating/editing configuration            of t...
Classes and Interfaces to be implemented            Developing a wizard for creating/editing configuration            of t...
Classes and Interfaces to be implemented             Standard forms and adapter configuration parameters            (part ...
Classes and Interfaces to be implemented)             Custom forms and adapter configuration parameters            (part 4...
Building Adapter Configuration Project              What libraries should be added in JDeveloper • To build the project yo...
Distinctive Features:                            Installing libraries and                            extensions to JDevelo...
Installing Adapter Configuration libraries to          Oracle JDeveloper 11g  • Steps install and configure the adapter co...
Building JDeveloper Extension package            Part 1- directory structure     • Extension installation package has the ...
Building JDeveloper Extension package             Part 2 –Bundle descriptor structure   • Extension installer package shou...
Building JDeveloper Extension package            Part 3 – Extension JAR file structure   • Extension JAR must be located i...
Installing an extension to JDeveloper   • Use the following menu to initiate the extension installation:     JDeveloper He...
Distinctive Features:                            Deploying/Configuring our                            adapter in SOA Suite...
Deploying and Configuring Adapter           Deploy your RAR file with Adapter to Weblogic Server             Setup outboun...
Configure OSB to know about your adapter              • Oracle SOA/BPM Suite do not require additional                conf...
Demonstration:                            Custom JCA Adapter for                            SSH communication© 2010 Oracle...
More Resources and Information  • Programming Resource Adapters for Oracle    WebLogic Server 11gR1 Guide         • http:/...
Q&A     Dmitry Nefedkin, Oracle ISV Migration Center FMW Consultant     Dmitry.Nefedkin@oracle.com     Dmitry Volodin, Sen...
Upcoming SlideShare
Loading in …5
×

Partner Webcast - Building Custom JCA Adapters To Integrate 3rd Party Solutions to Oracle FMW - 21 Feb 2013

2,174 views

Published on

Succeed in business process optimization with efficient integration of back-end applications

Oracle Integration Adapters, a component of Oracle Fusion Middleware, offers organizations a service oriented approach to unlocking the information assets that have evolved in most IT environments. These adapters are based on Java Connection Architecture (JCA) specification, and they have become a standard way of integration with Enterprise Information Systems (EIS).

Oracle Adapters provide an easy-to-use, flexible, standards based SOA platform to enable rapid and real-time connectivity and access to over 300+ enterprise applications. Oracle on its own and also via partnerships with best of breed Adapter Vendors provide a broad range, but what if your application is not covered? What is your application cannot be easily integrated via technology adapters (DB, File, JMS, etc.) or you'd like to gain performance or other benefits from knowing its internal architecture?

How can you develop your custom JCA adapter?

Find out more at https://blogs.oracle.com/imc/entry/partner_webcast_building_custom_jca

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,174
On SlideShare
0
From Embeds
0
Number of Embeds
75
Actions
Shares
0
Downloads
61
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Partner Webcast - Building Custom JCA Adapters To Integrate 3rd Party Solutions to Oracle FMW - 21 Feb 2013

  1. 1. <Insert Picture Here>Building custom JCA adapters to integrate 3rd partysystems with Oracle Fusion MiddlewareDmitry Nefedkin, Oracle ISV Migration Center FMW ConsultantDmitry.Nefedkin@oracle.comDmitry Volodin, Senior Sales ConsultantDmitry.Volodin@oracle.com
  2. 2. ISV Migration Center Team • Who we Are ISV Migration Center Team is a team of senior technical consultants based in Eastern and Central Europe and represents Oracles technical investment for partners. • Mission Statement Enable partners to rapidly and successfully adopt and implement Oracle latest technology • What do we Offer Whether you are selling Oracle technology, building business solutions, including hosted Internet solutions or providing system integration and implementation services for Oracle technology, IMC Team can help you succeed. • How can we assist We offer a wide range of free services for partners such as one2one assistance, webinars, seminars and hands-on workshops. ISV Migration Center blog: http://blogs.oracle.com/imc Contacts: Thanos Terentes Printzios, ISV Migration Center Manager, EE&CIS thanos.terentes.printzios@oracle.com© 2010 Oracle Corporation 2
  3. 3. Agenda • Why are you might be interested in developing a <Insert Picture Here> custom JCA adapter? • Java Connector Architecture (JCA) overview • JCA Adapters for Oracle Fusion Middleware – the distinctive features • Adapter implementation • Developing Adapter Configuration Wizard for JDeveloper • Installing libraries and extensions to JDeveloper • Deploying and configuring your custom JCA adapter in Oracle SOA Suite / Service Bus • Demo – Custom JCA adapter for SSH communication • Q&A© 2010 Oracle Corporation 3
  4. 4. Why are you might be interested in developing a custom JCA adapter?© 2010 Oracle Corporation 4
  5. 5. Oracle Fusion Middleware for integration Flexible architecture Worklist Process Portal MS Office Online Shopping Mobile Devices ORACLE SERVICE BUS / SOA SUITE/ BPM© 2010 Oracle Corporation 5
  6. 6. Application integration What might be hidden under the covers Online Mobile Worklist Portal MS Office Devices Shopping Web Services ORACLE SERVICE BUS/SOA SUITE/BPM Application Native API Crontab Servers Jobs Application Application Application Instance 1 Instance 2 Instance 3© 2010 Oracle Corporation 6
  7. 7. Application integration Benefits of using JCA Adapters for Integration with EIS • JCA API - unified interface for communication with any Enterprise Information System (EIS); • Integration middleware is independent of the protocols supported by the EIS; • Transactional communications, including XA (if the EIS supports it) • Application Server-managed pool of connections to the EIS; • Support for asynchronous communication;© 2010 Oracle Corporation 7
  8. 8. Java Connector Architecture (JCA) overview© 2010 Oracle Corporation 8
  9. 9. Java EE Connector Architecture Specification Versions History Specification JSR# Final release Java EE edition version date JCA 1.0 JSR 16 24 Sep, 2001 Java EE 1.3 JCA 1.5 JSR 112 24 Nov, 2003 Java EE 1.4, 5 JCA 1.6 JSR 332 10 Dec, 2009 Java EE 6 Note: as the time of this writing Oracle JCA Adapter Framework supports JCA 1.5, so we’re going to describe this version of the spec.© 2010 Oracle Corporation 9
  10. 10. Java EE Connector Architecture Overview Container- Component Application component, Application Server Contract acts as adapter client Connection CCI - Common Client Management Interface System Contract Transaction (SPI - Service Management Provider Interface) JCA Resource Adapter Security Contract Work EIS specific interface Management Lifecycle EIS – Enterprise Management Information System© 2010 Oracle Corporation 10
  11. 11. Resource Adapter Characteristics • Supplied types of communication between application and EIS: • Outbound • Inbound • Bi-Directional • Operating environment: • Managed mode – resource adapter and adapter client are deployed on the application server • Non-managed mode – adapter is called from non-managed clients (thick java clients, applets)© 2010 Oracle Corporation 11
  12. 12. Resource Adapter Implementation Steps – outbound adapter • Implement system contracts (SPI): • Lifecycle management; • Connection management + security; • Transaction Management (if EIS supports transactions) • Work management (if needed) • Implement interaction (CCI) • Create the deployment descriptors • Resource adapter module packaging© 2010 Oracle Corporation 13
  13. 13. Resource Adapter Implementation Steps – inbound adapter • Implement system contracts (SPI): • Lifecycle management; • Message inflow contract (activation) • Transaction inflow contract (if needed) • Create the deployment descriptors • Resource adapter module packaging© 2010 Oracle Corporation 14
  14. 14. System Contract Implementation (SPI) Lifecycle management Adapter developer implements start and stop methods of javax.resource.spi.Resourc eAdapter interface© 2010 Oracle Corporation 15
  15. 15. System Contract Implementation (SPI + CCI) Connection management Interfaces in yellow boxes are implemented by the connector developer Interfaces in green boxes are implemented only if adapter should work in non-managed mode© 2010 Oracle Corporation 16
  16. 16. System Contract Implementation (SPI) Security Contract • JCA security is based on JAAS • ManagedConnectionFactory .createManagedConnection method accepts JAAS Subject as on of the parameters; • ManagedConnection.getConnection takes a Subject parameter to support re-authentication (if needed); • You should throw SecurityException if you cannot authenticate the caller; • The resource adapter must specify its support for the security contract as part of its deployment descriptor.© 2010 Oracle Corporation 17
  17. 17. System Contract Implementation (SPI) Transaction management 2 Methods in ManagedConnection implementation class define how transaction management is done by Adapter: •getLocalTransaction •getXAResource© 2010 Oracle Corporation 18
  18. 18. Transaction Management Local vs Distributed Transactions • Local Transaction • A transaction that deals with a single Resource Manager • Distributed Transaction • A transaction that spans multiple Resource Managers coordinated by a Transaction Manager • Helps to ensure consistency across multiple data sources and other transactional resources (eg. JMS Queue) • Common flavour is 2-Phase-Commit (2PC) where XA is the interface between the Global Transaction Manager (eg. WebLogic) and the Local Resource Managers (eg. Oracle DB)© 2010 Oracle Corporation 19
  19. 19. System Contract Implementation (SPI) Message Inflow Contract (inbound adapters)© 2010 Oracle Corporation 20
  20. 20. System Contract Implementation (SPI) Work management contract • Adapter running in the managed mode cannot create threads directly, they should: • - implement Work interface • - call WorkManager.schedule Work to schedule work execution • - monitor execution status via WorkListener© 2010 Oracle Corporation 21
  21. 21. Common Client Interface (CCI) Calling JCA Adapter from applications CCI defines a standard client API for application components and enables application components and integration frameworks to drive interactions across heterogeneous EISs using a CCI API. Main parts of CCI API (javax.resource.cci package) : • Connection-related interfaces; • Interaction-related interfaces; • Data representation-related interfaces • Metadata related-interfaces© 2010 Oracle Corporation 22
  22. 22. Common Client Interface (CCI) Class Diagram of most important interfaces© 2010 Oracle Corporation 23
  23. 23. Deployment descriptors Describe your JCA adapter • 2 types of descriptors: • Standard resource adapter descriptor – ra.xml • Application Server-specific descriptor, for example weblogic-ra.xml for Oracle Weblogic • Standard descriptior defines: • Resource adapter class • Connection factory and connection classes • Adapter configuration properties • Transaction support • Supported authentication mechanism© 2010 Oracle Corporation 24
  24. 24. Deployment descriptors ra.xml example <connector xmlns=http://java.sun.com/xml/ns/j2ee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=… version="1.5"> <display-name>SSH Adapter</display-name><vendor-name>Oracle</vendor-name> <eis-type>Generic SSH System</eis-type><resourceadapter-version>1.0</resourceadapter-version> <resourceadapter> <resourceadapter-class>oracle.tip.adapter.ssh.SshAdapter</resourceadapter-class> <outbound-resourceadapter> <connection-definition> <managedconnectionfactory-class>oracle.tip.adapter.ssh.SshManagedConnFactory</managedconnectionfactory-class> <config-property> <config-property-name>hostName</config-property-name> <config-property-type>java.lang.String</config-property-type> <config-property-value>fmw-image.ru.oracle.com</config-property-value> </config-property> <connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface> <connectionfactory-impl-class>oracle.tip.adapter.ssh.SshConnectionFactory</connectionfactory-impl-class> <connection-interface>oracle.tip.adapter.ssh.ISshConnection</connection-interface> <connection-impl-class>oracle.tip.adapter.ssh.SshConnection</connection-impl-class> </connection-definition> <transaction-support>NoTransaction</transaction-support> <authentication-mechanism>.. </authentication-mechanism> </outbound-resourceadapter> </resourceadapter> </connector>© 2010 Oracle Corporation 25
  25. 25. Deployment descriptors Vendor-specific descriptor • Allows to define the adapter properties that are not covered by JCA spec • Weblogic-ra.xml allows to define: • JNDI name for the resource adapter • Work Manager that will be used by the resource adapter bean • Additional security properties • Pre-defined connection instances • And many more© 2010 Oracle Corporation 26
  26. 26. Deployment descriptors weblogic-ra.xml example <weblogic-connector xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-connector http://www.bea.com/ns/weblogic/weblogic- connector/1.0/weblogic-connector.xsd" xmlns="http://www.bea.com/ns/weblogic/weblogic-connector"> <jndi-name>jca/SshResourceAdapter</jndi-name> <enable-access-outside-app>true</enable-access-outside-app> <enable-global-access-to-classes>true</enable-global-access-to-classes> <outbound-resource-adapter> <default-connection-properties> <pool-params> <initial-capacity>1</initial-capacity> <max-capacity>10</max-capacity> <capacity-increment>1</capacity-increment> … </pool-params> <transaction-support>NoTransaction</transaction-support> </default-connection-properties> <connection-definition-group> … <connection-instance> <description>SSH Adapter Demo</description> <jndi-name>eis/SSH/Demo</jndi-name> <connection-properties> <pool-params> <initial-capacity>1</initial-capacity> <max-capacity>10</max-capacity> <capacity-increment>100</capacity-increment> </connection-instance> </outbound-resource-adapter> … </weblogic-connector>© 2010 Oracle Corporation 27
  27. 27. Resource Adapter Packaging Prepare your adapter for the distribution A resource adapter must be packaged using the Java ARchive (JAR) format in to the file with RAR extension (ResourceAdapter ARchive). RAR file should have the following structure: Your_Adapter.rar META-INF MANIFEST.MF Or any other AS- ra.xml specific descriptor weblogic-ra.xml All third-party JARs are JARs with also put here adapter classes DLLs for Windows, SO Any native files for Solaris, etc.. libraries© 2010 Oracle Corporation 28
  28. 28. JCA Adapters for Oracle Fusion Middleware – distinctive features© 2010 Oracle Corporation 29
  29. 29. Distinctive Features: Adapter implementation© 2010 Oracle Corporation 30
  30. 30. Oracle Adapter Framework What’s this? • Has been created initially for Oracle BPEL PM 10g to wrap up any standard JCA 1.5 adapter to call as a web service via WSIF • SDK that Oracle uses to create JCA adapters that can be plugged into Oracle Fusion Middleware Infrastructure (SOA Suite/BPM Suite/Service Bus)© 2010 Oracle Corporation 31
  31. 31. Oracle Adapter Framework – what are the differences in adapter implementation? (Part 1) Task “Standard” JCA Oracle Adapter Framework adapter Getting Implement Implement connection to javax.resource.cci.Con oracle.tip.adapter.api.OracleCon an EIS nectionFactory nectionFactory instance Execute EIS Implement Record should be treated as function javax.resource.cci.Inte instanceof raction oracle.tip.adapter.api.record.XM public Record LRecord execute(InteractionSpec interactionSpec, Record record) Execute EIS InteractionSpecImpl InteractionSpecImpl should function implements standard implement bunch of additional InteractionSpec interfaces from interface oracle.tip.adapter.api package© 2010 Oracle Corporation 32
  32. 32. Oracle Adapter Framework – what are the differences in adapter implementation? (Part 2) Task “Standard” JCA Oracle Adapter Framework adapter Set client Set and get attribute InteractionSpec implemented class specific functions in the should always have setter and context for InteractionSpec getter methods for WSDL based EIS function implemented class JCA-properties Generally not used Supports Implement Should always implement the local client javax.resource.cci.Loc transaction interface with stub transaction alTransaction methods and events sending if you need client transaction support© 2010 Oracle Corporation 33
  33. 33. Distinctive Features: Developing Adapter Configuration Wizard for JDeveloper© 2010 Oracle Corporation 34
  34. 34. Custom Adapter Configuration Oracle JDeveloper 11g SOA Composite Editor • SOA Composite Editor has Java API to developer configuration wizards for custom adapters; • Support for generating adapter artifacts: WSDL, JCA, XSD files; • Has set of pre-defined forms that can be used as the steps of the wizard; • Custom forms for the wizard steps can be developed as well;© 2010 Oracle Corporation 35
  35. 35. Custom Adapter Configuration Settings to display adapter on the component palette• Adapter configuration settings for component palette are located in: • %JDEV_HOME%integrationseedsoaconfigurationsoa-config.xml • %JDEV_HOME%integrationseedsoaconfigurationbpm-soa-config.xml• Source code of the wizard sample can be found here: • %JDEV_HOME%integrationadapterssamplescustom </adapterType> <adapterType resourceBundle="oracle.tip.tools.ide.adapters.designtime.adapter.ssh.resources.SshStringResourceBundle"> <name>${SSH_ADAPTER_COMPONENT_NAME_L}</name> <bindingType>jca</bindingType> <bindingSubType>custssh</bindingSubType> <implementationClass>oracle.tip.tools.ide.adapters.designtime.adapter.ssh.SshAdapterScaEndpointImpl</implementationClass> <description>${SSH_ADAPTER_COMPONENT_DESC}</description> <tooltip>${SSH_ADAPTER_COMPONENT_DESC}</tooltip> <icon16x16>/oracle/tip/tools/ide/adapters/designtime/adapter/ssh/resources/ssh_adapter_16x16.png</icon16x16> <icon20x20>/oracle/tip/tools/ide/adapters/designtime/adapter/ssh/resources/ssh_adapter_20x20.png</icon20x20> <topSectionIcon>oracle/tip/tools/ide/fabric/resource/image/visuals_rd1/whiteServiceTop.png</topSectionIcon> <middleSectionIcon>oracle/tip/tools/ide/fabric/resource/image/visuals_rd1/whiteServiceMiddle.png</middleSectionIcon> <bottomSectionIcon>oracle/tip/tools/ide/fabric/resource/image/visuals_rd1/whiteServiceBottom.png</bottomSectionIcon> <collapsedSectionIcon>oracle/tip/tools/ide/fabric/resource/image/visuals_rd1/whiteServiceCollapsed.png</collapsedSectionIcon> </adapterType>© 2010 Oracle Corporation 36
  36. 36. Developing the adapter configuration wizard Class diagram SCAEndpoint JcaAdapterWizard CustomScaEndpointImpl CustomAdapterWizard SOA Diagram +Adds Wizard Pages() JcaServiceNamePage soa-config.xml CustomConnectionPage CustomWsdlSelectionPage WsdlSelectionPage CustomStringResourceBundle CustomOperationPage JcaOperationPage CustomPropertyPage CustomAdapterConfig© 2010 Oracle Corporation 37
  37. 37. Classes and Interfaces to be implemented Text and graphical resources for the wizard • Resource bundle for storing string resources (name, adapter code, messages, headers, field names for the forms) public class SshStringResourceBundle extends ListResourceBundle { public Object[][] getContents() { return contents; } static final Object[][] contents = { // KEYS SHOULD BE IN ALPHABETIC ORDER {"SSH_ADAPTER_COMPONENT_DESC", "The SSH JCA Adapter Wizard can a wsdl and jca file with any interaction spec and jca parameters." }, … • Graphical icons for displaying adapter on the SOA component palette and SCA diagram: • 16 x 16 pixels in PNG format – for component palette • 20 x 20 pixels in PNG format – for SCA diagram© 2010 Oracle Corporation 38
  38. 38. Classes and Interfaces to be implemented Developing a wizard for creating/editing configuration of the custom adapter (part 1) • Implement the interaction with SCA editor • Class will orchestrate the communication between JDeveloper graphical sybsystem, SOA composite project and the adapter wizard // SCAEndpoint Interface Implementation public class SshAdapterScaEndpointImpl implements SCAEndpoint { … // Must only have empty constructor public SshAdapterScaEndpointImpl() { } public EndpointInfo createImplementation(Project jdevProject, SCAController scaController, boolean isExternalReference) { … try { Frame frame = Ide.getMainWindow(); // Note: adapter wizard implicitly uses JDeveloper project. SshAdapterWizard wiz = new SshAdapterWizard(frame, null, serviceOrReferenceName, isExternalReference, jdevProject) ; boolean ok = wiz.display(); …© 2010 Oracle Corporation 39
  39. 39. Classes and Interfaces to be implemented Developing a wizard for creating/editing configuration of the custom adapter (part 2) • Load text resources from the resource bundle; • Context initialization for transferring information between the pages of the wizard; • Defining the sequence of the pages displayed; public class SshAdapterWizard extends JcaAdapterWizard { //This variable uses only if need to share data across wizard pages public SshAdapterContext m_adapterContext; Object getAdapterSpecificContext() {…} public void initializeResources() {…} public void addInitialWizardPages(JcaAdapterContext wcontext){ … new SshConnectionPage(wcontext, new ImageWizardPage(null, wcontext._getImage(), m_bundle.getString("SSH_CN_PAGE_TITLE"))); //new SshWsdlSelectionPage(wcontext, new ImageWizardPage(null, wcontext._getImage(), wcontext._bundle.getString("WS_PAGE_TITLE"))); new SshOperationPage(wcontext, new ImageWizardPage(null, wcontext._getImage(), m_bundle.getString("SSH_OP_PAGE_TITLE"))); …© 2010 Oracle Corporation 40
  40. 40. Classes and Interfaces to be implemented Standard forms and adapter configuration parameters (part 3)• WsdlSelectionPage class – selection of the existing WSDL file or its auto- generation based on operation and XSD schema. Page UI is generated automatically;• CommonAdapterSchemaPage class – XML Schema selection for inbound/outbound messages. Page UI is generated automatically;• JcaOperationPage class – operation type selection. UI should be tweaked.© 2010 Oracle Corporation 41
  41. 41. Classes and Interfaces to be implemented) Custom forms and adapter configuration parameters (part 4) • Should extend techAdapterWizardPage class • Used to build the custom form, e.g. for entering parameters dependent from each other, for building form model using metadata from the external system. • buildDataModel() method is executed each time user clicks “Finish”. public class SshInteractionPropertiesPage extends techAdapterWizardPage implements ActionListener { … public SshInteractionPropertiesPage(AdapterWizardContext wcontext, ImageWizardPage iwp) { … setHelpTopicID("bpmjdev_adp_wiz_cu_properties"); setContextAndPage(wcontext, iwp); jbInit(); } public void buildDataModel() throws Exception {…}© 2010 Oracle Corporation 42
  42. 42. Building Adapter Configuration Project What libraries should be added in JDeveloper • To build the project you will need the following libraries: • %JDEV_HOME%jdevextensionsoracle.sca.modeler.jar (SOA Designtime) • %JDEV_HOME%jdevextensionsoracle.ide.jar • %JDEV_HOME%jlibjewt4.jar • %JDEV_HOME%idelibjavatools.jar • %JDEV_HOME%integrationliboracle.sca.ui.adapters.jar • %JDEV_HOME%integrationlibbpm-ide-common.jar • %JDEV_HOME%integrationlibbpaxbean.jar • JDEV_HOME%soamodulesoracle.soa.adapter_11.1.1adapter_xbeans.jar • %BEA_HOME%oracle_commonmodulesoracle.javatools_11.1.1javatools- nodeps.jar • %BEA_HOME%oracle_commonjlibshare.jar • JAX-RPC Client Library© 2010 Oracle Corporation 43
  43. 43. Distinctive Features: Installing libraries and extensions to JDeveloper© 2010 Oracle Corporation 44
  44. 44. Installing Adapter Configuration libraries to Oracle JDeveloper 11g • Steps install and configure the adapter configuration library in JDeveloper • Copy the library jar to %JDEV_HOMEintegrationlib • Add it to JDeveloper classpath • Add adapter configuration to soa-config.xml and/or bpm-soa-config.xml – depending on what JDeveloper extensions (SOA Composite Editor/BPM Studio) you are going to use. • Implementation options • Manual copying the library jar and changing the configuration files • Automation of these steps with JDeveloper Extension SDK Bundle© 2010 Oracle Corporation 45
  45. 45. Building JDeveloper Extension package Part 1- directory structure • Extension installation package has the following structure (/)jca-ssh-adapter-extension META-INF bundle.xml - bundle descriptor integration lib oracle.sca.ui.adapter.ssh.jar - our adapter UI wizard library jdev extension oracle.custom.jca.ssh.adapter.jar - extension archive • Packed to the zip archive© 2010 Oracle Corporation 46
  46. 46. Building JDeveloper Extension package Part 2 –Bundle descriptor structure • Extension installer package should include bundle.xml file, which describes the extension (name, version, installation directory), and also points to the java class that should be called after the extension install (in our case it will modify soa-config.xml and/or bpm-soa-config.xml files). <?xml version = 1.0 encoding = UTF-8?> <update-bundle version="1.0" xmlns="http://xmlns.oracle.com/jdeveloper/updatebundle" xmlns:u="http://xmlns.oracle.com/jdeveloper/update"> <u:update id="oracle.custom.jca.ssh.adapter"> <u:name>Custom JCA SSH Adapter for Oracle SOA Suite 11g</u:name> <u:version>11.1.1.6.0.0.1</u:version> <u:author>Oracle</u:author> <u:author-url>http://www.oracle.com</u:author-url> <u:description>Custom JCA SSH Adapter</u:description> <u:destination>${oracle.home}</u:destination> <u:requirements> <u:requires-extension id="oracle.studio" minVersion="11.1.1.6.38.61.92" maxVersion="11.1.1.99"/> </u:requirements> <u:post-startup- hook>oracle.tip.tools.ide.adapters.designtime.adapter.ssh.install.SshAdapterSOAComponentConfig</u:post- startup-hook> </u:update> </update-bundle>© 2010 Oracle Corporation 47
  47. 47. Building JDeveloper Extension package Part 3 – Extension JAR file structure • Extension JAR must be located inside the extension ZIP bundle in %CUST_EXT_ROOT%jdevextension. It contains: • Mandatory file - .META-INFextention.xml – describes the extension, it’s dependency on the other extensions (e.g. Oracle SCA Modeler), and adds the classpath entries to the JDeveloper classpath • Optional - Startup Hook Class or link on the library containing this class. <?xml version = 1.0 encoding = UTF-8?> <extension esdk-version="1.0" id="oracle.custom.jca.ssh.adapter" version="11.1.1.6.0.0.1" rsbundle- class="oracle.tip.tools.ide.adapters.designtime.adapter.ssh.resources.SshStringResourceBundle" xmlns="http://jcp.org/jsr/198/extension-manifest"> <name>Custom JCA SSH Adapter</name> <dependencies> <import>oracle.sca.modeler</import> </dependencies> <classpaths> <classpath>../../integration/lib/oracle.sca.ui.adapter.ssh.jar</classpath> </classpaths> </extension>© 2010 Oracle Corporation 48
  48. 48. Installing an extension to JDeveloper • Use the following menu to initiate the extension installation: JDeveloper Help-> Check for Updates…->Install From Local Files© 2010 Oracle Corporation 49
  49. 49. Distinctive Features: Deploying/Configuring our adapter in SOA Suite/OSB© 2010 Oracle Corporation 50
  50. 50. Deploying and Configuring Adapter Deploy your RAR file with Adapter to Weblogic Server Setup outbound connection pools for your adapter, save changes in the deployment plan and update the deployment© 2010 Oracle Corporation 51
  51. 51. Configure OSB to know about your adapter • Oracle SOA/BPM Suite do not require additional configuration, but OSB need it • List of JCA adapters allowed to use in OSB is contained in the following file: %OSB_HOME%configadapterOSBSupportedAdapters.xml • You should add an element for your adapter: <jca:adapter-type>YOUR_ADAPTER_NAME</jca:adapter-type> • The name of the custom adapter type comes from the JCA file; the "adapter" attribute value in the <adapter- config> element (but it should be uppercase and the spaces are replaced with underscores)© 2010 Oracle Corporation 52
  52. 52. Demonstration: Custom JCA Adapter for SSH communication© 2010 Oracle Corporation 53
  53. 53. More Resources and Information • Programming Resource Adapters for Oracle WebLogic Server 11gR1 Guide • http://docs.oracle.com/cd/E23943_01/web.1111/e13732/toc.htm • Adapter Development Cookbook (Release 10g only) • http://www.oracle.com/technetwork/testcontent/adapter.pdf • Oracle Adapters FAQ (Release 10g only) • http://www.oracle.com/technetwork/testcontent/faq-adapters-otn- 130381.pdf • OTN Discussions Forums • Request Adapter SDK via SR on support.oracle.com© 2010 Oracle Corporation 54
  54. 54. Q&A Dmitry Nefedkin, Oracle ISV Migration Center FMW Consultant Dmitry.Nefedkin@oracle.com Dmitry Volodin, Senior Sales Consultant Dmitry.Volodin@oracle.com ISV Migration Center blog: http://blogs.oracle.com/imc© 2010 Oracle Corporation 55

×