Re: [Wicket-user] How to attach thread

2007-03-15 Thread Thomas Kuechenthal
But how for example will it then be possible to run time intensive
functions while updating the process status within the gui?
I think in a MVC or event driven environment it must be possible to
completly seperate the business logic from the gui.
In Swing for example it is the usual way to put time intensive actions
into an own thread. e.g. time consuming database queries of which the
results shall be displayed after a while, without freezing the whole gui.

regards
/thomas

Johan Compagner wrote:
 First of all you shouldn't really access the session in another thread.
 Because that is not really supported by a webcontainer, especially in
 clustering or persistent storage..
 
 So if you want to spawn to a thread you should only really do backend
 logic, not gui logic things.
 
 If you really want then you could look at Session.set/get and
 Application.set/get
 
 johan
 
 
 On 3/14/07, *Thomas Küchenthal*  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:
 
 Dear all,
 
 within my Wicket application I'm using a self build process
 framework. I
 klick on a wicket button and a process starts running in an own thread.
 I want the process thread to take over the control of the wicket thread
 to e.g. build the gui, or change the current model of a component
 etc...
 (Actually I'm using the wizard component and want to combine/synchronize
 my own process steps with the wizard steps)
 
 But for now I receive this error message:
 
 caused by: wicket.WicketRuntimeException : there is no session attached
 to current thread Thread-51
 at wicket.Session.get(Session.java:210)
 at wicket.Page.dirty(Page.java:338)
 at wicket.Page.componentStateChanging(Page.java:956)
 at wicket.Component.addStateChange(Component.java:2347)
 
 
 
 How can I attach the process thread to the wicket thread?
 
 Thanks in advance
 
 /thomas
 
 -
 
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to
 share your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 
 
 
 
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to attach thread

2007-03-15 Thread Martijn Dashorst
You can still do that, but you need to reverse the logic: query the
running thread for the required progress/data instead of pushing it
from the thread to the session.

The difference between Swing apps and web apps is that you can run the
web app on multiple machines, where the session is shared between
different servers.

Another thing is that the session is managed by the web container, and
can be serialized to disk or a database. Keeping (unmanaged)
references to managed objects is not a wise thing to do.

Don't call us, we call you is a good principle in this case.

Martijn

On 3/15/07, Thomas Kuechenthal [EMAIL PROTECTED] wrote:
 But how for example will it then be possible to run time intensive
 functions while updating the process status within the gui?
 I think in a MVC or event driven environment it must be possible to
 completly seperate the business logic from the gui.
 In Swing for example it is the usual way to put time intensive actions
 into an own thread. e.g. time consuming database queries of which the
 results shall be displayed after a while, without freezing the whole gui.

 regards
 /thomas

 Johan Compagner wrote:
  First of all you shouldn't really access the session in another thread.
  Because that is not really supported by a webcontainer, especially in
  clustering or persistent storage..
 
  So if you want to spawn to a thread you should only really do backend
  logic, not gui logic things.
 
  If you really want then you could look at Session.set/get and
  Application.set/get
 
  johan
 
 
  On 3/14/07, *Thomas Küchenthal*  [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:
 
  Dear all,
 
  within my Wicket application I'm using a self build process
  framework. I
  klick on a wicket button and a process starts running in an own thread.
  I want the process thread to take over the control of the wicket thread
  to e.g. build the gui, or change the current model of a component
  etc...
  (Actually I'm using the wizard component and want to combine/synchronize
  my own process steps with the wizard steps)
 
  But for now I receive this error message:
 
  caused by: wicket.WicketRuntimeException : there is no session attached
  to current thread Thread-51
  at wicket.Session.get(Session.java:210)
  at wicket.Page.dirty(Page.java:338)
  at wicket.Page.componentStateChanging(Page.java:956)
  at wicket.Component.addStateChange(Component.java:2347)
 
 
 
  How can I attach the process thread to the wicket thread?
 
  Thanks in advance
 
  /thomas
 
  
  -
 
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to
  share your
  opinions on IT  business topics through brief surveys-and earn cash
  
  http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  
  http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  mailto:Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
  
 
  -
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to share your
  opinions on IT  business topics through brief surveys-and earn cash
  http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 
 
  
 
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user


 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-- 
Learn Wicket at ApacheCon Europe: http://apachecon.com
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.5 will keep your server alive. Download Wicket now!
http://wicketframework.org

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance 

[Wicket-user] How to attach thread

2007-03-14 Thread Thomas Küchenthal
Dear all,

within my Wicket application I'm using a self build process framework. I
klick on a wicket button and a process starts running in an own thread.
I want the process thread to take over the control of the wicket thread
to e.g. build the gui, or change the current model of a component etc...
(Actually I'm using the wizard component and want to combine/synchronize
my own process steps with the wizard steps)

But for now I receive this error message:

caused by: wicket.WicketRuntimeException: there is no session attached
to current thread Thread-51
at wicket.Session.get(Session.java:210)
at wicket.Page.dirty(Page.java:338)
at wicket.Page.componentStateChanging(Page.java:956)
at wicket.Component.addStateChange(Component.java:2347)



How can I attach the process thread to the wicket thread?

Thanks in advance

/thomas

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to attach thread

2007-03-14 Thread Johan Compagner

First of all you shouldn't really access the session in another thread.
Because that is not really supported by a webcontainer, especially in
clustering or persistent storage..

So if you want to spawn to a thread you should only really do backend logic,
not gui logic things.

If you really want then you could look at Session.set/get and
Application.set/get

johan


On 3/14/07, Thomas Küchenthal [EMAIL PROTECTED] wrote:


Dear all,

within my Wicket application I'm using a self build process framework. I
klick on a wicket button and a process starts running in an own thread.
I want the process thread to take over the control of the wicket thread
to e.g. build the gui, or change the current model of a component etc...
(Actually I'm using the wizard component and want to combine/synchronize
my own process steps with the wizard steps)

But for now I receive this error message:

caused by: wicket.WicketRuntimeException: there is no session attached
to current thread Thread-51
at wicket.Session.get(Session.java:210)
at wicket.Page.dirty(Page.java:338)
at wicket.Page.componentStateChanging(Page.java:956)
at wicket.Component.addStateChange(Component.java:2347)



How can I attach the process thread to the wicket thread?

Thanks in advance

/thomas

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user