Apache OFBiz 学习手册.doc_第1页
Apache OFBiz 学习手册.doc_第2页
Apache OFBiz 学习手册.doc_第3页
Apache OFBiz 学习手册.doc_第4页
Apache OFBiz 学习手册.doc_第5页
已阅读5页,还剩12页未读 继续免费阅读

下载本文档

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

文档简介

Apache OFBiz Getting StartedApache OFBiz 之旅1. Apache OFBiz介绍21.1 The What, Why and How of Apache OFBiz21.2. How Do I Decide What to Use?22. Second Part Mailing Lists33. Demo and Test Setup Guide示例和安装指南53.1. Introduction53.2. Quick & Easy Setup53.3. Building From SVN63.4. Database Setup73.5. J2EE Containers84. The Open For Business Project: Entity Engine Configuration Guide81. Apache OFBiz介绍这个档和相关文档信息内容来开始我们的OFBiz之旅。This document and its related documents contain information about getting started with OFBiz.阅读这编文档后你也许可以得到一些帮助同时也开始了Apache OFBiz精彩世界之旅。After reading this document you might find these helpful as well as you get started on your journey into the wonderful world of Apache OFBiz: Mailing Lists(邮件发送清单) Demo and Test Setup Guide(示例测试指南) Technical Production Setup Guide(技术产品指南) Business Setup Guide(业务指南) OFBiz Source Repository and Access(OFBiz源码库和通道) Framework Introduction Videos and Diagrams(框架介绍的视频和图表) OFBiz Beginners Development Guide Using Practice Application OFBiz Contributors Best Practices1.1 The What, Why and How of Apache OFBizThe basic structure and driving force behind OFBiz has a lot to do with the goals and actualization of the release process.OFBiz is and always has been a community-driven open source project. There is no central commercial organization that drives the development of OFBiz or derives a project from the intellectual property of the software or other project assets. This is formalized now that OFBiz is a project in the Apache Software Foundation.Because of this OFBiz always has been and always will be just what users who contribute to the project want it to be. There are many different individuals and groups involved with many different needs and our goal is to define and follow development and release policies that serve the needs of these parties.So, lets start with that.1.2. How Do I Decide What to Use?From a project user perspective there is one main question that can help determine which way they will want to get OFBiz: Do I want to contribute to the open source project?For this question there are 3 main answers:1 Yes, definitely: I want to contribute to design, coding, and testing efforts and thereby collaborate with others to more effectively and efficiently satisfy the long-term requirements from me, my clients, or my employer2 Kind of: I want to stay on the cutting edge and participate with testing and feedback, but Im not in a position to participate in development and/or in the near future I will need something more reliable and supported and that wont change very much3 Not really: Im happy to offer feedback, but I really need something that will work well now and well into the future so we can get things going in our organizationFor each answer there is a recommended way to get OFBiz:4 Get the code straight from the code repository (SVN) trunk and update frequently through development, stopping before your integration or final pre-deployment testing, and periodically even after production deployment according to your ongoing develop/deploy plan; note that when you are not updating from SVN you should continue to watch the commits for bug fixes to patch into your code base5 Get the code from the code repository (SVN) release branch and keep updated or patched regularly as fixes are committed and the branch stabilizes over time; when getting started choose the most recent branch, even if it is very new; when new release branches are created update to them soon after the branch is done6 Get a built release package or the code from a release branch tag, and update as new pre-built release packages and tags are created; these will only represent fixes and unless a major issue arises they will be backward compatible and generally safe to update or patch to; when getting started choose a release branch that has been around for at least 2-3 months and that has no major outstanding issues in the issue tracker to assure that it has stabilized; when new release branches are created wait until you are ready to do a major upgrade and possibly need to modify your code and configuration, and wait at least until the prospective branch has stabilized before moving to it2. Second Part Mailing ListsTo subscribe to a mailing list use the links below. In your first email you will get some information about working with the list manager EZMLM.To unsubscribe from any of the following lists, you need to send an empty, subjectless email to unsubscribe address listed below. In other words, click the appropriate unsubscribe link below and press send.Support of Users and Developers List: The user list is intended for installation, deployment, custom development and usage related topics.High Traffic Subscribe Unsubscribe ArchivesDigest Subscription: Subscribe UnsubscribeSearchable Archives: Nabble MarkMailWhen you ask a complex questions on this list, its better to give details. Most of the time URLs are enough and welcome.Else please follow this scenario (at leat relevant parts)Why What you were looking for How did you try to achieve it What did you expect as results And what you really gotHow1 What you did (including detailed steps to reproduce)2 What you expected to happen3 What actually happened (including exact quotes of error messages, etc)4 If possible provide an URLDesign and development List: The developer list is strictly for topics related to the design and development of the OFBiz Project itself.Please dont ask questions relevant to User Mailing List in this Mailing List. If you are not sure to which list to post, do it into User Mailing List. By the way, you should get much more attention from this list for users questions type.High Traffic Subscribe Unsubscribe ArchivesDigest Subscription: Subscribe UnsubscribeSearchable Archives: Nabble MarkMailCommits List: The commits list is used to notify subscribers of commits to the OFBiz SVN repository and is not used for discussions. High Traffic Subscribe Unsubscribe ArchivesDigest Subscription: Subscribe UnsubscribeSearchable Archives: Nabble MarkMail2.1. Global Searchable ArchivesTo search in all Nabble forums, in all OFBiz MLs with MarkMailPlugin search tools for Firefox using Nabble or Mark Mail2.2. HistoryFor history you may look at dev user svn JiraThere is no embedded search tool but you may use google site search option2.3. Searching in the wikiAs Confluence wiki is shared among projects at the ASF, if you want to search only for OFBiz information you can use the OFBiz Advanced Search page.Or you can follow these steps:5 Add the 5 OFBiz spaces (or whatever you want) into your favorite spaces. For that, browse /confluence/dashboard.action and click on the Star besides any spaces to add, or if you see any stars there, whilst in a space click on Tools Favorite. The star should go yellow.6 Click in the search box and press enter to get the advanced search (Which should bring you to /confluence/dosearchsite.action?queryString=)7 Type in your search term then choose Favorite Spaces from the Where drop down box.8 Click on filter.Results from only the spaces you have added to favorites will be shown.Personnaly I have also added the 5 spaces as watches to receive everyday a summary of changes in these space. This also build you a correct dashboard (My Dashboard).3. Demo and Test Setup Guide示例和安装指南3.1. Introduction这编文档描述了OFBiz的安装和业务项目的基本配置选项。有关更详细的介绍请看OFBiz Framework Configuration Guide, Entity Engine (database) Configuration Guide, Service Engine Configuration Guide, 和 OFBiz Documentation Indexthis document describes an initial setup process and basic configuration options for the Open For Business Project. For more detail see related documents such as the OFBiz Framework Configuration Guide, the Entity Engine (database) Configuration Guide, the Service Engine Configuration Guide, and other related documents you may found at OFBiz Documentation IndexIf you run into trouble there are various resources available to help. The first steps would be to search on the New OFBiz Docs Site and Old OFBiz Wiki (now archived), and then on the OFBiz Mailing Lists. If you cant find you answer there, then subscribe to the Apache OFBiz Users Mailing List, and send a message with as much detail as possible about the problem you are having.3.2. Quick & Easy SetupYou can get up and running quickly by downloading the OFBiz Complete distribution and following some simple instructions. For more options and explanations, see the rest of this document.1 Download and install the Java 2 v1.5 series JDK/J2SDK (not the JRE, you need the full SDK) from Suns Java (J2SE) site if you intent to use a release prior to R10.04 or trunk else use 1.6, and make sure your JAVA_HOME environment variable is set to this JDK after installation (NOTE that for Mac OS X no JVM setup is needed, just make sure Java is up to date with the OS X Software Update facility). Note also that OpenJdk is still not recommended, there are still some compilation problmems with it (today: 2010-05-27)2 Download the OFBiz release archiveand unzip it in the directory of your choice (see comments below about that, so for now checking out of SVN repository is preferred, see below.). This should create one sub-directory: ofbiz. This will be the OFBIZ_HOME location.3 Start OFBiz with embedded Tomcat by going into the ofbiz directory and then running startofbiz.bat (or %JAVA_HOME%binjava -jar ofbiz.jar) for Windows, or ./startofbiz.sh(or $JAVA_HOME/bin/java -jar ofbiz.jar) for Linux/Unix. For OS X you can just run java -jar ofbiz.jar and you dont need to setup the JAVA_HOME or anything because it is already there.4 Open a browser and go to :8080/ecommerce/control/main for the ecommerce application or :8443/webtools/control/main for the WebTools application or :8443/catalog/control/main for the Catalog Manager application.5 The default administrative account is username: admin, password: ofbiz.6 Have fun with it! You are running on a Java database. For more discussion of databases, read the section below on that topic.7 For more detailed options and configuration information, read on!3.3. Building From SVNWhen building from SVN you will need to have a Java 1.5 series J2SDK (NOT just the JRE, need to full SDK) as mentioned above, for release prior to R10.04 or trunk else use 1.6. The build is done using Ant, and sufficient Ant libraries are included with OFBiz. If you have Ant installed separately just make sure you have version 1.5 or later, and then run Ant as normal intead of as listed in the following examples.In the directory where you want OFBiz to be, do a SVN checkout of the ofbiz trunk. For example:svn co /repos/asf/ofbiz/trunk ofbizFor information on connecting to SVN click here.Now go into the ofbiz directory and run ant.bat (Windows), or ./ant (Linux/Unix/OSX). It will compile all modules and leave you an executable jar (ofbiz.jar) in the ofbiz directory.To load the seed and demo data, run ant.bat run-install or %JAVA_HOME%binjava -jar ofbiz.jar install (Windows), or ./ant run-install or*$JAVA_HOME/bin/java -jar ofbiz.jar install* (Linux/Unix/OSX)As an alternative to the previous step: to load the seed data only, run ant.bat run-install-seed or %JAVA_HOME%binjava -jar ofbiz.jar install -readers=seed (Windows), or ./ant run-install-seed or*$JAVA_HOME/bin/java -jar ofbiz.jar install -readers=seed* (Linux/Unix/OSX)To start the server run ant.bat run or %JAVA_HOME%binjava -jar ofbiz.jar (Windows), or ./ant run or $JAVA_HOME/bin/java -jar ofbiz.jar (Linux/Unix/OSX)Another build option in the Ant build script that is useful is ant.bat clean (Windows) or ./ant clean (Linux/Unix/OSX). That will clean out all built classes allowing you to run ant again to get a clean build. If you are running into funny errors after updating from SVN in the future, give this clean build process a try first.3.4. Database SetupDatabase setup is done in the entityengine.xml file. There are many options there which are described in the Entity Engine Configuration GuideThe OFBiz package comes with Derby, an open source Java database from IBM that complies with DB2 specs and is based on the Cloudscape product. This database is good for demonstration purposes because it is easy to setup and use. It is not the best for large data sets and does not provide the same performance or scalability that a major database would, but compared to HypersonicSQL (that we used to use) it is significantly better because while not as fast for small scale operations it is closer to a production database environment and allows us to catch issues earlier on. Smaller sites might even consider this as an option for their production deployment, especially once the database is a bit more stabilized.There are many open source databases that will scale well and deliver good performance. The two most popular are PostgreSQL and MySQL (4.1.11 or later, or the 5 series) . Postgres is a very full featured database with transaction support, foreign keys, stored procedures, et cetera. Postgres also has very friendly license terms. MySQL is a pretty good option these days as well. Please note that if you use this in a commercial production instance you may have to purchase a commercial license because it is GPL licensed and so is the JDBC driver. MySQL AB allows use of the JDBC driver in open source projects in spite the GPL license, but this may not apply for commercial use of a modified OFBiz. For some a commercial license is the preferred way to go anyway because of support and warranty and other issues. For those with this preference considering Postgres there is also a commercial Postgres derivative called EnterpriseDB.Commercial databases are also supported. If you have database licenses for other needs, or have major in-house familiarity with and support for a certain commercial database, then there is no reason not to take advantage of that. OFBiz has been tested with Oracle, DB2, Sybase, MS SQL Server and others and should work fine with any database that has a JDBC driver. Please note that we have experienced that in some cases the JDBC drivers included with certain databases are not fully specification compliant. The options are often to use the database-specific APIs or to get a third party driver. The database-specific code is an issue because of licensing restrictions and additional difficulty needed to keep up with them, so sometimes a third party (even a commercial one) is preferred. For example with Oracle we have had much more success with the DataDirect JDBC driver.There is no need to run any SQL scripts to create the tables or populate them with the default data. The entity engine can create missing tables or fields when the server starts up and does so if the appropriate property is set in the entityengine.xml file. This is the file that configures the servers for the entity engine.For the table creation routine to work properly, the field types must be set up. Do this by specifying the corresponding fieldtypeXXX.xml (where XXX is the database name) file for the server in the entityengine.xml file. These fieldtypeXXX.xml files are located in the ofbiz/framework/entity/fieldtypedirectory.Default data can be loaded through the run-install Ant target as mentioned in the Building from SVN section.3.5. J2EE ContainersOFBiz comes and runs by default with Tomcat for a Servlet/JSP container, the Apache Geronimo Transaction Manager for a transaction (JTA) manager, and Apache DBCP for a transaction aware connection pool.OFBiz can also be configured to run in different containers, but there may be issues with certain quirks that other containers have, especially with servlet containers. We have always been able to find work-arounds for these, but they also seem to keep on appearing, so that is just something to watch for.Because of the difficulty of deploying in an external application server we have created a configuration and script template tool that takes the classpath and webapp settings from the various OFBiz files to more easily generate the files you need. For more information, see the README file in the ofbiz/framework/appservers directory. If you are looking for a good commercial J2EE app server, Orion is a good place to start, but we recommend trying out Tomcat and Geronimo TM and see if they meet your needs.4. The Open For Business Project: Entity Engine Configuration GuideWritten by: David E. Jones, Minor corrections by: Pawel H. DebskiEdited by: Les AustinLast Updated: August 6, 2004Table of Contents Related Documents Introduction Resource Loaders JTA Elements Delegator Elements Entity Model XML Files Entity Group XML Files Entity ECA XML Files Field Type XML Files Data Source Elements4.1. Related Documents: Entity Engine Guide Framework Configuration Guide Service Engine Configuration Guide XML File Definitions (Documents Page)4.2. IntroductionThis document describes the configuration of the Entity Engine. It starts with an introduction to general ideas and then goes through each part of the entityengine.xml file and explains the available elements and their usage. The entityengine.xml file used for the OFBiz applications has examples of a number of different options and is located in ofbiz/commonapp/etc/entityengine.xml.The configuration of the Entity Engine is done through a simple XML file called entityengine.xml that must exist somewhere on th

温馨提示

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

最新文档

评论

0/150

提交评论