Task:
- Authentication and Session Management
- variable session timeout for different user/groups
- 10min grains - no timeout
- one session only per loginID
- prompt for session overwrite
- User Login Management Portlet
- manage users' session time out
- tracks the users login/logout history
- force log out of users
Audit Trail module and search portlet done up.
Learnings
Managing Persistence with Liferay.
- Liferay's service builder is relatively simple to use. Just fill up service.xml and do a "ant build-service" to auto generate all the persistence classes. Update impl and model classes, run ant again, and you're done with the persistence classes. There's even a "ant build-db" to generate the sql scripts for the new tables. Comprehensive tutorial here.
- At times, there would be the need for custom queries that the service builder does not take care of. I've had the need to join tables for the query of user group session timeouts, and luckily enough, there's another comprehensive tutorial that enlightened me on this aspect. Here's the good stuff.
- The hibernate DAO types provided by Liferay are incomplete and I had to do up my own TimestampType for the sake of my audit trail module. Why provide some types only and not all? Hope Liferay makes it complete on the next major release. Things should not be done halfway, eh?
- I was more of less done until I did my testing and found this crazy bug. My developed portlets refresh and somehow loses their sense of identity, rendering content of another portlet's. This is by far the biggest problem so far, and can any kind souls help me out. Please view my posting on Liferay developer forums. I'm currently reading up on JSR Specs to see what went wrong. :(