Você está na página 1de 11

OracleeBS11iInfrastructure

InthisarticlewewilldescribetheinfrastructureofOracleeBusinessSuite(eBS).Initssimplestform, eBSisa3tierapplicationwithaclienttier,ApplicationtierandDBtier.

DatabaseTier
LetsstartwiththeDBTier.Surprisingly,thedatabasetierhasonlyverylittleeBSspecificfeatures. Ofcourseweneedadatabase(instance)andthereforeanORACLE_HOME.Butthedatabasecan eitherbeasingleinstanceoraRACinstallationandallOracleRDBMSfeaturesaretransparently availableforeBS. ThemanagementoftheRDBMSInstallationisalsoindependentofeBS.

DBTierfilesystem
LetsstartwiththefilesystemontheDBTier.OfcoursethereisanOracle_homeinstallationneeded, fortheRDBMSInstance.ThiswillbeinstalledduringinstallationofeBS.Butalsoafreshinstalled ORACLE_HOMEcanbeused,withaneBSdatabase. IntheORACLE_HOME,anextradirectoryisadded.TheAppsutildirectory.Thisdirectorycontainsthe softwareanddataneededforrunningAutoconfigandRapidclone. AllotherdirectoriesareatthediscretionoftheeBSDBA.

OracleInstance
WhenwelookattheinstancetoruneBS,wefindanumberofmandatoryparametersforeBS.These arefoundinMetalinknotes216205.1and396009.1(Atthetimeofwriting.Pleaseverifythesenotes foryourself). TheseparametersarerecommendedormandatorybasedontestingbyOracleCorp.Theywill automaticallybesetbytheeBSinstaller.Butyoushouldtakenoteofthemwhenyouuseafresh installedORACLE_HOME. Thenwefinallycometothecontentsofthedatabase.

TheeBSDatabase
Letsstartwiththeschemasinthedatabase.OracleeBScreatesaseparateschemaforeverymodule. Theschemaisnamedastheshort_nameofthemodule,forexampleAP(OraclePayables/Accounts Payable),AR(OracleReceivables/OracleReceivables). ThereisaseparateschemafortheApplicationownerAPPS. TheApplicationschemascontainthetables,indexesandsequencesforthedifferentapplications.All objectsintheseschemas(exceptindexes,ofcourse)haveasynonymintheAPPSSchema.Inthe APPSSchemawealsofindallPL/SQLobjects,viewsandMaterializedViews.

AmajorpartofeBSiswritteninPL/SQL.AllPL/SQLobjectsarealsoinstalledintheAPPSSchema. UsersessionswithineBSwillusuallyrunintheAPPSSchemaaswell. Thatbringsustoanextraschemainthedatabase:APPLSYSPUB.Thisschemahasaccesstosomeof theeBStablesandpackages,thatallowittovalidateeBSloginsandstartanAPPSsessionbasedon thatlogininformation.Wewillseethedetailsofthislateron. Beforerelease11.5.2everyschemahaditsowntablespace.However,thenumberofmodulesfor eBS(andwiththatthenumberofschemas)iseverincreasing.Somanagingthedatabasebecame moreandmorecomplex.In11.5.2OracleintroducedtheOracleApplicationsTablespaceModel (OATM).Withinthismodel,thetablespacesineBSarebasedonfunctionality,ratherthanschemas. Inthismodel,weseethefollowingtablespaces: APPS_TS_TX_DATAContainingalltransactiontables,MaterializedViewsandIOTs APPS_TS_TX_IDXContainingallindexesfortransactiontables APPS_TS_SEEDContainingthetablesandindexeswithseededdata(asopposedtotransaction data). APPS_TS_INTERFACEForOpenInterfacetables APPS_TS_SUMMARYContainssummarytablesforseveralmodules(AR,PA,BIM,etc) APPS_TS_NOLOGGINGFortablesandobjectsthatarecreatedwiththeNOLOGGINGoption APPS_TS_ARCHIVEContainingarchiveandhistorytables(andindexes) APPS_TS_QUEUESContainingtheAQ(AdvancedQueuing)objects APPS_TS_MEDIAContainingtableswithLOBs.Formediaobjectsordocuments. TheUndoandTemptablespacesarenotpartofthetablespacemodel.

ApplicationTier
NowitstimetolookattheApplicationTier.InfacttheApplicationTierconsistsof3different services:Webservice,FormsserviceandConcurrentProcessing.In11iinstallations,thereisalsoan Administrationservice. TheApplicationTiersignificantlychangedfromR11itoR12.Welldiscussthe11iAppsTiershortly, andthendiscusstheR12tierinmoredetail.

The11iinfrastructure
BoththeR11andR12infrastructureconsistofaWebservice,aFormsServiceandaConcurrent Processingpart.

Wewillbediscussingthedifferentserviceshere.Thefollowingpictureshowsallcomponentsand theircommunications.Youmightwanttokeepitforreferenceduringthisarticle.

R11iWebService
For11i,thewebtierisbuiltonOracleiAS9i.TheiASinstallationprovideswebservices(Apache HTTP/HTTPS),aJavaRuntimeEngine(JSERV)andaPL/SQLengine(modplsql). ThewebservicealsoactsagatewayfortheConcurrentRequestlogandoutputfiles.Anditisthefirst pointofaccesswhenstartingaformssession.(Whenusingasocketformsconnection,whenusinga formsservletthewebtierwillhosttheformsprocess). AdetailfromthepictureaboveshowstheiASstructure.

ThecoreofiASisthewebserver.Thisisthefrontendfortheclient.Requestscanalsobeforwarded toandfromtheformsserverandtheconcurrentprocessing.Wellseethatinthenextparagraphs.

WithintheiASJservandmodplsqlareplugins.Theyaretheonlycomponentsthatcommunicatewith thedatabase.Whentheyarecalled,theyexecutejava(Jserv)orPL/SQL(modplsql)andreturnan htmlpage.ThispageisthensenttotheclientthroughtheHTTPservice. TheJservdeliversaJavaRuntimeEnvironment.IntheJserv,javaservletscanberun.AlsotheJSP filesareexecutedintheJserv.AJSPfile(JavaServerPage)isapagewithjavacodethatreturnsan htmlpage(similartothewayscriptinglanguageslikePhPwork).ThejavapartisexecutedinJserv, whichreturnsthehtmltothewebserver.Thewebserverredirectsthehtmltotheclient. Letstakeacloserlookatthecomponentsandtheirexecutions: Webserver ThewebserverisbasedontheregularApache2webserver.Theconfigurationfileisalsoequaltothe Apacheconfigfile.Theconfigurationissetinhttpd.conf(orhttpds.confforSSL). Insteadofstartingthewebserverthrough$APACHE_HOME/bin/httpdctl,westartthrough $APACHE_HOME/apachectl.ThedefaultportnumberusedforeBS11iis8000.Thisispartofport pool0.Fordifferentportpools,theportnumberisincreased.Soforportpool1thewebserverruns onport8001. Therootdirectoryforthewebserverissetto$OA_HTML,whichisbydefault$COMMON_TOP/html. Thisdirectorycontainsall*.htmlfilesforeBS. AnumberofvirtualdirectoriesaresetupwithineBS.

JServ
Asmentionedbefore,javacodeisexecutedbyJserv.Jservisajavaservletengine.Thatmeansthatit canrunbothservletsandjspfiles. Theseservletsaremostlylocatedinthe$JAVA_TOP.The*.jspfilesarelocatedinthe$OA_HTML directory. OneoftheoptionsofJservistocreateadatabaseconnectiontotherdbmsdatabase.Thisisdoneby aJDBCThinClientconnection. BeforewelookattheconfigurationforJserv,examinethefollowingpicture.

WithinJserv,wecandefinedifferentjavaenvironments,calledzones.Thesezonesareconfigured withdifferentservletsorjavaarchives(jarfiles).Eachzoneisconfiguredwithitsownconfiguration file.Withinthezonethestartupparameters(initargs)fortheservletaredefined. Ontheothersideofthepicture,youseeagroup.AlljavaprocesseswithinJservaregrouped together.Youmustdefineatleastonegroup.ThedefaultgroupisOACoreGroup.Withineach group,wecreateoneormoreprocessesthatwillbemappedtoourzones. Thismappingisdonebymountingthezonesandthegroupstodifferentlogicaldirectories.Inthe picture,amountpointiscreated:/oa_servlets/.ItreferstothegroupOACoreGroup,whichholds3 javaprocesses.Anditismappedtozoneroot,whichincludestheservletdummywithasetof startupparameters. WheniASreceivesacalltothevirtualdirectory/oa_servlets/itwillberecognizedasaJservmount pointandtherequestwillbeforwardedtoJserv.InthisexampleJservhas3javaprocessesinthe groupforthismountpoint.Andtheywillbeabletorunalltheservletsinthezone. Soundscomplicated?Takealookatthefollowingconfigurations: Jserv.conf:
ApJServGroup OACoreGroup 3 1 /etc/oracle/iAS/Jserv/etc/jserv.properties ApJServGroupMount /oa_servlets balance://OACoreGroup/root

Jserv.properties:
wrapper.bin=/opt/oracle/iAS/Apache/Apache/bin/java.sh

zones=root<host> root<host>.properties = /etc/oracle/iAS/Jserv/etc/zone.properties

Zone.properties
servlet.Dummy.initArgs=message=I'm a dummy servlet

Withinjserv.confwedefineagroupcalledOACoreGroup.Thisgroupisrunning3Javaprocesses.And thedefinitionofthegroupisinthejserv.propertiesfile.The1indicatestheweightforloadbalancing withmultiplegroups. ThenwemountthezoneroottothegroupOACoreGroup.Thismountpointislinkedtothevirtual directory/oa_servlets/. ThevirtualdirectoryisusedforredirectiontotheJServ.Whenarequestismadetothevirtual directoryJservwillbecalled.ThepartoftheURLafterthevirtualdirectoryisthepathtotheservlet. Thispathwillbesearchedforinthe$CLASSPATH. Whenthejavaservletsneedtoconnecttothedatabase,theycanbuildaconnectionusingJDBC.The accessinformationisstoredina*.dbcfilein$FND_TOP/secure.Thedbcfileisreferredtointhe parametersforthezone.

Modplsql
Letstakealookatthemodplsqlmodule.Thismoduleisdesignedtorunpl/sqlprocedureswithinthe database.Theconnectionisbasedonthewdbsvr.appfile.ThisfilecontainstheDAD(Database AccessDescriptor),includingtheaccessdatatotheeBSdatabase. Themoduleisalsocalledthroughavirtualdirectory.Forexamplehttp://<host>:<port>/pls/TESTDB/ dummy./pls/isthevirtualdirectorythatreferstomodplsql.TESTDBisthenameoftheDADand dummyisthenameofapl/sqlprocedureaccessibleforthedbuserfromtheDAD. Thatconcludesthe9iiASmodulefornow.

Formsserver
Letstakealookattheformsserver. Oracleformscanbesetupintwoways,socketconnectionandservlet.Thedefaultissocket connection.Withasocketconnection,aseparateformsserveranddedicatedformsprocessesare used.Fortheservletconnection,ajavaservletiscalledwithintheiAS. Theformsserveritselfisinstalledinthe8.0.9ORACLE_HOME.Formshasaformsserver,andoneor moreclientprocesses.Theformsserverisstartedwithf60svr.Itwillspawnaf60webmxprocessfor everyclientsessionconnecting.

Ontheserverside,formsarerunintheformsclientprocesses.Ontheclientside,theyarerunina javaapplet.WhentheclientclicksaformsbasedfunctioninthePersonalHomePage,itcallsanURL thatreferstotheformsclientexecutableinthe8.0.6ORACLE_HOME. ThisURListakenfromtheprofileoptionICX:FormsLauncher,andthedefaultvalueislike http://<server>:<port>/dev60cgi/f60cgi.Theparametersreferringtothefunctionbeingclickedare addedtothisURLasparameters.(i.e.thenameoftheformtobestarted) WhenthisURLiscalled,thewebserverwillexecutetheexecutablef60cgi.Thisexecutablereturnsa HTMLpagetotheclient.ThispageiscalledtheBaseHTMLforthisformsserver.(bydefaultthisis $OA_HTML/US/appsbase.htm) ThisHTMLpagecallstheJinitiatorplugin(orthenativeJVMwhenconfigured).Italsoincludesthe parameterstoconnecttotheformsserverandthenameoftheformtostart. TheJinitiatorwillstartanappletontheclient,whichconnectstotheformslistenerprocess.The formslistenerprocessthenassignsadedicatedformsclientprocess. Atthispointthewholechainlookslikethis:

Theconfigurationfortheformsserverisintheappsweb.cfgfilein($OA_HTML/bin).Thisfilecontains thebasiccoloringschemefortheformsserver,theformssettingsandthereferralinformationtothe JInitiatorplugin.Thepluginontheclientsideiscalledthroughitsclassid,whichisalsosetinthe appsweb.cfg.

ConcurrentManagers
Thelastpartoftheapplicationtieristheconcurrentprocessingpart.Theconcurrentmanagersare usedtoexecutebackgroundandbatchprocesses. Differentexecutablesincludinghostcommandfiles,pl/sqlprocedures,OracleReports,SQL*Loader controlfilesandBinaryexecutablescanbedefinedtoberunasconcurrentprograms.Parameters arealsooptionallydefinedwiththeconcurrentprograms. Theexecutablefilesaredefinedseparatefromtheconcurrentprograms.Soanexecutablecanberun asdifferentprogramswithdifferentparameters. TheprogramsareexecutedthroughRequests.Arequestisstartedasaconcurrentprogramandthe valuesofitsparameters.Itcanbescheduledtostartataspecifictime,orinaspecificschedule.The outputoftheprogramcanbesenttoaprinter.Itisalsoavailablethroughtheapplication. Thispictureshowstherelationbetweenprograms,requestsandmanagers.

Themanagers
Welltakeacloserlookattheconcurrentprogramslater.Letsfirstlookattheconcurrentmanagers. Thereareconcurrentmanagersandtransactionmanagers.Alsoanumberofcontrolmanagersare defined. WellstartwiththeInternalManager.Thisisthefirstmanagertobestarted.Itspurposeisto controlthestoppingand(re)startingoftheothermanagers.WhenGenericServiceManagementis

enabled(defaultasof11.5.7),itdelegatestotheServiceManagers.Oneverynodewhere concurrentprocessingisenabled,aServiceManagerisstarted.However,onlyoneInternal Managerisrunningatanytime. Theotherconcurrentmanagersaredefinedwithaworkshiftthatcontrolshowmanyprocessesa concurrentmanagershouldhaveatcertaintimes.Theworkshiftsconsistofatimerangeanda numberofprocesses.TheServiceManagers(orInternalManager)willstartandstopprocesses accordingtotheseworkshifts. Anotherpartofthesetupofconcurrentmanagersistheirspecializationrules.Thespecialization rulesindicatewhichprogramsarevalidforaconcurrentmanager,orareexcludedforthatmanager. Theyworkonaninclude/excludeprinciple.Whenprogramsareincludedforthatmanager,the managercanonlyrunthoseprograms.Whenprogramsareexcluded,themanagercanrunany programexcepttheexcludedones. Whenarequest(torunaprogram)issubmittedfromeBS,itwillbeplacedin FND_CONCURRENT_REQUESTSwithastatus_codeI(TheeBSformshavefewerstatusesthanthe codesinthetable).Themanagerprocesseswillquerythistableforrequeststhattheyareeligibleto run. Onceamanagerprocessfindsarequestwithstatus_codeI,whichitiseligibletorunthenitwillput therequestonitsownqueue.Itwillthenruntheexecutablewiththedefinedparameters.Thelogfile andoutputfilearewrittentothefilesystemin$APPLCSF/$APPLLOGresp.$APPLCSF/$APPLOUT. Therearesomespecialcasesthatneedtobediscussed.Thefirstistheincompatibility.Concurrent Programscanbemadeincompatiblewitheachother.Thatmeansthattheycannotrunatthesame time.Onceaprogramisstartedthatisdefinedasincompatiblewithanother,itwillbeautomatically putonthequeuefortheConflictResolutionManager.Thisspecialmanagerwillcheckifany incompatibleprogramisrunningorPendingwithcodeI.Ifso,itwillholdtherequestonitsown queue.IfnoincompatibleprogramisrunningorPending,thenitwillsetthestatusoftherequestto Pending. AnotherspecialcasearetheTransactionManagers.Theyarestartedandstoppedthesamewayas theotherconcurrentmanagers.Buttheydonotusetherequestqueue.Transactionmanagersare calledonlinefromtheeBSforms.Andtheyexecutealimitednumberofprograms.Theseprograms definedwithintheirexecutables.TheyarecalledthroughtheFND_TRANSACTION.SYNCHRONOUS procedure,whichusestheDBMS_PIPEpackage.

Theprograms
Itstimetolookattheconcurrentprograms.Asmentionedbefore,aconcurrentprogramisan instantiationofanexecutable.Theexecutableisdefinedwithashortname,anapplication(module), afilenameandamethod. Theshortnamewilluniquelyidentifytheexecutable.Theotherdataisneededtodeterminewhat shouldberunforthisexecutable.IftheexecutableisanOSbasedprogram,theapplicationwillbe usedtoderivethedirectoryonthefilesystemwheretheexecutableisfound.

WhentheexecutableisdefinedasPL/SQL,thefilenamewillcontaintheprocedurethatneedstobe run. Theconcurrentprogramisdefinedastheexecutablewithan(optional)setofparameters.Italsohas somepropertiesfortheprintingoftheoutput(printstyle,predefinedprinter,sizeoftheoutput). Dependingonthetypeofexecutablethatneedstoberun,theparameterswillbesenttothe executableorderedornamed.ForPL/SQLandhostfiles,theparametersareordered.Andtheorder inwhichtheyaredefinedintheformdefineshowtheywillbesenttotheexecutable.Forreportsthe parametersarenamed,whichmeanstheyaresentas<parameter>=<value>,. Aftertherequesthasfinished,therequesttableFND_CONCURRENT_REQUESTSwillbeupdated withthestatusinformationandareferencetothelogandoutputfile.Duringtheexecutionofthe request,astatus_codeandphase_codeareupdated.Theexactvaluesofthesefieldsaredescribedin oneofthenextarticles.Thatwillgodeeperintoconcurrentprocessing.

Theoutput
Thelogandoutputfilefromtherequestsarewrittentothedirectories$APPLCSF/$APPLLOGand $APPLCSF/$APPLOUT.Buttheyofcoursealsoneedtobemadeavailabletotheuser.Thisisdone throughtheApplicationsReportReviewAgent. Thereisquitealotofsetupthatcanbedoneforthewholeprocess.Butwithinthescopeofthis article,wellonlylookatthebasicarchitecture. FromtheeBSformthelogandoutputfileareavailablefrom2buttons.Thesebuttonscalltheweb serverforFNDWRR.exe(.exeonbothWindowsandUnix). FNDWRR.exeisacgiexecutablethatwillcalltheFNDFSlistener. Thisisan8.0.6TNSlistenerintheeBSORACLE_HOMEontheeBSapplicationtier.Oneoftheless knownfeaturesoftheTNSlistenersisthattheycandomorethancreatedatabaseconnections. Inthelistener.ora,youcandefineaprogramtobecalledwhenaconnectionismadeonacertaintns entry.ThatfeatureisusedfortheFNDFSlistener.Whenitiscalled,itwillredirecttraffictothe FNDFS(FNDFileSystem)executable.Thisexecutablewillreadtherequestedfilefromthefile systemandsendittoFNDWRR.exe. Again,wehaveaschematoshowthewholeflow:

Thiscomplexretrievalisofcourseneededbecausetheconcurrentprocessingtiercanbeseparate fromtheformsandwebtiers.

Você também pode gostar