users@glassfish.java.net

Re: Jersey or Servlet ?

From: Felipe Gaúcho <fgaucho_at_gmail.com>
Date: Tue, 31 Mar 2009 20:36:45 +0200

Usually I adopt resource injection (like datasource and JMS
resources), so it is always setter injection... but it is really not
important..

DI is good to reduce external configuration files.. otherwise it is
also not so relevant.. you will have the same solution quality in both
scenarios (with or without DI), the only difference is the effort to
have your resource reference.



On Tue, Mar 31, 2009 at 8:32 PM, Martin Gainty <mgainty_at_hotmail.com> wrote:
> seems like every Java Class is injecting <an enabler> interface
> http://www.theserverside.com/tt/articles/article.tss?l=IOCBeginners
>
> Does there exist any scenario where DI should not be used?
>
> If you are using DI is there a case for Constructor Injection over setter
> Injection
> or an scenario where setter injection works better than Constructor
> Injection?
>
> Thanks
> Martin Gainty
> ______________________________________________
> Disclaimer and confidentiality note
>
> This message is confidential and may be privileged. If you are not the
> intended recipient, we kindly ask you to please inform the sender. Any
> unauthorised dissemination or copying hereof is prohibited. This message
> serves for information purposes only and shall not have any legally binding
> effect. Given that e-mails can easily be subject to manipulation, we can not
> accept any liability for the content provided.
>
>
>
>
>
>
>> Date: Tue, 31 Mar 2009 19:33:30 +0200
>> From: fgaucho_at_gmail.com
>> To: users_at_glassfish.dev.java.net
>> Subject: Re: Jersey or Servlet ?
>>
>> > Just leverage a simple lookup pattern in your code. Later, when we get
>> > injection, you can update your lookup code to simply return the injected
>> > resources. Simple.
>>
>> yes, I will wait and pray for that.. I am having a great joy in the
>> server side coding personal projects like cejug-classifieds:
>> http://fgaucho.dyndns.org:8080/cejug-classifieds-richfaces/index.faces
>> I am pretty adictive to EJB 3 + JMS (specially JMS - the masterpiece
>> of JavaEE) + JPA + etc...
>>
>> the first trial of the incoming footprint-service is online:
>> http://fgaucho.dyndns.org:8080/footprint-service/application.wadl
>>
>> I confess I could put it online in less than 20 minutes.. a good start...
>>
>> I will bet on Jersey.. and I hope it provides injection of my
>> component very soon.. than I finally will have my bread and my butter
>> together :) eheh
>>
>> * it is a second dream on the stack since I am desperate looking for a
>> complete Glassfish V3 + EJB 3.1 to replace my current Glassfish
>> installation.. let's see.. perhaps in JavaONE my little projects will
>> have finally unleash its Java EE powers :) ......
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>
> ________________________________
> Hotmail® is up to 70% faster. Now good news travels really fast. Find out
> more.



-- 
Please help to test this application:
http://fgaucho.dyndns.org:8080/cejug-classifieds-richfaces