I use Hibernate in wicket and i create a Hibernate Session at the beginning
of each request. now i want to create a TimerTask and work with database but
there is no open session in this thread and if I open session manually, it
doesn't work because my entities work with the session that give form
RequestCycle.get(). so is there any way to manually create a request and
finalize it?

I try this

    final MockWebRequest request = new MockWebRequest(null);
    final NullResponse response = NullResponse.getInstance();
    RequestCycle rc = Application.get().createRequestCycle(request,
response);
    //do jobs
    rc.detach();

but at line 3 it said that There is no application attached to current
thread.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Create-Request-Manually-tp4666838.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to