Development Guide Volume 4: Server Development
Total Page:16
File Type:pdf, Size:1020Kb
Red Hat JBoss Data Virtualization 6.3 Development Guide Volume 4: Server Development This guide is intended for developers Red Hat Customer Content Services Red Hat JBoss Data Virtualization 6.3 Development Guide Volume 4: Server Development This guide is intended for developers Red Hat Customer Content Services Legal Notice Copyright © 2016 Red Hat, Inc. This document is licensed by Red Hat under the Creative Commons Attribution-ShareAlike 3.0 Unported License. If you distribute this document, or a modified version of it, you must provide attribution to Red Hat, Inc. and provide a link to the original. If the document is modified, all Red Hat trademarks must be removed. Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. Linux ® is the registered trademark of Linus Torvalds in the United States and other countries. Java ® is a registered trademark of Oracle and/or its affiliates. XFS ® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries. MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and other countries. Node.js ® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project. The OpenStack ® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community. All other trademarks are the property of their respective owners. Abstract This document provides information for developers creating custom solutions. Table of Contents Table of Contents .C .h .a .p . t.e .r .1 .. .R . e. a. d. .M . e. .3 . 1.1. Back Up Your Data 3 1.2. Variable Name: EAP_HOME 3 1.3. Variable Name: MODE 3 1.4. Red Hat Documentation Site 3 .C .h .a .p . t.e .r .2 .. .D . e. v. e. l.o .p .i n. g. f.o .r .R . e. d. .H . a. t. J. B. .o .s .s . D. a. t. a. .V .i r. t.u .a .l i.z .a .t i.o .n . .4 . 2.1. Developing for Red Hat JBoss Data Virtualization 4 2.2. Red Hat JBoss Data Virtualization Connector Architecture 4 2.3. Translators in Red Hat JBoss Data Virtualization 4 2.4. Resource Adapters in Red Hat JBoss Data Virtualization 7 2.5. Other Red Hat JBoss Data Virtualization Development 7 2.6. Setting the Development Environment 8 2.7. Maven Repository Location 8 .C .h .a .p . t.e .r .3 .. .R . e. s. o. u. r. c. e. .A .d .a .p . t.e .r .D . e. v. e. l.o .p .m . e. n. .t . .9 . 3.1. Developing Custom Adapters 9 3.2. Define a Managed Connection Factory 9 3.3. Define a Connection Factory 10 3.4. Define a Connection 11 3.5. XA Transactions 11 3.6. Specify Configuration Properties in an ra.xml File 11 3.7. Packaging the Adapter 13 3.8. Adding Dependent Libraries 14 3.9. Deploying the Adapter 14 .C .h .a .p . t.e .r .4 .. .T .r .a .n .s .l a. t.o .r . D. e. v. e. l.o . p. m. .e .n .t . .1 .6 . 4.1. Environment Set-Up 16 4.2. Implementing the Framework 18 .C .h .a .p . t.e .r .5 .. .E . x. t.e .n .d .i n. g. t.h .e . J. D. .B .C . .T .r a. n. .s .l a. t.o .r . .4 .3 . 5.1. Extensions 43 5.2. Capabilities Extension 43 5.3. SQL Translation Extension 43 5.4. Results Translation Extension 43 5.5. Adding Function Support 44 5.6. Using Function Modifiers 44 5.7. Installing Extensions 46 .C .h .a .p . t.e .r .6 .. .D . e. l.e .g .a .t i.n .g . .4 .7 . 6.1. Delegating Translator 47 6.2. Adding Dependent Modules 48 .C .h .a .p . t.e .r .7 .. .P . a. c. k. a. g. i.n .g . a. n. d. D. e. p. l.o . y. i.n .g . t.h .e . T. .r a. n. s. l.a .t o. .r . .4 .9 . 7.1. Packaging 49 7.2. Translator Deployment Overview 49 7.3. Module Deployment 49 7.4. JAR Deployment 49 .C .h .a .p . t.e .r .8 .. .U . s. e. r. D. .e .f i.n .e .d . F. .u .n .c .t i.o .n . s. .5 .1 . 8.1. User Defined Functions 51 8.2. Support for Non-Pushdown User Defined Functions 51 8.3. Source Supported Functions 55 1 Development Guide Volume 4: Server Development .C .h .a .p . t.e .r .9 .. .A . d. m. .i n. .A . P. I. .5 .8 . 9.1. Admin API 58 9.2. Connecting 58 9.3. Administration Methods 58 .C .h .a .p . t.e .r .1 .0 .. .C . u. s. t.o .m . L. o. g. g. i.n . g. .5 .9 . 10.1. Customized Logging 59 10.2. Command Logging API 59 10.3. Audit Logging API 59 10.4. Configuration 60 .C .h .a .p . t.e .r .1 .1 .. .R . u. n. t.i m. e. .U .p .d . a. t.e .s . .6 .1 . ..