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.