the bug is that something does not serialize access to the page. the contract on models and components is that they always run in a single-threaded environment. this is what allows the user code to be simple and free of any synchronization logic.
so whatever push/pull/whatever framework you are using - it should properly synchronize access to the page instance that owns the models. -igor On Wed, Dec 26, 2012 at 6:16 PM, Hendy Irawan <he...@soluvas.com> wrote: > I think I just found a "bug" ... LoadableDetachableModel is potentially > non-threadsafe. > > I experience weird behavior, my concurrent models are chained (i.e. calls > other models getObject()), and my concurrent models extend > LoadableDetachableModel. The weird behavior is that sometimes (!!) the > models return null. But if debugged, they're not null. It's like a timing > and race condition problem. > > Now I think I know why. LoadableDetachableModel, upon getObject(), sets > attached=true before caling load(), which can take some time. If > getObject() gets called again, it then immediately returns the "loaded > object", which was still null (sometimes.....). > > Should I report this as bug? > > On Wed, Dec 26, 2012 at 6:14 PM, Siefart, Olaf [via Apache Wicket] < > ml-node+s1842946n4655056...@n4.nabble.com> wrote: > >> Hi, >> >> A dashboard with unrelated web services is exactly the usecase of our >> christmas project (https://github.com/osiefart/wicket-christmas). >> >> @Hendy: I would not start the execution immediately upon model creation. I >> would choose a Visitor - onConfigure - Solution. Then it is possible to >> check the visibility of the component before loading data... >> >> Kindly regards, >> Olaf >> >> -----Ursprüngliche Nachricht----- >> Von: Serban.Balamaci [mailto:[hidden >> email]<http://user/SendEmail.jtp?type=node&node=4655056&i=0>] >> >> Gesendet: Mittwoch, 26. Dezember 2012 11:45 >> An: [hidden email] <http://user/SendEmail.jtp?type=node&node=4655056&i=1> >> Betreff: Re: Are Wicket models loaded concurrently ? >> >> Hello guys. >> For sure this would be useful. I encountered many cases where the models >> are using different unrelated web services and starting the requests in >> parallel would be a nice improvement. >> >> >> >> -- >> View this message in context: >> http://apache-wicket.1842946.n4.nabble.com/Are-Wicket-models-loaded-concurrently-tp4655046p4655055.html >> >> Sent from the Users forum mailing list archive at Nabble.com. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden >> email]<http://user/SendEmail.jtp?type=node&node=4655056&i=2> >> For additional commands, e-mail: [hidden >> email]<http://user/SendEmail.jtp?type=node&node=4655056&i=3> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden >> email]<http://user/SendEmail.jtp?type=node&node=4655056&i=4> >> For additional commands, e-mail: [hidden >> email]<http://user/SendEmail.jtp?type=node&node=4655056&i=5> >> >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the discussion >> below: >> >> http://apache-wicket.1842946.n4.nabble.com/Are-Wicket-models-loaded-concurrently-tp4655046p4655056.html >> To unsubscribe from Are Wicket models loaded concurrently ?, click >> here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4655046&code=aGVuZHlAc29sdXZhcy5jb218NDY1NTA0NnwxNTI0Njc4NzUy> >> . >> NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> >> > > > > -- > Hendy Irawan - on Twitter <http://twitter.com/hendybippo> - on > LinkedIn<http://id.linkedin.com/in/hendyirawan> > Web Developer | Bippo Indonesia <http://www.bippo.co.id/> | Akselerator > Bisnis | Bandung > > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Are-Wicket-models-loaded-concurrently-tp4655046p4655067.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org