Return-Path: Delivered-To: apmail-uima-user-archive@www.apache.org Received: (qmail 55625 invoked from network); 20 Mar 2011 02:23:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Mar 2011 02:23:23 -0000 Received: (qmail 42794 invoked by uid 500); 20 Mar 2011 02:23:23 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 42751 invoked by uid 500); 20 Mar 2011 02:23:23 -0000 Mailing-List: contact user-help@uima.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@uima.apache.org Delivered-To: mailing list user@uima.apache.org Delivered-To: moderator for user@uima.apache.org Received: (qmail 86018 invoked by uid 99); 19 Mar 2011 20:44:25 -0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of achaphiv@gmail.com designates 209.85.216.47 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=KM901qW59CRadXenvMhzwSXXYMpujXHDnTfozEPjITI=; b=N4vMvoqSk2YxM1/N74ojFplm2AdPa8iObgUHK1TGOtztPyPxAHPXCE7YW99DorJFr/ dPm12Pp2251bsSvdebIxm06v1vomU0wnlZK64dna+2zhpg/82brQ8yjYuUo+wZqBUQ+k 4bpk9EnbyJZdnELAyiDfikky3L2Hgt4dGmA6A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=eSLimo5YPT+oW4O5Et+EfFghCxCk0+4jzB/289UzTzV2hC6qNtzaRN3xiYKqNtsSnx yBW2YKbE4YQSD/1GdHz/bDNHpb6JGhot9maJORWRLSnkKPJ2noJ5kkrVi5NkklHOOVqg b0zzSbsPduKCPPvHnnOeCRvwIQwFBsgWlajtM= MIME-Version: 1.0 In-Reply-To: References: Date: Sat, 19 Mar 2011 16:43:56 -0400 Message-ID: Subject: Re: Dependency Injection support? From: Alex Chaphiv To: user@uima.apache.org Cc: tommaso.teofili@gmail.com Content-Type: multipart/alternative; boundary=001485eba2d811425d049edbf4ed X-Virus-Checked: Checked by ClamAV on apache.org --001485eba2d811425d049edbf4ed Content-Type: text/plain; charset=ISO-8859-1 Hey, Thanks for the response. I actually have been using uimaFIT. And while it provides a lot of convenience, it only uses spring as detailed here: http://code.google.com/p/uimafit/issues/detail?id=40 The library allows you to use @ExternalResource annotations to have dependencies "injected", but each dependency requires a separate ExternalResourceLocator (the uimaFIT convenience wrapper for UIMA's Resource) implementation, and still doesn't solve the dependency resolution issue between dependencies. I suppose I was hoping for some kind of magic in UIMA AS. On Sat, Mar 19, 2011 at 2:54 PM, Tommaso Teofili wrote: > Hi Alex, > I think you could take inspiration from the (Spring based) DI support in > uimaFIT [1], even if, personally, I'd recommend the use of Guice instead of > Spring. > My 2 cents, > Tommaso > > [1] : http://code.google.com/p/uimafit/ > > 2011/3/18 Alex Chaphiv > >> Hi, >> >> I have several annotators that require objects that are rather complex to >> build. >> I've been able to get around this using by using ExternalResources with >> custom >> api interfaces, but it requires a lot of boilerplate and doesn't allow for >> sharing of dependencies between ExternalResources. >> >> So what would be the best way to get around this? Even better, is there >> any >> support for Spring or Guice? >> >> > --001485eba2d811425d049edbf4ed--