on 03-05-2007 7:51 AM
Hi all;
I do not understand the difference between application and entity service---
Both seems to be Entity beans
both have CRUD methods
we can call query also in both
Then what is the diference between the two?
Why do we need both of them ?
Please Help me to understand this concept
Tahnks
--Points assured for help
Hi Shobhendra,
Entity service represents the business objects. You can only add attributes to the entity services. The CRUD methods are automatically generated for the entity services and you can't change/delete/edit them. You can only add additional query methods to the entity services.
But in app services you can add any methods you like. And it's also possible to add custom logic to the app service methods. Within the app service methods you'll call the entity service's CRUD methods with some custom logic. So app service methods are required if you need to add custom logic over the CRUD methods of the entity service e.g. your entity service has a id field where you want to assign a sequence number, which the user won't fill up but generated automatically by some custom logic. You need to have a custom create method in your app service where you can implement this logic and call the entity service's create method.
Thanks,
Dipankar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check out this Blog
<a href="/people/ashutosh.rastogi/blog/2006/11/24/when-to-use-which-caf-service to use which CAF Service ?</a>
Hope this helps
Ashutosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.