Maris Orbidans schrieb:

Let's remember good old EJB's. Inject an EntityManager in a session bean facade and EJB container will handle all concurrency issues. No need to write any boilerplate code.

that´s where i come from. problem is, that you domain object aren´t able to lazily fetch attached data from database, unless you manage the EM yourself (maybe via Stateful SB, like seam does you encourage to).

there are situations in which SBs are the best way to implement DAOs. I doubt, these are the majority.

BTW I have seen that some people use OpenEntityManagerInViewFilter and map it to url pattern "/*". It seems that an EntityManager would be created every time a static web resource is accessed. Isn't that terrible ?

i don´t know if OpenEntityManagerInViewFilter actually opens an EM.
my solution wont, but instead provide a Context for EMs, so that they can be created and managed (and yes, more than one ;) automatically on demand.

cu uwe
--

THOMAS DAILY GmbH
Adlerstraße 19
79098 Freiburg
Deutschland
T  + 49 761 3 85 59 0
F  + 49 761 3 85 59 550
E  [EMAIL PROTECTED]
www.thomas-daily.de

Geschäftsführer/Managing Directors:
Wendy Thomas, Susanne Larbig
Handelsregister Freiburg i.Br., HRB 3947


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to