Message Boards
Combination View Flat View Tree View
Threads [ Previous | Next ]
service layer in liferay
toggle
service layer in liferay
8/30/10 5:00 PM
Hi Friends,
When am trying to do ant build-service it will generate model folder and service folder and all the classes its working fine but at the same time it will generate some xml files inside the src META-INF like portlet-spring.xml,infrastructure-spring.xml what is the use of this files?can anyone help me ?
Flag Flag
RE: service layer in liferay
7/16/10 3:54 AM as a reply to Liyakath ali khan.
Liferay uses Spring for integration and service layer implementation. It also uses hibernate for persistency. The xml files generated are spring configuration , hibernate configuration and infrastructure related (transaction management etc) files.

I hope this helps
Flag Flag
RE: service layer in liferay
axis web service liferay hibernate configuration liferay json liferay spring configuration liferay web service
7/24/10 3:53 AM as a reply to Liyakath ali khan.
Liyakath ali khan:
Hi Friends,
When am trying to do ant build-service it will generate model folder and service folder and all the classes its working fine but at the same time it will generate some xml files inside the src META-INF like portlet-spring.xml,infrastructure-spring.xml what is the use of this files?can anyone help me?


Hello Liyakat ,

When you generate the service layer with the service builder, it generates certain files which includes Java Beans,Axis Web Services(if remote is set to true),Spring Configuration files,Hibernate Configuration files,SQL scripts,JSON interface.
Java Beans are implemented in the form of setters and getters which ,as the name suggests is used for setting and getting the values respectively.
Speaking about the web services ,there are different methodologies to implement but the one which Liferay supports is Axis.The Axis framework is the implementation of the SOAP (Simple Object Access Protocol) which is helpful in inter application communication.
Spring framework in the portal is used for maintaining the business and data services layers as well as transaction management. For example ext-spring.xml contains the Spring based Dependency Injection.Also spring provides the Connection Pooling mechanism in Liferay .LIferay services are implemented as Spring. portal-spring.xml file contains all of the definitions of the service implementations, dynamic-data-source-spring.xml provides the
datasource and transaction manager.
HibernateSession is used by Dynamic Query API, portal-hbm.xml is used for Hibernate object-relationship mappings for portal models.Also we can provide custom Hibernate object-relationship mappings in ext-hbm.xml.
SQL scripts provides the database structure and JSON service generated is used in the context of Ajax which provides us with the functionality to access the server side resources without actually submitting the form.
Flag Flag
RE: service layer in liferay
7/24/10 12:16 AM as a reply to Tanweer Ahmed Ansari.
Excellent explanation Tanveer.
Flag Flag
RE: service layer in liferay
7/24/10 4:04 AM as a reply to Muhammed Shakir Misarwala.
Muhammed Shakir Misarwala:
Excellent explanation Tanveer.

Thnx Br Shakir,
Flag Flag