cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emanuele Maiarelli <evvd...@yahoo.it>
Subject Re: Different DataContext
Date Wed, 22 Jul 2009 11:42:32 GMT
I think the problem is there:

    DataContext mycontext = Databinder.getContext();
    person = ObjectFactory.getInstance().getPerson(parameters.getInt("personid"),
mycontext);

'mycontext' isn't the same context of the one ObjectFactory is using , u should share the
same context between 
Wicket and your Singleton.

I hope this will solve,








________________________________
Da: Reinout van Schouwen <reinout@gmail.com>
A: user@cayenne.apache.org
Inviato: Mercoledì 22 luglio 2009, 13:32:29
Oggetto: Re: Different DataContext

Hello Emanuele,

Thanks for your reply.

2009/7/22 Emanuele Maiarelli <evvdrak@yahoo.it>:

>  i'm not an apache Wicket expert, but the Exception its obiusvly casted by
> the fact that ur application is casting objects into different DataContexts.

Yes, but I have no idea how that could happen.

>  What happen if u steps into
(...)

This part of the code works fine. It's the 'else' case that causes the
exception.

Regards,

-- 
Reinout van Schouwen
http://vanschouwen.info/



      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message