Hellu again,
Phooeee, I did some more testing and found out the following interesting things:
- I get this error only if I have requested a session in my Ejb A and haven't used it yet till I go to EJB B were I use the same session.
So, the one that gives the error (just after getting back from Ejb B):
Code:
EJB A:
methodtoB {
b = get ref to EjbB
get session
b.methodinB
[b] sesion.find("something")[/b]
The one that doesn't give the error:
Code:
EJB A:
methodtoB {
b = get ref to EjbB
get session
[b] sesion.find("something")[/b]
b.methodinB
Method in EJB B does something like:
[code]
session.fing(something again)
[/close]
So I think that when I retrieve a session I don't have a db connection yet untill I really use it. So when I get in the EJb B (in situation that is incorrect), and really start using the session through a find, exactly get a db connection, so when I leave Ejb B JBoss thinks: " I gave out the connection, so I want it back when you leave ".... instead as when I get in with a session already.... you are "allowed" to go out with one ....
Could it be something like that ??
When is hibernate really opening/retrieving a connection ???
Please some help ??
I am still strugling with the following question:
1) Yes use Jboss... or just POJO with hibernate. Steve, ... you told me that it's nice to use the CMT of a J2Ee app, but stillll you can perfectly do that with Hibernate as well not ?? and even hide it in something like a endCall.. (see your exampel above)...
I am still not confinced about using Jboss with hibernate... It only gives me trouble and cost me a lot of time development/testing/deployment.... I mean, Hibernate is comming out with cluser caching support soon.... so ... !?!?
Please some advice on this... to find me more arguments on to use JBoss.. ;)
Ed