Normally service layer and DAO layer are deployed on the same jvm. The service method through stateless session bean is exposed to web tier through remote interface (if web tier is deployed on a different jvm).
However we can wrap DAO code (regardless if you are using JPA or just plain jdbc) into ejb, deploy them onto a different jvm and expose them through remote ejb interface. The service layer ejb then invoke these dao ejb by distributed transactions.
The benefit of this is tightened security for database access information.(By the pure fact that DAO is on a different application server which could be secured more)
However, has this been done anywhere else? I could not find any reference.
- The data transfer between service ejb and dao ejb goes through wire (serialized through remote ejb call). What will be the performance impact?
- Any problems with distributed transaction between service ejbs and dao ejbs? How practical is this? Performance impact?
Aucun commentaire:
Enregistrer un commentaire