> I understand what you're saying, so is there any way to get around
> this??? Here is the code that I am using in my pageBeginRender
>
> Session session =
> SessionFactoryUtils.getSession((SessionFactory)getGlobal().getSpringContex
> t().getBean("sessionFactory"),
> false);
> try {
> session.lock(website, LockMode.NONE); //throws exceptio
> website = (Website) session.get(Website.class,
> website.getId());
> } catch(HibernateException he) {
> he.printStackTrace();
> }
>
Based on what little code there is here I can't really help you except to
note that at the point where you go:
session.lock(website, LockMode.NONE); //throws exception
The session already has an instance of that website in memory.
What pattern are you using for your hibernate sessions? Session per thread?
Long Session? Etc. Likewise, are you persisting website either explicitely
or by being sloppy and not nulling it out in the page's initialize method?
Basically I'd start looking for where that "extra" website is coming from.
Either it's being duplicated within this transaction, or it's "garbage"
leftover from a previous transaction.
--- Pat
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]