Message Boards

Use of service builder for creating spring portlet

Jagir Vimalbhai Buch, modified 9 Years ago.

Use of service builder for creating spring portlet

New Member Posts: 11 Join Date: 3/28/14 Recent Posts
Hi All,

Somewhere i read that ServiceBuilder in liferay is also used for generating

1) Spring Configuration
2) Hibernate Configuration
3) JSON Javascript interface

Does any one knows how it possible?? or how to do this?
Which steps we need to follow to do this??
Jagir Buch, modified 9 Years ago.

RE: Use of service builder for creating spring portlet

New Member Posts: 11 Join Date: 3/28/14 Recent Posts
These many views..but no reply from anyone...
No one knows the answer... emoticon
thumbnail
Tonu Sri, modified 9 Years ago.

RE: Use of service builder for creating spring portlet

Regular Member Posts: 197 Join Date: 4/15/11 Recent Posts
Hi Jagir,

Service Builder saves development time is by providing Spring and Hibernate configurations for your project. Service Builder uses Spring dependency injection for making service implementation classes available at runtime and uses Spring AOP for database transaction management. Service Builder also uses the Hibernate persistence framework for object-relational mapping. As a convenience to developers, Service Builder hides the complexities of using these technologies. Developers can take advantage of Dependency Injection (DI), Aspect Oriented Programming (AOP), and Object-Relational Mapping (ORM) in their projects without having to manually set up a Spring or Hibernate environment or make any configurations.

Service builder generated Spring and Hibernate code when you define your service.xml and run service builder.

1) Spring Configuration

You can refer docroot/WEB-INF/src/META-INF/portlet-spring.xml
2) Hibernate Configuration

You can refer docroot/WEB-INF/src/META-INF/portlet-hbm.xml
3) JSON Javascript interface

It also create JSON based web services when you create remote services: *JSONSerializer.

You can find detailed explanation here:

https://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/service-build-2

Thanks:
Tonu
Jagir Buch, modified 9 Years ago.

RE: Use of service builder for creating spring portlet

New Member Posts: 11 Join Date: 3/28/14 Recent Posts
Thanks for your valuable reply
This is really helpful for meemoticon
Georgian ABRAHAM, modified 9 Years ago.

RE: Use of service builder for creating spring portlet

Regular Member Posts: 163 Join Date: 4/19/13 Recent Posts
Hey Thanks Tonu for awesome explanation.

It seems Tonu knows better than the Liferay employessemoticonemoticon