Status: New
Owner: ----
New issue 550 by ron.gross: Exceptions when using circular dependency in
multi-threaded code
http://code.google.com/p/google-guice/issues/detail?id=550
I am using circular dependency in two object's constructors. The two
objects are defined as singletons, and are being created in multi-threaded
code. I'm getting the following exception:
java.lang.IllegalStateException: This is a proxy used to support circular
references involving constructors. The object we're proxying is not
constructed yet. Please wait until after injection has completed to use
this object.
at
com.google.inject.internal.ConstructionContext$DelegatingInvocationHandler.invoke(ConstructionContext.java:100)
at $Proxy6.whoAmI(Unknown Source)
at com.delver.guice.GuiceTest.testIt(GuiceTest.java:65)
at com.delver.guice.GuiceTest.access$000(GuiceTest.java:21)
at com.delver.guice.GuiceTest$2.call(GuiceTest.java:44)
at com.delver.guice.GuiceTest$2.call(GuiceTest.java:39)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Attached is a test that reproduces the problem.
Attachments:
multi-threaded-circular-dependency.zip 2.3 KB
--
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-guice-dev?hl=en.