cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ramiro Aparicio <ramiro.apari...@prot-on.com>
Subject DI in 3.1
Date Thu, 04 Oct 2012 18:16:41 GMT
Hi,
I am back again with some questions, after migrating to 3.1 it seems 
almost everything is working as it should except timed task, this kind 
of process is timed using spring and does not pass throught 
CayenneFilter and there is no context attached, so I need to be able to 
create context on demand for those cases and that is changed to DI in 
3.1 wich is undocummented afaik, I have tried with:
     @Inject
     private Injector injector;
  and then:
             DataContext context = (DataContext) 
injector.getInstance(ObjectContextFactory.class).createContext();
but injector is not injected, so right now I am out of options, can 
someone point me how Cayenne DI is working or how can I create a new 
context at 3.1?

Thanks in advance for the help.

Ramiro Aparicio


Mime
View raw message