ApacheOFBiz学习基础手册专业资料_第1页
ApacheOFBiz学习基础手册专业资料_第2页
ApacheOFBiz学习基础手册专业资料_第3页
ApacheOFBiz学习基础手册专业资料_第4页
ApacheOFBiz学习基础手册专业资料_第5页
已阅读5页,还剩18页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

ApacheOFBizGettingStartedApacheOFBiz之旅TOC\o"1-3"\h\u79261.ApacheOFBiz简介 2102561.1TheWhat,WhyandHowofApacheOFBiz 2251791.2.HowDoIDecideWhattoUse? 2295372.SecondPartMailingLists 3323953.DemoandTestSetupGuide示例和安装指南 5267623.1.Introduction 5300893.2.Quick&EasySetup 5259323.3.BuildingFromSVN 6109263.4.DatabaseSetup 7209183.5.J2EEContainers 860224.TheOpenForBusinessProject:EntityEngineConfigurationGuide 8ApacheOFBiz简介这个档和有关文档信息内容来开始咱们OFBiz之旅。Thisdocumentandit'srelateddocumentscontaininformationaboutgettingstartedwithOFBiz.阅读这编文档后你也允许以得到某些协助同步也开始了ApacheOFBiz精彩世界之旅。AfterreadingthisdocumentyoumightfindthesehelpfulaswellasyougetstartedonyourjourneyintothewonderfulworldofApacheOFBiz:MailingLists(邮件发送清单)DemoandTestSetupGuide(示例测试指南)TechnicalProductionSetupGuide(技术产品指南)BusinessSetupGuide(业务指南)OFBizSourceRepositoryandAccess(OFBiz源码库和通道)FrameworkIntroductionVideosandDiagrams(框架简介视频和图表)OFBizBeginnersDevelopmentGuideUsingPracticeApplicationOFBizContributorsBestPracticesTheWhat,WhyandHowofApacheOFBizThebasicstructureanddrivingforcebehindOFBizhasalottodowiththegoalsandactualizationofthereleaseprocess.OFBizisandalwayshasbeenacommunity-drivenopensourceproject.ThereisnocentralcommercialorganizationthatdrivesthedevelopmentofOFBizorderivesaprojectfromtheintellectualpropertyofthesoftwareorotherprojectassets.ThisisformalizednowthatOFBizisaprojectintheApacheSoftwareFoundation.BecauseofthisOFBizalwayshasbeenandalwayswillbejustwhatuserswhocontributetotheprojectwantittobe.Therearemanydifferentindividualsandgroupsinvolvedwithmanydifferentneedsandourgoalistodefineandfollowdevelopmentandreleasepoliciesthatservetheneedsoftheseparties.So,let'sstartwiththat...HowDoIDecideWhattoUse?FromaprojectuserperspectivethereisonemainquestionthatcanhelpdeterminewhichwaytheywillwanttogetOFBiz:DoIwanttocontributetotheopensourceproject?Forthisquestionthereare3mainanswers:Yes,definitely:Iwanttocontributetodesign,coding,andtestingeffortsandtherebycollaboratewithotherstomoreeffectivelyandefficientlysatisfythelong-termrequirementsfromme,myclients,ormyemployerKindof:Iwanttostayonthecuttingedgeandparticipatewithtestingandfeedback,butI'mnotinapositiontoparticipateindevelopmentand/orinthenearfutureIwillneedsomethingmorereliableandsupportedandthatwon'tchangeverymuchNotreally:I'mhappytoofferfeedback,butIreallyneedsomethingthatwillworkwellnowandwellintothefuturesowecangetthingsgoinginourorganizationForeachanswerthereisarecommendedwaytogetOFBiz:Getthecodestraightfromthecoderepository(SVN)trunkandupdatefrequentlythroughdevelopment,stoppingbeforeyourintegrationorfinalpre-deploymenttesting,andperiodicallyevenafterproductiondeploymentaccordingtoyourongoingdevelop/deployplan;notethatwhenyouarenotupdatingfromSVNyoushouldcontinuetowatchthecommitsforbugfixestopatchintoyourcodebaseGetthecodefromthecoderepository(SVN)releasebranchandkeepupdatedorpatchedregularlyasfixesarecommittedandthebranchstabilizesovertime;whengettingstartedchoosethemostrecentbranch,evenifitisverynew;whennewreleasebranchesarecreatedupdatetothemsoonafterthebranchisdoneGetabuiltreleasepackageorthecodefromareleasebranchtag,andupdateasnewpre-builtreleasepackagesandtagsarecreated;thesewillonlyrepresentfixesandunlessamajorissuearisestheywillbebackwardcompatibleandgenerallysafetoupdateorpatchto;whengettingstartedchooseareleasebranchthathasbeenaroundforatleast2-3monthsandthathasnomajoroutstandingissuesintheissuetrackertoassurethatithasstabilized;whennewreleasebranchesarecreatedwaituntilyouarereadytodoamajorupgradeandpossiblyneedtomodifyyourcodeandconfiguration,andwaitatleastuntiltheprospectivebranchhasstabilizedbeforemovingtoitSecondPartMailingListsTosubscribetoamailinglistusethelinksbelow.InyourfirstemailyouwillgetsomeinformationaboutworkingwiththelistmanagerEZMLM.

Tounsubscribefromanyofthefollowinglists,youneedtosendanempty,subjectlessemailtounsubscribeaddresslistedbelow.Inotherwords,clicktheappropriateunsubscribelinkbelowandpresssend.SupportofUsersandDevelopersList:Theuserlistisintendedforinstallation,deployment,customdevelopmentandusagerelatedtopics.HighTrafficSubscribeUnsubscribeArchives

DigestSubscription:SubscribeUnsubscribe

SearchableArchives:NabbleMarkMailWhenyouaskacomplexquestionsonthislist,it'sbettertogivedetails.MostofthetimeURLsareenoughandwelcome.

Elsepleasefollowthisscenario(atleatrelevantparts)WhyWhatyouwerelookingforHowdidyoutrytoachieveitWhatdidyouexpectasresultsAndwhatyoureallygotHowWhatyoudid(includingdetailedstepstoreproduce)WhatyouexpectedtohappenWhatactuallyhappened(includingexactquotesoferrormessages,etc)IfpossibleprovideanURLDesignanddevelopmentList:ThedeveloperlistisstrictlyfortopicsrelatedtothedesignanddevelopmentoftheOFBizProjectitself.

Pleasedon'taskquestionsrelevanttoUserMailingListinthisMailingList.Ifyouarenotsuretowhichlisttopost,doitintoUserMailingList.Bytheway,youshouldgetmuchmoreattentionfromthislistforusersquestionstype.HighTrafficÂSubscribeÂUnsubscribeÂArchives

DigestSubscription:SubscribeUnsubscribe

SearchableArchives:NabbleMarkMailCommitsList:ThecommitslistisusedtonotifysubscribersofcommitstotheOFBizSVNrepositoryandisnotusedfordiscussions.ÂHighTrafficÂSubscribeÂUnsubscribeÂArchives

DigestSubscription:SubscribeUnsubscribe

SearchableArchives:NabbleMarkMailGlobalSearchableArchivesTosearchinallNabbleforums,inallOFBizMLswithMarkMail

PluginsearchtoolsforFirefoxusingNabbleorMarkMailHistoryForhistoryyoumaylookatdevusersvnJiraThereisnoembeddedsearchtoolbutyoumayusegooglesitesearchoptionSearchinginthewikiAsConfluencewikiissharedamongprojectsattheASF,ifyouwanttosearchonlyforOFBizinformationyoucanusetheOFBizAdvancedSearchpage.Oryoucanfollowthesesteps:Addthe5OFBizspaces(orwhateveryouwant)intoyourfavoritespaces.Forthat,browseandclickonthe'Star'besidesanyspacestoadd,orifyouseeanystarsthere,whilstinaspaceclickonTools>Favorite.Thestarshouldgoyellow.Clickinthesearchboxandpressentertogettheadvancedsearch(Whichshouldbringyouto)Typeinyoursearchtermthenchoose'FavoriteSpaces'fromthe'Where'dropdownbox.Clickonfilter.Resultsfromonlythespacesyouhaveaddedtofavoriteswillbeshown.PersonnalyIhavealsoaddedthe5spacesaswatchestoreceiveeverydayasummaryofchangesinthesespace.Thisalsobuildyouacorrectdashboard(MyDashboard).DemoandTestSetupGuide示例和安装指南Introduction这编文档描述了OFBiz安装和业务项目基本配备选项。关于更详细简介请看OFBizFrameworkConfigurationGuide,EntityEngine(database)ConfigurationGuide,ServiceEngineConfigurationGuide,和OFBizDocumentationIndexthisdocumentdescribesaninitialsetupprocessandbasicconfigurationoptionsfortheOpenForBusinessProject.FormoredetailseerelateddocumentssuchastheOFBizFrameworkConfigurationGuide,theEntityEngine(database)ConfigurationGuide,theServiceEngineConfigurationGuide,andotherrelateddocumentsyoumayfoundatOFBizDocumentationIndexIfyourunintotroubletherearevariousresourcesavailabletohelp.ThefirststepswouldbetosearchontheNewOFBizDocsSiteandOldOFBizWiki(nowarchived),andthenontheOFBizMailingLists.Ifyoucan'tfindyouanswerthere,thensubscribetotheApacheOFBizUsersMailingList,andsendamessagewithasmuchdetailaspossibleabouttheproblemyouarehaving.Quick&EasySetupYoucangetupandrunningquicklybydownloadingtheOFBizCompletedistributionandfollowingsomesimpleinstructions.Formoreoptionsandexplanations,seetherestofthisdocument.DownloadandinstalltheJava2v1.5seriesJDK/J2SDK(nottheJRE,youneedthefullSDK)fromSun'sJava(J2SE)siteifyouintenttouseareleasepriortoR10.04ortrunkelseuse1.6,andmakesureyourJAVA_HOMEenvironmentvariableissettothisJDKafterinstallation(NOTEthatforMacOSXnoJVMsetupisneeded,justmakesureJavaisuptodatewiththeOSXSoftwareUpdatefacility).NotealsothatOpenJdkisstillnotrecommended,therearestillsomecompilationproblmemswithit(today:-05-27)DownloadtheOFBizreleasearchiveandunzipitinthedirectoryofyourchoice(seecommentsbelowaboutthat,sofornowcheckingoutofSVNrepositoryispreferred,seebelow...).Thisshouldcreateonesub-directory:ofbiz.ThiswillbetheOFBIZ_HOMElocation.StartOFBizwithembeddedTomcatbygoingintotheofbizdirectoryandthenrunning"startofbiz.bat"(or"%JAVA_HOME%\bin\java-jarofbiz.jar")forWindows,or"./startofbiz.sh"(or"$JAVA_HOME/bin/java-jarofbiz.jar")forLinux/Unix.ForOSXyoucanjustrun"java-jarofbiz.jar"andyoudon'tneedtosetuptheJAVA_HOMEoranythingbecauseitisalreadythere.Openabrowserandgoto:8080/ecommerce/control/mainfortheecommerceapplicationor:8443/webtools/control/mainfortheWebToolsapplicationor:8443/catalog/control/mainfortheCatalogManagerapplication.Thedefaultadministrativeaccountisusername:"admin",password:"ofbiz".Havefunwithit!YouarerunningonaJavadatabase.Formorediscussionofdatabases,readthesectionbelowonthattopic.Formoredetailedoptionsandconfigurationinformation,readon!BuildingFromSVNWhenbuildingfromSVNyouwillneedtohaveaJava1.5seriesJ2SDK(NOTjusttheJRE,needtofullSDK)asmentionedabove,forreleasepriortoR10.04ortrunkelseuse1.6.ThebuildisdoneusingAnt,andsufficientAntlibrariesareincludedwithOFBiz.IfyouhaveAntinstalledseparatelyjustmakesureyouhaveversion1.5orlater,andthenrunAntasnormalinteadofaslistedinthefollowingexamples.InthedirectorywhereyouwantOFBiztobe,doaSVNcheckoutoftheofbiztrunk.Forexample:svncoofbizForinformationonconnectingtoSVNclickhere.Nowgointothe"ofbiz"directoryandrun"ant.bat"(Windows),or"./ant"(Linux/Unix/OSX).Itwillcompileallmodulesandleaveyouanexecutablejar(ofbiz.jar)inthe"ofbiz"directory.Toloadtheseedanddemodata,run"ant.batrun-install"or"%JAVA_HOME%\bin\java-jarofbiz.jarinstall"(Windows),or"./antrun-install"or*"$JAVA_HOME/bin/java-jarofbiz.jarinstall"*(Linux/Unix/OSX)Asanalternativetothepreviousstep:toloadtheseeddataonly,run"ant.batrun-install-seed"or"%JAVA_HOME%\bin\java-jarofbiz.jarinstall-readers=seed"(Windows),or"./antrun-install-seed"or*"$JAVA_HOME/bin/java-jarofbiz.jarinstall-readers=seed"*(Linux/Unix/OSX)Tostarttheserverrun"ant.batrun"or"%JAVA_HOME%\bin\java-jarofbiz.jar"(Windows),or"./antrun"or"$JAVA_HOME/bin/java-jarofbiz.jar"(Linux/Unix/OSX)AnotherbuildoptionintheAntbuildscriptthatisusefulis"ant.batclean"(Windows)or"./antclean"(Linux/Unix/OSX).Thatwillcleanoutallbuiltclassesallowingyoutorun"ant"againtogetacleanbuild.IfyouarerunningintofunnyerrorsafterupdatingfromSVNinthefuture,givethiscleanbuildprocessatryfirst.DatabaseSetupDatabasesetupisdoneintheentityengine.xmlfile.TherearemanyoptionstherewhicharedescribedintheEntityEngineConfigurationGuideTheOFBizpackagecomeswithDerby,anopensourceJavadatabasefromIBMthatcomplieswithDB2specsandisbasedontheCloudscapeproduct.Thisdatabaseisgoodfordemonstrationpurposesbecauseitiseasytosetupanduse.Itisnotthebestforlargedatasetsanddoesnotprovidethesameperformanceorscalabilitythatamajordatabasewould,butcomparedtoHypersonicSQL(thatweusedtouse)itissignificantlybetterbecausewhilenotasfastforsmallscaleoperationsitisclosertoaproductiondatabaseenvironmentandallowsustocatchissuesearlieron.Smallersitesmightevenconsiderthisasanoptionfortheirproductiondeployment,especiallyoncethedatabaseisabitmorestabilized.Therearemanyopensourcedatabasesthatwillscalewellanddelivergoodperformance.ThetwomostpopulararePostgreSQLandMySQL(4.1.11orlater,orthe5series).Postgresisaveryfullfeatureddatabasewithtransactionsupport,foreignkeys,storedprocedures,etcetera.Postgresalsohasveryfriendlylicenseterms.MySQLisaprettygoodoptionthesedaysaswell.PleasenotethatifyouusethisinacommercialproductioninstanceyoumayhavetopurchaseacommerciallicensebecauseitisGPLlicensedandsoistheJDBCdriver.MySQLABallowsuseoftheJDBCdriverinopensourceprojectsinspitetheGPLlicense,butthismaynotapplyforcommercialuseofamodifiedOFBiz.Forsomeacommerciallicenseisthepreferredwaytogoanywaybecauseofsupportandwarrantyandotherissues.ForthosewiththispreferenceconsideringPostgresthereisalsoacommercialPostgresderivativecalledEnterpriseDB.Commercialdatabasesarealsosupported.Ifyouhavedatabaselicensesforotherneeds,orhavemajorin-housefamiliaritywithandsupportforacertaincommercialdatabase,thenthereisnoreasonnottotakeadvantageofthat.OFBizhasbeentestedwithOracle,DB2,Sybase,MSSQLServerandothersandshouldworkfinewithanydatabasethathasaJDBCdriver.PleasenotethatwehaveexperiencedthatinsomecasestheJDBCdriversincludedwithcertaindatabasesarenotfullyspecificationcompliant.Theoptionsareoftentousethedatabase-specificAPIsortogetathirdpartydriver.Thedatabase-specificcodeisanissuebecauseoflicensingrestrictionsandadditionaldifficultyneededtokeepupwiththem,sosometimesathirdparty(evenacommercialone)ispreferred.ForexamplewithOraclewehavehadmuchmoresuccesswiththeDataDirectJDBCdriver.ThereisnoneedtorunanySQLscriptstocreatethetablesorpopulatethemwiththedefaultdata.Theentityenginecancreatemissingtablesorfieldswhentheserverstartsupanddoessoiftheappropriatepropertyissetintheentityengine.xmlfile.Thisisthefilethatconfigurestheserversfortheentityengine.Forthetablecreationroutinetoworkproperly,thefieldtypesmustbesetup.DothisbyspecifyingthecorrespondingfieldtypeXXX.xml(whereXXXisthedatabasename)filefortheserverintheentityengine.xmlfile.ThesefieldtypeXXX.xmlfilesarelocatedintheofbiz/framework/entity/fieldtypedirectory.Defaultdatacanbeloadedthroughthe"run-install"AnttargetasmentionedintheBuildingfromSVNsection.J2EEContainersOFBizcomesandrunsbydefaultwithTomcatforaServlet/JSPcontainer,theApacheGeronimoTransactionManagerforatransaction(JTA)manager,andApacheDBCPforatransactionawareconnectionpool.OFBizcanalsobeconfiguredtorunindifferentcontainers,buttheremaybeissueswithcertainquirksthatothercontainershave,especiallywithservletcontainers.Wehavealwaysbeenabletofindwork-aroundsforthese,buttheyalsoseemtokeeponappearing,sothatisjustsomethingtowatchfor.BecauseofthedifficultyofdeployinginanexternalapplicationserverwehavecreatedaconfigurationandscripttemplatetoolthattakestheclasspathandwebappsettingsfromthevariousOFBizfilestomoreeasilygeneratethefilesyouneed.Formoreinformation,seetheREADMEfileintheofbiz/framework/appserversdirectory.IfyouarelookingforagoodcommercialJ2EEappserver,Orionisagoodplacetostart,butwerecommendtryingoutTomcatandGeronimoTMandseeiftheymeetyourneeds.TheOpenForBusinessProject:EntityEngineConfigurationGuideWrittenby:DavidE.Jones,Minorcorrectionsby:PawelH.DebskiEditedby:LesAustin

LastUpdated:August6,TableofContentsRelatedDocumentsIntroductionResourceLoadersJTAElementsDelegatorElementsEntityModelXMLFilesEntityGroupXMLFilesEntityECAXMLFilesFieldTypeXMLFilesDataSourceElementsRelatedDocuments:EntityEngineGuideFrameworkConfigurationGuideServiceEngineConfigurationGuideXMLFileDefinitions(DocumentsPage)IntroductionThisdocumentdescribestheconfigurationoftheEntityEngine.Itstartswithanintroductiontogeneralideasandthengoesthrougheachpartoftheentityengine.xmlfileandexplainstheavailableelementsandtheirusage.Theentityengine.xmlfileusedfortheOFBizapplicationshasexamplesofanumberofdifferentoptionsandislocatedinofbiz/commonapp/etc/entityengine.xml.TheconfigurationoftheEntityEngineisdonethroughasimpleXMLfilecalledentityengine.xmlthatmustexistsomewhereontheclasspath.ThisfileisusedtodefineparametersforpersistenceserverssuchasEJBserverparametersorJDBCserverparameters.ItisalsousedtospecifywhichXMLentitymodel,entitygroup,andfieldtypemodelfileswillbeusedforthatserver.ThedefaultfilefortheOFBizdistributioncanbefoundinofbiz/commonapp/etc/entityengine.xml.EachapplicationthatusestheEntityEnginedoessothroughaGenericDelegatorinstance.Thedelegatornamemustbepassedtothestaticfactorymethodthatisthenpassedtotheconstructorifanewinstanceisneeded.Thisdelegatornameisusedtolookupsettingsforthatdelegatorintheentityengine.xmlfile.Eachdelegatorusesanentitymodelreaderandanentitygroupreaderthatspecifiesagroupnameforeachnamedentityintheentitymodelfile.Theentityengine.xmlfilecontainsthesettingsthatmapeachgroupnametoaGenericHelperforthatgroup.GenericHelperisaninterfacethatmustbeimplementedforeachtypeofdatasource(i.e.:JDBC,EJB,SOAP,HTTP,etcetera).ThesettingsforeachnamedGenericHelperarespecifieddatsourceelementsintheentityengine.xmlfile.ForaJDBChelperthesewouldincludedatabaseconnectionparameterssuchaseithertheJNDIdatasourceparametersortheJDBCparametersincludingthedrivername,theJDBCURI,andtheusernameandpasswordforthedatabase.AnEJBhelperwouldcontainJNDIparameterssuchasthecontextproviderURL,theinitialcontextfactory,andtheURLpackageprefixes.TheGenericDelegatoristheprimaryaccessmethodforEntityEngineservices.EachservicerequestisdispatchedtothehelperthatcorrespondstotheentitythattheserviceisrequestedforaccordingtothegroupnameoftheentityspecifiedintheentitygroupXMLfileandthehelperforthatgroupspecifiedintheentityengine.xmlfile.ThedefaultentitygroupXMLfilefortheOFBizentitymodelcanbefoundinofbiz/commonapp/entitydef/entitygroup.xml.ResourceLoadersTheresource-loadertagisusedtoconfigureanamedresourceloaderthatcanbeusedelsewheretoloadXMLandotherresources.Ithasthefollowingattributes.AttributeNameRequired?DescriptionnameYThenameoftheresourceloader.Usedinothertagsinthe"loader"attribute.classYTheclasstousethatextendstheabstractclassorg.ofbiz.entity.config.ResourceLoader.AvailableclassesincludeFileLoader,UrlLoader,andClasspathLoader,allinthesamepackageastheResourceLoaderclass.prepend-envNThenameofaJavaenvironmentpropertytoputattheverybeginningofthefulllocation,beforetheprefix.Thisisoptional.prefixNAstringtoputbeforethelocationwhenmakingthefulllocation.Thisisoptional.Ifusedwillgoaftertheprependedenvironmentpropertyandbeforethelocationspecifiedforeachresource.JTAElementsForJTAsupporttheEntityEngineneedsaccesstothejavax.transaction.UserTransactionandoptionallythejavax.transaction.TransactionManagerinterfaceimplementationsfortheTXManagerbeingused.Theseareretrievedthroughtheorg.ofbiz.entity.TransactionFactoryclass.Thisclassusestheclassspecifiedwiththeclassattributeofthetransaction-factory.ThisclassmaybechangeddependingonwhichapplicationserverortransactionmanageryouarerunningOFBizon.ThedefaultTXManagerisJOTMfromObjectWebandthefactoryclassforJOTMisorg.ofbiz.entity.transaction.JotmFactory.ThereisalsoaspecialclassforWeblogic:org.ofbiz.entity.transaction.WeblogicFactory,whichmustbechangedtoincludetheWeblogicspecificstuffandthencompiledwithweblogic.jarontheclasspath.Themostwidelyusefultransactionfactoryclassistheorg.ofbiz.entity.transaction.JNDIFactoryclass.Thisclassusessomeadditionalelementsfromtheentityengine.xmlfiletolocatetheUserTransactionandTransactionManagerobjectsinJNDI.Theuser-transaction-jndiandtransaction-manager-jnditagsareusedtospecifytheobjectnamesinJNDIandthenameoftheJNDIServertouse,asconfiguredabove.Bothtagshavetworequiredattributes:jndi-server-nameandjndi-name.Anexamplejndi-namefortheUserTransactionobjectisjava:comp/UserTransactionandfortheTransactionManagerobjectisjava:comp/TransactionManager.DelegatorElementsTheGenericDelagatoriscreatedthroughafactorymethodthattakesaStringargumentcontainingthedelegatorname.Thisdelegatornameisusedtolookupadelegatortagintheentityengine.xmlfile.AttributeNameRequired?DescriptionnameYThenameoftheDelegator.Usedtolookupthistagbydelegatorname.entity-model-readerYThenameoftheentity-model-readertouseforthisdelegator.entity-group-readerYThenameoftheentity-group-readertouseforthisdelegator.entity-eca-readerNThenameoftheentity-eca-readertouseforthisdelegator.IfnotspecifiednoEntityECAswillbeused.distributed-cache-clear-enabledNUsedtospecifyifthedistributedcacheclearshouldbeenabled.Ifnotspecifieddefaultsto"false".IfsettotruetheotherDCCattributeswillbeused.distributed-cache-clear-class-nameNUsedtospecifyifthenameoftheclasstouseforDCCandthatimplementsthedistributedcacheclearinterface.Ifnotspecifieddefaultsto"org.ofbiz.entityext.cache.EntityCacheServices",whichisagooddefaultformostcasesthatusestheServiceEngineforconfigurationandremotecalls.distributed-cache-clear-user-login-idNUsedtospecifyiftheuserLoginId(touseforanysecuritychecks)isneededrelatedtodistributedcacheclearoperation.Ifnotspecifieddefaultsto"admin".Thedelegatortagmustcontainoneormoregroup-maptagsspecifyingadatasourcetouseforeachgroupofentitiesthatthedelegatorwillknowaboutfromtheentity-group-reader.Thedelegatorusesthisfiletoassignagrouptoeachentity.WhenanoperationonanentityisperformeditlooksupthegroupandthedatasourcehelperthatcorrespondstothegroupandusesthatHelpertoperformlowerlevelDataSourceoperations.WiththistechniquewhentheapplicationiswrittenitdoesnothavetoknowwhichHelperisresponsibleforagivenentity,andcanthereforehandleanentityorgroupsofentitiesassignedtodifferentDataSourceswithasimpleconfiguration.EntityModelXMLFilesTheentity-model-readertagisusedtoconfigureeachnamedentitymodelreader.Thetaghasanameattributeusedtospecifytheentitymodelreader'sname.Eachreadermayloadfrommultipleresourcesthatareeachspecifiedwitharesourcetaginsidethemaintag.Eachresourcetaghastworequiredattributes:loaderwhichspecifieswhichresource-loadertouseandlocationwhichspecifiesthelocationthattheresource-loaderwilluseinsideitselftoloadtheresource.EntityGroupXMLFilesTheentity-group-readertagisusedtoconfigureeachnamedentitygroupreader.Thetaghasanameattributeusedtospecifytheentitygroupreader'sname.ThegroupreaderusesXMLfilestogettheentity-groupmappings.Thetaghastwooptionalattributes:loaderwhichspecifieswhichresource-loadertouseandlocationwhichspecifiesthelocationthattheresource-loaderwilluseinsideitselftoloadtheresource.Thereisalsoasub-elementnamed"resource"thathasthesesameattributesandcanbeusedtospecifyadditionresourcesforadditionfiles.EntityECAXMLFilesTheentity-eca-readertagisusedtoconfigureeachnamedentityECAreader.ThetaghasanameattributeusedtospecifytheentityECAreader'sname.TheECAreaderusesXMLfilestogettheentityECAruledefinitions.Eachreadermayloadfrommultipleresourcesthatareeachspecifiedwitharesourcetaginsidethemaintag.Eachresourcetaghastworequiredattributes:loaderwhichspecifieswhichresource-loadertouseandlocationwhichspecifiesthelocationthattheresource-loaderwilluseinsideitselftoloadtheresource.FieldTypeXMLFilesThefield-typetagisusedtoconfigureeachnamedfieldtype.Thetaghasanameattributeusedtospecifythefieldtype'sname.ThegroupreaderusesasingleXMLfiletogetthefieldtypeinformation.Thetaghastworequiredattributes:loaderwhichspecifieswhichresource-loadertouseandlocationwhichspecifiesthelocationthattheresource-loaderwilluseinsideitselftoloadtheresource.DataSourceElementsManydatasourcescanbeconfiguredusingonedatasourcetagforeachdatasource.Thistaghasthefollowingattributes,andmaycontainthefollowingsub-elements:AttributeNameRequired?DescriptionnameYThatnameofthedatasource.helper-classYTherecanbemanytypesofdatasourcehelpers;themainoneusedistheJDBC/DAOhelper.Youcancodeyouownhelpersandusethembyimplementingtheorg.ofbiz.entity.GenericHelperinterface.ForJDBC/DAOhelperstheclasswillbeorg.ofbiz.entity.GenericHelperDAO.field-type-nameYThenameofthefield-typetouse.Mustmatchthenameofanexistingfield-typetagasdefinedabove.schema-nameNThenameoftheschematouseinthedatabase.Ifnotspecifiednoschemanamewillbeused.Thisisacasesensitivevalueandadifferentdatabasemayexpectadifferentcasing.check-on-startNCheckthedatasourceonstartup?Mustbetrueorfalse,defaultstotrue.add-missing-on-startNAddmissingentitiesandfieldstothedatasourceonstartupwhencheckingisdone?Mustbetrueorfalse,defaultstofalse.use-foreign-keysNUse/Createforeignkeysfor"one"relationships?Mustbetrueorfalse,defaultstotrue.use-foreign-key-indicesNUse/Createindicesforforeignkeys(i.e.anindexontheforeignkeycolumns)?Notethatcreatingforeignkeysisnotrequiredforthistoworkandthatindicesarecreatedfortype"one"relationshipdefinitions.Mustbetrueorfalse,defaultstotrue.

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论