As a follow on to the conflict between the name of the Seam Session
component and the implicit session variable in the web context, I have
discovered another conflict. The default (assumed) name of the
Hibernate persistence context component is also "session". It just so
happens that a request for the session component name returns the
Hibernate persistence context because of precedence rules (root
context variable names take precedence over imported context variable
names).
In all of this long windedness, my proposal for Seam 2.1 is to make
the assumed name of the Hibernate persistence context hibernateSession
rather than session. This would affect the Hibernate class in the Seam
Application Framework and the HibernateTransaction component.
I feel quite strongly that this is a wise move.
-Dan
public class HibernateEntityController extends PersistenceController<Session>
{
...
@Override
protected String getPersistenceContextName()
{
return "session";
}
...
}
--
Dan Allen
Software consultant | Author of Seam in Action
http://www.mojavelinux.com
http://manning.com/dallen
NOTE: While I make a strong effort to keep up with my email on a daily
basis, life and work come first and, at times, keep me away from my mail
for a while. If you contact me, then don't hear back for more than a week,
it is very likely that I am excessively backlogged or the message was
caught in the spam filters. Please don't hesitate to resend a message if
you feel that it did not reach my attention.