RE: [picocontainer-dev] Latest Pico Commit.... changed behavior on AbstractContainerBuilder

"Michael Rimov" <[email protected]> Tue, 30 Nov 2010 14:38:40 -0800
Newsgroups gmane.comp.java.picocontainer.devel
Organization Centerline Computers, Inc.
Message-ID <[email protected]>
------=_NextPart_000_004B_01CB909C.51495750
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Absolutely!    

 

The only problem I've found is that the strategy interface will also need to
bleed into ScriptedContainerBuilderFactory so that there's a default
behavior in containers constructed.  

 

That said, it would still wouldn't be too ugly, and it would save people
when they migrate from Pico 2 - Pico 3.  I'll make the changes.

 

Thanks!

 
-Mike

 

From: Paul Hammant [mailto:[email protected]] 
Sent: Tuesday, November 30, 2010 8:55 AM
To: dev-qxt/[email protected]
Subject: Re: [picocontainer-dev] Latest Pico Commit.... changed behavior on
AbstractContainerBuilder

 

Is there a away that this could be a strategy on DPC ?

 

  DPC.setChildContainerStarter(new DontAutoStartChildContrainers())

  DPC.setChildContainerStarter(new AutoStartChildContrainers()) // default

 

- Paul

On Tue, Nov 30, 2010 at 7:40 AM, Michael Rimov <[email protected]>
wrote:

Hi guys,

Pico 2 behavior:  AbstractContainerBuilder would automatically start all
containers that it created.
New Pico 3 behavior I just checked in:  Starting behavior has been
refactored out into a decorating AutoStartingContainerBuilder.  So you get
Pico 2 behavior with:
ContainerBuilder builder = new AutoStartingContainerBuilder(new
GroovyContainer(.....));

I needed it for me because I kept running into situations where
parent.makeChildContainer() would cause all sorts of conniptions when both
the parent and child were deployed through the container builders; and my
"don't change any behavior" fix through the constructor args was __U G L
Y__.

Let me know if there are better options that you can see.


-Mike


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



 


------=_NextPart_000_004B_01CB909C.51495750
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><META =
HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 14 =
(filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Absolutely!&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>The only problem I&#8217;ve found is that the strategy interface will =
also need to bleed into ScriptedContainerBuilderFactory so that =
there&#8217;s a default behavior in containers constructed.&nbsp; =
<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>That said, it would still wouldn&#8217;t be too ugly, and it would =
save people when they migrate from Pico 2 &#8211; Pico 3.&nbsp; =
I&#8217;ll make the changes.<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Thanks!<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -Mike<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p>&nbsp;</o:p></span></p><div =
style=3D'border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in =
4.0pt'><div><div style=3D'border:none;border-top:solid #B5C4DF =
1.0pt;padding:3.0pt 0in 0in 0in'><p class=3DMsoNormal><b><span =
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span>=
</b><span style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> =
Paul Hammant [mailto:[email protected]] <br><b>Sent:</b> Tuesday, =
November 30, 2010 8:55 AM<br><b>To:</b> =
dev-qxt/[email protected]<br><b>Subject:</b> Re: =
[picocontainer-dev] Latest Pico Commit.... changed behavior on =
AbstractContainerBuilder<o:p></o:p></span></p></div></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>Is there a =
away that this could be a strategy on DPC ?<o:p></o:p></p><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>&nbsp;&nbsp;DPC.setChildContainerStarter(new =
DontAutoStartChildContrainers())<o:p></o:p></p></div><div><p =
class=3DMsoNormal>&nbsp;&nbsp;DPC.setChildContainerStarter(new =
AutoStartChildContrainers()) // default<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'>- Paul<o:p></o:p></p><div><p =
class=3DMsoNormal>On Tue, Nov 30, 2010 at 7:40 AM, Michael Rimov &lt;<a =
href=3D"mailto:[email protected]">[email protected]</a>&gt; =
wrote:<o:p></o:p></p><p class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'>Hi guys,<br><br>Pico 2 behavior: =
&nbsp;AbstractContainerBuilder would automatically start =
all<br>containers that it created.<br>New Pico 3 behavior I just checked =
in: &nbsp;Starting behavior has been<br>refactored out into a decorating =
AutoStartingContainerBuilder. &nbsp;So you get<br>Pico 2 behavior =
with:<br>ContainerBuilder builder =3D new =
AutoStartingContainerBuilder(new<br>GroovyContainer(.....));<br><br>I =
needed it for me because I kept running into situations =
where<br>parent.makeChildContainer() would cause all sorts of =
conniptions when both<br>the parent and child were deployed through the =
container builders; and my<br>&quot;don't change any behavior&quot; fix =
through the constructor args was __U G L<br>Y__.<br><br>Let me know if =
there are better options that you can =
see.<br><br><br>-Mike<br><br><br>----------------------------------------=
-----------------------------<br>To unsubscribe from this list, please =
visit:<br><br>&nbsp; &nbsp;<a =
href=3D"http://xircles.codehaus.org/manage_email" =
target=3D"_blank">http://xircles.codehaus.org/manage_email</a><br><br><o:=
p></o:p></p></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div></div></div></body></html>
------=_NextPart_000_004B_01CB909C.51495750--