Return-Path: X-Original-To: apmail-isis-users-archive@www.apache.org Delivered-To: apmail-isis-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B178010176 for ; Sun, 17 Nov 2013 16:15:46 +0000 (UTC) Received: (qmail 45503 invoked by uid 500); 17 Nov 2013 16:15:46 -0000 Delivered-To: apmail-isis-users-archive@isis.apache.org Received: (qmail 45466 invoked by uid 500); 17 Nov 2013 16:15:45 -0000 Mailing-List: contact users-help@isis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@isis.apache.org Delivered-To: mailing list users@isis.apache.org Received: (qmail 45454 invoked by uid 99); 17 Nov 2013 16:15:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Nov 2013 16:15:43 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [212.227.126.186] (HELO moutng.kundenserver.de) (212.227.126.186) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Nov 2013 16:15:35 +0000 Received: from [192.168.1.39] (81.203.48.6.dyn.user.ono.com [81.203.48.6]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0MCObR-1Vr7QZ2WFF-009dvs; Sun, 17 Nov 2013 17:15:14 +0100 From: =?iso-8859-1?Q?GESCONSULTOR_-_=D3scar_Bou?= Content-Type: multipart/alternative; boundary="Apple-Mail=_B3BB43CB-1294-4F4C-8935-FFD60CAF6D38" Subject: Services still not injected when entering @PostConstruct methods on a Service Message-Id: Date: Sun, 17 Nov 2013 17:15:12 +0100 To: users@isis.apache.org Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) X-Mailer: Apple Mail (2.1822) X-Provags-ID: V02:K0:/pQ13CG1AQUTwN6U8dRUAmP9caJW6OOPb7IAsPKxI9L 1e2psz9M0JjvVGlcqWQfvD+YpGN8aicpkdyPqwUGyM50Wj2OKM oOKPb0B86AL/b04mscsHjSrSerJt6im3Wv6qMmevE3nxsUSzIR BRO7rKwpdk1OGw6geCLqq+okUKu3uD2jn14G2HRSlq/E5UXWnD cXYUFXOXBtdtVbGYsTaL3nNx0PjgFJ8qm51xrfVp8Dso0A0Lof PScwzfuZrR6ddoiSeYE6V5pS6NzpzcnoLfnVLIzqJ/7o4Gs9cV 33GDr3lbKk0EAWIpPEoC8VL2XLIgpWbkJesP97Rp65jDGt+ffk AC+FyYm/ph9BWVKK+y5U/CYydh0QlcSUuapH3gufSCoG7TlFQz tT5RhoR5WKrvA== X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_B3BB43CB-1294-4F4C-8935-FFD60CAF6D38 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi to all. I have an Isis service that needs to initialize a "server" upon creation = (it's a Drools session, but it would be the same with an email server, = for instance). For initializing that "server", I need to pass it references to other = Isis services (in this case Drools globals). If, as per [1], I try like this: @PostConstruct public void init(final Map props) { server.setGlobal("eventOccurrences", this.eventOccurrences); =09 } .... // {{ injected: EventOccurrences private EventOccurrences eventOccurrences; public final void injectEventOccurrences(final EventOccurrences = eventOccurrences) { this.eventOccurrences =3D eventOccurrences; } // }} The problem is that when the execution arrives to: server.setGlobal("eventOccurrences", this.eventOccurrences); this.eventOccurrences is still null... So it has not yet been injected = (or instantiated). I must ensure that the server starts to run from the beginning of the = Isis application execution. There's a note on [1] footer, but I thought this is not the case, as my = only expectation is that services are injected when calling = "@PostConstruct" methods. Perhaps I'm missing something basic or the previous expectation is = precisely the one explicited by the footer note ... If that's the case, is there a better way to solve it? Thanks, Oscar [1] http://isis.apache.org/core/services/initializing-services.html --Apple-Mail=_B3BB43CB-1294-4F4C-8935-FFD60CAF6D38--