Our application has very large data and we want to perform our business logic (aggregations)
in the Database Layer (Stored Procedures).
Liferay prefers to have business logic in Business Layer (having mutli-layered Architecture).
What is the impact if we want to use Stored Procedures for Business Logic?
As Liferay also uses Hibernate, Is there a way to by-pass hibernate in this case if it doesn’t add much value in this case?
There are reasons why Liferay does its business logic at application code level (high level):
There may be other reasons or there might be some other philosophy they may be following, but this is what I can think of right now.
As frant.hartm says, it is completely up to you. It depends upon your requirement and how you plan to design, maintain and enhance your architecture.
Also as a word of caution: It is recommended not to use Liferay’s database tables directly from Stored procedures as Liferay may change the Database architecture for newer versions. So it might complicate your upgrade procedure.
I feel this question is not so liferay related, hence here are some links that might help you decide:
If it does not add value then yes you can use JDBC for your own custom portlet by-passing hibernate. There is nothing special to configure for using JDBC, it is the same good old thing 🙂.
Hope this leads you in a positive direction.