Sunday, June 19, 2016

How to querying Alfresco for development purpose?

Working around with Alfresco document management systems, it comes with an architecture to handle and dealing with files likely, in terms on building your interfaces that request/response the petition of document to be indexing, profiling, storing and managing following CMIS specification, the best way of doing an implementation of an interface if your using Web Service is handle the archive as attachments or MTOM in the best way previously passing the file thought discovering, encoding, binarization and packing for sending a file to well decoupled layer of services that handle asynchronously the reception of document and retrieving a correct response to a client who is waiting with a timeout in queue/streaming manner the processing of his document.

Alfresco uses open source in backstage (Apache Chemistry) which intermediately use a language to communicate repository with internal database is like JPQL or LINQ, is just simple like using hibernate HQL and you must develop an integration to dealing the document structure and normalization of their characterization with your systems, so to dealing with connection you could query Alfresco with: Chemestry OpenCMIS Workbench to start the tool you must execute:

$ workbench.sh

and you will get like this in Java Application:
Commons problems in development are that tables with column ObjectId respond lower in amount of time of 20 seconds after 2 million of records saved in the documents, this sound like a tunning database problem, solving will require some investing hours, after taking care of network problems handling with High Availability in your infrastructure and asynchronously retrieve a response of events and states with steps of document process.


Best Regards,

Saturday, June 18, 2016

How to configure a porlet inside your application to be installed on Liferay Portal?

I remembered that few years I told a manager to review Liferay Portal before doing an home development, my experience with portals give to suggest that it was going to fix to his solution, after working with Liferay may I say you have to be care and have well-configured, federated, not superpass and overloading the actual functions of the Portal Layer, for example federation is interesting topic where portal layer should be a pass-out and measure how the Authentication, authorization, and accounting (AAA) is doing and where an application should intervene (recovered cookies, tokens or sessions), Liferay as well as an application should live together with other applications in a container installed on a Application Server, you should probably think twice how all applications federated could be live together in a cluster with a server(s) running with Liferay.

Liferay Portal has cool things that you probably you must not codify, configure or manage, for example considerations of being responsive to the client rendering content to the most common devices in the other hand a TUNNING is a priority in development state, the first thing is install the database in DMBS outside of memory fabric configuration (review index, table, partitions, users, columns), clustering is not of free version so you probably develop Security Agents to handle objects of authorization and accounting, review log files to view how you should perform jvm parameters (parallel is recommend) and spread functionality across the server

To configurate a portlet you should the following next steps:

1. Required artifact in your pom file:

2. Configuration in web.xml (tld should be download from liferay distribution)
3. Create portlet file:


There is another consideration to be careful that is well programmed applications using portlets for example, timeout in any request/response in the front-end and in the back-end take care of the cost and duration of transactions for not converting your Application Server in a rock (it happens and is terrible).

So after choosing your portal there is a benefit of using a technology and decisions of taking a path and this is the knowledge and ideas you probably you have experienced, if you are doing a home development is well suited decision to start for your infrastructure or having license for Portals like IBM where front-end should be carried in using and extends provider libraries, or built something from open-source resources which are paths that be well done when there is team up, management with vision and well suited timetables.  

Best regards,



Tuesday, June 14, 2016

How to connect OpenAM and Spring Security to do Single Sign On (SSO)?

There is a list of previous steps for doing SSO between a Web app and OpenAm and the most important things are:
  1.  Start OpenAM and well configurated server.
  2.  Create users and specificate the rol names.
  3.  Install agentapp inside webserver
  4.  Execute agentadmin to create a policy between webapp and openam.
All those steps require some time, in the application context we need to do some configuration in context for conclude AAA, Authentication is taking for OpenAM, Authorization is given by Spring Security and OpenAM interconnection and Accounting is doing for WebApp when it asign the corresponding roles and access to the client (by now we are going to do some federation), so here the short list of configuration for doing with Spring security:

1. First required artifact in the app:

2. Start spring context with spring security:

3. The most import part filters and connection to retry OpenAM config:

4. Create the shared cookie:

5. The amconfig properties to taking url, user and password

For the application is kind of simple for just federate permissions between components.

Important link: