| Article: |
JBoss Optimizations 101 | |
| Subject: | O/R Mapping Tools and JBoss | |
| Date: | 2003-05-30 00:48:14 | |
| From: | anonymous2 | |
|
Response to: O/R Mapping Tools and JBoss
|
||
|
If you simply use Hibernate directly from SLSB, then it is up to Hibernate to provide these services (locking, caching, etc. ) and no more the app server.
|
||
Showing messages 1 through 3 of 3.
-
O/R Mapping Tools and JBoss
2003-05-30 01:01:38 anonymous2 [View]
-
O/R Mapping Tools and JBoss
2003-05-30 01:07:10 anonymous2 [View]
Well, as I said, it is no more about JBoss here, but about Hibernate. From the JBoss point of view, if you use SLSB, there will be no locking (per EJB spec) and thus:
- you may have multiple requests for the same data at the same time, it is up to hibernate to handle that correctly (if such thing is necessary)
- the caching cannot be handled by JBoss (as no entities are involved in the process) thus it is the job of Hibernate
- the distributed cache invalidation framework is useless as you don't use entities, so see if Hibernate has something similar
As for transactions maybe you should think about marking your SLSB methods as "Required" instead of playing with UserTransaction (if that makes sense in your app).
Cheers,
sacha -
O/R Mapping Tools and JBoss
2003-05-30 03:43:32 anonymous2 [View]
Thanks for those quick replies! Wasn't expecting to receive them in a day! =)
Len



My current implementation is configured to use UserTransaction retrieved from the JNDI and keep Hibernate's SessionTransaction it in a Thread Local. My SLSBs actually calls my own entry point for business logic which uses Hibernate codes.
Len