-
1. Re: EntityManager available outside container ?
fhh Apr 16, 2007 10:19 AM (in response to gbasilico)Can't you use the factory pattern to get an entityManager? This would of course imply that you allow your clients to acces the db directly.
Regards
Felix -
2. Re: EntityManager available outside container ?
gbasilico Apr 16, 2007 10:27 AM (in response to gbasilico)Felix, thank you for your answer.
Well, the problem is that currently we use CMP entity beans, the transactions are managed by the container and we do not want to modify the client side (managing the transactions by hand). So i'm afraid using the factory is not the solution...
Regards,
Guillaume -
3. Re: EntityManager available outside container ?
fhh Apr 16, 2007 3:46 PM (in response to gbasilico)I don't think you can acess an entityManager remotely. Since it manages the loaded entities it would either have to have access to the remote (the client's) JVM (not possible) or turn every entity into a kind of stateful session bean so that they inform the entityManager about changes (very difficult but _theoretically_ possible).
But then again: Maybe I am wrong.
Regards
Felix -
4. Re: EntityManager available outside container ?
gbasilico Apr 17, 2007 3:13 AM (in response to gbasilico)Thank you for your reply.
That's what i was thinking, unfortunately... In fact, i managed to access to the entitymanager thanks to a session bean or a servlet, which both are on the server side, but not from my client... Too bad.
A last question : do you think another container (Glassfish or another one) could have implemented that ? (i can dream, no ? ;-) )
Regards,
Guillaume -
5. Re: EntityManager available outside container ?
fhh Apr 17, 2007 9:20 AM (in response to gbasilico)I can't imagine anybody has actually implemented this. But I don't know...
Regards
Felix