Noel J. Bergman wrote:
> 
> 
> Serge Knystautas wrote:
> 
> > Noel J. Bergman wrote:
> > > Alexander Zhukov wrote:
> > > > By mentioning JNDI I guess you are talking about ServiceLocator
> > > > pattern, right?  It is considered as anti-pattern.
> > > Not here:
> > <snip />
> > What is your point Noel?
> 
> That there is a usefulness, and that the supposed positioning 
> of the pattern as an anti-pattern isn't even agreed by those 
> held up as the champions of CdI.  I think both approaches 
> have their place.

Pragmatically, unless we are to rewrite the universe and exclusively use 
services offered up as CDI oriented POJOs, we are going to run into this over 
and over - JNDI, JDBC, JavaMail, and so forth.

The approach I take is to wrap such services within a lighweight CDI style 
adaptor so that the "smell of an anti-pattern" is contained within a single 
component. This enables all components to be plugged together using CDI, 
avoiding confusion and the "whiff" of different metaphors ("different 
metaphors" is non-religous speak for anti-pattern) spreading throughout the 
architecture.

-- Steve


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to