Liferay EE 6 has done away with the old EXT environment in previous versions and has moved to a more extensible plugin approach. While I wholeheartedly endorse that approach, it is fraught with one small problem: redeployments. The situation is this: you initially deploy your EXT plugin but then you make some changes and want to redeploy. Well your previous deployment’s jars are now in the class loader so you can’t just run “ant deploy” again to get your new changes on the server.
The solution: shutdown your server and run this script. This script has been improved upon from this post here to include portlets that you may have modified in your EXT. I’ve also included a version for MAC/Linux users.
if "%app_name%" == "" goto end
rmdir /S /Q %tomcat_home%\temp
rmdir /S /Q %tomcat_home%\webapps\%app_name%-ext
rmdir /S /Q %tomcat_home%\webapps\ROOT\html\portlet\ext
del /S /Q %tomcat_home%\lib\ext\ext-%app_name%-ext-service.jar
del /S /Q %tomcat_home%\webapps\ROOT\WEB-INF\lib\ext-%app_name%-ext-util-bridges.jar
del /S /Q %tomcat_home%\webapps\ROOT\WEB-INF\lib\ext-%app_name%-ext-util-taglib.jar
del /S /Q %tomcat_home%\webapps\ROOT\WEB-INF\lib\ext-%app_name%-ext-util-java.jar
del /S /Q %tomcat_home%\webapps\ROOT\WEB-INF\lib\ext-%app_name%-ext-impl.jar
del /S /Q %tomcat_home%\webapps\ROOT\WEB-INF\ext-%app_name%-ext.xml
del /S /Q %tomcat_home%\webapps\ROOT\WEB-INF\tiles-defs-ext.xml
del /S /Q %tomcat_home%\temp\liferay\com\liferay\portal\deploy\dependencies\ext-%app_name%-ext-util-bridges.jar
del /S /Q %tomcat_home%\temp\liferay\com\liferay\portal\deploy\dependencies\ext-%app_name%-ext-util-taglib.jar
del /S /Q %tomcat_home%\temp\liferay\com\liferay\portal\deploy\dependencies\ext-%app_name%-ext-util-java.jar
if [ $# -ne 1 ]; then
echo "Usage: clean-my-ext [ext-name]"
rm -rf $tomcat_home/temp
rm -rf $tomcat_home/webapps/$app_name-ext
rm -rf $tomcat_home/webapps/ROOT/html/portlet/ext
rm -f $tomcat_home/lib/ext/ext-$app_name-ext-service.jar
rm -f $tomcat_home/webapps/ROOT/WEB-INF/lib/ext-$app_name-ext-util-bridges.jar
rm -f $tomcat_home/webapps/ROOT/WEB-INF/lib/ext-$app_name-ext-util-taglib.jar
rm -f $tomcat_home/webapps/ROOT/WEB-INF/lib/ext-$app_name-ext-util-java.jar
rm -f $tomcat_home/webapps/ROOT/WEB-INF/lib/ext-$app_name-ext-impl.jar
rm -f $tomcat_home/webapps/ROOT/WEB-INF/ext-$app_name-ext.xml
rm -f $tomcat_home/webapps/ROOT/WEB-INF/tiles-defs-ext.xml
rm -f $tomcat_home/temp/liferay/com/liferay/portal/deploy/dependencies/ext-$app_name-ext-util-bridges.jar
rm -f $tomcat_home/temp/liferay/com/liferay/portal/deploy/dependencies/ext-$app_name-ext-util-taglib.jar
rm -f $tomcat_home/temp/liferay/com/liferay/portal/deploy/dependencies/ext-$app_name-ext-util-java.jar
Bryan Cheung gives a topic on enterprise collaboration to the business user audience.
Bryan describes a concept of the porous enterprise which has to be a relationship with the community, marketing and legal to take the good stuff out of your ecosystem and share appropriate information. A good example of this is Salesforce “Idea Exchange” where people can submit ideas and have them voted up or down.
The mobile enterprise is the next big area of growth for Web applications. Expensify is such an example where you take a photo of your receipts with your mobile device and create expense reports.
Collaboration of the future will have to take into account multiple facets, whether by community, product or geographical location to create views of information on the fly to make sense of social data.
Ad hoc collaboration is the ability to get input from groups outside the usual slides.
Liferay introduces Social Office to provide a Java-based solution for social computing. This gives a focused purpose for collaboration using Liferay. Social Office is designed to give users less customizations, such as portlet sizing or coloring, so that the user can focus on the purpose of the application.
Ivan Cheung and Wes Gong give a talk on best practices to avoid performance issues.
- LDAP: You don’t necessarily need LDAP mass import to just authenticate against LDAP and use groups for permissions
- Cache: Make sure you cluster ehCache settings between servers so users looking at the same page have a similar experience in multi-node environments
- File Storage: DB is an option but it’s slow; use a SAN for faster, higher performance. You can use Data Migration Tool in EE6 to migrate between filesystems, if needed.
- Plan Ahead: Change the admin password, change the default timezone/locale and set default communities/roles.
- Backups: Backup plan is crucial so you can rollback if something goes sideways. Be sure to store source code in an SCM.
- PreProd Environment: Should be exactly as PROD environment so you can test new development
- Updating Data: Use GUI and available Web services versus using SQL to update the database
- Liferay Home: Specify this in portal-ext.properties to allow Liferay find stuff, especially between upgrades
- Transforming Liferay: Keep core and custom code separate, and use the Plugins SDK as much as possible. Ask for help if you need help!
- EE Service Packs: Don’t get locked into a service pack…upgrade for many bug fixes and critical performance enhancements.
Just from my own experience being an EE customer, I think Liferay Support is rock solid. I have resolved many issues through their helpful support and persistence.
As a side note, check out LDAP group permissions after reauthenticating when added to a new group to verify they have permissions to that group. As per the first bullet point, you may be able to just do an initial import.
In 6.0, the license check has been improved, so if you use a symlink you should not get hit with adding a new key if the home remains the same.
Rich Sezov, author of Liferay in Action, presents many features of Liferay 6 by creating an “insult creation” application based on his high school experiences (with a mullet wig on…oh, the 80’s). Liferay’s Service Builder is used to manage persisted data. Here’s how:
- Define your entities in one file (service.xml) to create a remote or local service that will have the primary key and attributes. You can also define queries in this file.
- When complete, run ant build-service to create all the generated code.
- You can continue making customizations to certain source files that extended the generated code.
- Create DAOs to interact with Service Builder
- You can add a portlet to your Liferay instance control panel.
- MVCPortlet can be used to implement MVC inside of Liferay. Create a portlet action to call the function and then set the render parameter to show a different JSP when done.
- To pretty things up, you can use Alloy UI.
- For validation, you can use Liferay’s validator.
Some other features include internationalization, data traversal, and authorization. SearchContainer allows you to iterate through data. You can use PermissionChecker to set-up authorization to the different components on your pages based on the available roles you set-up inside of Liferay.
Today kicks off the Liferay Symposium (West Coast) which just announced the release of Liferay Portal 6EE. Bryan Cheung and Paul Hinz give the initially keynote and tout the benefits of Liferay 6. I’ll be blogging my notes about the conference over the next few days.
Some key takeaways include open standards, affordability and extensibility and compatibility with other enterprise applications. Currently 35,000 community members and estimate 250,000 Liferay installations worldwide.
Some key facts and features demoed during the keynote:
- Product footprint only 215MB
- $3,950 per server up to 8 cores ($17k for enterprise level support)
- New embedded lightweight Workflow engine called Kaleo (or integrate with Italio or jBPM)
- Can add new pages with a defined set of portlets called “page templates” or you can create site templates for a whole community layout
- New Web content portlet where you can drag-n-drop UI components onto the portlet. You can easily change the attributes of any of these to make Liferay a Web publishing platform for non-developers.
- Social Equity is new so you can weight people on the content they add to say a blog or forum based on participation, time and contribution of posts.
- Open Social container to consume Google Gadgets
- Custom fields can be added to any existing object or custom objects you create (e.g., you need to add additional LDAP fields specific to your environment).
- Liferay IDE is an Eclipse-based IDE; Liferay Developer studio available to EE users. With this tool you can create new plugin projects and hook into your existing Liferay deployments. Wizards available to simplify development.
- Alloy UI is new RIA tool Liferay created based on YUI3 and provides a meta framework for CSS, HTML and JS. Vaadin and JSF IceFaces are other UI frameworks available to the Java developer.
What are the differences between EE and CE editions of Liferay?
- Over 300 fixed issues
- 200% performance improvement
- Long term support
- Additional enterprise configurations and enterprise features such as auditing, reporting and rules.