Hello,
Thanks for your question it is quite interesting. Actually I don't see that as a limitation. An object obtained from JNDI and serialized on the wire will still have the same problem you describe.
The correct solution is of course to *always* obtain the object via JNDI. However, this means you have to go through some contortions to serialize services. With the injector this is solved by using what we call "Static" injection in Guice. When an object is brought out thru the wire you can statically repopulate it with deps during deserialization.
This
pattern is discussed in some detail in the Guice forums, but essentially it is not a limitation of DI as such. And more a problem about transmission across the wire. In general, I would not send services across the wire anyway, but separate their state into value objects which are easier to transmit and do not hold references to instances in a particular VM.
Hope that helped!
Dhanji