Re:Unsure if I understand TransactionAwarePersistenceManager...
by strlen on Friday June 28, 2013 @07:13PM
(#5960823)
Alternatively, this is why Java needs a real namespace mechanism. "package" doesn't cut it. See: namespaces in C# or C++, or alternately modules in ML.
One thing I like about DI implemented in a language itself is that is that it negates the need to make factories in all cases. So, essentially, imagine if Java had C# style namespace and this was done using Guice-style DI.
bind(Persistance::Manager.class).toProvider(
new Provider<>() {
public Persistance::Manager get() {
new Persistence::Manager::TransactionAware();
}
});
One thing I like about DI implemented in a language itself is that is that it negates the need to make factories in all cases. So, essentially, imagine if Java had C# style namespace and this was done using Guice-style DI.