Table of Contents - teiid.github.ioteiid.github.io/teiid-documents/10.2.x/teiid-documents.pdf ·...
Transcript of Table of Contents - teiid.github.ioteiid.github.io/teiid-documents/10.2.x/teiid-documents.pdf ·...
-
1.1
1.2
1.3
1.3.1
1.3.2
1.3.2.1
1.3.2.1.1
1.3.2.1.2
1.3.2.1.3
1.3.2.1.4
1.3.2.1.5
1.3.2.1.6
1.3.2.1.7
1.3.2.1.8
1.3.2.1.9
1.3.2.1.10
1.3.2.1.11
1.3.2.1.12
1.3.2.1.13
1.3.2.1.14
1.3.2.1.15
1.3.2.1.15.1
1.3.2.1.15.2
1.3.2.2
1.3.3
1.3.4
1.3.5
1.3.6
1.3.6.1
1.3.6.2
1.3.6.3
1.3.6.4
1.3.6.5
1.3.6.6
1.3.7
1.3.8
1.3.8.1
TableofContentsIntroduction
LegalNotice
AdministratorsGuide
InstallationGuide
DeployingVDBs
DeployingVDBDependencies
AccumuloDataSources
AmazonSimpleDBDataSources
CassandraDataSources
CouchbaseDataSources
FileDataSources
Ftp/FtpsDataSources
GoogleSpreadsheetDataSources
InfinispanHotRodDataSources
JDBCDataSources
LDAPDataSources
MongoDBDataSources
PhoenixDataSources
SalesforceDataSources
SolrDataSources
WebServiceDataSources
KerberoswithRESTbasedServices
OAuthAuthenticationWithRESTBasedServices
VDBVersioning
Logging
ClusteringinTeiid
Monitoring
PerformanceTuning
MemoryManagement
Threading
CacheTuning
SocketTransports
LOBs
OtherConsiderations
TeiidConsole
AdminShell
GettingStarted
1
-
1.3.8.2
1.3.8.3
1.3.8.4
1.3.8.5
1.3.8.6
1.3.9
1.3.10
1.3.11
1.3.12
1.3.13
1.3.14
1.4
1.4.1
1.4.2
1.4.2.1
1.4.2.2
1.4.3
1.4.4
1.4.5
1.4.6
1.5
1.5.1
1.5.1.1
1.5.1.1.1
1.5.1.1.2
1.5.1.1.3
1.5.1.1.4
1.5.1.1.5
1.5.1.1.6
1.5.1.1.7
1.5.1.2
1.5.1.3
1.5.1.4
1.5.1.4.1
1.5.1.4.2
1.5.1.4.3
1.5.1.4.4
1.5.1.4.5
1.5.1.5
1.5.1.5.1
Executingascriptfile
LogFileandRecordedScriptfile
DefaultConnectionProperties
HandlingMultipleConnections
InteractiveShellNuances
OtherScriptingEnvironments
SystemProperties
TeiidManagementCLI
DiagnosingIssues
MigrationGuideFromTeiid9.x
MigrationGuideFromTeiid8.x
CachingGuide
ResultsCaching
MaterializedViews
ExternalMaterialization
InternalMaterialization
CodeTableCaching
TranslatorResultsCaching
HintsandOptions
ProgrammaticControl
ClientDevelopersGuide
JDBCSupport
ConnectingtoaTeiidServer
DriverConnection
DataSourceConnection
StandaloneApplication
WildFlyDataSource
UsingMultipleHosts
SSLClientConnections
AdditionalSocketClientSettings
PreparedStatements
ResultSetLimitations
JDBCExtensions
StatementExtensions
PartialResultsMode
Non-blockingStatementExecution
ResultSetExtensions
ConnectionExtensions
UnsupportedJDBCMethods
UnsupportedClassesandMethodsin"java.sql"
2
-
1.5.1.5.2
1.5.2
1.5.2.1
1.5.2.2
1.5.2.3
1.5.2.4
1.5.3
1.5.3.1
1.5.4
1.5.5
1.5.6
1.5.7
1.5.8
1.5.9
1.5.10
1.5.11
1.5.12
1.5.13
1.5.14
1.5.15
1.5.15.1
1.5.15.2
1.5.15.3
1.5.15.4
1.6
1.6.1
1.6.1.1
1.6.1.1.1
1.6.1.1.2
1.6.1.2
1.6.1.2.1
1.6.1.3
1.6.1.3.1
1.6.1.4
1.6.2
1.6.2.1
1.6.2.1.1
1.6.2.1.2
1.6.2.2
1.6.2.2.1
UnsupportedClassesandMethodsin"javax.sql"
ODBCSupport
InstallingtheODBCDriverClient
ConfiguringtheDataSourceName(DSN)
DSNLessConnection
ODBCConnectionProperties
ODataSupport
ODataVersion4.0Support
UsingTeiidwithHibernate
UsingTeiidwithEclipseLink
GeoServerIntegration
QGISIntegration
SQLAlchemyIntegration
Node.jsIntegration
ADO.NETIntegration
Reauthentication
ExecutionProperties
SETStatement
SHOWStatement
Transactions
LocalTransactions
RequestLevelTransactions
UsingGlobalTransactions
Restrictions
DevelopersGuide
DevelopingJEEConnectors
ConnectorEnvironmentSetup
BuildEnvironment
ArchetypeTemplateConnectorProject
ImplementingtheTeiidFramework
ra.xmlfileTemplate
PackagingtheAdapter
AddingDependentLibraries
DeployingtheAdapter
TranslatorDevelopment
EnvironmentSetup
Settingupthebuildenvironment
ArchetypeTemplateTranslatorProject
ImplementingtheFramework
CachingAPI
3
-
1.6.2.2.2
1.6.2.2.3
1.6.2.2.4
1.6.2.2.5
1.6.2.2.6
1.6.2.2.7
1.6.2.2.8
1.6.2.2.9
1.6.2.3
1.6.2.4
1.6.2.5
1.6.2.5.1
1.6.2.6
1.6.3
1.6.3.1
1.6.3.2
1.6.3.2.1
1.6.4
1.6.5
1.6.6
1.6.7
1.6.8
1.6.8.1
1.7
1.7.1
1.7.2
1.8
1.8.1
1.8.2
1.8.2.1
1.8.2.2
1.8.2.3
1.8.2.4
1.8.2.5
1.8.2.6
1.8.2.7
1.8.2.8
1.8.2.9
1.8.3
1.8.3.1
CommandLanguage
ConnectionstoSource
DependentJoinPushdown
ExecutingCommands
ExtendingtheExecutionFactoryClass
LargeObjects
TranslatorCapabilities
TranslatorProperties
ExtendingTheJDBCTranslator
DelegatingTranslator
Packaging
AddingDependentModules
Deployment
UserDefinedFunctions
SourceSupportedFunctions
SupportforUser-DefinedFunctions(Non-Pushdown)
ArchethypeTemplateUDFProject
AdminAPI
CustomLogging
RuntimeUpdates
CustomMetadataRepository
PreParser
ArchethypeTemplatePreParserProject
EmbeddedGuide
LogginginTeiidEmbedded
SecureEmbeddedwithPicketBox
ReferenceGuide
DataSources
VirtualDatabases
DevelopingaVirtualDatabase
DDLVDB
UsingXML&DDL
VDBProperties
SchemaObjectDDL
DomainDDL
MultiSourceModels
MetadataRepositories
RESTServiceThroughVDB
SQLSupport
Identifiers
4
-
1.8.3.2
1.8.3.3
1.8.3.4
1.8.3.4.1
1.8.3.4.2
1.8.3.4.3
1.8.3.4.4
1.8.3.4.5
1.8.3.4.6
1.8.3.4.7
1.8.3.4.8
1.8.3.4.9
1.8.3.4.10
1.8.3.4.11
1.8.3.4.12
1.8.3.4.13
1.8.3.4.14
1.8.3.5
1.8.3.5.1
1.8.3.5.2
1.8.3.5.3
1.8.3.5.4
1.8.3.5.5
1.8.3.5.5.1
1.8.3.5.5.2
1.8.3.5.5.3
1.8.3.5.5.4
1.8.3.5.6
1.8.3.5.7
1.8.3.5.8
1.8.3.5.9
1.8.3.5.10
1.8.3.5.11
1.8.3.5.12
1.8.3.6
1.8.3.6.1
1.8.3.6.2
1.8.3.6.3
1.8.3.6.4
1.8.3.7
Expressions
Criteria
ScalarFunctions
NumericFunctions
StringFunctions
Date_TimeFunctions
TypeConversionFunctions
ChoiceFunctions
DecodeFunctions
LookupFunction
SystemFunctions
XMLFunctions
JSONFunctions
SecurityFunctions
SpatialFunctions
MiscellaneousFunctions
NondeterministicFunctionHandling
DMLCommands
SetOperations
Subqueries
WITHClause
SELECTClause
FROMClause
XMLTABLE
ARRAYTABLE
OBJECTTABLE
TEXTTABLE
WHEREClause
GROUPBYClause
HAVINGClause
ORDERBYClause
LIMITClause
INTOClause
OPTIONClause
DDLCommands
TempTables
AlterView
AlterProcedure
AlterTrigger
Procedures
5
-
1.8.3.7.1
1.8.3.7.2
1.8.3.7.3
1.8.3.8
1.8.4
1.8.4.1
1.8.4.2
1.8.4.3
1.8.4.4
1.8.5
1.8.5.1
1.8.6
1.8.6.1
1.8.6.2
1.8.6.3
1.8.6.4
1.8.6.5
1.8.7
1.8.7.1
1.8.7.2
1.8.7.3
1.8.7.4
1.8.8
1.8.8.1
1.8.8.2
1.8.9
1.8.9.1
1.8.9.2
1.8.9.3
1.8.9.4
1.8.9.5
1.8.9.6
1.8.9.7
1.8.9.8
1.8.9.9
1.8.9.10
1.8.9.11
1.8.9.11.1
1.8.9.11.2
1.8.9.11.3
ProcedureLanguage
VirtualProcedures
UpdateProcedures
Comments
Datatypes
SupportedTypes
TypeConversions
SpecialConversionCases
EscapedLiteralSyntax
UpdatableViews
preservedTable
TransactionSupport
AutoCommitTxnExecutionProperty
UpdatingModelCount
JDBCandTransactions
TransactionalBehaviorwithJBossDataSourceTypes
LimitationsandWorkarounds
DataRoles
Permissions
RoleMapping
XMLDefinition
Customizing
SystemSchema
SYS
SYSADMIN
Translators
AmazonS3Translator
AmazonSimpleDBTranslator
ApacheAccumuloTranslator
ApacheSOLRTranslator
CassandraTranslator
CouchbaseTranslator
DelegatingTranslators
FileTranslator
GoogleSpreadsheetTranslator
InfinispanTranslator
JDBCTranslators
ActianVectorTranslator
ApachePhoenixTranslator
ClouderaImpalaTranslator
6
-
1.8.9.11.4
1.8.9.11.5
1.8.9.11.6
1.8.9.11.7
1.8.9.11.8
1.8.9.11.9
1.8.9.11.10
1.8.9.11.11
1.8.9.11.12
1.8.9.11.13
1.8.9.11.14
1.8.9.11.15
1.8.9.11.16
1.8.9.11.17
1.8.9.11.18
1.8.9.11.19
1.8.9.11.20
1.8.9.11.21
1.8.9.11.22
1.8.9.11.23
1.8.9.11.24
1.8.9.11.25
1.8.9.11.26
1.8.9.11.27
1.8.9.11.28
1.8.9.11.29
1.8.9.11.30
1.8.9.11.31
1.8.9.12
1.8.9.13
1.8.9.14
1.8.9.15
1.8.9.16
1.8.9.17
1.8.9.18
1.8.9.19
1.8.9.20
1.8.9.21
1.8.9.22
1.8.9.23
DB2Translator
DerbyTranslator
GreenplumTranslator
H2Translator
HiveTranslator
HSQLTranslator
InformixTranslator
IngresTranslators
IntersystemsCacheTranslator
JDBCANSITranslator
JDBCSimpleTranslator
MetaMatrixTranslator
MicrosoftAccessTranslators
MicrosoftSQLServerTranslator
ModeShapeTranslator
MySQLTranslators
NetezzaTranslator
OracleTranslator
OSISoftPITranslator
PostgreSQLTranslator
PrestoDBTranslator
RedshiftTranslator
SAPHanaTranslator
SAPIQTranslator
SybaseTranslator
TeiidTranslator
TeradataTranslator
VerticaTranslator
JPATranslator
LDAPTranslator
LoopbackTranslator
MicrosoftExcelTranslator
MongoDBTranslator
ObjectTranslator
ODataTranslator
ODataV4Translator
SwaggerTranslator
OLAPTranslator
SalesforceTranslators
SAPGatewayTranslator
7
-
1.8.9.24
1.8.10
1.8.10.1
1.8.10.2
1.8.10.3
1.8.10.4
1.8.10.5
1.8.10.6
1.8.10.7
1.8.10.8
1.8.11
1.8.11.1
1.8.11.2
1.8.11.3
1.8.11.4
1.8.12
1.9
1.9.1
1.9.2
1.9.3
1.9.4
1.9.5
1.9.6
1.9.7
1.9.8
1.9.9
WebServicesTranslator
FederatedPlanning
PlanningOverview
QueryPlanner
QueryPlans
FederatedOptimizations
SubqueryOptimization
XQueryOptimization
FederatedFailureModes
ConformedTables
Architecture
Terminology
DataManagement
QueryTermination
Processing
BNFforSQLGrammar
SecurityGuide
LoginModules
TeiidServerTransportSecurity
JDBC/ODBCSSLconnectionusingself-signedSSLcertificates
DataSourceSecurity
KerberossupportthroughGSSAPI
CustomAuthorizationValidator
SAMLBasedSecurityForOData
OAuth2BasedSecurityForODataUsingKeyCloak
SAMLBasedSecurityForODataUsingKeyCloak
8
-
LegalNotice
ContributetoTeiidDocumentation
ThedocumentationprojectishostedonGitHubat(teiid/teiid-documents).
ForsimplechangesyoucanjustusetheonlineeditingcapabilitiesofGitHubbynavigatingtotheappropriatesourcefileandselectingfork/edit.
Forlargerchangesfollowthese3steps:
Step.1clonethesources
[email protected]:teiid/teiid-documents.git
Step.2doedit
Useanytexteditortoedittheadocfiles,AsciiDocSyntaxQuickReferencecanhelpyouinAsciiDocSyntax.
Step.3submityourchange
Oncethepullrequestiscommittedthepublishedcontentwillbeupdatedautomatically.
TestlocallyYoumayneedtestlocally,tomakesurethechangesarecorrect,todothisinstallgitbook,thenexecutethefollowingcommandsfromthecheckoutlocation:
$gitbookinstall$gitbookserve-w
Onceabovecommandsexecutessuccessfully,thehttpformatdocumentcanbetestlocallyviahttp://localhost:4000/.
Introduction
9
https://github.com/teiid/teiid-documentshttp://asciidoctor.org/docs/asciidoc-syntax-quick-reference/https://github.com/GitbookIO/gitbook
-
Generatehtml/pdf/epub/mobi
Youmaylocallycreaterenderedformsofthedocumentation.Todothisinstallgitbookandebook-convert,thenexecutethefollowingcommandsfromthecheckoutlocation:
$gitbookbuild./teiid-documents$gitbookpdf./teiid-documents.pdf$gitbookepub./teiid-documents.epub$gitbookmobi./teiid-documents.mobi
Onceabovecommandsexecutessuccessfully,theteiid-documentsfolder,teiid-documents.pdf,teiid-documents.epub,andteiid-documents.mobiwillbegenerated.
Introduction
10
https://github.com/GitbookIO/gitbookhttps://help.gitbook.com/build/ebookconvert.html
-
LegalNotice
1801VarsityDriveRaleigh,NC27606-2072USAPhone:+19197543700Phone:8887334281Fax:+19197543701POBox13588ResearchTrianglePark,NC27709USA
Copyright2017byRedHat,Inc.Thiscopyrightedmaterialismadeavailabletoanyonewishingtouse,modify,copy,orredistributeitsubjecttothetermsandconditionsoftheApacheSoftwareLicense,Version2.0.
RedHatandtheRedHat"ShadowMan"logoareregisteredtrademarksofRedHat,Inc.intheUnitedStatesandothercountries.
Allothertrademarksreferencedhereinarethepropertyoftheirrespectiveowners.
CA2086862BD69DFC65F6ECC4219180CDDB42A60E
LegalNotice
11
mailto:[email protected]
-
AdministratorsGuideThisguideisintendedforanyuserwhoassumesroleofadeveloper/administratorofTeiidinstance.ThisguideguidesuserthroughinstallationofTeiidServer,configurationofdifferentservicesanddeploymentofTeiidartifactssuchasVDBs.BeforeonecandelveintoTeiiditisveryimportanttolearnfewbasicconstructsofTeiid,likewhatisVDB?whatisModel?etc.Forthatpleasereadtheshortintroductionherehttp://teiid.jboss.org/basics/
AdministratorsGuide
12
http://teiid.jboss.org/basics/
-
InstallationGuideTeiidneedstobeinstalledintoanexistingWildFly11.0.0installation.
Note Teiidprovidesanembeddedkit,howeveritshouldbeconsideredatechpreviewasitsAPIswilllikelyevolveandthereissparsedocumentation.
StepstoinstallTeiid
DownloadtheWildFlyapplicationserver.Installtheserverbyunzippingintoaknownlocation.Ex:/apps/jboss-install
Note YoumayalsochoosetouseanexistingASinstallation.HoweverifapreviousversionofTeiidwasalreadyinstalled,youmustremovetheoldTeiiddistributionartifactsbeforeinstallingthenewversion.
DownloadTeiid.UnzipthedownloadedartifactinsidetheWildFlyinstallation.Teiid10.2directorystructurematchesWildFlydirectly-itisjustanoverlay.ThiswilladdnecessarymodulesandconfigurationfilestoinstallTeiidinWildFly11.0.0inbothStandaloneandDomainmodes.Teiidprovidesseparateconfigurationfilesforbothstandalonemodeanddomainmode.BasedonmodetypeyouselectedtorunWildFly11.0.0,youmayhavetorunaCLIscripttocompletetheTeiidinstallation.
The"Domain"moderecommendedinaclusteredenvironmenttotakeadvantageofclusteredcachingandclustersafedistributionofevents.TeiidsdefaultconfigurationforDomainmodethroughCLIscriptconfiguredforhighavailabilityandclusteredcaching.
StandaloneMode
ifyouwanttostartthe"standalone"profile,executethefollowingcommand
/bin/standalone.sh-c=standalone-teiid.xml
InstallingTeiidusingCLIscript
TheaboveisstartingWildFlyinaseparateTeiidspecificconfigurationthatisbasedstandalone.xml.However,ifyoualreadyworkingwithapredefinedconfigurationforexampledefaultstandalone.xmlandwouldliketoinstallTeiidintothatconfiguration,thenyoucanexecutethefollowingJBossCLIscript.First,starttheserver
/bin/standalone.sh
theninaseparateconsolewindowexecute
/bin/jboss-cli.sh--file=bin/scripts/teiid-standalone-mode-install.cli
thiswillinstallTeiidsubsystemintotherunningconfigurationoftheWildFly11.0.0instandalonemode.
Note:Ifyouareusingstandalonehaorstandalonefull-ha,youshouldusetheteiid-standalone-ha-mode-install.cliscriptinstead.
DomainMode
InstallationGuide
13
http://wildfly.org/downloads/http://teiid.jboss.org/downloads/
-
Tostarttheserverin"Domain"mode,installWildFly11.0.0andTeiid10.2onalltheserversthataregoingtobepartofthecluster.Selectoneoftheserversasthe"master"domaincontroller,therestoftheserverswillbeslavesthatconnecttothe"master"domaincontrollerforalltheadministrativeoperations.PleaserefertoWildFly11.0.0provideddocumentationforfulldetails.
Onceyouconfiguredalltheservers,startthe"master"nodewithfollowingcommand
/bin/domain.sh
andon"slave"nodes
/bin/domain.sh
Theslavenodesfetchtheirdomainconfigurationfromthe"master"node.
Oncealltheserversareup,completetheinstallationtorunindomainmodebyexecutingthefollowingcommandagainstthe"master"node.Notethatthisonlyneedstoberunonceperdomain(i.e.cluster)install.ThisscriptwillinstallTeiidinthehaandfull-haprofiles.Itwillalsore-configuremain-server-grouptostartthehaprofile.Onceindomainmode,youcannotstaticallydeployresourcesbydroppingtheminthedomain/deploymentsfolder,sothisscriptwilldeploythedefaultresources(file,ldap,salesforceandwsconnectors)usingtheCLIinterface.
/bin/jboss-cli.sh--file=bin/scripts/teiid-domain-mode-install.cli
Thatsit!.WildFlyandTeiidarenowinstalledandrunning.Seebelowinstructionstocustomizevariousothersettings.
OnceVDBshavebeendeployed,userscannowconnecttheirJDBCapplicationstoTeiid.IfyouneedhelponconnectingyourapplicationtoTeiidusingJDBCcheckouttheClientDevelopersGuide.
DirectoryStructureExplained
ThisshowsthecontentsoftheTeiid10.2deployment.ThedirectorystructureisexactlythesameunderanyJBossprofile.
DirectoryStructure
/bin/scripts/docs/teiid/datsources/schema/examples/domain/configuration/modules/system/layers/base/org/jboss/teiid/*/standalone/configurationstandalone-teiid.xml
InstallationGuide
14
https://docs.jboss.org/author/display/WFLY9/WildFly+9+Cluster+Howto
-
Name Description
bin/scripts ContainsinstallationandutilityCLIscriptsforsettingupTeiidindifferentconfigurations.
docs/teiid Containsdocuments,examples,sampledatasourceXMLfragmentsandschemafiles.
/standalone/configurationstandalone-teiid.xml-MasterconfigurationfilefortheTeiidsystem.ThisfilecontainstheTeiidsubsystem,inadditiontothestandardWildFlywebprofilesubsystems
/domain/configuration/ -
/modules/system/layers/base/org/jboss/teiid/* ThisdirectorycontainstheTeiidmodulesforWildFly11.0.0system
/modules/system/layers/base/org/jboss/teiid/client
ThisdirectorycontainsTeiidclientlibraries.IthastheTeiidJDBCdriverjar,"teiid-11.0.0.Final-jdbc.jar",andalsocontains"teiid-hibernate-dialect-11.0.0.Final.jar"thatcontainsTeiidsHibernatedialect.
{standaloneordomain}/tmp/teiid
Thisdirectoryunderstandaloneordomain,containstemporaryfilescreatedbyTeiid.Thesearemostlycreatedbythebuffermanager.ThesefilesarenotneededacrossaVMrestart.CreationofTeiidlobvalues(forexamplethroughSQL/XML)willtypicallycreateonefileperlobonceitexceedstheallowableinmemorysizeof8KB.Inheavyusagescenarios,considerpointingthebufferdirectoryatapartitionthatisroutinelydefragmented.
{standaloneordomain}/data/teiid-data Thisdirectoryunderstandaloneordomain,containscachedvdbmetadatafiles.Donoteditthemmanually.
InstallationGuide
15
-
DeployingVDBsAVDBistheprimarymeanstodefineaVirtualDatabaseinTeiid.AusercancreateaVDBusingTeiidDesigner-http://www.jboss.org/teiiddesigner/-orfollowtheinstructionsintheReferenceGuidetocreateaVDBwithoutTeiidDesigner.
Onceyouhavea"VDB"builtitcanbedeployed/undeployedinTeiidruntimeindifferentways.
WarningIfVDBversioningisnotusedtogivedistinctversionnumbers,overwritingaVDBofthesamenamewillterminateallconnectionstotheoldVDB.ItisrecommendedthatVDBversioningbeusedforproductionsystems.
Caution RemovinganexistingVDBwillimmediatelycleanupVDBfileresources,andwillautomaticallyterminateexistingsessions.
CautionTheruntimenamesofdeployedVDBartifactsmusteitherbe*.vdbforazipfileor*-vdb.xmlforanxmlfileor-vdb.ddlforDDLfile.FailuretonamethedeploymentproperlywillresultinadeploymentfailureastheTeiidsubsystemwillnotknowhowtoproperlyhandletheartifact.
Tip ifyouhaveexistingVDBincombinationof*.vdbor-vdb.xmlformat,youcanmigratetoallDDLversionusingthe"teiid-convert-vdb.bat"or"teiid-convert-vdb.sh"utilityinthe"bin"directoryoftheinstallation.
DirectFileDeployment
CopytheVDBfileintothe
/standalone/deployments
directory.ThencreateanemptymarkerfilewithsamenameastheVDBwithextension".dodeploy"inthesamedirectory.Forexample,ifyourvdbnameis"enterprise.vdb",thenmarkerfilenamemustbe"enterprise.vdb.dodeploy".MakesurethattherearenootherVDBfileswiththesamename.IfaVDBalreadyexistswiththesamename,thenthisVDBwillbereplacedwiththenewVDB.ThisisthesimplestwaytodeployaVDB.Thisismostlydesignedforquickdeploymentduringdevelopment,whentheTeiidserverisavailablelocallyonthedevelopersmachine.
Note ThisonlyworksintheStandalonemode.ForDomainmode,youmustuseoneoftheotheravailablemethods.
AdminConsoleDeployment(Web)
Usetheadminwebconsoleat:
http://:/console
MoredetailsforthiscanbefoundintheAdminConsoleVDBdeploymentsection.ThisistheeasiestwaytodeployaVDBtoaremoteserver.
CLIbasedDeploymentWildFly11.0.0providescommandlineinterface(CLI)fordoinganykindofadministrativetask.Execute
DeployingVDBs
16
http://www.jboss.org/teiid/basics/virtualdatabases.htmlhttp://www.jboss.org/teiiddesigner/
-
bin/jboss-cli.sh--connect
commandandrun
#instandalonemodedeploy/path/to/my.vdb
#indomainmodedeploy/path/to/my.vdb--server-groups=main-server-group
todeploytheVDB.Notethatindomainmode,youneedtoeitherselectaparticular"server-group"orallavailableservergroupsaredeploymentoptions.CheckoutCLIdocumentationformoregeneralusageoftheCLI.
AdminShellDeploymentTeiidprovidesagroovybasedAdminShellscriptingtool,whichcanbeusedtodeployaVDB.Seethe"deploy"method.ConsulttheAdminShelldocumentationformoreinformation.NotethatusingtheAdminShellscripting,youcanautomatedeploymentofartifactsinyourenvironment.WhenusingAdminShell,indomainmode,theVDBisdeployedtoalltheavailableservers.
AdminAPIDeploymentTheAdminAPI(lookinorg.teiid.adminpi.*)providesJavaAPImethodsthatletsauserconnecttoaTeiidruntimeanddeployaVDB.IfyouneedtoprogramaticallydeployaVDBusethismethod.ThismethodispreferableforOEMusers,whoaretryingtoextendtheTeiidscapabilitiesthroughtheirapplications.WhenusingAdminAPI,indomainmode,theVDBisdeployedtoalltheservers.
DeployingVDBs
17
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide
-
DeployingVDBDependenciesApartfromdeployingtheVDB,theuserisalsoresponsibleforprovidingallthenecessarydependentlibraries,configurationforcreatingthedatasourcesthatareneededbythemodels(schemas)definedin"META-INF/vdb.xml"fileinsideyourVDB.Forexample,ifyouaretryingtointegratedatafromOracleRDBMSandFilesourcesinyourVDB,thenyouareresponsibleforprovidingtheJDBCdriverfortheOraclesourceandanynecessarydocumentsandconfigurationthatareneededbytheFileTranslator.
DatasourceinstancesmaybeusedbysingleVDB,ormaybesharedwithasotherVDBsorotherapplications.Considersharingconnectionstodatasourcesthathaveheavy-weightandresourceconstrained.
WiththeexceptionofJDBCsources,othersupporteddatasourceshaveacorrespondingJCAconnectorintheTeiidkit.Eitherdirectlyeditthestandalone-teiid.xmloruseCLItocreatetherequireddatasourcesbytheVDB.Exampleconfigurationsareprovidedforallthesourcesin"/docs/teiid/datasources"directory.NotethatintheDomainmode,youmustuseCLIoradmin-consoleorAdminShelltoconfigurethedatasources.
Somedatasourcesmaycontainpasswordsorothersensitiveinformation.SeetheWIKIarticleEncryptingDataSourcePasswordstonotstorepasswordsinplaintext.
OncetheVDBanditsdependenciesaredeployed,thenclientapplicationscanconnectusingtheJDBCAPI.Ifthereareanyerrorsinthedeployment,aconnectionattemptwillnotbesuccessfulandamessagewillbelogged.Youcanusetheadmin-consoletoolorcheckthelogfilesforerrorsandcorrectthembeforeproceeding.CheckClientDevelopersGuideonhowtouseJDBCtoconnecttoyourVDB.
DeployingVDBDependencies
18
https://community.jboss.org/wiki/JBossAS7SecuringPasswords
-
ApacheAccumuloDataSourcesAccumulodatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly11.0.0duringinstallation.TherearemanywaystocreateaAccumulodatasource,usingCLI,AdminShell,admin-console,etc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutethefollowingcommandusingtheCLIonceyouconnectedtotheServer.MakesureyouprovidethecorrectURLandusercredentials.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=accumulo/connection-definitions=teiid:add(jndi-name=java:/accumulo-ds,class-name=org.teiid.resource.adapter.accumulo.AccumuloManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=accumulo/connection-definitions=teiid/config-properties=ZooKeeperServerList:add(value=localhost:2181)/subsystem=resource-adapters/resource-adapter=accumulo/connection-definitions=teiid/config-properties=Username:add(value=user)/subsystem=resource-adapters/resource-adapter=accumulo/connection-definitions=teiid/config-properties=Password:add(value=password)/subsystem=resource-adapters/resource-adapter=accumulo/connection-definitions=teiid/config-properties=InstanceName:add(value=instancename)/subsystem=resource-adapters/resource-adapter=accumulo/connection-definitions=teiid/config-properties=Roles:add(value=public)/subsystem=resource-adapters/resource-adapter=accumulo:activaterunbatch
AllthepropertiesthataredefinedontheRARfileare
PropertyName Description Required Default
ZooKeeperServerList
Acommaseparatedlistofzookeeperserverlocations.Eachlocationcancontainanoptionalport,oftheformathost:port
true none
Username ConnectionUsersName true none
Password ConnectionUserspassword true none
InstanceName Accumuloinstancename true none
Rolesoptionalvisibilityforuser,supplymultiplewithcommaseparated
false none
TofindoutallthepropertiesthataresupportedbythisAccumuloConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=accumulo)
Tip
DevelopersTip-IfWildFly11.0.0isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin"/docs/teiid/datasources/accumulo"directoryunder"resource-adapters"subsystem.Shutdowntheserver
DeployingVDBDependencies
19
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
beforeyoueditthisfile,andrestartafterthemodificationsaredone.
DeployingVDBDependencies
20
-
AmazonSimpleDBDataSourcesSimpleDBdatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly11.0.0duringinstallation.TherearemanywaystocreateaSimpleDBdatasource,usingCLI,AdminShell,admin-console,etc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutethefollowingcommandusingtheCLIonceyouconnectedtotheServer.Makesureyouprovidethecorrectaccesskeys.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=simpledb/connection-definitions=simpledbDS:add(jndi-name=java:/simpledbDS,class-name=org.teiid.resource.adapter.simpledb.SimpleDBManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=simpledb/connection-definitions=simpledbDS/config-properties=AccessKey:add(value=xxx)/subsystem=resource-adapters/resource-adapter=simpledb/connection-definitions=simpledbDS/config-properties=SecretAccessKey:add(value=xxx)/subsystem=resource-adapters/resource-adapter=simpledb:activaterunbatch
TofindoutallthepropertiesthataresupportedbythisSimpleDBConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=simpledb)
Tip
DevelopersTip-IfWildFly11.0.0isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin"/docs/teiid/datasources/simpledb"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
DeployingVDBDependencies
21
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
CassandraDataSourcesCassandradatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly11.0.0duringinstallation.TherearemanywaystocreateaCassandradatasource,usingCLI,AdminShell,admin-console,etc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutethefollowingcommandusingtheCLIonceyouconnectedtotheServer.MakesureyouprovidethecorrectURLandusercredentials.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=cassandra/connection-definitions=cassandraDS:add(jndi-name=java:/cassandraDS,class-name=org.teiid.resource.adapter.cassandra.CassandraManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=cassandra/connection-definitions=cassandraDS/config-properties=Address:add(value=127.0.0.1)/subsystem=resource-adapters/resource-adapter=cassandra/connection-definitions=cassandraDS/config-properties=Keyspace:add(value=my-keyspace)/subsystem=resource-adapters/resource-adapter=cassandra:activaterunbatch
TofindoutallthepropertiesthataresupportedbythisCassandraConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=cassandra)
Tip
DevelopersTip-IfWildFly11.0.0isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin"/docs/teiid/datasources/cassandra"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
DeployingVDBDependencies
22
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
CouchbaseDataSourcesCouchbasedatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly11.0.0duringinstallation.TherearemanywaystocreateaCouchbasedatasource,usingCLI,AdminShell,admin-console,etc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutethefollowingcommandusingtheCLIonceyouconnectedtotheServer.MakesureyouprovidethecorrectURLandusercredentials.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=couchbaseQS:add(module=org.jboss.teiid.resource-adapter.couchbase)/subsystem=resource-adapters/resource-adapter=couchbaseQS/connection-definitions=couchbaseDS:add(jndi-name="java:/couchbaseDS",class-name=org.teiid.resource.adapter.couchbase.CouchbaseManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=couchbaseQS/connection-definitions=couchbaseDS/config-properties=ConnectionString:add(value="localhost")/subsystem=resource-adapters/resource-adapter=couchbaseQS/connection-definitions=couchbaseDS/config-properties=Keyspace:add(value="default")/subsystem=resource-adapters/resource-adapter=couchbaseQS/connection-definitions=couchbaseDS/config-properties=Namespace:add(value="default")runbatch
TofindoutallthepropertiesthataresupportedbythisCouchbaseConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=couchbase)
Tip
DevelopersTip-IfWildFly11.0.0isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin"/docs/teiid/datasources/couchbase"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
DeployingVDBDependencies
23
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
FileDataSourcesFiledatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly11.0.0duringinstallation.Therearemanywaystocreatethefiledatasource,usingCLI,AdminShell,admin-console,etc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutefollowingcommandusingtheCLIonceyouconnectedtotheServer.Makesureyouprovidethecorrectdirectorynameandotherpropertiesbelow.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=file/connection-definitions=fileDS:add(jndi-name=java:/fileDS,class-name=org.teiid.resource.adapter.file.FileManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=file/connection-definitions=fileDS/config-properties=Parentdirectory:add(value=/home/rareddy/testing/)/subsystem=resource-adapters/resource-adapter=file/connection-definitions=fileDS/config-properties=AllowParentPaths:add(value=true)/subsystem=resource-adapters/resource-adapter=file:activaterunbatch
TofindoutallthepropertiesthataresupportedbythisFileConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=file)
Tip
DevelopersTip-IfWildFly11.0.0isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin"/docs/teiid/datasources/file"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
DeployingVDBDependencies
24
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
Ftp/FtpsDataSourcesFtp/FtpsdatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly11.0.0duringinstallation.TherearemanywaystocreatetheFtp/Ftpsdatasource,usingCLI,AdminShell,admin-console,etc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutefollowingcommandusingtheCLIonceyouconnectedtotheServer.Makesureyouprovidethecorrectdirectorynameandotherpropertiesbelow.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
/subsystem=resource-adapters/resource-adapter=ftp:add(module=org.jboss.teiid.resource-adapter.ftp)/subsystem=resource-adapters/resource-adapter=ftp/connection-definitions=ftpDS:add(jndi-name=${jndi.name}",class-name=org.teiid.resource.adapter.ftp.FtpManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=ftp/connection-definitions=ftpDS/config-properties=ParentDirectory:add(value="${ftp.parent.dir}")/subsystem=resource-adapters/resource-adapter=ftp/connection-definitions=ftpDS/config-properties=Host:add(value="${ftp.parent.host}")/subsystem=resource-adapters/resource-adapter=ftp/connection-definitions=ftpDS/config-properties=Port:add(value=${ftp.parent.port}")/subsystem=resource-adapters/resource-adapter=ftp/connection-definitions=ftpDS/config-properties=Username:add(value=${ftp.parent.username}")/subsystem=resource-adapters/resource-adapter=ftp/connection-definitions=ftpDS/config-properties=Password:add(value=${ftp.parent.password}")/subsystem=resource-adapters/resource-adapter=ftp:activate()
TofindoutallthepropertiesthataresupportedbythisFtp/FtpsConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=ftp)
Tip
DevelopersTip-IfWildFly11.0.0isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin"/docs/teiid/datasources/ftp"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
DeployingVDBDependencies
25
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
GoogleSpreadsheetDataSources
TheGoogleJCAconnectorisnamedteiid-connector-google.rar.Theexamplesincludeasamplegoogle.xmlfile.TheJCAconnectorhasnumberofconfig-propertiestodriveauthentication.TheJCAconnectorconnectstoexactlyonespreadsheetwitheachsheetexposedasatable.
AuthenticationtoyourgoogleaccountmaybedoneusingOAuth,whichrequiresarefreshtoken(outlinedbelow).
Configproperty Description
ClientId clientIDforaccess.Ifnotspecified,theTeiiddefaultwillbeused.
ClientSecret clientsecretforaccess.Ifnotspecified,theTeiiddefaultwillbeused.
RefreshToken UseguidebelowtoretrieveRefreshToken.RequestaccesstoGoogleDriveandSpreadsheetAPI.
SpreadsheetName Name/TitleoftheSpreadsheet.
SpreadsheetId IDofSpreadsheet.
ApiVersion OptionalGDataAPIversion.Canbev3orv4.Defaultstov3.
BatchSize Maximumnumberofrowsthatcanbefetchedatatime.Defaultsto4096.
Thev4apirequirestheuseofSpreadsheetIdandspecifyingClientIdandClientSecret.Somesheetssuchasthosecontainedinateamdrivewillonlybevisibletothev4api.
CreateAuthorizationCredentials
Forv3connectionsitisrecommendedthatyoucreateyourownauthorizationcredentialsratherthanrelyingonthedefaultTeiidclientidandclientsecret.Forv4connectionsitisrequiredthatyoucreateyourowncredentials.CreatingyourownprojectwillgiveyougreatercontrolovermonitoringandcontrollingAPIaccess.
YoushouldfollowtheOAuth2ForDevicesGuideprerequisites.YoushouldallowtheprojectaccesstoGoogleDriveAPIandtheSheetsAPI.
Acondensedformoftherestoftheguide"ObtainingOAuth2.0accesstokens"iscoverednextas"GettinganOAuthRefreshToken".
GettinganOAuthRefreshToken
WithabrowserorotherclientissuetherequestwiththeappropriateclientID:
https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fspreadsheets&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&client_id=;
DeployingVDBDependencies
26
https://developers.google.com/accounts/docs/OAuth2ForDeviceshttps://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fspreadsheets&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&client_id="
-
ThencopytheauthorizationcodeintofollowingPOSTrequestandrunitincommandline:
curl\--data-urlencodecode=\--data-urlencodeclient_id=\--data-urlencodeclient_secret=\--data-urlencoderedirect_uri=urn:ietf:wg:oauth:2.0:oob\--data-urlencodegrant_type=authorization_codehttps://accounts.google.com/o/oauth2/token
Therefreshtokenwillbeintheresponse.
TousetheTeiiddefaults:
Clickonhttps://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive+https%3A%2F%2Fspreadsheets.google.com%2Ffeeds&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&client_id=217138521084.apps.googleusercontent.com
ThencopytheauthorizationcodeintofollowingPOSTrequestandrunitincommandline:
curl\--data-urlencodecode=\--data-urlencodeclient_id=217138521084.apps.googleusercontent.com\--data-urlencodeclient_secret=gXQ6-lOkEjE1lVcz7giB4Poy\--data-urlencoderedirect_uri=urn:ietf:wg:oauth:2.0:oob\--data-urlencodegrant_type=authorization_codehttps://accounts.google.com/o/oauth2/token
ImplementationDetailsGoogleTranslatorisimplementedusingGDataAPIandtheGoogleVisualizationProtocol.v4connectionsstillrelyuponv3functionalityforupdate/deleteasthev4APIdoesnotprovideappropriatesearchfunctionality.
DeployingVDBDependencies
27
https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive+https%3A%2F%2Fspreadsheets.google.com%2Ffeeds&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&client_id=217138521084.apps.googleusercontent.com
-
InfinispanDataSourcesInfinispandatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly11.0.0duringinstallation.TherearemanywaystocreateaInfinispanhotrodbaseddatasource,usingCLI,AdminShell,admin-console,etc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutethefollowingcommandsusingtheCLIonceyouconnectedtotheServer.MakesureyouprovidethecorrectURLandusercredentials.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=infinispanDS:add(module=org.jboss.teiid.resource-adapter.infinispan.hotrod)/subsystem=resource-adapters/resource-adapter=infinispanDS/connection-definitions=ispnDS:add(jndi-name="java:/ispnDS",class-name=org.teiid.resource.adapter.infinispan.hotrod.InfinispanManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=infinispanDS/connection-definitions=ispnDS/config-properties=RemoteServerList:add(value="{host}:11222")/subsystem=resource-adapters/resource-adapter=infinispanDS:activaterun-batch
AllthepropertiesthataredefinedontheRARfileare
PropertyName Description Required Default
RemoteServerList
Acommaseparatedlistofserverlocations.Eachlocationcancontainanoptionalport,oftheformathost:port
Yes n/a
UserNameIfremoteserverissecured,thispropertyusedasusernametologin
No n/a
PasswordIfremoteserverissecured,thispropertyusedaspasswordtologin
No n/a
SaslMechanism
Ifremoteserverissecured,thispropertydefinesthetypeofsecurity.Allowedvaluesare"CRAM-MD5","DIGEST-MD5","PLAIN","EXTERNAL"."EXTERNAL"iswhencertificatebasedsecurityatuse,allothersuseusername/password.
No n/a
AuthenticationRealm Realmtouseforauthentication. No n/a
AuthenticationServerName InfinispanservernamewheretheAuthenticationishandled. No n/a
TrustStoreFileName
When"EXTERNAL"SaslMechnismused,usethispropertytodefinetruststore.
No n/a
DeployingVDBDependencies
28
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
AlternativelyJAVAsystemproperty"javax.net.ssl.trustStore"canalsobedefinedinstead.
TrustStorePassword
When"EXTERNAL"SaslMechnismused,usethispropertytodefinetruststorepassword.AlternativelyJAVAsystemproperty"javax.net.ssl.trustStorePassword"canalsobedefinedinstead.
No n/a
KeyStoreFileName
When"EXTERNAL"SaslMechnismused,usethispropertytodefinekeystore.AlternativelyJAVAsystemproperty"javax.net.ssl.keyStore"canalsobedefinedinstead.
No n/a
KeyStorePassword
When"EXTERNAL"SaslMechnismused,usethispropertytodefinekeystorepassword.AlternativelyJAVAsystemproperty"javax.net.ssl.keyStorePassword"canalsobedefinedinstead.
No n/a
TofindoutallthepropertiesthataresupportedbythisInfinispanConnector,executethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=infinispan)
Tip
DevelopersTip-IfWildFly11.0.0isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin"/docs/teiid/datasources/infinispan"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
DeployingVDBDependencies
29
-
JDBCDataSourcesThefollowingisanexamplehighlightingconfiguringanOracledatasource.Theprocessisnearlyidenticalregardlessofthedatabasevendor.TypicallytheJDBCjarandtheconfigurationlikeconnectionURLandusercredentialschange.
Thereareconfigurationtemplatesforallthedatasourcesinthe"/docs/teiid/datasources"directory.AcompletedescriptionhowadatasourcecanbeaddedintoWildFlyisalsodescribedhere.Thebelowwepresenttwodifferentwaystocreateadatasource.
DeployingasingleJDBCJarFile
FirststepinconfiguringthedatasourceisdeployingtherequiredJDBCjarfile.Forexample,ifyouaretryingtocreateaOracledatasource,firstyouneedtodeploythe"ojdbc6.jar"filefirst.ExecutefollowingcommandusingtheCLIonceyouconnectedtotheServer.
deploy/path/to/ojdbc6.jar
Tip DevelopersTip-IfWildFly11.0.0isrunninginstandalonemode,youcanalsomanuallycopythisojdbc6.jar"tothe"/standalone/deployments"directory,toautomaticallydeploywithoutusingtheCLItool.
CreatingamodulefortheDriver
Youmayalsocreateamoduletohavemorecontroloverthehandlingofthedriver.Incaseswherethedriverisnotcontainedinasinglefile,thismaybepreferabletocreatinga"uber"jarasthedependenciescanbemanagedseparately.
Creatingamoduleforadriverisnodifferentthananyothercontainermodule.Youjustincludethenecessaryjarsasresourcesinthemoduleandreferenceothermodulesasdependencies.
...
CreateDataSourceNowthatyouhavetheJDBCdriverdeployedorthemodulecreated,itistimetocreateadatasourceusingthisdriver.TherearemanywaystocreatethedatasourceusingCLI,AdminShell,admin-consoleetc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutefollowingcommandusingCLIonceyouconnectedtotheServer.MakesureyouprovidethecorrectURLandusercredentialsandedittheJNDInametomatchtheJNDInameyouusedinVDB.
/subsystem=datasources/data-source=oracel-ds:add(jndi-name=java:/OracleDS,driver-name=ojdbc6.jar,connection-url=jdbc:oracle:thin:{host}:1521:orcl,user-name={user},password={password})/subsystem=datasources/data-source=oracel-ds:enable
DeployingVDBDependencies
30
https://docs.jboss.org/author/display/WFLY10/DataSource+configurationhttps://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLIhttps://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
Thedriver-namewillmatchthenameofjarormodulethatyoudeployedforthedriver.
Tip
DevelopersTip-IfWildFly11.0.0isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin*"/docs/teiid/datasources/oracle"directoryunder"datasources"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
DeployingVDBDependencies
31
-
LDAPDataSourcesLDAPdatasourcesuseaTeiidspecificJCAconnectorwhichisdeployedintoWildFly11.0.0duringinstallation.Therearemanywaystocreatetheldapdatasource,usingCLI,AdminShell,admin-consoleetc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutefollowingcommandusingCLIonceyouconnectedtotheServer.MakesureyouprovidethecorrectURLandusercredentials.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=ldap/connection-definitions=ldapDS:add(jndi-name=java:/ldapDS,class-name=org.teiid.resource.adapter.ldap.LDAPManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=ldap/connection-definitions=ldapDS/config-properties=LdapUrl:add(value=ldap://ldapServer:389)/subsystem=resource-adapters/resource-adapter=ldap/connection-definitions=ldapDS/config-properties=LdapAdminUserDN:add(value={cn=???,ou=???,dc=???})/subsystem=resource-adapters/resource-adapter=ldap/connection-definitions=ldapDS/config-properties=LdapAdminUserPassword:add(value={pass})/subsystem=resource-adapters/resource-adapter=ldap/connection-definitions=ldapDS/config-properties=LdapTxnTimeoutInMillis:add(value=-1)/subsystem=resource-adapters/resource-adapter=ldap:activaterunbatch
TofindoutallthepropertiesthataresupportedbythisLDAPConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=ldap)
Tip
DevelopersTip-IfWildFly11.0.0isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin*"/docs/teiid/datasources/ldap"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
Note Touseananonymousbind,settheLdapAuthTypetonone.Whenperformingananonymousbindthevaluesfortheadminuserandpasswordwillbeignored.
Tip Ifyouexperiencestaleconnectionsinthepool,youshouldenableeitherthevalidate-on-matchorthebackground-validationpoolsettings.
DeployingVDBDependencies
32
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
MongoDBDataSourcesMongoDBdatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly11.0.0duringinstallation.TherearemanywaystocreateaMongoDBdatasource,usingCLI,AdminShell,admin-console,etc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutethefollowingcommandusingtheCLIonceyouconnectedtotheServer.MakesureyouprovidethecorrectURLandusercredentials.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=mongodb/connection-definitions=mongodbDS:add(jndi-name="java:/mongoDS",class-name=org.teiid.resource.adapter.mongodb.MongoDBManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=mongodb/connection-definitions=mongodbDS/config-properties=RemoteServerList:add(value="{host}:27017")/subsystem=resource-adapters/resource-adapter=mongodb/connection-definitions=mongodbDS/config-properties=Database:add(value="{db-name}")/subsystem=resource-adapters/resource-adapter=mongodb:activaterunbatch
AllthepropertiesthataredefinedontheRARfileare
PropertyName Description Required Default
RemoteServerListAcommaseparatedlistofserverlocations.Eachlocationcancontainanoptionalport,oftheformathost:port
Username ConnectionUsersName false none
Password ConnectionUserspassword false none
Database MongoDBdatabasename true none
SecurityType
MongoDBTypeofAuthenticationtobeused.Allowedvaluesare"None","SCRAM_SHA_1","MONGODB_CR","Kerberos","X509".IfyouareusingMongoDBversionlessthan3.0,MongoDBbydefaultuses"MONGODB_CR",thusthisvalueneedtobesetaccordinglyorsettoNone.
false SCRAM_SHA_1
AuthDatabase
MongoDBDatabaseNameforuserauthenticationincasewhenSecurityType'MONGODB-CR'isused.Thisisanoptionalvalue.
false none
Ssl UseSSLConnections false none
TofindoutallthepropertiesthataresupportedbythisMongoDBConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=mongodb)
DevelopersTip-IfWildFly11.0.0isrunninginstandalonemode,youcanalsomanuallyeditthe"
-
Tip install>/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin"/docs/teiid/datasources/mongodb"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
DeployingVDBDependencies
34
-
PhoenixDataSourcesThefollowingisaexampleforsettingupPhoenixDataSources,whichispreconditionforApachePhoenixTranslator.InadditiontotheDataSourcessetup,thisarticlealsocovermappingPhoenixtabletoanexistingHBasetableandcreatinganewPhoenixtable.
ThereareconfigurationtemplatesforPhoenixdatasourcesinthe"/docs/teiid/datasources"directory.AcompletedescriptionhowadatasourcecanbeaddedintoWildFlyisalsodescribedhere.
ConfiguringaPhoenixdatasourceinWildFly
ConfiguringaPhoenixdatasourceisnearlyidenticaltoconfiguringJDBCDataSources.ThefirststepisdeployingthePhoenixdriverjar.UsingbelowCLIcommandtodeployPhoenixdriver:
moduleadd--name=org.apache.phoenix--resources=/path/to/phoenix-[version]-client.jar--dependencies=javax.api,sun.jdk,org.apache.log4j,javax.transaction.api/subsystem=datasources/jdbc-driver=phoenix:add(driver-name=phoenix,driver-module-name=org.apache.phoenix,driver-class-name=org.apache.phoenix.jdbc.PhoenixDriver)
TheDriverjarcanbedownloadfromphoenixdocument.
ThesecondstepsiscreatingtheDataSourcebaseonabovedeployeddriver,whichisalsolikecreatingJDBCDataSource.UsingbelowCLIcommandtocreateDataSource:
/subsystem=datasources/data-source=phoenixDS:add(jndi-name=java:/phoenixDS,driver-name=phoenix,connection-url=jdbc:phoenix:{zookeeperquorumserver},enabled=true,use-java-context=true,user-name={user},password={password})/subsystem=datasources/data-source=phoenixDS/connection-properties=phoenix.connection.autoCommit:add(value=true)
PleasemakesuretheURL,Driver,andotherpropertiesareconfiguredcorrectly:
jndi-name-TheJNDInameneedtomatchtheJNDInameyouusedinVDB
driver-name-TheDrivernameneedtomatchthedriveryoudeployedinabovesteps
connection-url-TheURLneedtomatchtheHBasezookeeperquorumserver,theformatlikejdbc:phoenix[:[:][:]],jdbc:phoenix:127.0.0.1:2181isaexample
user-name/password-TheusercredentialsforPhoenixConnection
ThePhoenixConnectionAutoCommitdefaultisfalse.Setphoenix.connection.autoCommittotrueifyouwillbeexecutingINSERT/UPDATE/DELETEstatementsagainstPhoenix.
MappingPhoenixtabletoanexistingHBasetable
MappingPhoenixtabletoanexistingHBasetablehas2steps.Thefirststepisinstallingphoenix-[version]-server.jartotheclasspathofeveryHBaseregionserver.AneasywaytodothisistocopyitintotheHBaselib-formoredetailspleaserefertothephoenixdocumentation.
ThesecondstepisexecutingtheDDLtomapaPhoenixtabletoanexistingHBasetable.TheDDLcaneitherbeexecutedviaPhoenixCommandLine,orexecutedbyJDBC.
DeployingVDBDependencies
35
https://docs.jboss.org/author/display/WFLY10/DataSource+configurationhttp://phoenix.apache.org/http://phoenix.apache.org/download.htmlhttp://phoenix.apache.org/download.html
-
TheFollowingisaexampleformappinganexistingHBaseCustomerwiththefollowingstructure:
Asdepictedabove,theHBaseCustomertablehave2columnfamilies,customerandsales,andeachhas2columnqualifiers,name,city,productandamountrespectively.WecanmapthisTabletoPhoenixviaDDL:
CREATETABLEIFNOTEXISTS"Customer"("ROW_ID"VARCHARPRIMARYKEY,"customer"."city"VARCHAR,"customer"."name"VARCHAR,"sales"."amount"VARCHAR,"sales"."product"VARCHAR)
FormoreaboutmappingPhoenixtabletoanexistingHBasetablepleaserefertothephoenixdocumentation.
CreatinganewPhoenixtable
CreatinganewPhoenixtableisjustlikemappingtoanexistingHBasetable.Phoenixwillcreateanymetadata(table,columnfamilies)thatdonotexist.SimilartotheaboveexampletheDDLtocreatethePhoenix/HBaseCustomertablewouldbe:
CREATETABLEIFNOTEXISTS"Customer"("ROW_ID"VARCHARPRIMARYKEY,"customer"."city"VARCHAR,"customer"."name"VARCHAR,"sales"."amount"VARCHAR,"sales"."product"VARCHAR)
DefiningForeignTableinVDBFinally,weneeddefineaForeignTableinVDBthatmaptoPhoenixtable,thefollowingprinciplesshouldbeconsideredindefiningForeignTable:
nameinsourceoptioninTableusedtomatchPhoenixtablename
nameinsourceoptioninColumnusedtomatchHBaseTablesColumns
createaprimarykeyisrecommended,theprimarykeycolumnshouldmatchPhoenixtablesprimarykey/HBaserowid.
With"MappingPhoenixtabletoanexistingHBasetable"sections`Customer'table,belowisaexample:
CREATEFOREIGNTABLECustomer(PKstringOPTIONS(nameinsource'ROW_ID'),citystringOPTIONS(nameinsource'"city"'),namestringOPTIONS(nameinsource'"name"'),amountstringOPTIONS(nameinsource'"amount"'),productstringOPTIONS(nameinsource'"product"'),CONSTRAINTPK0PRIMARYKEY(PK))OPTIONS(nameinsource'"Customer"',"UPDATABLE"'TRUE');
Note "Constraintviolation.Xmaynotbenull"exceptionmaythrownifupdatingatablewithoutdefiningaprimarykey.
DeployingVDBDependencies
36
http://phoenix.apache.org/faq.html#How_I_map_Phoenix_table_to_an_existing_HBase_table
-
DeployingVDBDependencies
37
-
SalesforceDataSourcesSalesforcedatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly11.0.0duringinstallation.Therearethreeversionsofthesalesforceresourceadapter-salesforce,whichcurrentlyprovidesconnectivitytothe22.0SalesforceAPI,salesforce-34,whichprovidesconnectivitytothe34.0SalesforceAPI,andsalesforce-41.Theversion22.0supporthasbeendeprecated.
Note
IfyouneedconnectivitytoanAPIversionotherthanwhatisbuiltin,youmaytrytouseanexistingconnectivitypair,butinsomecircumstances-especiallyaccessingalaterremoteapifromanolderjavaapi-thisisnotpossibleandresultsinwhatappearstobehungconnections.PleaseraiseanissueifyoucannotsuccessfullyaccessaspecificAPIversion.
Therearemanywaystocreatethesalesforcedatasource,usingCLI,AdminShell,admin-consoleetc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutefollowingcommandusingtheCLIonceyouconnectedtotheServer.MakesureyouprovidethecorrectURLandusercredentials.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=salesforce/connection-definitions=sfDS:add(jndi-name=java:/sfDS,class-name=org.teiid.resource.adapter.salesforce.SalesForceManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=salesforce/connection-definitions=sfDS/config-properties=URL:add(value=https://www.salesforce.com/services/Soap/u/22.0)/subsystem=resource-adapters/resource-adapter=salesforce/connection-definitions=sfDS/config-properties=username:add(value={user})/subsystem=resource-adapters/resource-adapter=salesforce/connection-definitions=sfDS/config-properties=password:add(value={password})/subsystem=resource-adapters/resource-adapter=salesforce:activaterunbatch
Thesalesforce-xxconnectiondefinitionconfigurationissimilartotheabove.Theresourceadapternamewouldinsteadbesalesforce-xx,andtheurlwouldpointtoalaterversion.
TofindoutallthepropertiesthataresupportedbythisSalesforceConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=salesforce)
Tip
DevelopersTip-IfWildFly11.0.0isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin*"/docs/teiid/datasources/salesforce"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
MutualAuthentication
IfyouneedtoconnecttoSalesforceusingMutualAuthentication,followthedirectionstosetupSalesforceathttps://help.salesforce.com/apex/HTViewHelpDoc?id=security_keys_uploading_mutual_auth_cert.htm&language=en_USthenconfigurethebelowCXFconfigurationfileontheresource-adapterbyaddingfollowingpropertytoabovecliscript
/subsystem=resource-adapters/resource-adapter=salesforce/connection-definitions=sfDS/config-properties=ConfigFile:add(value=${jboss.server.config.dir}/cxf-https.xml)
DeployingVDBDependencies
38
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLIhttps://help.salesforce.com/apex/HTViewHelpDoc?id=security_keys_uploading_mutual_auth_cert.htm&language=en_US
-
cxf-https.xml
moreinformationaboutCXFconfigurationfilecanbefoundathttp://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport(includingSSLsupport)-ConfiguringSSLSupport
h==OAuthSecuritywith"RefreshToken"
ThebelowlayoutthedirectionstouseRefreshTokenbasedOAuthAuthenticationwithSalesforce.
1)createconnectedapp(mayneedtosetupcustomdomain)2)addprofileand/orpermissionssettotheconnectedapp3)grabthe"callbackurl"(oneneedtosetashttps://localhost:443/_callback"4)Runthroughtheteiid-oauth-util.shin"/bin"directory,useclient_id,client_pass,andcallbackfromconnectedapp5)use"https://login.salesforce.com/services/oauth2/authorize"authorizelink6)use"https://login.salesforce.com/services/oauth2/token"foraccesstokenurl7)theyougetarefreshtokenfromit8)createasecurity-domainbyexecutingCLI
/subsystem=security/security-domain=oauth2-security:add(cache-type=default)/subsystem=security/security-domain=oauth2-security/authentication=classic:add/subsystem=security/security-domain=oauth2-security/authentication=classic/login-module=Kerberos:add(code=org.teiid.jboss.oauth.OAuth20LoginModule,flag=required,module=org.jboss.teiid.security,module-options=[client-id=xxxx,client-secret=xxxx,refresh-token=xxxx,access-token-uri=https://login.salesforce.com/services/oauth2/token])reload
thiswillgeneratefollowingXMLinthestandalone.xmlordomain.xml(thiscanalsobedirectlyaddedtothestandalone.xmlordomain.xmlfilesinsteadofexecutingtheCLI)
standalone.xml
DeployingVDBDependencies
39
http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport(includingSSLsupport)-ConfiguringSSLSupporthttps://localhost:443/_callback
-
9)Thentousetheabovesecuritydomaininthesalesforcedatasourceconfiguration,add"oauth2-security"
OAuthSecuritywith"JWTToken"basedSteps
ThebelowlayoutthedirectionstouseJWTtokenbasedOAuthAuthenticationwithSalesforce.
1)CreateaSelf-SignedcertificatelocallyoronSalesForce.(usersetupsecurity-controlsCertificateandKeyManagement)2)Downloadthecertificateandalsoputinkeystoreanddownloadkeystore.KeystoreisneededforTeiid,certificateforthesalesforcesetup3)CreateconnectedappandselectOAuth,andselectallthescopes(somepostssayrefresh-tokenofflineismust)4)createaprofileand/orpermissionsetassigntotheconnectedapp.Ibelievebeforeyoucancreateaconnectedappyouneedtosetupcustomdomain5)Whenyoucreatingconnectedappmakesureyouaddthecertificatein"DigitalCertificate"6)NowinTeiidcreatesecurity-domainbyexecutingCLI
/subsystem=security/security-domain=oauth2-jwt-security:add(cache-type=default)/subsystem=security/security-domain=oauth2-jwt-security/authentication=classic:add/subsystem=security/security-domain=oauth2-jwt-security/authentication=classic/login-module=oauth:add(code=org.teiid.jboss.oauth.OAuth20LoginModule,flag=required,module=org.jboss.teiid.security,module-options=[client-id=xxxx,client-secret=xxxx,access-token-uri=https://login.salesforce.com/services/oauth2/token,jwt-audience=https://login.salesforce.com,[email protected],keystore-type=JKS,keystore-password=changeme,keystore-url=${jboss.server.config.dir}/salesforce.jks,certificate-alias=teiidtest,signature-algorithm-name=SHA256withRSA])reload
thiswillgeneratefollowingXMLinthestandalone.xmlordomain.xml(thiscanalsobedirectlyaddedtothestandalone.xmlordomain.xmlfilesinsteadofexecutingtheCLI)
standalone.xml
7)Thentousetheabovesecuritydomaininthesalesforcedatasourceconfiguration,add"oauth2-jwt-security"
Morehelpfullinks
DeployingVDBDependencies
40
-
https://developer.salesforce.com/blogs/developer-relations/2011/03/oauth-and-the-soap-api.htmlhttps://help.salesforce.com/apex/HTViewHelpDoc?id=remoteaccess_oauth_jwt_flow.htm&language=en_US#create_tokenhttp://salesforce.stackexchange.com/questions/31904/how-and-when-does-a-salesforce-saml-oauth2-user-give-permission-to-use-a-connehttp://salesforce.stackexchange.com/questions/30596/oauth-2-0-jwt-bearer-token-flowhttp://salesforce.stackexchange.com/questions/88396/invalid-assertion-error-in-jwt-bearer-token-flow
Logging
Logging,whenenabled,willbeperformedatanINFOleveltotheorg.apache.cxf.interceptorcontext.
PerResourceAdapder
TheCXFconfigpropertymayalsobeusedtocontroltheloggingofrequestsandresponses.
Exampleloggingdatasource
NoTransactiontokenhttps://www.salesforce.com/services/Soap/u/34.0name/path/to/cxf.xml
Correspondingcxf.xml
Exampleloggingdatasource
AllCXFUsage
WiththeWildFlydistributionofCXFasystempropertycanbeusedtoenableCXFloggingacrossallusageintheapplicationserver-seetheWildFlydocs.
DeployingVDBDependencies
41
https://developer.salesforce.com/blogs/developer-relations/2011/03/oauth-and-the-soap-api.htmlhttps://help.salesforce.com/apex/HTViewHelpDoc?id=remoteaccess_oauth_jwt_flow.htm&language=en_US#create_tokenhttp://salesforce.stackexchange.com/questions/31904/how-and-when-does-a-salesforce-saml-oauth2-user-give-permission-to-use-a-connehttp://salesforce.stackexchange.com/questions/30596/oauth-2-0-jwt-bearer-token-flowhttp://salesforce.stackexchange.com/questions/88396/invalid-assertion-error-in-jwt-bearer-token-flowhttps://docs.jboss.org/author/display/JBWS/Advanced+User+Guide
-
ExampleSystemProperty
DeployingVDBDependencies
42
-
SolrDataSourcesSolrdatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly11.0.0duringinstallation.TherearemanywaystocreateaSolrdatasource,usingCLI,AdminShell,admin-console,etc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutethefollowingcommandusingtheCLIonceyouconnectedtotheServer.MakesureyouprovidethecorrectURLandusercredentials.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=solr/connection-definitions=solrDS:add(jndi-name=java:/solrDS,class-name=org.teiid.resource.adapter.solr.SolrManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=solr/connection-definitions=solrDS/config-properties=url:add(value=http://localhost:8983/solr/)/subsystem=resource-adapters/resource-adapter=solr/connection-definitions=solrDS/config-properties=CoreName:add(value=collection1)/subsystem=resource-adapters/resource-adapter=solr:activaterunbatch
TofindoutallthepropertiesthataresupportedbythisSolrConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=solr)
Tip
DevelopersTip-IfWildFly11.0.0isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin"/docs/teiid/datasources/solr"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
DeployingVDBDependencies
43
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
WebServiceDataSourcesWebservicedatasourcesuseaTeiidspecificJCAconnectorthatisdeployedintoWildFly11.0.0duringinstallation.Therearemanywaystocreatethefiledatasource,usingCLI,AdminShell,admin-consoleetc.TheexampleshownbelowusestheCLItool,asthisworksinbothStandaloneandDomainmodes.
ExecutefollowingcommandusingtheCLIonceyouconnectedtotheServer.Makesureyouprovidethecorrectendpointandotherpropertiesbelow.Addanyadditionalpropertiesrequiredbytheconnectorbyduplicatingthe"connection-definitions"commandbelow.EdittheJNDInametomatchtheJNDInameyouusedinVDB.
batch/subsystem=resource-adapters/resource-adapter=webservice/connection-definitions=wsDS:add(jndi-name=java:/wsDS,class-name=org.teiid.resource.adapter.ws.WSManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=webservice/connection-definitions=wsDS/config-properties=EndPoint:add(value={end_point})/subsystem=resource-adapters/resource-adapter=webservice:activaterunbatch
TofindoutallthepropertiesthataresupportedbythisWebServiceConnectorexecutethefollowingcommandintheCLI.
/subsystem=teiid:read-rar-description(rar-name=webservice)
TheWebServiceDataSourcesupportsspecifyingaWSDLusingtheWsdlproperty.IftheWsdlpropertyisset,thentheServiceName,EndPointName,andNamespaceUripropertiesshouldalsobeset.TheWsdlpropertymaybeaURLorfilelocationortheWSDLtouse.
Tip
DevelopersTip-IfWildFly11.0.0isrunninginstandalonemode,youcanalsomanuallyeditthe"/standalone/configuration/standalone-teiid.xml"fileandaddtheXMLconfigurationdefinedin*"/docs/teiid/datasources/web-service"directoryunder"resource-adapters"subsystem.Shutdowntheserverbeforeyoueditthisfile,andrestartafterthemodificationsaredone.
Allavailableconfigurationpropertiesofwebresource-adapter
PropertyName appliesto Required DefaultValue Description
EndPoint HTTP&SOAP true n/aURLforHTTP,ServiceEndpointforSOAP
SecurityType HTTP&SOAP false none
TypeofAuthenticationtousedwiththewebservice.Allowedvalues["None","HTTPBasic","WSSecurity","Kerberos","OAuth"]
AuthUserName HTTP&SOAP false n/aNamevalueforauthentication,usedinHTTPBasicandWsSecurity
AuthPassword HTTP&SOAP false n/aPasswordvalueforauthentication,usedinHTTPBasicandWsSecurity
ConfigFile HTTP&SOAP false n/a CXFclientconfigurationFileorURL
DeployingVDBDependencies
44
https://docs.jboss.org/author/display/WFLY/Documentation/Admin+Guide#AdminGuide-RunningtheCLI
-
EndPointName HTTP&SOAP
false teiid LocalpartoftheendpointQNametousewiththisconnection,needstomatchonedefinedincxffile
ServiceName SOAP false n/a LocalpartoftheserviceQNametousewiththisconnection
NamespaceUri SOAP false http://teiid.org NamespaceURIoftheserviceQNametousewiththisconnection
RequestTimeout HTTP&SOAP false n/a Timeoutforrequest
ConnectTimeout HTTP&SOAP false n/a Timeoutforconnection
Wsdl SOAP false n/a WSDLfileorURLforthewebservice
CXFConfiguration
EachwebservicedatasourcemaychooseaparticularCXFconfigfileandportconfiguration.TheConfigFileconfigpropertyspecifiestheSpringXMLconfigurationfilefortheCXFBusandportconfigurationtobeusedbyconnections.Ifnoconfigfileisspecifiedthenthesystemdefaultconfigurationwillbeused.
Only1portconfigurationcanbeusedbythisdatasource.YoumayexplicitlysetthelocalnameoftheportQNametouseviatheConfigNameproperty.ThenamespaceURIfortheQNameinyourconfigfileshouldmatchyourWSDL/namespacesettingonthedatasourceorusethedefaultofhttp://teiid.org.SeetheCXFDocumentationandthesectionsbelowonWS-Security,Logging,etc.forexamplesofusingtheCXFconfigurationfile.
SampleSpringXMLConfigurationToSetTimeouts
Intheconduitname{http://teiid.org[http://teiid.org]}configName.http-conduit,thenamespace,{http://teiid.org[http://teiid.org]},maybesetviathenamespacedatasourceproperty.Typicallythatwillonlyneeddonewhenalsosupplyingthewsdlsetting.Thelocalnameisfollowedby.http-conduit.ItwillbebasedupontheconfigNamesetting,withadefaultvalueofteiid.
SeetheCXFdocumentationforallpossibleconfigurationoptions.
Note ItisnotrequiredtousetheSpringconfigurationtosetjusttimeouts.TheConnectionTimeoutandReceiveTimeoutcanbesetviatheresourceadapterconnectTimeoutandrequestTimeoutpropertiesrespectively.
Security
DeployingVDBDependencies
45
http://teiid.orghttp://teiid.orghttp://cxf.apache.org/docs/configuration.htmlhttp://teiid.orghttp://teiid.orghttp://cxf.apache.org/docs/
-
ToenabletheuseofWS-Security,theSecurityTypeshouldbesettoWSSecurity.AtthistimeTeiiddoesnotexpectaWSDLtodescribetheservicebeingused.ThusaSpringXMLconfigurationfileisnotonlyrequired,itmustinsteadcontainalloftherelevantpolicyconfiguration.Andjustaswiththegeneralconfiguration,eachdatasourceislimitedtospecifyingonlyasingleportconfigurationtouse.
batch/subsystem=resource-adapters/resource-adapter=webservice/connection-definitions=wsDS:add(jndi-name=java:/wsDS,class-name=org.teiid.resource.adapter.ws.WSManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=webservice/connection-definitions=wsDS/config-properties=ConfigFile:add(value=${jboss.server.home.dir}/standalone/configuration/xxx-jbossws-cxf.xml)/subsystem=resource-adapters/resource-adapter=webservice/connection-definitions=wsDS/config-properties=ConfigName:add(value=port_x)/subsystem=resource-adapters/resource-adapter=webservice/connection-definitions=wsDS/config-properties=SecurityType:add(value=WSSecurity)/subsystem=resource-adapters/resource-adapter=webservice:activaterunbatch
Thecorrespondingxxx-jbossws-cxf.xmlfilethataddsatimestamptotheSOAPheader
ExampleWS-Securityenableddatasource
NotethattheclientportconfigurationismatchedtothedatasourceinstancebytheQName{http://teiid.org}port_x,wherethenamespacewillmatchyournamespacesettingorthedefaultofhttp://teiid.org.Theconfigurationmaycontainotherportconfigurationswithdifferentlocalnames.
FormoreinformationonconfiguringCXFinterceptors,pleaseconsulttheCXFdocumentation
KerberosWS-SecurityKerberosisonlysupportedwhentheWSDLpropertyisdefinedinresource-adapterconnectionconfigurationandonlywhenWSDLBasedProceduresareused.WSDLfilemustcontainWS-Policysection,thenWS-Policysectioniscorrectlyinterpretedandenforcedontheendpoint.ThesampleCXFconfigurationwilllooklike
DeployingVDBDependencies
46
http://teiid.orghttp://cxf.apache.org/docs/security.html
-
andyouwouldneedtoconfigurethesecurity-domaininthestandalone-teiid.xmlfileunderthe'security'subsystemas
forcompletelistofkerberospropertiespleaserefertothistestcase
LoggingLogging,whenenabled,willbeperformedatanINFOleveltotheorg.apache.cxf.interceptorcontext.
SOAP
TheCXFconfigpropertymayalsobeusedtocontroltheloggingofrequestsandresponsesforspecificorallports.
Exampleloggingdatasource
DeployingVDBDependencies
47
http://anonsvn.jboss.org/repos/jbossws/stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/kerberos/KerberosTestCase.java
-
batch/subsystem=resource-adapters/resource-adapter=webservice/connection-definitions=wsDS:add(jndi-name=java:/wsDS,class-name=org.teiid.resource.adapter.ws.WSManagedConnectionFactory,enabled=true,use-java-context=true)/subsystem=resource-adapters/resource-adapter=webservice/connection-definitions=wsDS/config-properties=ConfigFile:add(value=${jboss.server.home.dir}/standalone/configuration/xxx-jbossws-cxf.xml)/subsystem=resource-adapters/resource-adapter=webservice/connection-definitions=wsDS/config-properties=ConfigName:add(value=port_x)/subsystem=resource-adapters/resource-adapter=webservice:activaterunbatch
Correspondingxxx-jbossws-cxf.xml
Exampleloggingdatasource
AllCXFUsage
WiththeWildFlydistributionofCXFasystempropertycanbeusedtoenableCXFloggingacrossallusageintheapplicationserver(includingsalesforce)-seetheWildFlydocs.
ExampleSystemProperty
TransportSettingsTheCXFconfigpropertymayalsobeusedtocontrollowlevelaspectsoftheHTTPtransport.SeetheCXFdocumentationforallpossibleoptions.
ExampleDisablingHostnameVerification
-
http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans.xsd">
ConfiguringSSLSupport(Https)ForusingtheHTTPS,youcanconfigureCXFfileasbelow
forallthehttp-conduitbasedconfigurationseehttp://cxf.apache.org/docs/client-http-transport-including-ssl-support.html.YoucanalsoconfigureforHTTPBasic,kerberos,etc.
DeployingVDBDependencies
49
http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html
-
KerberoswithRESTbasedServices
Note "Kerberosinws-securitywithSOAPservices"-
CheckoutthecxfconfigurationtoallowKerberosinSOAPwebservicesathttp://cxf.apache.org/docs/security.html
ThekerberossupportisbasedSPNEGOasdescribedinhttp://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport%28includingSSLsupport%29-SpnegoAuthentication%28Kerberos%29.Theretwotypesofkerberossupport
Negotiation
Withthisconfiguration,RESTserviceisconfiguredwithKerberosJAASdomain,tonegotiateatoken,thenuseitaccessthewebservice.Forthisfirstcreateasecuritydomaininstandalone.xmlfileasbelow
andthejboss-cxf-xxx.xmlfileneedstobesetas
NegotiateMY_REALM
Theresourceadaptercreationneedstodefinethefollowingproperties
path/to/jboss-cxf-xxxx.xmltest
NoteEventhoughaboveconfigurationconfiguresthevalueof"ConfigName",thecxfframeworkcurrentlyinthecaseofJAX-RSclientdoesnotgiveoptiontouseit.Forthatreasonuse"*.http-conduit"whichwillapplytoalltheHTTPcommunicationsunderthisresourceadapter.
DeployingVDBDependencies
50
http://cxf.apache.org/docs/security.htmlhttp://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport%28includingSSLsupport%29-SpnegoAuthentication%28Kerberos%29
-
Delegation
IfincasetheuserisalreadyloggedintoTeiidusingKerberosusingJDBC/ODBCorusedSPNEGOinweb-tierandusedpass-throughauthenticationintoTeiid,thenthereisnoneedtonegotiateanewtokenfortheKerberos.Thesystemcandelegatetheexistingtoken.
Toconfigurefordelegation,setupsecuritydomaindefinedexactlyasdefinedin"negotiation",andjboss-cxf-xxx.xmlfile,howeverremovethefollowinglinefromjboss-cxf-xxx.xmlfile,asitisnotgoingtonegotiatenewtoken.
MY_REALM
Addthefollowingpropertiesinwebserviceresourceadaptercreation.Oneconfiguresthat"kerberos"securitybeingused,theseconddefinesasecuritydomaintobeusedatthedatasource,inthiscasewewanttouseasecuritydomainthatpassesthroughaloggedinuser
Kerberospassthrough-security
Toconfigurein"passthrough-security"securitydomain,the"security"subsystemaddfollowingXMLfragment
IfincasethereisnodelegationCredentialisavailableonthecontext,theaccesswillfail.
DeployingVDBDependencies
51
-
OAuthAuthenticationWithRESTBasedServices
SingleuserOAuthauthentication
WebServicesresource-adaptercanbeconfiguredtoparticipateinOAuth1.0aandOAuth2authenticationschemes.UsingTeiidalongwith"ws"translatorand"web-services"resourceadapteroncewriteapplicationscommunicatingwithwebsiteslikeGoogleandTwitter.
InordertosupportOAuthauthentication,thereissomepreparationandconfigurationworkinvolved.IndividualwebsitestypicallyprovidedeveloperfacingRESTbasedAPIsforaccessingtheircontentonthewebsitesandalsoprovidewaystoregistercustomapplicationsonusersbehalf,wheretheycanmanagetheAuthorizationofservicesofferedbythewebsite.Thefirststepistoregisterthiscustomapplicationonthewebsiteandcollectconsumer/APIkeysandsecrets.Theweb-siteswillalsolisttheURLS,wheretorequestforvariousdifferenttypesoftokensforauthorizationusingthesecredentials.AtypicalOAuthauthenticationflowisdefinedasbelow
Theaboveimagetakenfromhttps://developers.google.com/accounts/docs/OAuth2
Toaccommodateabovedefinedflow,Teiidprovidesautilitycalled"teiid-oauth-util.sh"or"teiid-oauth-util.bat"forwindowsinthe"bin"directoryofyourserverinstallation.Byexecutingthisutility,itwillaskforvariouskeys/secretsandURLsforthegeneratingtheAccessTokenthatisusedintheOAuthauthenticationandintheendoutputaXMLfragmentlikebelow.
$./teiid-oauth-util.shSelecttypeofOAuthauthentication1)OAuth1.0A2)OAuth2.0
2===OAuth2.0Workflow===
DeployingVDBDependencies
52
http://oauth.orghttp://google.comhttp://twitter.comhttps://developers.google.com/accounts/docs/OAuth2
-
EntertheClientID=10-xxxjb.apps.googleusercontent.com
EntertheClientSecret=3L6-xxx-v9xxDlznWq-o
EntertheUserAuthorizationURL=https://accounts.google.com/o/oauth2/auth
Enterscope(hitenterfornone)=profile
Cut&PastetheURLinawebbrowser,andAuthticateAuthorizeURL=https://accounts.google.com/o/oauth2/auth?client_id=10-xxxjb.apps.googleusercontent.com&scope=profile&response_type=code&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&state=Auth+URL
EnterTokenSecret(AuthCode,Pin)frompreviousstep=4/z-RT632cr2hf_vYoXd06yIM-xxxxx
EntertheAccessTokenURL=https://www.googleapis.com/oauth2/v3/token
RefreshToken=1/xxxx_5qzAF52j-EmN2U
AddthefollowingXMLintoyourstandalone-teiid.xmlfileinsecurity-domainssubsystem,andconfiguredatasourcesecurtytothisdomain
TheXMLfragmentattheenddefinestheJAASLoginModuleconfiguration,editthestandalone-teiid.xmlandadditunder"security-domains"subsystem.Userneedstousethissecurity-domainintheirresourceadapterasthesecurityproviderforthisdatasource.Anexampleresource-adapterconfigurationtodefinethedatasourcetothewebsiteinstandalone-teiid.xmlfilelookslike
NoTransactionOAuth
DeployingVDBDependencies
53
-
oauth2-security
---
Then,anyquerywrittenusingthe"ws"translatorandaboveresource-adapterwillbeautomaticallyAuthorizedwiththetargetwebsiteusingOAuth,whenyouaccessaprotectedURL.
===OAuthwithDelegation
Intheaboveconfigurationasingleuserisconfiguredtoaccessthewebsite,howeverifyouwanttodelegateloggedinuserscredentialasOAuthauthentication,thenuserneedstoextendtheaboveLoginModule_(org.teiid.jboss.oauth.OAuth20LoginModuleororg.teiid.jboss.oauth.OAuth10LoginModule)_andautomatetheprocessdefinedinthe"teiid-oauth-util.sh"todefinetheAccessTokendetailsdynamically.Sincethisprocesswillbedifferentfordifferentwebsites(itinvolvesloginandauthentication),Teiidwillnotbeabletoprovidesinglesolution.However,usercanextendtheloginmoduletoprovidethisfeaturemuchmoreeasilysincetheywillbeworkingwithtargetedwebsites.
DeployingVDBDependencies
54
-
VDBVersioningVDBVersioningisafeaturethatallowsmultipleversionsofaVDBtobedeployedatthesametimewithadditionalsupporttodeterminewhichversionwillbeused.Ifaspecificversionisrequested,thenonlythatVDBmaybeconnectedto.Ifnoversionisset,thenthedeployedVDBsaresearchedfortheappropriateversion.Thisfeaturehelpssupportmorefluidmigrationscenarios.
VersionProperty
WhenauserconnectstoTeiidthedesiredVDBversioncanbesetasaconnectionproperty(SeetheClientDevelopersGuide)inJDBCorusedaspartoftheVDBnameforODataandODBCaccess.
Thevdbversionissetineitherthevdb.xml,whichisusefulforanxmlfiledeployment,orthroughanamingconventionofthedeploymentname-vdbname.version.vdb,e.g.marketdata.2.vdb.Thedeployerisresponsibleforchoosinganappropriateversionnumber.IfthereisalreadyaVDBname/versionthatmatchesthecurrentdeployment,thenconnectionstothepreviousVDBwillbeterminatedanditscacheentrieswillbeflushed.AnynewconnectionswillthenbemadetothenewVDB.
AsimpleintegerversionactuallytreatedasthesemanticversionX.0.0.Ifdesiredafullsemanticversioncanbeusedinstead.Asemanticversionisuptothreeintegersseparatedbyperiods.
Trailingversioncomponentsthataremissingaretreatedaszeros-version1isthesameas1.0.0andversion1.1isthesameas1.1.0.
JDBCandODBCclientsmayuseaversionrestriction--vdbname.X.orvdbname.X.X.-notethetrailing'.'whichmeansaVDBthatmustmatchthepartialversionspecified.Forexamplevdbname.1.2.couldmatchany1.2.Xversion,butwouldnotallow1.3+or1.1andearlier.
ConnectionTypeOncedeployedaVDBhasanupdatablepropertycalledconnectiontype,whichisusedtodeterminewhatconnectionscanbemadetotheVDB.Theconnectiontypecanbeoneof:
NONE-disallownewconnections.
BY_VERSION-thedefaultsetting.AllowconnectionsonlyiftheversionisspecifiedorifthisistheearliestBY_VERSIONvdbandtherearenovdbsmarkedasANY.
ANY-allowconnectionswithorwithoutaversionspecified.
TheconnectiontypemaybechangedeitherthroughtheAdminConsoleortheAdminAPI.
DeploymentScenarios
IfonlyaselectfewapplicationsaretomigratetothenewVDBversion,thenafreshlydeployedVDBwouldbeleftasBY_VERSION.Thisensuresthatonlyapplicationsthatknowthenewversionmayuseit.
IfonlyaselectfewapplicationsaretoremainonthecurrentVDBversion,thentheirconnectionsettingswouldneedtobeupdatedtoreferencethecurrentVDBbyitsversion.ThenthenewlydeployedvdbwouldhaveitsconnectiontypesettoANY,whichallowsallnewconnectionstobemadeagainstthenewerversion.Ifarollbackisneededinthisscenario,thenthenewlydeployedvdbwouldhaveitsconnectiontypesettoNONEorBY_VERSIONaccordingly.
VDBVersioning
55
-
VDBVersioning
56
-
LoggingTheTeiidsystemprovidesawealthofinformationvialogging.Tocontrollogginglevel,contexts,andloglocations,youshouldbefamiliarwithlog4jandthecontainersstandalone-teiid.xmlordomain-teiid.xmlconfigurationfilesdependinguponthestartupmodeofWildFly.
AllthelogsproducedbyTeiidareprefixedby"org.teiid".ThismakesitextremelyeasytocontrolofofTeiidloggingfromasinglecontext.Notehoweverthatchangestothelogconfigurationfilemanuallyrequirearestarttotakeaffect.CLIbasedlogcontextmodificationsarepossible,howeverdetailsarebeyondthescopeofthisdocument.
Ifyouexpectahighvolumeoflogginginformationoruseexpensivecustomaudit/commandloggers,itisagoodideatouseanaynchappendertominimizetheperformanceimpact.Forexampleyoucanuseaconfigurationsnippetliketheonebelowtoinsertanasynchhandlerinfrontofthetargetappender.
LoggingContextsWhileallofTeiidslogsareprefixedwith"org.teiid",therearemorespecificcontextsdependingonthefunctionalareaofthesystem.Notethatlogsoriginatingfromthird-partycode,includingintegratedorg.jbosscomponents,willbeloggedthroughtheirrespectivecontextsandnotthrough"org.teiid".SeethetablebelowforinformationoncontextsrelevanttoTeiid.Seethecontainersstandalone-teiid.xmlforamorecompletelistingofloggingcontextsusedinthecontainer.
Context Description
com.arjuna Third-partytransactionmanager.Thiswillincludeinformationaboutalltransactions,notjustthoseforTeiid.
org.teiidRootcontextforallTeiidlogs.Note:therearepotentiallyothercontextsusedunderorg.teiidthanareshowninthistable.
org.teiid.PROCESSORQueryprocessinglogs.Seealsoorg.teiid.PLANNERforqueryplanninglogs.
Logging
57
http://logging.apache.org/log4j/
-
org.teiid.PLANNER Queryplanninglogs.
org.teiid.SECURITY Session/Authenticationevents-seealsoAUDITlogging
org.teiid.TRANSPORT Eventsrelatedtothesockettransport.
org.teiid.RUNTIME Eventsrelatedtoworkmanagementandsystemstart/stop.
org.teiid.CONNECTOR Connectorlogs.
org.teiid.BUFFER_MGR Bufferandstoragemanagementlogs.
org.teiid.TXN_LOG Detaillogofalltransactionoperations.
org.teiid.COMMAND_LOG Seecommandlogging
org.teiid.AUDIT_LOG Seeauditlogging
org.teiid.ADMIN_API AdminAPIlogs.
org.teiid.ODBC ODBClogs.
CommandLogging
CommandloggingcapturesexecutingcommandsintheTeiidSystem.Thisincludesusercommands(thathavebeensubmittedtoTeiidatanINFOlevel),datasourcecommands(thatarebeingexecutedbytheconnectorsataDEBUGlevel),andqueryplans(ataTRACElevel)aretrackedthroughcommandlogging.
Theusercommand,"STARTUSERCOMMAND",isloggedwhenTeiidstartsworkingonthequeryforthefirsttime.Thisdoesnotincludethetimethequerywaswaitinginthequeue.Andacorrespondingusercommand,"ENDUSERCOMMAND",isloggedwhentherequestiscomplete(i.e.whenstatementisclosedorallthebatchesareretrieved).Thereisonlyonepairoftheseforeveryuserquery.
Thequeryplancommand,"PLANUSERCOMMAND",isloggedwhenTeiidfinishesthequeryplanningprocess.Thereisnocorrespondingendinglogentry,butwithtraceloggingenabledthequeryplanwillbeincludedwithsubsequentusercommandevents.
Thedatasourcecommand,"STARTDATASRCCOMMAND",isloggedwhenaqueryissenttothedatasource.Andacorrespondingdatasourcecommand,"ENDSRCCOMMAND",isloggedwhentheexecutionisclosed(i.ealltherowshasbeenread).TherecanbeonepairforeachdatasourcequerythathasbeenexecutedbyTeiid,andtherecanbeanynumberofpairsdependinguponyouruserquery.
TheSRCcommanditselfisthentranslatedinto1ormoresourcestatements,operations,etc.Forsourcesthathavetextualrepresentationsofthenativesourcequery,eachwillbereportedina"SOURCESRCCOMMAND"eventasattheDEBUGlevelwiththefieldsourceCommandrepresentingtheSQL,SOQL,LDAPqueryetc.thatisactuallyissued.
Withthisinformationbeingcaptured,theoverallqueryexecutiontimeinTeiidcanbecalculated.Additionally,eachsourcequeryexecutiontimecanbecalculated.Iftheoverallqueryexecutiontimeisshowingaperformanceissue,thenlookateachdatasourceexecutiontimetoseewheretheissuemaybe.
Toenablecommandloggingtothedefaultloglocation,simplyenabletheDETAILlevelofloggingfortheorg.teiid.COMMAND_LOGcontext.
Logging
58
-
Note "Wanttologtoadatabase?"-IfyouwouldliketologCommandlogmessagestoanydatabase,thenlookatthehttps://github.com/teiid/teiid-extensionsproject.TheinstallationzipfileisavailableinTeiiddownloadspage.
Toenablecommandloggingtoanalternativefilelocation,configureaseparatefileappenderfortheDETAILloggingoftheorg.teiid.COMMAND_LOGcontext.Anexampleofthisisshownbelowandcanalsobefoundinthestandalone-teiid.xmldistributedwithTeiid.
SeetheDevelopersGuidetodevelopacustomloggingsolutioniffilebasedlogging,oranyotherbuilt-inLog4jlogging,isnotsufficient.
Thefollowingisanexampleofadatasourceco