Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C4781DCA4 for ; Thu, 4 Oct 2012 18:17:13 +0000 (UTC) Received: (qmail 56958 invoked by uid 500); 4 Oct 2012 18:17:13 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 56910 invoked by uid 500); 4 Oct 2012 18:17:12 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 56899 invoked by uid 99); 4 Oct 2012 18:17:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Oct 2012 18:17:12 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [46.105.67.216] (HELO exchange.prot-on.net) (46.105.67.216) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Oct 2012 18:17:03 +0000 Received: from [192.168.1.26] (87.218.21.242) by exchange.prot-on.net (46.105.67.216) with Microsoft SMTP Server (TLS) id 14.1.218.12; Thu, 4 Oct 2012 20:16:41 +0200 Message-ID: <506DD289.8040901@prot-on.com> Date: Thu, 4 Oct 2012 20:16:41 +0200 From: Ramiro Aparicio User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: Subject: DI in 3.1 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [87.218.21.242] 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