Posts

  • PHP debugging with XDebug and XAMPP on Win32

    PHP is a powerful language for building from little web applications to bigger applications such as Facebook, Wordpress, Drupal, Joomla, Meneame, Elgg, …
    and several times you need to solve many bugs and manage your source code, then in this case you will need powerful tools to trace errors.
    A text editor is not enough for this, Eclipse IDE and PHP Development Tools are a good option. In this post, you learn how to set your debug environment with XDebug, that seems to be one of the more popular ones and Eclipse PDT already has support for it.

  • Content Modeling when developing application in Alfresco ECM

    When developing applications, you start with a stage of analysis-design that allows modeling the structure of the database that you application will use.
    So why not do something similar when developing applications on Alfresco ECM?. What makes Alfresco ECM a powerful tool is the ability to do content modeling. If you do not that, would not make much sense to use Alfresco ECM and instead should use any file-system such as WebDAV, FTP, NFS, etc. The content model in Alfresco ECM allows us to identify types of documents, properties and their relationships existing in our organization/business. This post will explain how to modeling the content that our type of organization/business requires and also explains how to deploy it on an installation of Alfresco ECM.

    I. XML definition files

    Create the following files:

    1. intix-model-context.xml

    This is Spring file configuration for the new content model.

    [sourcecode language=”xml” gutter=”true” wraplines=”false”]
    <?xml version=’1.0’ encoding=’UTF-8’?>
    <!DOCTYPE beans PUBLIC ‘-//SPRING//DTD BEAN//EN’ ‘http://www.springframework.org/dtd/spring-beans.dtd’>

    alfresco/extension/intixModel.xml

    [/sourcecode]

    2. intixModel.xml

    This xml file contains our custom model.

    [sourcecode language=”xml” gutter=”true” wraplines=”false”]
    <?xml version=”1.0” encoding=”UTF-8”?>

    INTIX.info Content Model Roger Carhuatocto 1.0 Foo Project Bar Project Acme Project INTIX.info Document cm:content INTIX.info Related Documents false true </source> ix:doc false true cm:generalclassifiable INTIX.info Legal Document ix:doc INTIX.info Folder Document cm:folder INTIX.info Documents Related to Folder false true </source> ix:doc false true INTIX.info Marketing Document ix:doc d:text true

    [/sourcecode]

    3. web-client-config-custom.xml

    This configuration file enables Alfresco Explore/Web Client to load the new content model in the Alfresco UI.

    [sourcecode language=”xml” gutter=”true” wraplines=”false”]

    [/sourcecode]

    II. Deploy the content model

    1. Stop Alfresco. 2. Copy intix-model-context.xml to ${ALFRESCO_HOME}\tomcat\shared\classes\alfresco\extension 3. Copy intixModel.xml to ${ALFRESCO_HOME}\tomcat\shared\classes\alfresco\extension 4. At this point, you will still not actually can not “see” the new custom model on the Alfresco UI (Alfresco Explorer/Web Client).
    For that, you will need to set up the property dialogs for each of the content types. Then, copy web-client-config-custom.xml to ${ALFRESCO_HOME}\tomcat\shared\classes\alfresco\extension 5. Start Alfresco. 6. Verify successfully deployment of new content model by browsing on Alfresco Explorer/Web Client.

    [caption id=”” align=”alignnone” width=”432” caption=”Step 1 - Upload a new type of content”]Step 1 - Upload a new type of content[/caption]

    [caption id=”” align=”alignnone” width=”350” caption=”Step 2 - Modify properties (metadata) of new uploaded content”]Step 2 - Modify properties (metadata) of new uploaded content[/caption]

    [caption id=”” align=”alignnone” width=”463” caption=”Step 3 - Modify properties of new type content”]Step 3 - Modify properties of new type content[/caption] 7. End.

  • Building Alfresco ECM from scratch

    This article show us how to build Alfresco from scratch which is useful when extending or bug fixing.

    [caption id=”” align=”aligncenter” width=”236” caption=”Alfresco ECM”]Alfresco ECM[/caption]

    Requisites:

    1. Windows XP
    2. Java/JDK 1.6.0_21 (http://www.oracle.com/technetwork/java/javase/downloads/index.html)
    3. Eclipse EE Helios SR2 (http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/heliossr2)
    4. Subversion plugin for Eclipse (downloaded from Eclipse Marketplace)
    5. Apache Tomcat 6.0.32 (http://tomcat.apache.org/download-60.cgi)
    6. MySQL (XAMPP - http://www.apachefriends.org/en/xampp-windows.html)
    7. ImageMagick 6.7.0-Q16 (http://www.imagemagick.org/script/binary-releases.php#windows)
    8. SWFTools 0.9.1 (http://www.swftools.org/download.html)
    9. OpenOffice 3.2 (http://download.openoffice.org/index.html)
    10. Alfresco source code downloaded from SVN on 15/June.

    [caption id=”” align=”alignnone” width=”493” caption=”Alfresco ECM: Community - version 4.0.0”]Alfresco ECM: Community - version 4.0.0[/caption]

    Setup development environment:

    JDK

    1. Install JDK and set two system variables (JAVA_HOME and PATH):

    [sourcecode language=”text” gutter=”true” wraplines=”false”]
    JAVA_HOME=C:\1bpms-demo\jdk160_21
    PATH=%PATH%;%JAVA_HOME%\bin

    [/sourcecode]

    Apache Tomcat

    1. Install/Unzip Apache Tomcat in the folder above, for example, C:\1bpms-demo\alfresco_scratch\tomcat-6.0.32_app 2. Create setenv.bat in C:\1bpms-demo\alfresco_scratch\tomcat-6.0.32_app\bin file with the following content:

    [sourcecode language=”text” gutter=”true” wraplines=”false”]
    set JAVA_OPTS=-Xms256m -Xmx1024m -Xss96k -XX:MaxPermSize=256m -server
    set JAVA_OPTS=%JAVA_OPTS%

    [/sourcecode]

    Eclipse

    1. Unzip Eclipse into C:\1bpms-demo\eclipse-jee-helios-SR2. 2. Open Eclipse and install Subclipse plugin from Eclipse Marketplace. 3. Create a folder where will download and build the Alfresco source code, for example C:\1bpms-demo\alfresco_scratch. 4. Switch to “SVN Repository Exploring” perspective.
    Create a new SVN repository location, enter <svn://svn.alfresco.com> as the URL, then click on “alfresco” folder and do checkout as project in the workspace. 5. Configure ANT runtime in Eclipse.
    Go to Window > Preferences > Ant > Runtime > Properties and add 3 properties:

    [sourcecode language=”text” gutter=”true” wraplines=”false”]
    env.APP_TOMCAT_HOME=C:\1bpms-demo\alfresco_scratch\tomcat-6.0.32_app
    env.TOMCAT_HOME=C:\1bpms-demo\alfresco_scratch\tomcat-6.0.32_app
    env.VIRTUAL_TOMCAT_HOME=C:\1bpms-demo\alfresco_scratch\tomcat-6.0.32_virtual

    [/sourcecode] In my case, env.VIRTUAL_TOMCAT_HOME is an empty folder. 5. Create an ANT project. - Select New > Project in the Eclipse toolbar. Under “General” choose “Project”.
    - Right-click the project and choose New > File
    - When the new file dialog box appears click the Advanced button and select “Link to file in the file system”.
    - Browse to the build.xml file located in the HEAD\root directory.

    MySQL, OpenOffice, SWFTools, ImageMagick and others

    1. Install/Unzip MySQL (XAMPP) and create an empty database, for example:

    [sourcecode language=”text” gutter=”true” wraplines=”false”]
    create database alfresco;
    grant all on alfresco.* to alfresco@localhost identified by ‘alfresco’;
    grant all on alfresco.* to alfresco@localhost.localdomain identified by ‘alfresco’;

    [/sourcecode] 2. Install ImageMagick and SWFTools. Make sure you both exist in PATH system variable and you can run them from any place. 3. Install OpenOffice and make sure you can run it from any place. 4. Setup the Windows NetBios DLLs for CIFS Server:
    Copy Win32Utils.dll and Win32NetBIOS.dll placed in (C:\2workspace\alfresco20110615\HEAD\root\projects\alfresco-jlan\jni) to the env.TOMCAT_HOME/bin folder.

    Pre-configure Alfresco before building

    1. Create the file alfresco-global.properties in C:\1bpms-demo\alfresco_scratch\tomcat-6.0.32_app\shared\classes with the following content:

    [sourcecode language=”text” gutter=”true” wraplines=”false”]
    dir.root=C:/1bpms-demo/alfresco_scratch/tomcat-6.0.32_app/alf_data
    web.application.context.url=http://127.0.0.1:8080/alfresco

    database connection properties

    db.driver=org.gjt.mm.mysql.Driver
    db.username=root
    db.password=
    db.name=alfresco
    db.url=jdbc:mysql://localhost/alfresco

    External executable locations

    ooo.exe=C:/1bpms-demo/openoffice-3.2/App/openoffice/program/soffice.exe
    ooo.enabled=false
    img.root=C:/1bpms-demo/ImageMagick-6.7.0-Q16
    img.dyn=${img.root}/lib
    img.exe=${img.root}/convert
    swf.exe=C:/1bpms-demo/swftools0.9.1/pdf2swf.exe
    jodconverter.enabled=true
    jodconverter.officeHome=C:/1bpms-demo/openoffice-3.2/App/openoffice
    jodconverter.portNumbers=8101

    [/sourcecode] 2. Copy mysql-connector-java-5.1.13-bin.jar to C:\1bpms-demo\alfresco_scratch\tomcat-6.0.32_app\lib 3. Modify shared.loader property of the catalina.properties file with following value:

    [sourcecode language=”text” gutter=”true” wraplines=”false”]
    shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar

    [/sourcecode]

    Building:

    All targets for building Alfresco are within build.xml.
    You can use ant -projecthelp to see all the available options. Here are a few of the common commands:

    [sourcecode language=”text” gutter=”true” wraplines=”false”]
    ant build-tomcat builds and deploys Alfresco for Tomcat
    ant incremental-tomcat incrementally builds and deploys Alfresco for Tomcat
    ant start-tomcat-application executes the Tomcat start up script
    ant build-jboss builds and deploys Alfresco for JBoss
    ant incremental-jboss incrementally builds and deploys Alfresco for JBoss
    ant start-jboss executes the JBoss start up script
    ant test runs unit tests for the entire project

    [/sourcecode] 1. Run target “build-tomcat” from Eclipse. 2. Eclipse will create alfresco.war and share.war, they will be copied to webapps folder in Tomcat. 3. Now, Alfresco now is ready to be deployed.

    [caption id=”” align=”alignnone” width=”631” caption=”Alfresco ECM deployed from Eclipse”]Alfresco ECM deployed from Eclipse[/caption]

    Launch Tomcat/Alfresco

    1. Run Tomcat from C:\1bpms-demo\alfresco_scratch\tomcat-6.0.32_app\bin\startup.bat. Make sure MySQL is running before. Alfresco database schema will be created and you will see all log of activity in the console. 2. If you want deploy/run alfresco from Eclipse: In Eclipse add a new server instance from “C:\1bpms-demo\alfresco_scratch\tomcat-6.0.32_app”.
    Edit launch configuration properties of this server adding new VM arguments as:

    [sourcecode language=”text” gutter=”true” wraplines=”false”]
    -Dcatalina.base=”C:\1bpms-demo\alfresco_scratch\tomcat-6.0.32_app”
    -Dcatalina.home=”C:\1bpms-demo\alfresco_scratch\tomcat-6.0.32_app”
    -Dwtp.deploy=”C:\1bpms-demo\alfresco_scratch\tomcat-6.0.32_app\webapps”
    -Djava.endorsed.dirs=”C:\1bpms-demo\alfresco_scratch\tomcat-6.0.32_app\endorsed”
    -Xms256m -Xmx1024m -Xss96k -XX:MaxPermSize=256m -server
    -Djava.library.path=”C:\1bpms-demo\alfresco_scratch\tomcat-6.0.32_app\bin”

    [/sourcecode] Now, from Eclipse Server window run Tomcat instance.

    Test Alfresco

    Open a browser and go to http://localhost:8080/alfresco or http://localhost:8080/share and enter admin/admin as user/password. END.

  • Which Portal Solution should I use?

    Tell me what you want to do and I will recommend a portal solution that meets your needs. There are many alternatives Free / Open Source, Commercial Open Source and Proprietary, in the LAMP area there are many more and in the world .Net, more.
    Therefore, is important to identify the needs and thus select the portal product with which you will build your solution.
    But before we should define what is Portal?, is another buzz word?, Portal or Web Portal?.


    Enterprise Portal

    What is Portal?

    From Wikipedia (http://en.wikipedia.org/wiki/Web_portal):

    “A web portal or links page is a web site that functions as a point of access to information on the World Wide Web. A portal presents information from diverse sources in a unified way.
    Apart from the standard search engine feature, web portals offer other services such as e-mail, news, stock prices, information, databases and entertainment. Portals provide a way for enterprises to provide a consistent look and feel with access control and procedures for multiple applications and databases, which otherwise would have been different entities altogether.
    Examples of public web portals are AOL, Excite, iGoogle, MSN, Netvibes, and Yahoo!.”

    ¿What is Software Portal?

    From SearchCIO.com (http://searchcio.techtarget.com/definition/portal-software):

    “Portal software is a type of development tool used to create a portal (starting point) on a company’s
    intranet so that employees can find a centralized starting place for access to consolidated
    enterprise-related functions, such as e-mail, customer relationship management (CRM) tools,
    company information, workgroup systems, and other applications. The package may be customized to
    varying degrees of enterprise or individual specificity. Portal software is similar to intranet
    software, but the end product typically features more complexity, automation, organization, and
    interactivity. Although the end product is sometimes referred to as an intranet portal, it is usually
    called an enterprise information”

    What types of portals are there?

    It is increasingly difficult to classify a Portal under a category, and that these categories are changing, also the portals have common details among themselves.
    I have taken the definition of types of Portals from www.contentmanager.eu.com I think is wide and exact.
    And these are:

    1. Information Portals vs. Content Management Portals

    Information Portals:
    Also called Vertical Portals or Enterprise Information Portals, they consolidate the information from different types and from different sources.
    The users of these sites tend to consume information, they do not create information. It is often used for:

    • make “mash-up” in general.
    • RSS, weather, financial information
    • Access to corporate email, calendar, events, courses, etc..
    • View company’s corporate information, download forms, etc..
    • View reports, etc.

    Content Management Portals:
    Allows you to manage (create, modify, delete, publish, share, etc.) digital assets (content, documents, etc.) from the Portal. It is often used for:

    • Check-in, check-out, do versioning, lock, etc. on documents.
    • Perform a workflow on the documents.

    2. Application Centric Portals vs. Content Centric Portals

    Application Centric Portals:
    Basically it is a portal that allows you to interact with applications or business systems of the organization, avoids access to each of them.
    This portal provides access to all business applications from a single point. It is often used for:

    • Perform procedures or workflows, not just the record or the initial part of them.

    Content Centric Portals:
    Very similar to Content Management Portal, in this case, the portal takes the information from enterprise applications such as WCMS, DMS, DAM, RMS and standard desktop applications.

    3. Vertical Enterprise Portals vs. Horizontal Enterprise Portals

    Vertical Enterprise Portals:
    There are specialized portals that address a certain theme and geared to a very specific audience. Examples:

    • www.mp3.com
    • www.pets.com

    Horizontal Enterprise Portals:
    They are portals that treat or display information from different types and are aimed at all audiences. Examples:

    • www.yahoo.com
    • www.aol.com

    What type of portal you want to build?

    Apparently, from the types of portal, a personal website is a portal and a Facebook page too.
    So it is most convenient identify the portal we want to implement and see if it fits the definition.

    Web Dashboard:

    • Show real-time financial information of the Stock Exchange.
    • Generate reports.
    • Historical view of certain indicators.

    e-Learning Web Portal:

    • Define courses, associate an agenda, content, exams, etc.
    • See students activity in virtual classrooms.
    • Allow collaboration: create content, conduct examinations.
    • Allow communication, via chat, instant messaging, email, VoIP calls, etc..
    • Allow assess.

    Web of e-Commerce:

    • Define product catalog.
    • Be able to pay.
    • Be able to order a gift, etc..
    • Make a delivery.
    • Notifications.

    Web of administrative Processes:

    • Define the list of processes.
    • Have an “inbox” where I will get notifications with the status of my processes.
    • Have a folder with all the processes that I can start.
    • Have a folder to save my documents that I could use in any process.

    Web blog:

    • Define categories, tags related to topics.
    • Rich editor that allows write articles on my blog.
    • Have tools for evaluating the quality of the articles, their acceptance, their importance or simply to indicate whether or not you like someone.
    • Have tools to make diffusion of the articles published on the blog.

    Intranet:

    • To access the document repository of the organization.
    • Able to access to email, instant messaging, chat, the blog, etc.
    • To access certain corporate applications such as SAP, CRM, ERP, etc.

    Corporate Web:

    • To create an information structure: about us, services / products, news, contact, etc.
    • It is the “cover letter” of my organization on the Internet and should be able to find through search engines or Internet directories.

    Social Network:

    • Be able to have a Wall as Facebook, to publish all my activity.
    • Post photos, videos, documents, etc.
    • Add members to my network.
    • To have communication and collaboration tools. … yes, the list is endless, it is important to define the scope of your website and then see if the technology exists to implement it.
      That is what the next step.

    What Software Portal can use?

    There are many products / software / technology to create the Portal we want.
    There are 2 product lines well marked, the difference is whether they are aligned or not standards Portals The Portal standards are:

    • JSR-168 (Java Portlet Specification v1.0)
    • JSR-286 (Java Portlet Specification v2.0)
    • WSRP (Web Services for Remote Portlets).

    Among those who are aligned to these standards are (in alphabetical order):

    1. Alfresco ECM

    Is an Enterprise Content Management, Document Management, has features of collaborative work, Record Management, Knowledge Management, Web Content Management and has social elements.

    2. Apache Pluto

    From its website:
    “Pluto is the Reference Implementation of the Java Portlet Specification. The current version (2.0) of this specification is known as JSR-286. The previous specification version, JSR-168, covers version 1.0 of the specification. Pluto implements and is fully compliant with both the 1.0 and 2.0 specifications.” Yes it is true, is a reference implementation of JSR-168 and JSR-286. The libraries of Apache Pluto is embedded in specialized implementations such as Apache JetSpeed​​, Sakai (for e-learning, etc.).

    3. Apache Jetspeed-2

    Is based on Apache Pluto.
    From its website: “Jetspeed is an Open Portal Platform and Enterprise Information Portal, written entirely in open source under the Apache license in Java and XML and based on open standards”.

    4. eXo Platform

    From its website: “eXo Platform 3.5 will enable social intranets and websites to be accessible in new ways, by adding cloud-readiness and mobile apps to the only User Experience Platform (UXP) for Java. Enterprise Java organizations will be able to more easily develop, extend and deploy modern enterprise portals, gadgets and mashups within a private cloud or in Platform-as-a-Service (PaaS) environments.”

    5. Hippo Portal 2

    From its website: “With Hippo Portal you can give secure and personalized access to content and business applications.” Is based on Apache Jetspeed-2, has an easy integration with Hippo CMS, providing it with content management functionality.

    6. IBM WebSphere Portal

    From its website: “IBM® WebSphere® Portal Server is the foundation offering of the WebSphere Portal product family, with enterprise portal capabilities that enable you to quickly consolidate applications and content into role-based applications, complete with search, personalization, and security capabilities.”

    7. InfoGlue

    Is a platform that integrates CMS and Portal. Is based on Apache Pluto.
    From its website: “InfoGlue have step by step matured into one of the most advanced, scalable and robust Open Source content management / portal platforms available. Our increased focus on usability together with flexibibility in every area makes it suitable for a wide range of applications and organisations.”

    8. Jahia

    Based on Apache Pluto, It’s a software similar to Alfresco ECM.
    From its website: “Jahia 6.5 is the comprehensive platform to meet these expectations: It is much more than a simple WCM, it helps your organization build cutting edge user experiences and virtually any type of web applications.” y
    “Jahia includes an embedded portal server, which is based on the Apache Pluto reference implementation of the JCR Portlet API specification. The goal of this implementation is to offer support for integrators who need to embed portlets on content pages.”

    9. JBoss GateIn

    From its website: “GateIn is a set of projects revolving aroung the main project called ‘GateIn Portal’.
    GateIn portal is a merge of two mature projects that have been around for a while, JBoss Portal and eXo Portal.
    It takes the best of both into a single new project.
    The aim is to provide both an intuitive portal to use as-is and a portal framework to build upon depending on your needs.”

    10. Liferay Portal

    From its website: “Liferay Portal is an enterprise web platform for building business solutions that deliver immediate results and long-term value.”

    11. OpenPortal

    From Wikipedia: “OpenPortal is an open-source web portal project. The code was donated by Sun Microsystems and was initially based on the Sun Java System Portal Server 7.1 update 1 release.”
    Is a discontinued project.

    12. Oracle Portal

    From its web: “Oracle Portal 11g Release 1 offers a complete and integrated framework for building, deploying, and managing enterprise portals running on Oracle WebLogic Server. Oracle Portal’s unified and secure point of access to vital enterprise information and services improves business visibility and collaboration, reduces integration costs, and ensures investment protection.”

    13. Sakai

    There are 2 products, Sakai CLE (Collaboration and Learning Environment) and Sakai OAE (Open Academic Environment) launched as a pre-release with version 0.1.
    Sakai CLE is based on Apache Pluto. From its web, Sakai CLE: “A full-featured system supporting technology-enabled teaching, learning, research and collaboration for education.” and
    Sakai OAE: “The Sakai Open Academic Environment is a new system that embraces a new vision for academic collaboration.”

    14. uPortal

    Based on Apache Pluto, from its web:”uPortal is the leading open source enterprise portal framework built by and for the higher education community.”

    What about software or products based on PHP, Python, Ruby, … ?

    Yes, there are, and they are very good, in the following article we will discuss them and its level of maturity.

    So, Is Portal Software ready for use?

    Depending on the type of portal you want to implement, usually with the products listed above could implement almost everything with a little effort in customizing and developing some custom components.
    Portlets (functional components that are deployed in Portales JSR-168) give the proper behavior of a portal type website.
    For example, if I have my own Facebook-style social network, you first have to install the Portal solution (the container), then add the tipical Portlets of a social network such as:
    Wall Portlet, RSS Reader Portlet, Chat Portlet, Portlet YouTube, etc.

    What features should have a Portal software?

    There are different features, they are: 1. Content Management

    • Document Library
    • Themes and Layout
    • Web & webspace publishing
    • Language support
    • Knowledge management: taxonomy, categories, WCM, Wiki, etc.
    • Indexing/Searching: Lucene/Solr

    2. Collaboration

    • Wiki
    • Blogs
    • Message boards
    • Instant messaging
    • Calendar
    • Knowledgebase: versioning, creation of docs, print to PDF, file attachment, integration with OpenSearch, rating system, etc.
    • Webmail client

    3. Social

    • Presence & Social: chat, friend list, activity tracker, etc.
    • Alerts & announcements
    • Mashup & integration: Facebook, iGoogle, OpenSocial, etc.

    4. Security

    • Authentication methods: LDAP, JAAS, NTLM, Facebook, etc.
    • Authorization based on roles (Role-Based Authorization Control - RBAC)
    • Signgle Sign On with CAS, CA SiteMinder, OpenSSO, OpenID, etc.
    • Identity Management: LDAP sync, Oracle Access Manager, Facebook, etc.

    5. Integration Platform

    • UI Integration Platform: AlloyUI, jQuery, …
    • Enterprise Integration Platform: Workflow Engine, Reporting Engine, SOAP, JSon, RMI over HTTP, …
    • Site Integration Platform: XSLT/XML, iFrame, WSRP, …

    6. Extendibility and easy Development

    • SDK and/or API
    • IDE for developing
    • Support for portlets frameworks: JSF, Wicket, Spring MVC, ICEfaces, Vaadin, …

    7. Ready for Mobility

    • Native mobile application
    • Mobile as thin client.

    What is the level of maturity of each portal software?

    Again, much depends on the needs and resources that are available, some solutions have a good base portal technology but lack the special features for WCM, for example.
    While other solutions lack of features related to social networks, so it must be created from scratch. So now assess every one of these solutions and add aspects related to the strength of Community and the type of licensing (Free / Open Source, Commercial Open Source, Proprietary).
    This is not an exhaustive technical evaluation of each portal software, is simply a general review where I try to identify who is best suited for every need. The aspects to consider are:

    1. Content Management
    2. Collaboration
    3. Social
    4. Security
    5. Integration Platform
    6. Extendibility and easy Development
    7. Ready to Mobility
    8. Community (user forums, documentation, wiki, etc.)
    9. License type (Free Open Source, Commercial Open Source, Proprietary)

    Rating:

    • Not have: 0
    • Low: 1
    • Media: 2
    • Enough: 3
    • Good: 4
    • Excellent: 5

    Finally, the result is this:

    Enterprise Portals - Revision

    Making a quick review of the product software Portals winner is Liferay Portal.

    With Liferay you can build any kind of portal, including social networks, e-learning portals and e-commerce portals, etc., however, its weakness is that it still has no native application for Android or iPhone, only you can use the mobile browser and wait to use the liferay theme for iphone.

    eXo Platform is in a second position and it really is a very powerful product, it is native applications for iPad, iPhone and Android.
    its weakness, compared with Liferay, is the weakness of their community.

    If my purpose is to create an e-learning portal with social and collaborative features, as the first option is to use Sakai. There are initiatives to port the e-learning Portlets in Sakai and take them to another container such as Liferay, but this is not necessary.
    Sakai is based on Apache Pluto and this at the same time implements WSRP (Remote Portlets invocation via webservice) so you do not need to migrate, simply invoke remotely.

    If you want to create a corporate Intranet, all of the above are good, but if we need document management functionalities, then Alfresco ECM is our best option.
    Nor should we forget Jahia, Hippo and eXo, they are all good choices.

    uPortal is notable for the strength of its community. Behind are universities and North American academic networks.
    As a product, in terms of technology is very mature, especially has a seamless integration with CAS (solution of authentication, authorization and SSO), also a product resulting from the efforts of the community.
    Particularly delight me much because it is a very lightweight alternative Portal, compared with Liferay for example. So is Hippo Portal (Optimized for low memory footprints and modest hardware requirements: Light-weight Installer Including 38MB Tomcat 6, Spring Portal Light-weight Framework) and Apache JetSpeed-2.

    Finally, if we want to create a more powerful portal solution and we do not create it from scratch, as a good alternative is to use as a basis Apache Pluto, Apache JetSpeed​​-2 or JBoss GateIn. These three are good implementations of Portal standards and many manufacturers are embedding these products into their advanced products.
    As is the case of Pentaho (Business Intelligence solution), they use JBoss Portal to create a Dashboard.

    Conclusions:

    1. If you want to create a corporate portal, a social network, etc. you should know that there is software to do that quickly and easily.
    2. If you want to create your own portal solution, you can embed an existing one as Apache Pluto.
    3. If your goal is to have a specialized portal (vertical portal) immediately, it is best to use an existing one for that purpose, for example, Alfresco ECM, Sakai for e-learning, etc.
      But if you have all the necessary resources, it is best to choose one that provides us with tools to quickly develop or customize functionality not had before, examples: Liferay, eXo, WebSphere Portal, Oracle Portal, etc.
    4. If your organization is aligned to the spirit of Free / Open Source and do not need advanced features, then the best alternatives are Apache JetSpeed​​-2, Jahia, Hippo, etc..

    References:

    ** Versión en castellano aquí. **

  • ¿Qué solución de Portal debería usar?

    Dime qué quieres hacer y yo te recomendaré una solución de portal que se ajuste a tus necesidades. Existen muchas alternativas Free/Open Source, Commercial Open Source and full Commercial, si nos vamos a LAMP pues existen muchas más y en el mundo .Net, otras más.
    Por ello es importante que identifiques tus necesidades y con ello podrás seleccionar el producto de portal con la que construirás tu solución.
    Pero antes definamos qué es Portal, es otra palabra de moda?, Portal o Web Portal?.


    Enterprise Portal

    ¿Qué es Portal?

    From Wikipedia (http://en.wikipedia.org/wiki/Web_portal):

    “A web portal or links page is a web site that functions as a point of access to information on the World Wide Web. A portal presents information from diverse sources in a unified way.
    Apart from the standard search engine feature, web portals offer other services such as e-mail, news, stock prices, information, databases and entertainment. Portals provide a way for enterprises to provide a consistent look and feel with access control and procedures for multiple applications and databases, which otherwise would have been different entities altogether.
    Examples of public web portals are AOL, Excite, iGoogle, MSN, Netvibes, and Yahoo!.”

    ¿Qué es Software Portal?

    From SearchCIO.com (http://searchcio.techtarget.com/definition/portal-software):

    “Portal software is a type of development tool used to create a portal (starting point) on a company’s
    intranet so that employees can find a centralized starting place for access to consolidated
    enterprise-related functions, such as e-mail, customer relationship management (CRM) tools,
    company information, workgroup systems, and other applications. The package may be customized to
    varying degrees of enterprise or individual specificity. Portal software is similar to intranet
    software, but the end product typically features more complexity, automation, organization, and
    interactivity. Although the end product is sometimes referred to as an intranet portal, it is usually
    called an enterprise information”

    ¿Qué tipo de Portales existen?

    Cada vez es más difícil clasificar un Portal bajo una categoría, ya que las mismas categorías están cambiando y los Portales cada vez tienen detalles comunes entre sí.
    He tomado la definición de tipos de Portales de la www.contentmanager.eu.com que creo es muy amplia y acertada. Aquí va:

    1. Information Portals vs. Content Management Portals

    Information Portals:
    También llamado Vertical Enterprise Portals o Enterprise Information Portals consolida information de diferentes tipos y de diferentes fuentes.
    Los usuarios de estos portales suelen consumir información, no son creadores.
    Se suele usar para:

    • Hacer “mash-up” en general.
    • RSS, Información del tiempo, información financiera,
    • Acceder al correo corporativo, calendario, eventos, cursos, etc.
    • Ver información corporativa de la empresa, descargar formularios, etc.
    • Ver reportes, etc.

    Content Management Portals:
    Permite gestionar (crear, modificar, borrar, publicar, compartir, etc.) activos digitales (contenido, documentos, etc.) desde el Portal.
    Se suele usar para:

    • Hacer check-in, check-out, hacer versionado, bloquear, etc. sobre los documentos.
    • Realizar un flujo de trabajo sobre los documentos.

    2. Application Centric Portals vs. Content Centric Portals

    Application Centric Portals:
    Básicamente es un Portal que permite interactuar con las aplicaciones o sistemas de negocio de la organización, evita tener un acceso a cada una de ellas.
    Este Portal permite acceder a todas las aplicaciones de negocio desde un sólo punto.
    Se suele usar para:

    • Realizar los trámites, no sólo el registro o inicio de ellas.

    Content Centric Portals:
    Muy similar a Content Management Portal, en este caso, el Portal coge la información de las aplicaciones corporativas como los WCMS, DMS, DAM, RMS and standard Desktop applications.

    3. Vertical Enterprise Portals vs. Horizontal Enterprise Portals

    Vertical Enterprise Portals:
    Son portales especializados que tratan una cierta temática y orientado a un público muy concreto.
    Ejemplos:

    • www.mp3.com
    • www.pets.com

    Horizontal Enterprise Portals:
    Son portales que tratan o muestran información de diferentes tipos y están orientados a todos los públicos.
    Ejemplos:

    • www.yahoo.com
    • www.aol.com

    ¿Qué tipo de Portal quieres construir?

    Por lo visto, a partir de los tipos de portal, una página web personal es un portal y una página de Facebook también.
    Entonces, lo más conveniente es identificar el portal que queramos implementar y ver si encaja en las definiciones.

    Web Dashboard:

    • Mostrar información en tiempo real financiera de la Bolsa de Valores.
    • Sacar reportes.
    • Ver histórico de ciertos indicadores.

    Web para formación online:

    • Definir cursos, asociarle un temario, contenidos, pruebas, etc.
    • Ver actividad de los alumnos de las aulas virtuales.
    • Permitir la colaboración: en la edición de contenidos, organización, realización de pruebas, etc.
    • Permitir la comunicación: a través de chat, instant messaging, email, llamadas VoIP, etc.
    • Poder evaluar.

    Web para vender productos de manera online:

    • Definir catálogo de productos.
    • Poder efectuar el pago.
    • Poder hacer un pedido, un regalo, etc.
    • Realizar una orden de entrega.
    • Notificaciones.

    Web de trámites administrativos:

    • Definir el catálogo de trámites.
    • Tener un “inbox” donde recibiré mis notificaciones con el estado de mis trámites.
    • Tener una carpeta con todos los trámites que puedo realizar.
    • Tener una carpeta para poder guardar mis documentos que pueden ser usados en los trámites.

    Web blog:

    • Definir categorías, tags relacionados a temas.
    • Editor que permita componer artículos en mi blog.
    • Tener elementos que me permita valorar la calidad, su aceptación, su importancia o simplemente que permita indicar si le gusta o no a alguien.
    • Tener herramientas que permitan hacer difusión de los artículos publicados en el blog.

    Intranet:

    • Poder acceder al respositorio documental de la organización.
    • Poder acceder al correo electrónico, instant messaging, al chat, al blog, etc.
    • Poder acceder a algunas aplicaciones corporativas como SAP, CRM, ERP, etc.

    Web corporativa:

    • Poder crear una estructura de información: quiénes somos, servicios/productos, noticias, contacto, etc.
    • Es la “carta de presentación” de mi organización en internet y como tal debe poderse encontrar a través de los motores de búsqueda o directorios de internet.

    Red Social:

    • Poder tener un Wall, al estilo de Facebook, donde publicar toda mi actividad.
    • Publicar fotos, videos, documentos, ….
    • Añadir miembros a la Red
    • Tener herramientas de rápida comunicación y colaboración. …sí, la lista es infinita, lo importante es definir el alcance de tu web y luego ver si existe tecnología para implementarlo.
      De eso se trata el siguiente punto.

    ¿Qué Software de Portal puedo usar?

    Existen muchos productos/software/tecnología para crear el Portal que querramos.
    Hay 2 líneas de productos bien marcados, la diferencia es si están alineados o no a los estándares de Portales:
    Los estándares de portales son:

    • JSR-168 (Java Portlet Specification v1.0)
    • JSR-286 (Java Portlet Specification v2.0)
    • WSRP (Web Services for Remote Portlets).

    Entre los que están alineados a estos estándres son (orden alfabético):

    1. Alfresco ECM

    Es un Enterprise Content Management, Document Management, tiene funcionalidades de trabajo colaborativo, Record Management, Knowledge Management, Web Content Management y posee elementos sociales.

    2. Apache Pluto

    De su página web:
    “Pluto is the Reference Implementation of the Java Portlet Specification. The current version (2.0) of this specification is known as JSR-286. The previous specification version, JSR-168, covers version 1.0 of the specification. Pluto implements and is fully compliant with both the 1.0 and 2.0 specifications.” Sí, es cierto, es una implementación de referencia de JSR-168 y JSR-286. Las librerias de Apache Pluto es embebido en implementaciones más especializadas como Apache JetSpeed, Sakai (para e-learning), etc.

    3. Apache Jetspeed-2

    Está basado en Apache Pluto.
    De su web: “Jetspeed is an Open Portal Platform and Enterprise Information Portal, written entirely in open source under the Apache license in Java and XML and based on open standards”.

    4. eXo Platform

    De su web: “eXo Platform 3.5 will enable social intranets and websites to be accessible in new ways, by adding cloud-readiness and mobile apps to the only User Experience Platform (UXP) for Java. Enterprise Java organizations will be able to more easily develop, extend and deploy modern enterprise portals, gadgets and mashups within a private cloud or in Platform-as-a-Service (PaaS) environments.”

    5. Hippo Portal 2

    De su web: “With Hippo Portal you can give secure and personalized access to content and business applications.” Está basado en Apache Jetspeed-2, tiene una fácil integración con Hippo CMS, dotándole de funcionalidades de gestión de contenidos.

    6. IBM WebSphere Portal

    De su web: “IBM® WebSphere® Portal Server is the foundation offering of the WebSphere Portal product family, with enterprise portal capabilities that enable you to quickly consolidate applications and content into role-based applications, complete with search, personalization, and security capabilities.”

    7. InfoGlue

    Es una Plataforma que integra CMS y Portal. Está basado en apache Pluto.
    De su web sacamos: “InfoGlue have step by step matured into one of the most advanced, scalable and robust Open Source content management / portal platforms available. Our increased focus on usability together with flexibibility in every area makes it suitable for a wide range of applications and organisations.”

    8. Jahia

    Basado en Apache Pluto, es un software muy similar a Alfresco ECM.
    Y de su web sacamos: “Jahia 6.5 is the comprehensive platform to meet these expectations: It is much more than a simple WCM, it helps your organization build cutting edge user experiences and virtually any type of web applications.” y
    “Jahia includes an embedded portal server, which is based on the Apache Pluto reference implementation of the JCR Portlet API specification. The goal of this implementation is to offer support for integrators who need to embed portlets on content pages.”

    9. JBoss GateIn

    De su web sacamos: “GateIn is a set of projects revolving aroung the main project called ‘GateIn Portal’.
    GateIn portal is a merge of two mature projects that have been around for a while, JBoss Portal and eXo Portal.
    It takes the best of both into a single new project.
    The aim is to provide both an intuitive portal to use as-is and a portal framework to build upon depending on your needs.”

    10. Liferay Portal


    De su web: “Liferay Portal is an enterprise web platform for building business solutions that deliver immediate results and long-term value.”

    11. OpenPortal

    De la Wikipedia: “OpenPortal is an open-source web portal project. The code was donated by Sun Microsystems and was initially based on the Sun Java System Portal Server 7.1 update 1 release.”
    Es un proyecto abandonado.

    12. Oracle Portal

    De su web: “Oracle Portal 11g Release 1 offers a complete and integrated framework for building, deploying, and managing enterprise portals running on Oracle WebLogic Server. Oracle Portal’s unified and secure point of access to vital enterprise information and services improves business visibility and collaboration, reduces integration costs, and ensures investment protection.”

    13. Sakai

    Tiene 2 productos, Sakai CLE (Collaboration and Learning Environment) y Sakai OAE (Open Academic Environment) lanzado como un pre-release y en versión 0.1.
    Sakai CLE está bsado en Apache Pluto.
    De su web, Sakai CLE: “A full-featured system supporting technology-enabled teaching, learning, research and collaboration for education.” y
    Sakai OAE: “The Sakai Open Academic Environment is a new system that embraces a new vision for academic collaboration.”

    14. uPortal

    Basado en Apache Pluto, de su web:”uPortal is the leading open source enterprise portal framework built by and for the higher education community.”

    ¿Qué pasa con el software o los productos basados en PHP, Python, Ruby, … ?

    Sí, lo hay, y muy buenos, en un siguiente artículo hablaremos de ellos y veremos su grado de madurez.

    Entonces, ¿el Software de Portal está listo para ser usado?

    Depende del tipo de Portal que quieras implementar, por lo general con los productos de la lista anterior podríamos implementar casi todo con un poco de esfuerzo en personalización y desarrollando algunos componentes a medida.
    Los Portlets (componentes funcionales que se despliegan en los Portales JSR-168) dotan al portal de algún comportamiento propio del tipo de portal.
    Por ejemplo, si quiero tener mi propia red social al estilo Facebook, pues primero tendré que instalar la solución de Portal (el contenedor) y luego añadir el/los Portlet/s propios de una red social tales como:
    Wall Portlet, RSS Reader Portlet, Chat Portlet, YouTube Portlet, etc.

    ¿Qué características debería tener un software de Portal?

    Existen diferentes características, entre ellas están:

    1. Content Management

    • Document Library
    • Themes and Layout
    • Web & webspace publishing
    • Language support
    • Knowledge management: taxonomy, categories, WCM, Wiki, etc.
    • Indexing/Searching: Lucene/Solr

    2. Collaboration

    • Wiki
    • Blogs
    • Message boards
    • Instant messaging
    • Calendar
    • Knowledgebase: versioning, creation of docs, print to PDF, file attachment, integration with OpenSearch, rating system, etc.
    • Webmail client

    3. Social

    • Presence & Social: chat, friend list, activity tracker, etc.
    • Alerts & announcements
    • Mashup & integration: Facebook, iGoogle, OpenSocial, etc.

    4. Security

    • Authentication methods: LDAP, JAAS, NTLM, Facebook, etc.
    • Authorization based on roles (Role-Based Authorization Control - RBAC)
    • Signgle Sign On with CAS, CA SiteMinder, OpenSSO, OpenID, etc.
    • Identity Management: LDAP sync, Oracle Access Manager, Facebook, etc.

    5. Integration Platform

    • UI Integration Platform: AlloyUI, jQuery, …
    • Enterprise Integration Platform: Workflow Engine, Reporting Engine, SOAP, JSon, RMI over HTTP, …
    • Site Integration Platform: XSLT/XML, iFrame, WSRP, …

    6. Extendibility and easy Development

    • SDK and/or API
    • IDE for developing
    • Support for portlets frameworks: JSF, Wicket, Spring MVC, ICEfaces, Vaading, …

    7. Ready for Mobility

    • Aplicación móvil nativa
    • Usar el móvil como un client liviano.

    ¿Cuál es el grado de madurez de cada software de Portal?

    Otra vez, depende mucho de las necesidades y los recursos con que se disponen, algunas soluciones de Portal tienen una buena base tecnológica pero carecen de funcionalidades especiales para WCM, por ejemplo.
    Mientras que otras carecen de funcionalidades relacionadas a Redes Sociales, por lo que hay que crearlas desde cero.
    Entonces, valoraré cada una de estas soluciones y añadiré aspectos relacionados a la fuerza de la comunidad y el tipo de licenciamiento (Free/Open Source, Commercial Open Source, Proprietary).
    Esto no es una valoración técnica exhaustiva de cada software de Portal, es simplemente una revisión generalista donde trato de identificar quién es el más adecuado para cada necesidad.
    Los aspectos a considerar serán:

    1. Content Management
    2. Collaboration
    3. Social
    4. Security
    5. Integration Platform
    6. Extendibility and easy Development
    7. Ready to Mobility
    8. Community (user forums, documentation, wiki, etc.)
    9. License type (Free Open Source, Commercial Open Source, Proprietary)

    Valoración: * No tiene: 0 * Baja: 1 * Media: 2 * Suficiente: 3 * Buena: 4 * Excelente: 5

    Finalmente el resultado es este:


    Enterprise Portals - Valoración

    Haciendo una rápida revisión del software para Portales el producto ganador es Liferay Portal.
    Con Liferay puedes construir cualquier tipo de Portal, inclusive redes sociales, portales de e-learning y portales de e-commerce, etc., sin embargo, su punto débil es que aun no dispone de ninguna aplicación nativa para android o iphone, sólo es posible usar el browser del móvil y esperar que se use el liferay theme para iphone.

    eXo Platform está en una segunda posición y realmente es un producto muy potente, tiene aplicaciones nativas para iPad, iPhone y Android.
    Su punto débil comparado a Liferay es la fuerza de su comunidad.

    Si mi propósito es crear un Portal de e-learning con todos los elementos sociales y colaborativos, pues la primera opción es usar Sakai. Hay iniciativas de coger los Portlets de e-learning de Sakai y llevarlos a otro contenedor como Liferay, pero esto no es necesario.
    Sakai está basado en Apache Pluto y éste a su vez implementa WSRP (invocación remota de Portlets vía webservice) con lo que no es necesario migrarlos, basta con invocarlos remotamente.

    Si queremos crear una Intranet Corporativa, pues todas las opciones son buenas, pero si queremos que tenga funcionalidades de Gestión Documental, pues Alfresco ECM es nuestra mejor opción.
    Tampoco debemos olvidarnos de Jahia, Hippo y eXo, todas son buenas opciones.

    uPortal destaca por la fuerza de su comunidad, detrás de él se encuentran el grueso de universidades y redes académicas norte americanas.
    Como producto, pues a nivel tecnológico tiene de todo, sobretodo tiene una perfecta integración con CAS (solución de autenticación, autorización y SSO) que también es producto resultado del esfuerzo de su comunidad.
    Particularmente a mi me ha agradado mucho porque es una alternativa muy ligera de Portal, en comparación con Liferay por ejemplo. Lo es también Hippo Portal (Optimized for low memory footprints and modest hardware requirements: Light-weight Installer 38MB including Tomcat 6, Light-weight Spring Portal Framework) y Apache JetSpeed-2.

    Finalmente, si queremos crear una solución de Portal más potente y no queremos crearlo desde cero, pues una buena alternativa es usar como base Apache Pluto, Apache JetSpeed-2 o JBoss GateIn. Estos tres son buenas implementaciones de los estándares de portales y muchos fabricantes suelen embeber dichos productos en sus productos avanzados.

    Como es el caso de Pentaho (solución de Business Intelligence), el producto embebe JBoss Portal y sobre esto crean un Dashboard.

    Conclusiones:

    1. Si quieres crear un Portal Corporativo, una Red Social, etc. que sepas que existe software para hacerlo de manera rápida y fácil.
    2. Si quieres crear tu propia solución de Portal, puedes embeber uno existente como Apache Pluto.
    3. Si tu objetivo es tener un portal especializado (portal vertical) inmediatamente, pues lo mejor es usar alguno ya existente para dicho propósito, por ejemplo: Alfresco ECM, Sakai para e-learning, etc.
      Pero si dispones de todo los recursos necesarios, lo mejor es elegir aquel que nos provea de herramientas para desarrollar o personalizar rápidamente funcionalidades que no tenía antes, ejemplos: Liferay, eXo, WebSphere Portal, Oracle Portal, etc.
    4. Si tu organización está alineada al espíritu Free/Open Source y no necesitas funcionalidades avanzadas, pues las mejores alternativas son Apache JetSpeed-2, Jahia, Hippo, etc.

    Referencias:

    ** English version here. **

  • Install Mirth Connect 2.1 on Ubuntu 10.10 with MySQL Server

    Mirth Connect, SOA, ESB, HL7

    Mirth Connect is a Service Oriented Integration Platform based on Mule ESB. Mirth Connect is specifically designed for HL7 (Health Level Seven - set of standards for the health messages exchanging) message exchange. Mirth Connect as a SOA Platform provides tools for developing, testing, deploying, and monitoring interfaces (channel for the exchange of HL7 messages).

    Mirth Connect Architecture

    Mirth Connect is a project Open Source with Mozilla Public License 1.1 (MPL 1.1) and can be downloaded from here http://www.mirthcorp.com/community/downloads Well, we will explain how to install on Ubuntu and how to switch Derby database server to MySQL server.

  • Eclipse Helios in Mac OS X 10.6.6

    I recently bought a MacBook Pro (2 GHz Intel Core i7 with 64-bit kernel and extensions enabled) to develop with Java. First thing to do was updating Java and installing Eclipse IDE, but everything about Eclipse was very slow. So I started googling and found the solution here:

    http://www.eclipse.org/forums/index.php?t=tree&th=205238 The problem was related to 64-bit, Java and Eclipse are ready for working on 64-bit but you have to configure them. Then, open eclipse.ini and update of this way (lines updated are 12, 16, 19, 20 and 21):

    [sourcecode language=”text” gutter=”true” wraplines=”false” highlight=”12,16,19,20,21”]
    -startup
    ../../../plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
    --launcher.library
    ../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.2.R36x_v20101019_1345
    -product
    org.eclipse.epp.package.jee.product
    --launcher.defaultAction
    openFile
    -showsplash
    org.eclipse.platform
    --launcher.XXMaxPermSize
    512m
    --launcher.defaultAction
    openFile
    -vmargs
    -Dosgi.requiredJavaVersion=1.6
    -XstartOnFirstThread
    -Dorg.eclipse.swt.internal.carbon.smallFonts
    -XX:MaxPermSize=512m
    -Xms80m
    -Xmx1024m
    -Xdock:icon=../Resources/Eclipse.icns
    -XstartOnFirstThread
    -Dorg.eclipse.swt.internal.carbon.smallFonts

    [/sourcecode] Regards.

  • Simple functional tests of Liferay 6.0.5 CE with Apache JMeter

    If do you want to know the health of an easy and quickly way, the current status of your Liferay Portal installation or if you want to test quickly any basic functionality from UI (quickly functional test), then you could use Apache JMeter to do it.
    To do that, you should do the following:
    1. Download and install Apache JMeter from here http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi
    2. Identify the target to test it.
    In this case we will test if Liferay Sign in portlet works.
    3. Create a Test Plan.
    4. Add a “Thread Group”.
    5. In the before “Thread Group” to add a “HTTP Cookie Manager”. This allows to keep the liferay session open between diferents HTTP requests.

    [caption id=”” align=”alignnone”
    caption=”Create a HTTP Cookie Manager in JMeter for Liferay”]Create a HTTP Cookie Manager in JMeter for Liferay

    [/caption]
    6. Also, to add an “User Defined Variables” as shows in next figure:

    [caption id=”” align=”alignnone”
    caption=”Create a User Defined Variables in JMeter for Liferay”]

    Create a User Defined Variables in JMeter for Liferay

    [/caption]
    7. In the before “Thread Group” to add a “Loop Controller” named “Sign in to Liferay”.

    [caption id=”” align=”alignnone”
    caption=”Add a Loop Controller”]

    Add a Loop Controller

    [/caption]
    8. Add a first “HTTP Resquest” named “[Sign in - 1] Go to Welcome page”.
    You have to fill out the request with the appropriate parameters, for exmaple:
    - Server Name or IP
    - Port Number
    - Method
    - Path (URL of our target to be tested)
    9. Then, to add the first “Response Assertion” named “Check resp. 1 “. This will check if the result is correct. In this case only verify the existence of a message/text in the HTTP response.
    10. Later, to add the second “HTTP Request” named “[Sign in - 2] Do login”. This allows to do log into liferay, in this case we will need to compose a HTML form with the following parameters:

    [caption id=”” align=”alignnone”
    caption=”Create a HTTP Request to do Login from Liferay Sing in Portlet”]

    Create a HTTP Request to do Login from Liferay Sing in Portlet

    [/caption]
    These parameters have been extracted from the Liferay welcome web page that contains the “Sign in” portlet, as shown in the figure below:

    [caption id=”” align=”alignnone”
    caption=”Existing parameters in Liferay Sign in Portlet form”]

    Existing parameters in Liferay Sign in Portlet form

    [/caption]
    11. Create a “Response Assertion” of similarly way to step 9 if we want to verify if login process has been successful.
    In my case, I will verify the existence of a message/text “Sign Out” in the HTTP response.

    [caption id=”” align=”alignnone”
    caption=”Create a Response Assertion for Liferay Login process”]

    Create a Response Assertion for Liferay Login process

    [/caption]
    12. Add a third “HTTP Request” named “[Sign in - 3] Do logout” and other “Response Assertion”.
    This step is optional, it does not help us verify if the login process has been OK.
    13. At level of the “Thread Group” create a “Vire Results Tree” and “Assertion Results”. Both will allow us to monitor the test results.
    14. Run test plan and observe the results in the “View Result Tree”.
    If everything goes “green” is that everything has been correctly. If any test is “red”, is that the test is wrong or something is wrong. Then, you should see or check you network connection, Liferay is running or if you Database is running, etc.

    [caption id=”” align=”alignnone”
    caption=”View Result Tree for Liferay Sign in portlet”]

    View Result Tree for Liferay Sign in portlet

    [/caption]
    You can copy this test plan in Apache JMeter:

    [sourcecode language=”xml” gutter=”true” wraplines=”false”]
    <?xml version=”1.0” encoding=”UTF-8”?>

    Monitoring Liferay Portal 6.0.5 CE false false false 1 1 1 1281132211000 1281132211000 false continue Enable to keep session in Liferay false rfc2109 LFRY_HOSTNAME lfry01 = LFRY_PORT 8080 = LFRY_NON_ROOT_CTX intixportal = LFRY_TEST_USER test = LFRY_TEST_PWD test = LFRY_ASSERTION_MSG_1 Password = LFRY_ASSERTION_MSG_2 Sign Out = LFRY_ASSERTION_MSG_3a HTTP/1.1 200 OK = LFRY_ASSERTION_MSG_3b Liferay-Portal: Liferay Portal = LFRY_ASSERTION_MSG_3c Set-Cookie: JSESSIONID= = Define my liferay parameters false 1 Log into Liferay Portal ${LFRY_HOSTNAME} ${LFRY_PORT} http /${LFRY_NON_ROOT_CTX} GET false true true false false [Sign in - 1] Go to Welcome page ${LFRY_ASSERTION_MSG_1} Assertion.response_data false 16 Check response 1 true 58 = true p_p_id true 1 = true p_p_lifecycle true normal = true p_p_state true view = true p_p_mode true 0 = true saveLastPath true /login/login = true _58_struts_action true = true _58_redirect true ${LFRY_TEST_USER} = true _58_login true ${LFRY_TEST_PWD} = true _58_password true false = true _58_rememberMe ${LFRY_HOSTNAME} ${LFRY_PORT} http /${LFRY_NON_ROOT_CTX}/web/guest/home POST false true true false false [Sign in - 2] Do login ${LFRY_ASSERTION_MSG_2} Assertion.response_data false 16 Check response 2 ${LFRY_HOSTNAME} ${LFRY_PORT} http /${LFRY_NON_ROOT_CTX}/c/portal/logout GET false true true false false [Sign in - 3] Do logout ${LFRY_ASSERTION_MSG_3a} ${LFRY_ASSERTION_MSG_3b} Assertion.response_headers false 2 Check response 3 false saveConfig true true true true true true true false true true false false true false false false false false 0 true false saveConfig true true true true true true true false true true false false true false false false false false 0 true

    [/sourcecode] Have a Liferay happy testing!.

  • How to set back the clock of Mac OS X host in Virtual Box

    I have a Mac OS X as host and Windows XP as guest virtualbox machine. I need to set back the clock 2 years in the guest. I used to use this command, but it does not work with Mac OS X as host.

    [sourcecode language=”text” gutter=”true” wraplines=”false” highlight=”1”]
    VBoxManage setextradata “VBoxInternal/TM/UTCOffset”

    [/sourcecode] I tried this and it seems that it works.

    [sourcecode language=”text” gutter=”true” wraplines=”false” highlight=”1”]
    pisco:~ chilcano$ vboxmanage modifyvm intix_winxp01 –biossystemtimeoffset -63072000000
    Oracle VM VirtualBox Command Line Management Interface Version 3.2.12
    (C) 2005-2010 Oracle Corporation
    All rights reserved. pisco:~ chilcano$

    [/sourcecode] Notes:

    • _ intix_winxp_ is the name of guest vm.
    • _ -63072000000_ are milisecs (365 + 365 days).
    • The command vboxmanage is in lowercase.
      and if you want to reset time offset you have to run this:

    [sourcecode language=”text” gutter=”true” wraplines=”false” highlight=”1”]
    pisco:~ chilcano$ vboxmanage modifyvm intix_winxp01 –biossystemtimeoffset 0
    Oracle VM VirtualBox Command Line Management Interface Version 3.2.12
    (C) 2005-2010 Oracle Corporation
    All rights reserved. pisco:~ chilcano$

    [/sourcecode]

    References

    1. About the clock of a VM (http://forum.virtualbox.org/viewtopic.php?f=7&p=150430)
    2. Detener la sincronización de tiempo/fechas entre Host y Guest en Virtual Box (http://holisticsecurity.wordpress.com/2009/11/27/detener-la-sincronizacion-de-tiempofechas-entre-host-y-guest-en-virtual-box)
  • Web-SSO between Liferay and Alfresco with CAS and Penrose (part 2/2)

    The aims are to do authentication and web-sso between liferay and alfresco using CAS.
    In this blog post we will explain how to configure Alfresco to enable LDAP authentication and users syncronization, also we will explain how to configure CAS Authentication Filter to do Web-SSO with automatic/transparent login. Firstly, we will follow this technical design for authentication and sso.

    [caption id=”” align=”alignnone” width=”461” caption=”Authentication and SSO architectura”]Authentication and SSO architectura between Liferay, Alfresco and CAS

    [/caption]

    Requirements

    1. Virtual Directory Server (Penrose server 2.0) and CAS-server (tested with version 3.3.5)I will use existing CentOS VirtualBox VM with CAS and Penrose Server pre-configured (Virtual Directory/LDAP) named “directorysrv1” of last blog post (Web-SSO between Liferay and Alfresco with CAS and Penrose (part 1/2)) but with a few changes: [sourcecode language=”text” gutter=”true” wraplines=”false”]
      A sample DN:
      uid=480838,ou=Employees,dc=intix,dc=info
      cn=aamodwroclawski

    [/sourcecode] You can download this new Penrose partition here.

    [caption id=”” align=”alignnone” width=”483” caption=”LDAP tree”]LDAP tree[/caption]

    1. Alfresco 3.4c CE:We are using a new WinXP VirtualBox VM with Alfresco and MySQL installed named “alfr01”.
    2. Liferay 6.0.5 with LDAP and CAS enabled:We are using a WinXP VirtualBox VM with Liferay 6.0.5 CE installed named “lfry01”. See before post here.

    [caption id=”” align=”alignnone” width=”400”
    caption=”LDAP and CAS configuration in Liferay”]

    1
    |

    2
    —|—

    3
    |

    4

    5

    [/caption]

    1. CAS-client (3.1.10)

    I. Enable LDAP Authentication and LDAP users import in Alfresco

    To do Web-SSO is not necessary this step, but i recommend to do it because you can do users management from Alfresco Admin Console (Browser/Explorer or Share) (edit, delete, to do groups and give permissions). 1. Create the following folders in “\subsystems\Authentication\ldap\ldap1” in ${ALF_HOME}\tomcat\shared\classes\alfresco\extension 2. Copy the file ${ALF_HOME}\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\subsystems\Authentication\ldap\ldap-authentication.properties in the folder before created. 3. Modify ldap-authentication.properties enabling LDAP authN and sync. For example, you can use my file (This only works for my LDAP tree with UID as RDN and authN with CN. See my LDAP tree):

    [sourcecode language=”text” gutter=”true” wraplines=”false”]
    # This flag enables use of this LDAP subsystem for authentication. It may be

    that this subsytem should only be used for synchronization, in which case

    this flag should be set to false.

    ldap.authentication.active=true

    #

    This properties file brings together the common options for LDAP authentication rather than editing the bean definitions

    #

    ldap.authentication.allowGuestLogin=true

    How to map the user id entered by the user to that passed through to LDAP

    - simple

    - this must be a DN and would be something like

    uid=%s,ou=People,dc=company,dc=com

    - digest

    - usually pass through what is entered

    %s

    If not set, an LDAP query involving ldap.synchronization.personQuery and ldap.synchronization.userIdAttributeName will

    be performed to resolve the DN dynamically. This allows directories to be structured and doesn’t require the user ID to

    appear in the DN.

    intix: always search DN by RDN attribute, in my case uid (see ldap tree)

    ldap.authentication.userNameFormat=cn=%s,ou=Employees,dc=intix,dc=info

    intix: this config is better than above, because i want to searh by CN.

    It is necessary set ldap.synchronization.personQuery=inetOrgPerson and ldap.synchronization.userIdAttributeName=cn

    ldap.authentication.userNameFormat=

    The LDAP context factory to use

    ldap.authentication.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory

    The URL to connect to the LDAP server

    ldap.authentication.java.naming.provider.url=ldap://directorysrv1:10389

    The authentication mechanism to use for password validation

    ldap.authentication.java.naming.security.authentication=simple

    Escape commas entered by the user at bind time

    Useful when using simple authentication and the CN is part of the DN and contains commas

    ldap.authentication.escapeCommasInBind=false

    Escape commas entered by the user when setting the authenticated user

    Useful when using simple authentication and the CN is part of the DN and contains commas, and the escaped \, is

    pulled in as part of an LDAP sync

    If this option is set to true it will break the default home folder provider as space names can not contain \

    ldap.authentication.escapeCommasInUid=false

    Comma separated list of user names who should be considered administrators by default

    intix: administration user (CN) when ldap authN is enabled.

    The “admin” user is valid when alfrescoNtlm authN is enabled.

    ldap.authentication.defaultAdministratorUserNames=aamodwroclawski

    This flag enables use of this LDAP subsystem for user and group

    synchronization. It may be that this subsytem should only be used for

    authentication, in which case this flag should be set to false.

    ldap.synchronization.active=true

    The authentication mechanism to use for synchronization

    ldap.synchronization.java.naming.security.authentication=simple

    The default principal to use (only used for LDAP sync)

    ldap.synchronization.java.naming.security.principal=uid=admin,ou=system

    The password for the default principal (only used for LDAP sync)

    ldap.synchronization.java.naming.security.credentials=secret

    If positive, this property indicates that RFC 2696 paged results should be

    used to split query results into batches of the specified size. This

    overcomes any size limits imposed by the LDAP server.

    ldap.synchronization.queryBatchSize=0

    If positive, this property indicates that range retrieval should be used to fetch

    multi-valued attributes (such as member) in batches of the specified size.

    Overcomes any size limits imposed by Active Directory.

    ldap.synchronization.attributeBatchSize=0

    The query to select all objects that represent the groups to import.

    ldap.synchronization.groupQuery=(objectclass=groupOfNames)

    ldap.synchronization.groupQuery=(objectclass=groupOfUniqueNames)

    The query to select objects that represent the groups to import that have changed since a certain time.

    ldap.synchronization.groupDifferentialQuery=(&(objectclass=groupOfNames)(!(modifyTimestamp<={0})))

    ldap.synchronization.groupDifferentialQuery=(&(objectclass=groupOfUniqueNames)(!(modifyTimestamp<={0})))

    The query to select all objects that represent the users to import.

    ldap.synchronization.personQuery=(objectclass=inetOrgPerson)

    The query to select objects that represent the users to import that have changed since a certain time.

    ldap.synchronization.personDifferentialQuery=(&(objectclass=inetOrgPerson)(!(modifyTimestamp<={0})))

    The group search base restricts the LDAP group query to a sub section of tree on the LDAP server.

    ldap.synchronization.groupSearchBase=ou=Groups,dc=intix,dc=info

    The user search base restricts the LDAP user query to a sub section of tree on the LDAP server.

    ldap.synchronization.userSearchBase=ou=Employees,dc=intix,dc=info

    The name of the operational attribute recording the last update time for a group or user.

    ldap.synchronization.modifyTimestampAttributeName=modifyTimestamp

    The timestamp format. Unfortunately, this varies between directory servers.

    ldap.synchronization.timestampFormat=yyyyMMddHHmmss’Z’

    The attribute name on people objects found in LDAP to use as the uid in Alfresco

    ldap.synchronization.userIdAttributeName=uid

    intix: CN is necessary to authN by this attribute when searching LDAP

    ldap.synchronization.userIdAttributeName=cn

    The attribute on person objects in LDAP to map to the first name property in Alfresco

    ldap.synchronization.userFirstNameAttributeName=givenName

    The attribute on person objects in LDAP to map to the last name property in Alfresco

    ldap.synchronization.userLastNameAttributeName=sn

    The attribute on person objects in LDAP to map to the email property in Alfresco

    ldap.synchronization.userEmailAttributeName=mail

    The attribute on person objects in LDAP to map to the organizational id property in Alfresco

    ldap.synchronization.userOrganizationalIdAttributeName=o

    The default home folder provider to use for people created via LDAP import

    ldap.synchronization.defaultHomeFolderProvider=userHomesHomeFolderProvider

    The attribute on LDAP group objects to map to the authority name property in Alfresco

    ldap.synchronization.groupIdAttributeName=cn

    The attribute on LDAP group objects to map to the authority display name property in Alfresco

    ldap.synchronization.groupDisplayNameAttributeName=description

    The group type in LDAP

    ldap.synchronization.groupType=groupOfNames

    ldap.synchronization.groupType=groupOfUniqueNames

    The person type in LDAP

    ldap.synchronization.personType=inetOrgPerson

    The attribute in LDAP on group objects that defines the DN for its members

    ldap.synchronization.groupMemberAttributeName=member

    ldap.synchronization.groupMemberAttributeName=uniqueMember

    If true progress estimation is enabled. When enabled, the user query has to be run twice in order to count entries.

    ldap.synchronization.enableProgressEstimation=true

    [/sourcecode] 4. Re-start Alfresco. 5. Check LDAP authN and import of users in Alfresco.

    [caption id=”” align=”alignnone” width=”517” caption=”Imported users from LDAP tree in Alfresco”]Imported users from LDAP tree in Alfresco[/caption]

    II. Configure CAS in Alfresco

    We are setting up Alfresco so that when someone log into Alfresco it is redirected to CAS for authentication. Through the CAS filter, Alfresco catchs any request to access and these are redirected to CAS-login. When you has successfully authenticated with CAS, after you will be redirected to the My Alfresco Dashboard, then Alfresco will need to retrieve the values of session which is placed there by the CAS Filter. If you want to do SSO and automatic redirection when login to Alfresco Explorer after authentication in CAS, you should create a CAS Authentication Filter as Aksels Architecture Blog show us here and test with version 3.4c. To do this you have to create/modify the Java code (CasAuthenticationFilter.java) that is executed when enter to Alfresco page. 1. Edit the alfresco web.xml to modify Authentication Filter and to add the CAS filters.

    [sourcecode language=”text” gutter=”true” wraplines=”false”]
    c:>notepad++ C:\1bpms-demo\alfr34c_1\tomcat\webapps\alfresco\WEB-INF\web.xml

    [/sourcecode] … modify web.xml

    [sourcecode language=”xml” gutter=”true” wraplines=”false”]

    […]
    

    rootPath /app:company_home

    </context-param> <!–filter>

    Authentication Filter Authentication filter mapped only to faces URLs. Other URLs generally use proprietary means to talk to the AuthenticationComponent org.alfresco.repo.web.filter.beans.BeanProxyFilter beanName AuthenticationFilter

    </filter-->

    Authentication Filter INTIX - Authentication Filter org.jasig.cas.client.authentication.AuthenticationFilter casServerLoginUrl https://directorysrv1:8443/cas-server-webapp-3.3.5/login serverName http://alfr01:8080 Global Authentication Filter Authentication filter mapped to all authenticated URLs. Mainly for SSO support org.alfresco.repo.web.filter.beans.BeanProxyFilter beanName GlobalAuthenticationFilter

    […]
     

    CAS Validation Filter org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter casServerUrlPrefix https://directorysrv1:8443/cas-server-webapp-3.3.5 serverName http://alfr01:8080 Alfresco CAS Authentication Filter info.intix.alfresco.CasAuthenticationFilter Authentication Filter /faces/* CAS Validation Filter /faces/* Alfresco CAS Authentication Filter /faces/* Authentication Filter /navigate/* CAS Validation Filter /navigate/* Alfresco CAS Authentication Filter /navigate/* Authentication Filter /command/* CAS Validation Filter /command/* Alfresco CAS Authentication Filter /command/* Authentication Filter /download/* CAS Validation Filter /download/* Alfresco CAS Authentication Filter /download/* Authentication Filter /template/* CAS Validation Filter /template/* Alfresco CAS Authentication Filter /template/* Authentication Filter /n/* CAS Validation Filter /n/* Alfresco CAS Authentication Filter /n/* Authentication Filter /c/* CAS Validation Filter /c/* Alfresco CAS Authentication Filter /c/* Authentication Filter /t/* CAS Validation Filter /t/* Alfresco CAS Authentication Filter /t/* Authentication Filter /d/* CAS Validation Filter /d/* Alfresco CAS Authentication Filter /d/* Global Localization Filter /*

    […]
    

    Global Authentication Filter /faces/*

    </filter-mapping>

    <!–filter-mapping>

    Authentication Filter /faces/*

    </filter-mapping-->

    WebDAV Authentication Filter /webdav/*

    […]

    [/sourcecode] 2. Copy the CAS client jar file into the alfresco webapp lib folder.

    [sourcecode language=”text” gutter=”true” wraplines=”false”]
    c:>
    c:>copy C:\0share1\cas-client-core-3.1.10.jar C:\1bpms-demo\alfr34c_1\tomcat\webapps\alfresco\WEB-INF\lib\cas-client-core-3.1.10.jar
    1 archivos copiados. c:>

    [/sourcecode] 3. Modify and compile CasAuthenticationFilter.java (http://akselsarchitecture.googlegroups.com/web/CasAuthenticationFilter-Alfresco.java) and copy .jar into the alfresco webapp lib folder.

    [sourcecode language=”text” gutter=”true” wraplines=”false”]
    c:>
    c:>copy C:\0share1\www.intix.info-casauthnfilter-0.1.jar c:\1bpms-demo\alfr34c_1\tomcat\webapps\alfresco\WEB-INF\lib\www.intix.info-casauthnfilter-0.1.jar
    1 archivos copiados. c:>

    [/sourcecode] You can download my www.intix.info-casauthnfilter-0.1.jar file from here.
    4. Re-start Alfresco. 5. Test CAS configuration. Try opening an Alfresco’s page, for example: http://alfr01:8080/alfresco in a browser. You should be redirected to the CAS login page, and when you log in (for example with aamodwroclawski/test) you should be redirected back to the My Alfresco Dashboard. 6. If you have get this error (see figure below) is because you have not installed the CAS root SSL Cert as a trusted certificate in Alfresco (JRE’s cacert store). Alfresco 3.4c CE has JRE’s cacert store in ${ALF_HOME}/java/jre/lib/sec, then install the certificate there.

    [caption id=”” align=”alignnone” width=”468” caption=”CAS server SSL certificate no installed in Alfresco”]CAS server SSL certificate no installed in Alfresco[/caption] To solve it, you should import CAS server SSL public certificate in the JRE’s cacerts where Alfresco is running, in my case I have Alfresco running in WinXP box called “alfr01″.

    [sourcecode language=”text” gutter=”true” wraplines=”false”]
    c:>keytool -import -alias tomcat -file c:\0share1\directorysrv1_730days.crt -keystore C:\1bpms-demo\alf34c_1\java\jre\lib\sec
    y\cacerts
    Enter keystore password:
    Owner: CN=directorysrv1, OU=”INTIX I+D”, O=INTIX.info, L=BARCELONA, ST=CATALUNYA, C=ES
    Issuer: CN=directorysrv1, OU=”INTIX I+D”, O=INTIX.info, L=BARCELONA, ST=CATALUNYA, C=ES
    Serial number: 4d1df9bc
    Valid from: Fri Dec 31 16:41:48 GMT+01:00 2010 until: Sun Dec 30 16:41:48 GMT+01:00 2012
    Certificate fingerprints:
    MD5: 11:4D:72:BB:80:42:EE:F7:4A:CA:E9:EA:F6:4F:86:8D
    SHA1: 7F:6B:12:64:31:8B:47:4E:11:33:D7:FE:EF:C6:D4:65:12:59:8D:2E
    Signature algorithm name: SHA1withRSA
    Version: 3
    Trust this certificate? [no]: yes
    Certificate was added to keystore

    [/sourcecode]

    III. Tuning Authentication in Alfresco

    Right now, we have configured Alfresco and CAS, where the user management can be done syncronizing or importing users stored in LDAP tree. We can do user, groups and roles management via Alfresco LDAP subsystem and Authentication-SSO via EXTERNAL subsystem. To do this, we must modify the file alfresco-global.properties.

    [sourcecode language=”text” gutter=”true” wraplines=”false”]

    […]
    ### authentication.chain=alfrescoNtlm1:alfrescoNtlm,ldap1:ldap
    authentication.chain=external1:external,ldap1:ldap

    [/sourcecode]

    IV. Test Web Single Sign On between Liferay 6.0.5 CE and Alfresco 3.4.c CE

    Open a browser with http://alfr01:8080/alfresco, you get redirected to CAS-login page. Enter aamodwroclawski/test, then you should be redirected to Alfresco My Dashboard page (authenticated). In this time you should see Logout (aamodwroclawski) in the top right of the Alfresco page indicating that you have sucessfully logged in.

    [caption id=”” align=”alignnone” width=”476” caption=”User properly authenticated in Alfresco”]User properly authenticated in Alfresco[/caption] Then, open other browser with http://lfry01:8080/intixportal/user/aamodwroclawski, you get redirected to Liferay private and authenticated page for the user “aamodwroclawski”.

    [caption id=”” align=”alignnone” width=”442” caption=”The same user authenticated and with SSO in Liferay”]The same user authenticated and with SSO in Liferay[/caption] In other direction (Liferay to Alfresco) it does work too.

    V. Conclusions

    1. Authentication and users sync in Alfresco 3.4c does work with authentication subsystem LDAP. 2. SSO with CAS in Alfresco 3.4c does work by enabling authentication subsystem EXTERNAL. 3. There is an issue when importing users from LDAP tree in Liferay. The passwords are created with random value and no with “test”.

    END

    References: 1. CAS in Alfresco http://wiki.alfresco.com/wiki/Central_Authentication_Service_Configuration 2. CAS SSO for Alfresco 3.3 and Share http://akselsarchitecture.blogspot.com/2010/09/cas-sso-for-alfresco-33-and-share.html