RE: what's rule for using @Component and xml bean file

2013-02-14 Thread Frank Zhang
> > Sent: Wednesday, February 13, 2013 2:12 PM > > To: Frank Zhang; Edison Su; Darren Shepherd > > Cc: cloudstack-dev@incubator.apache.org > > Subject: Re: what's rule for using @Component and xml bean file > > > > Okay, I was sold by XML now, since it is more i

RE: what's rule for using @Component and xml bean file

2013-02-13 Thread Alex Huang
Wednesday, February 13, 2013 2:12 PM > To: Frank Zhang; Edison Su; Darren Shepherd > Cc: cloudstack-dev@incubator.apache.org > Subject: Re: what's rule for using @Component and xml bean file > > Okay, I was sold by XML now, since it is more important to reduce > confusion

Re: what's rule for using @Component and xml bean file

2013-02-13 Thread Kelven Yang
s of power of XML, though it's more handy >in some >way (to me it's unit test which I think we could adopt javaConfig in >some extent). > >Anther strong reason is avoiding re-compiling when we make some change in >Spring configuration. Actually I would suggest us adopti

RE: what's rule for using @Component and xml bean file

2013-02-12 Thread Frank Zhang
code" in any design, this would make our project stronger , more flexible, and more modular. For example, to disable a component in customer environment for debug purpose, with XML file it's a single line change, with JavaConfig you have to re-compile and deliver some jar file, and binary ja

Re: what's rule for using @Component and xml bean file

2013-02-12 Thread Kelven Yang
on, this is to solve the slow bootstrap issue. -Kelven > >> -----Original Message- >> From: Edison Su >> Sent: Tuesday, February 12, 2013 9:44 AM >> To: Kelven Yang; Frank Zhang; Darren Shepherd >> Cc: cloudstack-dev@incubator.apache.org >> Subject: RE: what's rul

RE: what's rule for using @Component and xml bean file

2013-02-12 Thread Frank Zhang
pages official manual), I will never switch to another editor anymore. > -Original Message- > From: Edison Su > Sent: Tuesday, February 12, 2013 9:44 AM > To: Kelven Yang; Frank Zhang; Darren Shepherd > Cc: cloudstack-dev@incubator.apache.org > Subject: RE: what's r

RE: what's rule for using @Component and xml bean file

2013-02-12 Thread Edison Su
ren Shepherd > Cc: cloudstack-dev@incubator.apache.org > Subject: Re: what's rule for using @Component and xml bean file > > > > On 2/11/13 11:39 AM, "Frank Zhang" wrote: > > >Ok. now I understood the story. I will go XML for my components. > >I

Re: what's rule for using @Component and xml bean file

2013-02-11 Thread Kelven Yang
e to hear more developers to comment about it. -Kelven > >> -----Original Message- >> From: Kelven Yang >> Sent: Monday, February 11, 2013 10:48 AM >> To: Darren Shepherd >> Cc: Frank Zhang; cloudstack-dev@incubator.apache.org >> Subject: Re: what's r

RE: what's rule for using @Component and xml bean file

2013-02-11 Thread Frank Zhang
ee we should be POJO, but just avoid being purist if the gain is small. > -Original Message- > From: Kelven Yang > Sent: Monday, February 11, 2013 10:48 AM > To: Darren Shepherd > Cc: Frank Zhang; cloudstack-dev@incubator.apache.org > Subject: Re: what's rule for usin

Re: what's rule for using @Component and xml bean file

2013-02-11 Thread Kelven Yang
can be used in place of the Spring one's >>>that >>> give most of all the functionality. Refer to >>> >>>http://static.springsource.org/spring/docs/3.2.x/spring-framework-refere >>>nc >>> e/html/beans.html#beans-standard-annotat

Re: what's rule for using @Component and xml bean file

2013-02-09 Thread Darren Shepherd
@Named and when to register the bean in XML. You >> should never use @Named. I'm sure many will disagree with me but past >> experiences have over and over again shown to me that component scanning >> on large scale projects is a bad idea. Ignoring bad initialization >> p

Re: what's rule for using @Component and xml bean file

2013-02-09 Thread Darren Shepherd
isagree with me but past >> experiences have over and over again shown to me that component scanning >> on large scale projects is a bad idea. Ignoring bad initialization >> performance, component scanning ends up introducing weird difficult to >> debug issues when some does

Re: what's rule for using @Component and xml bean file

2013-02-08 Thread Kelven Yang
text hierarchies (which I hope you do, >but that is a different topic altogether), component scanning blows up. > >Darren > > > > > > > > > Original Message >Subject: what's rule for using @Component and xml bean file >From: Frank

RE: what's rule for using @Component and xml bean file

2013-02-08 Thread Darren Shepherd
hat is registered in your context. Additionally if you get into context hierarchies (which I hope you do, but that is a different topic altogether), component scanning blows up. Darren Original Message ---- Subject: what's rule for using @Component and xml bean file Fro

Re: what's rule for using @Component and xml bean file

2013-02-08 Thread Rohit Yadav
So, the rule of thumb is that if you want to give the sysadmin an option to disable a component (like a plugin for example), you define that bean (name, class map) in a context xml file, else you use the @Component annotation on the class (generally an impl) so spring creates a singleton/bean and a

what's rule for using @Component and xml bean file

2013-02-08 Thread Frank Zhang
I see client/tomcatconf/componentContext.xml.in defining lots of beans while I also see many beans use @Component Is there any guideline here?