Going back to my original example..
With the Application.set() trick I am able to keep it from blow up, but why
would "MyService" call Application.get() (and thus blow up).
When the DAOs don't. They are both @Inject and they are both setup in my guice
module as "singleton"
D/
On May 28, 2010,
();
}
};
Alex
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/using-injected-services-in-a-child-thread-tp2233924p2235261.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To
t/clear the
> Application's ThreadLocal variable so that it's available during the
> execution of the task. "
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/using-injected-services-in-a-child-thread-tp2233924p2235201.html
&
this message in context:
http://apache-wicket.1842946.n4.nabble.com/using-injected-services-in-a-child-thread-tp2233924p2235201.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: users-uns
iew this message in context:
> http://apache-wicket.1842946.n4.nabble.com/using-injected-services-in-a-child-thread-tp2233924p2235168.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> -
&
What are you agreeing with? I can't see the thread...
On May 28, 2010, at 3:30 PM, Alex Objelean wrote:
>
> Yes, I agree. I do prefer this solution too.
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/using-injected-services-in-a-child-thre
No, it is about Sven Maier's solution: http://pastebin.com/NN58fiZx
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/using-injected-services-in-a-child-thread-tp2233924p2235168.html
Sent from the Wicket - User mailing list archive at Nabbl
Yes, I agree. I do prefer this solution too.
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/using-injected-services-in-a-child-thread-tp2233924p2235166.html
Sent from the Wicket - User mailing list archive at Nabble.com
On Fri, May 28, 2010 at 4:25 PM, Alex Objelean wrote:
>
> 2) Let the client code to create the Future. Though it is a good approach, I
> don't like the fact that the client is responsible for implementing such
> details each time it overrides the execute() method. It would be cleaner to
> move thi
That's what the other one did, but it used the callback methods to do
the set/unset. This way, you don't have to clutter up each task's
code.
On Fri, May 28, 2010 at 4:23 PM, Douglas Ferguson
wrote:
> This worked for me..
>
>
>
e the fact that the client is responsible for implementing such
details each time it overrides the execute() method. It would be cleaner to
move this logic inside the component..
Alex
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/using-injected-services-in
This worked for me..
@Override
public void run() {
s message in context:
> http://apache-wicket.1842946.n4.nabble.com/using-injected-services-in-a-child-thread-tp2233924p2235118.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> -
&
in context:
http://apache-wicket.1842946.n4.nabble.com/using-injected-services-in-a-child-thread-tp2233924p2235118.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: user
Even if I got that to work, it doesn't explain why some things using @Inject
blow up and others don't.
There has to be a reason for this. Under what circumstances to an injected
object need a reference to the Application?
D/
On May 28, 2010, at 11:34 AM, James Carman wrote:
> Perhaps you woul
I found this:
http://pastebin.com/NN58fiZx
But I don't see anything that would tied the Application to the child thread.
It is just a button that would exec a thread for you.
D/
On May 28, 2010, at 1:06 PM, Douglas Ferguson wrote:
> I've been following the thread to some degree, but I missed
I've been following the thread to some degree, but I missed that.
Is there a code example somewhere?
D/
On May 28, 2010, at 11:34 AM, James Carman wrote:
> Perhaps you would be interested in the other threads that have been
> going on where we discuss InheritableThreadLocal. In there Jeremy
>
Perhaps you would be interested in the other threads that have been
going on where we discuss InheritableThreadLocal. In there Jeremy
gave a good solution that would fix what you're seeing. Basically,
you use the beforeExecute()/afterExecute() methods to set/clear the
Application's ThreadLocal va
I'm still spinning my wheels on this one.
Let me try to explain better..
On the page I have
@Inject DAOFactory
@Inject MyService
On the DAOFactory I have
@Inject DAO1
@Inject DAO2
etc...
On MyService I have
@Inject DAO1
In my module I have
bind(MyService.class).toInstance(new MyService());
I'm using 1.4.8 (not the ITL version).
I have pass a runnable to an executer, how can I make use of classes that use
@Inject?
When I try to do so, it blows up saying "There is no application attached to
current thread pool-13-thread-1"
The confusing thing is that I inject 2 DAOs and 1 service.
20 matches
Mail list logo