Grails, Constructor Injection, and Spring Bean Builders
Had a run-in with Grails and trying to wire up some custom beans using Grails’s Spring Bean Builder DSL mechanism. I was wiring up an instance of the Apache HttpClient object, which can be constructed with HttpClientParams and/or HttpConnectionManager. Now the Grails BB syntax expects the first argument to be the type you’re wiring, followed by the parameters to pass into the constructor. Something like this:
httpClient(org.apache.commons.httpclient.HttpClient, defaultGlobalHttpConnectionManager)
Where httpClient is the bean name/id, org.apache.commons.httpclient.HttpClient is the type we’re wiring, and defaultGlobalHttpConnectionManager is some custom implementation of the HttpConnectionManager.
When using this Bean Builder syntax, Grails gets consfused about the argument ordering and is unable to create its Grails Application Context. I also tried the following which didn’t work either.
httpClient(org.apache.commons.httpclient.HttpClient, null,
defaultGlobalHttpConnectionManager)
I don’t know if you can explicitly set the arguments the same way you can in the standard XML wiring approach. My solution was then to use the tried and true method.
<bean id="defaultGlobalHttpConnectionManager"
class="com.site.commons.http.GlobalHttpConnectionManager"
destroy-method="shutDown" lazy-init="default" autowire="default"
dependency-check="default">
<property name="soTimeout">
<value>20000</value>
</property>
<property name="connectionTimeout">
<value>20000</value >
</property>
</bean>
<bean id="httpClient"
class="org.apache.commons.httpclient.HttpClient" lazy-init="default"
autowire="default"
dependency-check="default">
<constructor-arg ref="defaultGlobalHttpConnectionManager" />
</bean>
Resources:
http://grails.org/doc/1.0.x/
http://hc.apache.org/httpclient-3.x/apidocs/index.html
July 21st, 2010 at 7:07 am
Buy:Viagra.Cialis Soft Tabs.Levitra.Soma.Super Active ED Pack.Viagra Super Active+.Propecia.Viagra Professional.Cialis Professional.Cialis.Zithromax.VPXL.Tramadol.Cialis Super Active+.Maxaman.Viagra Soft Tabs.Viagra Super Force….
August 29th, 2010 at 9:10 pm
AT&T http://shewlettozipasb.05KIAPARTS.US/tag/AT&T+Help+atx26t+tilt/ : AT&T…
tilt…
September 7th, 2010 at 5:15 pm
Buy:Viagra Super Force.Viagra Professional.Cialis Professional.Viagra Soft Tabs.Cialis Soft Tabs.Soma.Super Active ED Pack.VPXL.Propecia.Cialis Super Active+.Viagra.Maxaman.Tramadol.Levitra.Zithromax.Cialis.Viagra Super Active+….
November 11th, 2010 at 12:21 am
…
BUY FASHION. TOP BRANDS: GUCCI, DOLCE&GABBANA, BURBERRY, DIESEL, ICEBERG, ROBERTO CAVALLI, EMPORIO ARMANI, VERSACE…
December 17th, 2010 at 12:21 pm
████████►BUY VIAGRA◀███████…
████████▲▲▲▲▲▲▲▲▲████████…
December 17th, 2010 at 10:45 pm
████████►BUY VIAGRA◀███████…
████████▲▲▲▲▲▲▲▲▲████████…
December 18th, 2010 at 1:07 pm
████████►BUY CIALIS◀████████…
▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲…
December 28th, 2010 at 1:10 am
fosamax@actonel.now” rel=”nofollow”>.…
Buynow…
December 28th, 2010 at 4:53 pm
Aleve@official.site” rel=”nofollow”>..…
Buyit now…
December 30th, 2010 at 12:37 pm
Avelox@official.site” rel=”nofollow”>……
Buyno prescription…
January 7th, 2011 at 7:38 pm
……
Buynow it…
January 21st, 2011 at 6:17 am
Depakote@official.site” rel=”nofollow”>.…
Buygeneric drugs…
January 21st, 2011 at 6:19 am
Depakote@official.site” rel=”nofollow”>.…
Buygeneric drugs…
February 4th, 2011 at 1:56 am
zyban pill…
Buywithout prescription…
February 4th, 2011 at 3:50 am
xeloda information.gov…
Buyit now…
February 6th, 2011 at 1:09 am
other names for trazodone…
Buyno prescription…
February 6th, 2011 at 4:12 am
Zetia…
Buyno prescription…
February 6th, 2011 at 7:57 am
Zelnorm…
Buygeneric pills…
February 6th, 2011 at 3:58 pm
quinapril…
Buyit now…
February 7th, 2011 at 4:15 am
Zocor…
Buygeneric drugs…
February 7th, 2011 at 11:29 am
Vitamin B…
Buydrugs without prescription…
March 3rd, 2011 at 9:52 pm
Lexapro…
Buygeneric drugs…
March 6th, 2011 at 9:41 pm
arthritis orlistat…
Buyno prescription…
March 7th, 2011 at 12:02 am
Eye Drops…
Buynow…
March 7th, 2011 at 12:32 pm
Risperdal…
Buygeneric meds…
March 7th, 2011 at 10:48 pm
Rogaine…
Buygeneric meds…
March 9th, 2011 at 4:07 am
Seroquel…
Buygeneric drugs…
March 9th, 2011 at 5:14 am
how much benadryl to take with zyrtec…
Buydrugs without prescription…
March 9th, 2011 at 10:11 pm
lamictal with pamelor…
Buygeneric pills…
March 11th, 2011 at 8:43 am
Paxil…
Buygeneric drugs…
March 28th, 2011 at 5:06 pm
Pulmicort@Pulmicort.Pulmicort” rel=”nofollow”>.…
Buynow it…
March 28th, 2011 at 10:53 pm
Synthroid@Synthroid.Synthroid” rel=”nofollow”>.…
Buynow it…
March 29th, 2011 at 9:54 am
Purim@Purim.Purim” rel=”nofollow”>..…
Buynow…
March 29th, 2011 at 5:24 pm
SleepWell@SleepWell.SleepWell” rel=”nofollow”>……
Buynow…
March 30th, 2011 at 9:09 am
symbicort@official.us.website” rel=”nofollow”>……
Buygeneric drugs…
March 30th, 2011 at 6:31 pm
Seroquel@Seroquel.Seroquel” rel=”nofollow”>..…
Buynow it…
March 31st, 2011 at 12:49 am
Coumadin@Coumadin.Coumadin” rel=”nofollow”>.…
Buyno prescription…
March 31st, 2011 at 7:32 am
Synthroid@Synthroid.Synthroid” rel=”nofollow”>.…
Buynow…
March 31st, 2011 at 10:46 am
Seroquel@Seroquel.Seroquel” rel=”nofollow”>..…
Buywithout prescription…
April 2nd, 2011 at 12:50 am
.…
Buygeneric pills…
April 2nd, 2011 at 2:14 am
.…
Buynow…
April 2nd, 2011 at 4:01 am
……
Buywithout prescription…
April 2nd, 2011 at 6:34 pm
pyridium@can.cause.low.blood.sugar” rel=”nofollow”>.…
Buygeneric drugs…
April 3rd, 2011 at 12:10 am
reglan@black.box” rel=”nofollow”>……
Buydrugs without prescription…
April 3rd, 2011 at 12:55 am
cipro@causes.problems” rel=”nofollow”>.…
Buygeneric drugs…
April 3rd, 2011 at 5:42 pm
.…
Buyno prescription…
April 5th, 2011 at 6:54 am
otc@nasonex.alternative” rel=”nofollow”>……
Buynow…
April 5th, 2011 at 9:15 am
what@is.arcoxia.” rel=”nofollow”>..…
Buygeneric drugs…
April 6th, 2011 at 2:04 am
flexeril@gain.weight” rel=”nofollow”>.…
Buygeneric drugs…
April 6th, 2011 at 2:20 pm
……
Buygeneric drugs…
July 8th, 2011 at 5:36 am
buy@aloe.vera.gel” rel=”nofollow”>……
Need cheap generic VIAGRA?…
July 18th, 2011 at 11:37 am
buy@generic.LEVITRA” rel=”nofollow”>……
Need cheap generic LEVITRA?…
July 29th, 2011 at 12:28 am
Order@Cheap.Coral.Calcium” rel=”nofollow”>..…
Buygeneric pills…
July 29th, 2011 at 12:51 am
Order@Discount.Coral.Calcium” rel=”nofollow”>..…
Buyno prescription…
July 29th, 2011 at 4:56 am
Order@Cheap.Abana” rel=”nofollow”>..…
Buynow it…
July 29th, 2011 at 7:55 am
Purchase@Discount.Abana” rel=”nofollow”>……
Buywithout prescription…
July 29th, 2011 at 9:12 am
Buy@Abilify.Online” rel=”nofollow”>..…
Buygeneric meds…
July 29th, 2011 at 9:45 am
Buy@Cheap.Abilify” rel=”nofollow”>..…
Buynow it…
July 29th, 2011 at 7:51 pm
Purchase@Generic.Abilify.5mg.10mg.15mg.20mg.30mg” rel=”nofollow”>.…
Buynow it…
July 29th, 2011 at 11:56 pm
Buy@Acai.Online” rel=”nofollow”>.…
Buywithout prescription…
July 30th, 2011 at 11:45 pm
Order@Generic.Acai” rel=”nofollow”>..…
Buywithout prescription…
July 31st, 2011 at 11:41 am
Buy@Coral.Calcium.Online” rel=”nofollow”>.…
Buygeneric drugs…
August 1st, 2011 at 1:21 am
coral@calcium.is.it.safe” rel=”nofollow”>..…
Buyit now…
August 2nd, 2011 at 3:06 am
Purchase@Coral.Calcium.Online” rel=”nofollow”>..…
Buygeneric meds…
August 2nd, 2011 at 4:14 am
Purchase@Discount.Coral.Calcium” rel=”nofollow”>……
Buygeneric pills…
August 2nd, 2011 at 5:22 am
Get@Coral.Calcium.Online” rel=”nofollow”>……
Buywithout prescription…
August 3rd, 2011 at 12:42 pm
Buy@Cheap.Acai” rel=”nofollow”>……
Buywithout prescription…
August 3rd, 2011 at 1:22 pm
Buy@Cheap.Acai” rel=”nofollow”>……
Buygeneric drugs…
August 3rd, 2011 at 3:38 pm
Buy@Discount.Acai” rel=”nofollow”>……
Buygeneric drugs…
August 3rd, 2011 at 5:10 pm
Order@Acai.Online” rel=”nofollow”>……
Buynow it…
August 3rd, 2011 at 5:18 pm
Order@Acai.Online” rel=”nofollow”>……
Buyit now…
August 3rd, 2011 at 10:27 pm
Purchase@Cheap.Acai” rel=”nofollow”>……
Buyit now…
August 4th, 2011 at 1:51 am
Cheap@Acai.Online” rel=”nofollow”>.…
Buygeneric meds…
August 4th, 2011 at 2:56 am
Cheap@Acai.Online” rel=”nofollow”>……
Buynow…
August 5th, 2011 at 11:29 am
Buy@Cheap.Accupril” rel=”nofollow”>.…
Buygeneric meds…
August 5th, 2011 at 4:56 pm
Purchase@Accupril.Online” rel=”nofollow”>.…
Buygeneric drugs…
August 6th, 2011 at 4:20 am
Order@Discount.Accutane” rel=”nofollow”>.…
Buyno prescription…
August 6th, 2011 at 6:26 am
Purchase@Cheap.Accutane” rel=”nofollow”>.…
Buynow it…
August 7th, 2011 at 12:46 am
Generic@Accutane.10mg.20mg.Without.Prescription” rel=”nofollow”>.…
Buynow it…
August 7th, 2011 at 3:48 am
Buy@Cheap.Aciphex” rel=”nofollow”>.…
Buygeneric meds…
August 7th, 2011 at 5:44 pm
Get@Aciphex.Online” rel=”nofollow”>.…
Buygeneric pills…
August 7th, 2011 at 9:49 pm
Order@Generic.Aciphex” rel=”nofollow”>.…
Buygeneric drugs…
August 8th, 2011 at 2:11 pm
Purchase@Generic.Aciphex.20mg” rel=”nofollow”>.…
Buynow it…
August 10th, 2011 at 1:45 pm
Purchase@Generic.Actonel” rel=”nofollow”>.…
Buygeneric meds vbg…
August 10th, 2011 at 2:20 pm
Purchase@Actonel.Without.Prescription” rel=”nofollow”>..…
Buynow it vhx…
August 10th, 2011 at 3:33 pm
Cheap@Actonel.Without.Prescription” rel=”nofollow”>……
Buynow it mou…
August 11th, 2011 at 12:19 am
Purchase@Discount.Actoplus.Met” rel=”nofollow”>..…
Buygeneric drugs krg…
August 11th, 2011 at 3:08 am
Buy@Discount.Actos” rel=”nofollow”>..…
Buygeneric meds qmo…
August 11th, 2011 at 6:00 am
Purchase@Cheap.Actos” rel=”nofollow”>..…
Buygeneric pills zdg…
August 12th, 2011 at 4:40 am
Order@Discount.Acular” rel=”nofollow”>.…
Buygeneric drugs zfk…
August 12th, 2011 at 11:51 am
Order@Cheap.Adalat” rel=”nofollow”>..…
Buygeneric drugs lzt…
August 12th, 2011 at 2:27 pm
Cheap@Adalat.Online” rel=”nofollow”>..…
Buywithout prescription dyo…
August 12th, 2011 at 4:36 pm
Buy@Cheap.Coral.Calcium” rel=”nofollow”>……
Buywithout prescription xiu…
August 13th, 2011 at 8:19 pm
Generic@Abilify.5mg.10mg.15mg.20mg.30mg.Without.Prescription” rel=”nofollow”>..…
Buydrugs without prescription faj…
August 14th, 2011 at 12:49 am
Buy@Discount.Acai” rel=”nofollow”>.…
Buygeneric drugs axm…
August 14th, 2011 at 4:01 am
Order@Discount.Acai” rel=”nofollow”>.…
Buygeneric drugs nih…
August 14th, 2011 at 5:02 am
Purchase@Acai.Online” rel=”nofollow”>.…
Buyit now ojb…
August 14th, 2011 at 10:52 am
Buy@Generic.Acai” rel=”nofollow”>.…
Buygeneric drugs mby…
August 14th, 2011 at 6:26 pm
Cheap@Generic.Acai” rel=”nofollow”>……
Buydrugs without prescription vrg…
August 15th, 2011 at 10:16 am
Order@Cheap.Energy.Boost” rel=”nofollow”>..…
Buyno prescription wkp…
August 15th, 2011 at 11:14 am
Order@Discount.Energy.Boost” rel=”nofollow”>..…
Buyno prescription gdt…
August 15th, 2011 at 9:12 pm
Order@Accupril.Online” rel=”nofollow”>..…
Buyno prescription tao…
August 16th, 2011 at 5:25 am
Purchase@Accupril.Online” rel=”nofollow”>.…
Buywithout prescription yyn…
August 16th, 2011 at 6:38 am
Purchase@Cheap.Accupril” rel=”nofollow”>..…
Buyit now irl…
August 16th, 2011 at 7:44 am
Purchase@Discount.Accupril” rel=”nofollow”>……
Buygeneric meds svb…
August 16th, 2011 at 4:53 pm
Buy@Accutane.Online” rel=”nofollow”>..…
Buyno prescription jui…
August 17th, 2011 at 2:24 am
Cheap@Accutane.Online” rel=”nofollow”>.…
Buynow it lmg…
August 17th, 2011 at 6:09 pm
Purchase@Generic.Accutane.10mg.20mg” rel=”nofollow”>.…
Buygeneric drugs itj…
August 19th, 2011 at 4:10 am
Cheap@Generic.Aciphex.20mg” rel=”nofollow”>……
Buynow it zdg…
August 21st, 2011 at 1:52 am
Cheap@Acomplia.Online” rel=”nofollow”>..…
Buygeneric drugs nvr…
August 21st, 2011 at 2:19 am
Get@Acomplia.Online” rel=”nofollow”>..…
Buynow it tly…
August 21st, 2011 at 5:00 am
Buy@Actonel.Online” rel=”nofollow”>..…
Buydrugs without prescription hak…
August 21st, 2011 at 3:55 pm
Purchase@Actonel.Online” rel=”nofollow”>……
Buygeneric drugs vbr…
August 21st, 2011 at 5:15 pm
Purchase@Cheap.Actonel” rel=”nofollow”>.…
Buydrugs without prescription xab…
August 25th, 2011 at 3:32 am
Get@Aggrenox.Online” rel=”nofollow”>……
Buynow fjl…
August 25th, 2011 at 10:12 am
Order@Cheap.Albenza” rel=”nofollow”>……
Buynow it sxk…
August 26th, 2011 at 5:56 am
abilify@and.weight.gain” rel=”nofollow”>……
Buyno prescription…
August 26th, 2011 at 7:16 am
hair@growth.and.accutane” rel=”nofollow”>..…
Buygeneric drugs…
August 27th, 2011 at 1:55 pm
altace@cough.buy” rel=”nofollow”>..…
Buynow…
August 28th, 2011 at 12:35 am
risperdal@vs.abilify” rel=”nofollow”>.…
Buygeneric drugs…
August 28th, 2011 at 4:15 pm
allegra@generic.purchase” rel=”nofollow”>……
Buynow…
August 29th, 2011 at 12:44 am
phamacokinetic@of.amikacin” rel=”nofollow”>..…
Buygeneric drugs…
August 29th, 2011 at 2:57 am
ampicillin@500.mg” rel=”nofollow”>.…
Buydrugs without prescription…
September 16th, 2011 at 12:19 pm
……
Search music now US Charts…
October 17th, 2011 at 12:39 am
sleep aids and half-life…
Buy_it now…
October 18th, 2011 at 6:16 am
adhd drugs causing hallucinations…
Buy_generic meds…
October 18th, 2011 at 9:36 am
methotrexate and tricyclerides side effects…
Buy_generic pills…
October 18th, 2011 at 11:16 am
antidepressant drugs for cats…
Buy_generic drugs…
October 18th, 2011 at 2:35 pm
cancer tattoos…
Buy_without prescription…
October 19th, 2011 at 5:18 pm
drug detection testing…
Buy_generic meds…
October 20th, 2011 at 6:17 am
number of obese in this generation…
Buy_generic meds…
October 20th, 2011 at 7:57 am
aspirin pain relief dog…
Buy_drugs without prescription…
October 21st, 2011 at 2:48 am
drug alcohol prevention resilience…
Buy_it now…
October 21st, 2011 at 9:28 am
best life diet…
Buy_no prescription…
October 21st, 2011 at 2:27 pm
obesity children summer…
Buy_it now…
October 22nd, 2011 at 7:08 am
prostate cancer injection treatment…
Buy_now it…
October 23rd, 2011 at 5:23 am
medication for ibs…
Buy_generic drugs…
October 24th, 2011 at 8:49 pm
green nerf ds lite armour…
Buy_generic pills…
October 25th, 2011 at 4:48 pm
research being done to treat hiv…
Buy_generic pills…
October 26th, 2011 at 4:29 am
bmi chart for kids…
Buy_generic drugs…
October 26th, 2011 at 9:29 am
buy cheap clomid…
Buy_it now…
October 26th, 2011 at 12:48 pm
effects of bulimia only sometimes…
Buy_generic meds…
October 26th, 2011 at 9:09 pm
serotonin natural sources…
Buy_generic meds…
October 27th, 2011 at 12:29 am
boniva price…
Buy_drugs without prescription…
October 27th, 2011 at 6:48 pm
nursing drug study website…
Buy_drugs without prescription…
October 27th, 2011 at 11:48 pm
australia clinical research resume…
Buy_generic drugs…
October 28th, 2011 at 11:28 am
planar warts…
Buy_drugs without prescription…
October 28th, 2011 at 1:08 pm
what is valtrex used for…
Buy_generic drugs…
October 28th, 2011 at 6:08 pm
tests for assessing anxiety…
Buy_now it…
October 28th, 2011 at 8:44 pm
thyroid scan image…
Buy_generic pills…
October 29th, 2011 at 1:21 pm
side effects of luvox…
Buy_now…
October 31st, 2011 at 1:06 am
deadliest type of cancer…
Buy_generic pills…
October 31st, 2011 at 2:26 pm
genie francis weight loss…
Buy_now…
October 31st, 2011 at 5:45 pm
tylenol without codeine related constipation…
Buy_it now…
October 31st, 2011 at 10:45 pm
zyrtec and drug tests…
Buy_generic meds…
November 1st, 2011 at 5:25 am
stop smoking phlegm…
Buy_drugs without prescription…
November 2nd, 2011 at 3:06 am
advantage of skin cancer…
Buy_generic drugs…
November 2nd, 2011 at 6:26 am
persistent nausea and stomach pain…
Buy_generic meds…
November 2nd, 2011 at 4:25 pm
household chemicals that kill fleas…
Buy_now it…
November 2nd, 2011 at 7:46 pm
respiratory infection humidity dry antibiotics avelox…
Buy_generic pills…
November 2nd, 2011 at 9:26 pm
find clomid cheap in us…
Buy_now…
November 3rd, 2011 at 11:31 am
what foods anorexia eat…
Buy_drugs without prescription…
November 3rd, 2011 at 1:13 pm
atkins diet first week foods…
Buy_without prescription…
November 3rd, 2011 at 2:54 pm
fungi amazing facts…
Buy_drugs without prescription…
November 4th, 2011 at 9:51 pm
dog hives and what causes them…
Buy_drugs without prescription…
November 5th, 2011 at 9:11 pm
nexium pepsin ac…
Buy_generic drugs…
November 8th, 2011 at 8:00 am
acne scar and pit lamp…
Buy_generic drugs…
November 9th, 2011 at 9:25 am
synephrine hcl diet pills…
Buy_generic pills…
November 9th, 2011 at 10:45 pm
neurontin and mood lability…
Buy_generic meds…
November 10th, 2011 at 3:45 am
menses while on birth control pills…
Buy_generic drugs…
November 10th, 2011 at 5:04 pm
new birth control pill…
Buy_now it…
November 10th, 2011 at 8:24 pm
terry abbot…
Buy_generic drugs…
November 12th, 2011 at 7:25 am
zocor orange juice effects…
Buy_no prescription…
November 12th, 2011 at 8:44 pm
childrens ibuprofen diabetes…
Buy_without prescription…
November 13th, 2011 at 6:44 am
benicar hct and norvasc…
Buy_it now…
November 13th, 2011 at 1:24 pm
macon georgia drug court…
Buy_without prescription…
November 13th, 2011 at 4:45 pm
can iodine help thyroid function…
Buy_generic drugs…
November 13th, 2011 at 6:24 pm
tsa drug dogs for adoptino…
Buy_generic drugs…
November 13th, 2011 at 11:25 pm
breven medication for add…
Buy_generic drugs…
November 15th, 2011 at 10:23 pm
information about treatment for leg edema…
Buy_generic drugs…
November 16th, 2011 at 3:23 am
barbecue interactions with drugs…
Buy_generic meds…
November 17th, 2011 at 1:03 am
dogs to detect cancer…
Buy_generic drugs…
December 9th, 2011 at 2:24 am
green@mountain.coffee.cafe.club” rel=”nofollow”>……
Buygeneric meds…
December 9th, 2011 at 5:30 am
protonix@experience.buy” rel=”nofollow”>……
Buygeneric meds…
December 10th, 2011 at 3:30 pm
indications@for.use.of.atrovent” rel=”nofollow”>……
Buygeneric meds…
January 6th, 2012 at 5:08 pm
advair diskus…
advair diskus…