Uwe Schäfer schrieb:
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).

if you use EJB3 you really want to use the wicket-contrib-javaee project (wicketstuff) all you need to do is call you @EJB and rest is handled automatically !

see yourself:
http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-contrib-javaee

i love this thing!

Best,

Korbinian


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

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

Reply via email to