免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
[中英對(duì)照]Liferay架構(gòu)及所集成的各項(xiàng)技術(shù)
基本架構(gòu)
  1. Overview
  2. Portlet API (JSR 168)
  3. Struts and Tiles
  4. Session EJBs, Spring, and Hibernate
  5. SOAP, RMI, and Tunneling
  6. Application Service Provider
  1. Overview

    Users can access the portal from traditional and wireless devices. Developers can access the portal from the exposed APIs via SOAP, RMI, and our custom tunneling classes.
    客戶程序可以通過(guò)傳統(tǒng)的或者無(wú)線設(shè)備來(lái)訪問(wèn)Liferay門(mén)戶。而開(kāi)發(fā)者能夠通過(guò)開(kāi)放的SOAP、RMI以及Liferay提供客戶隧道(tunnel)類來(lái)實(shí)現(xiàn)對(duì)門(mén)戶的訪問(wèn)。


  2. Portlet API (JSR 168)

    Liferay is designed to deploy portlets that adhere to the Portlet API (JSR 168). Many useful portlets are bundled with the portal (Mail, Document Library, Calendar, Message Boards, to name a few) and can be used as examples for adding your own custom portlets.
    Liferay是專門(mén)為符合Portlet APIJSR168)的門(mén)戶單元設(shè)計(jì)開(kāi)發(fā)的。而且有許多不錯(cuò)的門(mén)戶單元附加在Lliferay中,包括郵件、文檔庫(kù)、日歷、公告板等,它們也可以作為開(kāi)發(fā)學(xué)習(xí)時(shí)的例子使用。
  3. Struts and Tiles

    All HTTP and WAP requests go through MainServlet which extends the basic Struts ActionServlet. MainServlet processes all requests and ensures that each request is routed to the proper PortletAction. Refer to Struts for a better understanding of how the portal‘s web framework functions.
    Liferay門(mén)戶通過(guò)擴(kuò)展struts的基本類ActionServlet生成自己的MainServlet類,而所有的HTTPWAP請(qǐng)求都要提交給這個(gè)類來(lái)處理,以保證能傳遞給合適的PortletAction來(lái)處理。可能參閱Struts,進(jìn)一步學(xué)習(xí)理解WEB架構(gòu)的實(shí)現(xiàn)原理。
    All layout information for the portal is centralized in two files: portal_layout.jsp and portlet_layout.jsp. They can be found in /portal-web/docroot/WEB-INF/html/tiles. Refer to articles about Tiles to get a better understanding of how Tiles works as a layout manager.
    有關(guān)門(mén)戶所有的頁(yè)面表現(xiàn)信息都集中在兩個(gè)文件:portal_layout.jspportlet_layout.jsp,他們存放在目錄/portal-web/docroot/WEB-INF/html/tiles。要學(xué)習(xí)Tiles的工作原理,請(qǐng)參閱Tiles相關(guān)文檔。
  4. Session EJBs, Spring, and Hibernate

    Liferay is no longer dependent on EJBs and can be deployed on a standalone servlet container. All business logic is concentrated inside POJO implementations that are looked up and instantiated by Spring. These implementations can be modified or enhanced via Spring‘s AOP and IOC capabilities.
    Liferay不再依賴于EJB,它完全可以單獨(dú)裝配到一個(gè)servlet容器(如:Tomcat,JBoss等)中。而所有的業(yè)務(wù)邏輯都通過(guò)Spring管理的POJO來(lái)實(shí)現(xiàn)。這樣的實(shí)現(xiàn)利益于SpringAOPIOC特性。
    The enterprise release of the portal wraps the POJO implementations with Session EJBs to provide heavy scaling and transaction support required by large sites. The professional release of the portal calls the POJO implementations directly to provide a light weight facade.
    但在POJO的實(shí)現(xiàn)方法上Liferay的兩個(gè)版本有所不同,企業(yè)版(enterprise)中通過(guò)EJB從而為大站點(diǎn)提供了高擴(kuò)展性各良好的事務(wù)支持能力(如集群),而專業(yè)版(professiona)直接通過(guò)輕量級(jí)的接口完成。
    All data is persisted using Hibernate and is called through the POJO implementations. Liferay used to rely on CMP technology to achieve persistence, but switched over to Hibernate because of its raw speed and flexibility. Liferay is database agnostic and can run on a variety of popular databases.
    所有的業(yè)務(wù)數(shù)據(jù)都通過(guò)Hibernate來(lái)實(shí)現(xiàn)并通過(guò)POJO來(lái)調(diào)用。Liferay曾經(jīng)使用CMP技術(shù).來(lái)實(shí)現(xiàn)持久層,但后來(lái)因速度及靈活性等原因改用Hibernate。在數(shù)據(jù)庫(kù)方面,Liferay也完全兼容大多數(shù)主流類型DB
    Liferay uses JAAS Web security so that when a user logs in, their principal is propogated to the Servlet and EJB tiers. Remote Session EJBs can take advantage of this by checking security and permissions at the EJB level so it does not have be duplicated else where. Local Session EJBs exposes business logic to other Session EJBs and does not specifically check for security since they cannot be called remotely. Principals are also propagated to POJO implementations that are the base classes for Remote Session EJBs.
    Liferay使用JAAS來(lái)完成用戶認(rèn)證安全管理,好處是當(dāng)一個(gè)用戶登錄后,它的安全屬性可以在ServletEJB層中沿用,真正作到系統(tǒng)級(jí)的SSO。具體講,遠(yuǎn)程EJB可以沿用安全檢查及權(quán)限屬性,本地的EJB是為其它EJB提供業(yè)務(wù)邏輯服務(wù)的,不能被遠(yuǎn)程調(diào)用所以也不必做此類檢查;安全原則也派生到POJO實(shí)現(xiàn)中,而這此實(shí)現(xiàn)其實(shí)是遠(yuǎn)程EJB的基礎(chǔ)類。
    The enterprise release uses Session EJBs which allows the deployer to separate the Web server, EJB server, and database server to achieve clustering at three levels. This is true n-tier deploying because no one is forced to cluster at any single layer and allows the most flexibility for large companies.
    企業(yè)版式使用EJB,所以系統(tǒng)分別可以在WEB服務(wù)器、EJB服務(wù)器、數(shù)據(jù)庫(kù)服務(wù)器三層中實(shí)現(xiàn)集群。當(dāng)然在n層的系統(tǒng)中,集群也保持優(yōu)勢(shì),而且在每一層都并不強(qiáng)迫使用集群,這些都為大企業(yè)應(yīng)用提供了極好的彈性選擇權(quán)。
    Most of our EJBs, HBMs, and Models are generated through the ant task build-ejb which reads the file ejb.xml in /portal-ejb. Each portlet that persist data has its own ejb.xml (do a search in /portal-ejb and you will get a list back). We copy this file to /portal-ejb when we want to generate the persistence classes for that portlet. This is an internal tool that is built on top of the XDoclet engine.
    系統(tǒng)中的EJBHBM、以及模式Model者是ant執(zhí)行build-ejb任務(wù)時(shí),通過(guò)讀取目錄/portal-ejb下的ejb.xml文件,然后自動(dòng)生成的。每個(gè)有持久層對(duì)象的門(mén)戶單元(portlet)都有自己的ejb.xml文件(可以在/portal-ejb下搜索得到清單)。當(dāng)需要生成持久層的類時(shí),就把文件復(fù)制到/portal-ejb下,這生成工具是建立在XDoclet之上的。
    For example, upon reading ejb.xml found in the Bookmarks portlet, the following model classes are generated. Each model class reflects a table in the database. Never edit BookmarksEntryModel. Do edit BookmarksEntry to add hand massaged code. BookmarksEntry is generated once and extends BookmarksEntryModel. This allows us the ease of generated code and flexibility of hand massaged code.
    例如:通過(guò)讀取Bookmarks門(mén)戶單元的ejb.xml文件配置后,自動(dòng)生成下列的模式類。每個(gè)類對(duì)應(yīng)數(shù)據(jù)庫(kù)中的一個(gè)表。永遠(yuǎn)不要手工修改BookmarksEntryModel類,而要通過(guò)修改BookmarksEntry,然后再更新BookmarksEntryModel內(nèi)容。這樣做的好處是減少了直接寫(xiě)代碼的工作,而只做相應(yīng)的標(biāo)記工作。
    com.liferay.portlet.bookmarks.model.BookmarksEntry
    com.liferay.portlet.bookmarks.model.BookmarksEntryModel
    com.liferay.portlet.bookmarks.model.BookmarksFolder
    com.liferay.portlet.bookmarks.model.BookmarksFolderModel

    Hibernate classes are generated that map to the model classes. This allows for an n-tier architecture for cases where your model classes are marshalled across the wire and your Hibernate classes are not.
    Hibernate類是根據(jù)模式(model)類對(duì)應(yīng)生成的。這樣就可以在多層系統(tǒng)中允許模式類是可作序列化處理的,而Hibernate類則不必。
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryHBM
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderHBM

    Persistence methods to add, update, delete, find, remove, and count the Hibernate entries are generated as the default persistence mechaninsm.
    持久層的方法如:add, update, delete, find, remove, 以及count,系統(tǒng)都默認(rèn)自動(dòng)生成。
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryPersistence
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderPersistence

    Helper classes are generated that call the persistence methods. By default, the helper classes call the Hibernate persistence methods to update the database. You can override this in portal.properties and set your own persistence class as long as it extends the default persistence class. This means you can customize where you store your data. It can be a traditional database, a LDAP server, or even something else.
    也生成了專門(mén)的協(xié)助類(Helper classes),可以用來(lái)調(diào)用持久層方法。默認(rèn)時(shí),協(xié)助類調(diào)用Hibernate的方法來(lái)對(duì)數(shù)據(jù)庫(kù)進(jìn)行更新操作,但是也可以改寫(xiě)portal.properties中的配置,使用自己專用的類來(lái)完成,但這種類要求要繼承默認(rèn)的持久層類。換言之,用戶完全可以定制自己的持久層數(shù)據(jù),可以是一個(gè)正統(tǒng)的數(shù)據(jù)庫(kù),或者是LDAP服務(wù)器,其它什么的。
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryUtil
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderUtil

    Pooling classes are also created to minimize object creation. Behavior can be modified in portal.properties.
    為了減少對(duì)象生成的成本,引入了對(duì)象池,可以通過(guò)修改portal.properties文件來(lái)控制池的基本動(dòng)作。
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryPool
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderPool

    POJO implementations that extend PrincipalBean are generated to hold business logic that check the caller principal and can be called remotely. Calling getUserId() returns the user id of the current user. Calling getUser() returns the User model that represents the current user. The Session EJB that extends the POJO implementation implements PrincipalSessionBean.
    用來(lái)實(shí)現(xiàn)業(yè)務(wù)邏輯的POJO類,通過(guò)繼承PrincipalBean類,來(lái)實(shí)現(xiàn)有關(guān)調(diào)用者的方法,所以可以遠(yuǎn)程調(diào)用。如:調(diào)用getUserId()可以得到當(dāng)前用戶的ID;調(diào)用getUser()則返回當(dāng)前用戶的對(duì)象。EJB再繼承這類POJO,實(shí)現(xiàn)遠(yuǎn)程調(diào)用。
    For example, these classes allow you to delete a bookmark entry or folder if and only if you are the creator of that entry or folder.
    例如:下面的類實(shí)現(xiàn)了,允許當(dāng)且公當(dāng)bookmark項(xiàng)目或目錄的生成者可以刪除它。這些對(duì)象只有在不存在時(shí)才可能被創(chuàng)建。
    These classes are only generated once if they do not already exist.

    com.liferay.portlet.bookmarks.ejb.BookmarksEntryManagerImpl
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderManagerImpl

    Helper classes are generated based on the POJO implementations. They help save developer time and prevent polluted code. Instead of writing many lines of code just to look up the appropriate Session EJB wrapper or POJO implementation, you simply call BookmarksEntryManagerUtil.addEntry to call the equivalent method in BookmarksEntryManagerImpl.addEntry.
    協(xié)助類(Helper classes)是在POJO的實(shí)現(xiàn)基礎(chǔ)上生成的。它可以節(jié)約開(kāi)發(fā)者的工作,不必書(shū)寫(xiě)很多行的代碼,而只要簡(jiǎn)單的找到合適的EJB wrapperPOJO實(shí)現(xiàn),通過(guò)調(diào)用BookmarksEntryManagerUtil.addEntry來(lái)間接調(diào)用相應(yīng)的BookmarksEntryManagerImpl.addEntry方法就可以了。
    BookmarksEntryManagerUtil calls BookmarksFolderManagerFactory to look up the class that implements BookmarksEntryManager. BookmarksFolderManagerFactory defers to Spring and settings in portal.properties on whether to load the Session EJB wrapper or the plain POJO implementation. The Session EJB extends the POJO implementation.
    BookmarksEntryManagerUtil通過(guò)調(diào)用BookmarksFolderManagerFactory來(lái)查找實(shí)現(xiàn)BookmarksEntryManager的類。也正是通過(guò)BookmarksFolderManagerFactory來(lái)識(shí)別Springportal.properties中的配置來(lái)決定要是載入EJB wrapper還是POJO實(shí)現(xiàn)。
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryManager
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryManagerEJB
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryManagerEJBImpl
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryManagerFactory
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryManagerHome
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryManagerUtil
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderManager
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderManagerEJB
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderManagerEJBImpl
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderManagerFactory
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderManagerHome
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderManagerUtil

    Tunneling classes are generated so that developers can call the POJO implementations over port 80. An example of this given in the section V of this document.
    隧道類(Tunneling classes)是用來(lái)實(shí)現(xiàn)通過(guò)80端口來(lái)調(diào)用POJO的。在本文檔的第V部分有一個(gè)例子。
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryManagerHttp
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderManagerHttp

    Soap classes are generated so that developers can call the POJO implementations over port 80. Soap is slower than tunneling because tunneling streams requests in binary format. Soap is more flexible than tunneling because the client classes are not limited to Java.
    Soap類也是用來(lái)實(shí)現(xiàn)通過(guò)80端口來(lái)調(diào)用POJO的。雖然與隧道類相比Soap類在速度上要差一點(diǎn),原因是隧道類使用二進(jìn)制數(shù)據(jù)流。但Soap類用靈活,可以適用各種客戶端(不局限于Java)。
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryManagerSoap
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderManagerSoap

    POJO implementations classes that do not extend PrincipalBean are generated to hold business logic that do not check the caller principal and can be called locally. These classes exist so that business logic can be easily integrated with other projects.
    當(dāng)?shù)氐?/span>POJO為類實(shí)現(xiàn),并不繼承PrincipalBean類,實(shí)現(xiàn)業(yè)務(wù)邏輯時(shí)也不檢驗(yàn)調(diào)用者的身份。這種類使得可以更容易地與其它的項(xiàng)目集成。
    These classes are only generated once if they do not already exist.
    這些類只有在檢驗(yàn)到不存在時(shí)才會(huì)被創(chuàng)建。
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryLocalManagerImpl
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderLocalManagerImpl

    Helper classes are also generated.
    同時(shí)協(xié)助類也生成了。
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryLocalManager
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryLocalManagerEJB
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryLocalManagerEJBImpl
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryLocalManagerFactory
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryLocalManagerHome
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryLocalManagerUtil
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderLocalManager
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderLocalManagerEJB
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderLocalManagerEJBImpl
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderLocalManagerFactory
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderLocalManagerHome
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderLocalManagerUtil

    Some of our users needed to call the Local Manager classes remotely, so Remote Manager classes that parallel their Local counterparts are also generated.
    但總有一些用戶需要調(diào)用引種當(dāng)?shù)仡悾谑峭耆鄬?duì)應(yīng)的遠(yuǎn)程類也應(yīng)用而生了。
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryRemoteManager
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryRemoteManagerEJB
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryRemoteManagerEJBImpl
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryRemoteManagerFactory
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryRemoteManagerHome
    com.liferay.portlet.bookmarks.ejb.BookmarksEntryRemoteManagerUtil
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderRemoteManager
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderRemoteManagerEJB
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderRemoteManagerEJBImpl
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderRemoteManagerFactory
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderRemoteManagerHome
    com.liferay.portlet.bookmarks.ejb.BookmarksFolderRemoteManagerUtil

    A lot of people stay away from Session EJBs because they are heavy and require a lot of coding. Our build scripts show that you can leverage the advantages of Session EJBs while minimizing repetitive labor so that you can strike a good balance between effort and results.
    許多人避免使用EJB,因?yàn)樗闹亓考?jí),需要大量的代碼工作。Liferay的自動(dòng)生成腳本可以使得,既不損失EJB的優(yōu)點(diǎn),而且還最小化重復(fù)的代碼等工作,從而你可以在努力與結(jié)果之間找到一個(gè)良好的平衡點(diǎn)。
    Spring gives Liferay additional flexibility. Developers can test their POJO implementations with Liferay Portal Professional in a servlet container and deploy to production with Liferay Portal Enterprise in an application server.
    Spring也給Liferay帶來(lái)了更多的好處。開(kāi)發(fā)者既可以利用專業(yè)版在一個(gè)servlet容器中測(cè)試POJO的實(shí)現(xiàn),也可以通過(guò)企業(yè)版在應(yīng)用服務(wù)器上裝載要上線的產(chǎn)品。
  5. SOAP, RMI, and Tunneling

    All of our remote POJO implementations are exposed to the external world via SOAP, RMI, and our custom tunneling classes.
    通過(guò)SOAP, RMI, 以及我們客戶化的隧道類等途徑,所有的遠(yuǎn)程POJO實(shí)現(xiàn)都向外開(kāi)放。
    We do not do this simply because Web services is a buzz word, but because we find it extremely useful for integration. The following is an example of a company that leveraged these resources.
    之所以這么做,并不僅僅是因?yàn)榫W(wǎng)絡(luò)服務(wù)要應(yīng)用于商務(wù),而是根本上我們發(fā)現(xiàn)這樣做對(duì)集成來(lái)說(shuō)簡(jiǎn)直是太有用了。以下就有一個(gè)得益于此的企業(yè)集成案例。
    3sixteen is a t-shirt company that needed to get up and running fast. They saw Liferay and wanted to use the integrated Shopping portlet. However, they thought that Liferay was too ugly for a t-shirt company that prided itself on being at the cutting edge of fashion. To solve this problem, they decided to separate their web presence into two sites: a brochure site and shopping site.
    3sixteen是一個(gè)做服裝T恤的公司,需要擴(kuò)大發(fā)展。他們注意到了Liferay有意用之來(lái)集成一個(gè)商業(yè)門(mén)戶。但是,他們又感覺(jué)在一個(gè)超前時(shí)尚的服務(wù)行業(yè)Liferay似乎顯得有點(diǎn)太丑了,或者說(shuō)不入格。為了解決這個(gè)矛盾,他們不得以把WEB表現(xiàn)層分成了兩個(gè)站點(diǎn):一個(gè)產(chǎn)品展示站點(diǎn)和一個(gè)在線購(gòu)買(mǎi)站點(diǎn)。
    www.3sixteen.com became the pretty site built in Flash and my.3sixteen.com became the shopping site using the vanilla Liferay distribution. These two sites are hosted on two different Linux machines and for all intents and purposes could have resided on different continents.
    結(jié)果,www.3sixteen.com成了一個(gè)基于Flash技術(shù)的漂亮站點(diǎn),而my.3sixteen.com則是一個(gè)基于Liferayvanilla版本的在線購(gòu)物站點(diǎn)。這兩個(gè)站點(diǎn)分別安裝在不同的兩個(gè)Linux主機(jī)上,基于目標(biāo)及用途的考慮可以布署在不同的國(guó)家。
    They also needed to build a mailing list to collect email addresses for all their interested customers. To accomplish this, they added a JSP pop up box on their Flash site that would tell the portal server to add the email address to a contact in the Address Book portlet.
    項(xiàng)目的一個(gè)重要需求是要建立一個(gè)郵件地址管理系統(tǒng),用來(lái)收集目標(biāo)客戶的郵件地址。于是,在Flash作的站點(diǎn)中我們加入了彈出工窗口,用來(lái)通過(guò)門(mén)戶服務(wù)器要增加記錄某客戶的這個(gè)郵件地址到系統(tǒng)中。
    The following is a JSP snippet that shows how the guys at 3sixteen leveraged ABContactManagerHttp to add a contact.
    以下是相應(yīng)的JSP片段,它利用ABContactManagerHttp的功能來(lái)增加新的聯(lián)系人。
    String URL = "http://my.3sixteen.com";

    HttpPrincipal httpPrincipal = new HttpPrincipal(URL, "joe_bloggs", "password");

    ABContactManagerHttp.addContact(httpPrincipal, firstName, lastName, emailAddress);

    ABContactManagerHttp invoked addContact in ABContactManagerUtil. The invokation was sent over port 80 and received by http://my.3sixteen.com/tunnel/servlet/AuthTunnelServlet. The application server made sure the authentication matched and then processed ABContactManagerUtil as if the user with the id joe_bloggs was calling addContact. ABContactManagerUtil then called ABContactManagerImpl to do the actual work. You can trace the logic of this by viewing the source included in the generated JavaDocs.
    ABContactManagerHttp調(diào)用了ABContactManagerUtil中的addContact方法,而重要的是這個(gè)調(diào)用是通過(guò)80端口,直接由門(mén)戶站點(diǎn)的http://my.3sixteen.com/tunnel/servlet/AuthTunnelServlet接收,應(yīng)用服務(wù)器只要判定認(rèn)證合法之后,就以IDjoe_bloggs的用戶的身份調(diào)用addContact方法,然后由ABContactManagerUtil調(diào)用實(shí)現(xiàn)類ABContactManagerImpl來(lái)完成真正的添加聯(lián)系人的工作。這一過(guò)程可能通過(guò)查自動(dòng)生成的JavaDocs文檔中的源代碼來(lái)證實(shí)。
    Now Joe Bloggs can log into the portal and look in his Address Book portlet to see that he has a new contact. All of the included portlets have this capability because these helper classses are generated. This means you can write applets or any other Java application to access the Session EJBs that contain your business logic. This can be a security hazard if someone had your password, so you can configure to limit the Tunnel Servlet to only listen on certain ports by editing portal.properties.
    之后呢,那個(gè)Joe Bloggs就可以登錄門(mén)戶,通過(guò)查看它的地址本發(fā)現(xiàn)多了一個(gè)新的聯(lián)系人了。而且在系統(tǒng)的其它門(mén)戶單元也可以通過(guò)協(xié)助類(helper classses)達(dá)到同樣的目的。而另外一方面這也可能是一個(gè)安全隱患,因?yàn)殡S便一個(gè)人就可以通過(guò)一個(gè)小JAVAapplets)或其它程序,從而直接調(diào)用有業(yè)務(wù)邏輯功能的EJB,只要他擁有認(rèn)證的密碼。一個(gè)應(yīng)對(duì)的方法是通過(guò)修改portal.properties來(lái)只指定特定的端口偵聽(tīng)這類服務(wù)請(qǐng)求。
    You can also access the Session EJBs over SOAP and RMI. We will post more examples of that shortly.
    當(dāng)然也可以通過(guò)SOATRMI等來(lái)調(diào)用EJB,案例將在后續(xù)的工作中加入。
  6. Application Service Provider

    Liferay was built from the ground up to be used by application service providers. The following is a sample list of portals running off of one portal instance hitting one database and shows the capabilities of Liferay.
    Liferay是一個(gè)自下而上完整的應(yīng)用系統(tǒng)提供者。以下是案例清單,它們都是單一門(mén)戶單一數(shù)據(jù)庫(kù)系統(tǒng)。
    http://demo.liferay.net
    http://my.ccuc.net
    http://my.3sixteen.com
    http://portal.liferay.com
    http://www.gatewayfriends.org
    http://www.jasonandiris.com

    Users in each of these portals have no information about the other portals. They are separated by domain and each portal exists in its own space based on the company‘s id.
    其中每個(gè)門(mén)戶的用戶都與其它門(mén)戶完全隔離,門(mén)戶間是依據(jù)各自的公司ID通過(guò)域來(lái)分割不同的空間。
    See Multiple Portals for detailed informaton on how to set up multiple instances of Liferay on one machine.
    如果對(duì)在同一機(jī)器集成多個(gè)Liferay有興趣,請(qǐng)參閱Multiple Portals。
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開(kāi)APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
InfoQ: Eric Evans on Domain Driven Design
hibernate pojo與po的概念
Liferay Portal首頁(yè)、文檔和下載
一步一步開(kāi)發(fā)liferay筆記2連接數(shù)據(jù)庫(kù)
A beginners guide to Dependency Injection
Domain Driving Model Design之總結(jié)與我的選擇
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服