﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>语源科技BlogJava-光着膀子写程序</title><link>http://www.blogjava.net/Hut/</link><description /><language>zh-cn</language><lastBuildDate>Tue, 28 Apr 2026 19:01:26 GMT</lastBuildDate><pubDate>Tue, 28 Apr 2026 19:01:26 GMT</pubDate><ttl>60</ttl><item><title>敏捷随想- -</title><link>http://www.blogjava.net/Hut/archive/2005/08/11/9788.html</link><dc:creator>Hut</dc:creator><author>Hut</author><pubDate>Thu, 11 Aug 2005 03:37:00 GMT</pubDate><guid>http://www.blogjava.net/Hut/archive/2005/08/11/9788.html</guid><wfw:comment>http://www.blogjava.net/Hut/comments/9788.html</wfw:comment><comments>http://www.blogjava.net/Hut/archive/2005/08/11/9788.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Hut/comments/commentRss/9788.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Hut/services/trackbacks/9788.html</trackback:ping><description><![CDATA[<font color="#000000" size="3">http://canonical.blogdriver.com/canonical/741069.html<br>
<br>
&nbsp; 敏捷(Agile)开发的灵魂是演化（evolution）,其具体的过程表现为迭代
(iteration)，迭代的每一步就是重构(refactor)，而单元测试(unit test)与持续集成(continuous
integration)模拟了程序生存的环境（约束），是merciless
refactoring的技术保障。从数学上我们知道迭代总有个收敛问题。一些重型方法将变化（无论是正方向还是反方向的）等价于风险，而倾向于消除开发
中的不确定性，其中的迭代是趋于迅速收敛的。敏捷的迭代是开放式的，强调拥抱变化。敏捷编程排斥过度设计，除了过度设计会增加成本之外，另一个原因就是过
度设计会阻碍重构，阻碍变化。敏捷的目标不是僵化的稳定性而是灵活的适应性。当然敏捷迭代本身并不能保证系统持久的适应性，即使是自然界中的迭代和演化，
失败的案例也是比比皆是。大量的生物物种在经历了历史的辉煌之后最终仍然难免被岁月所埋葬。<br>
<br>
</font><font color="#000000" size="3">&nbsp;&nbsp;&nbsp;
在哲学上，一个悖论式说法是有存在于无中，或者说简单才能更复杂。杯子是空的，所以能包容万物。现在什么都没做，将来才能根据需要决定如何去做。所谓鱼与
熊掌不可兼得，一旦做出了选择，可能意味着必须放弃将来进行其他选择的机会。简单的目的不仅仅是为了最快的完成当前的任务，而且要为将来保留变化的可能。
过分强调目的性，我想是违背了演化的本质。高手过招，最忌把招数用老。我们所要做的是尽量推迟决定的时刻，并切实的保证自己随时拥有选择的权利。<br>
<br>&nbsp;&nbsp;&nbsp;
多样性是在演化中生存的关键。但多样性不是后天的。生物学的实验证实，物种的变异并不是环境变化后发生的，而是始终存在着并隐藏着，环境仅仅起了检选和倍
增的作用。适应性的系统总要允许一定的灰色地带，有时do something for nothing.</font><br>
<img src ="http://www.blogjava.net/Hut/aggbug/9788.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Hut/" target="_blank">Hut</a> 2005-08-11 11:37 <a href="http://www.blogjava.net/Hut/archive/2005/08/11/9788.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>使用Ldap连接池</title><link>http://www.blogjava.net/Hut/archive/2005/08/01/8942.html</link><dc:creator>Hut</dc:creator><author>Hut</author><pubDate>Mon, 01 Aug 2005 09:21:00 GMT</pubDate><guid>http://www.blogjava.net/Hut/archive/2005/08/01/8942.html</guid><wfw:comment>http://www.blogjava.net/Hut/comments/8942.html</wfw:comment><comments>http://www.blogjava.net/Hut/archive/2005/08/01/8942.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Hut/comments/commentRss/8942.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Hut/services/trackbacks/8942.html</trackback:ping><description><![CDATA[<!--StartFragment -->&nbsp;来源：<A href="http://java.sun.com/products/jndi/tutorial/ldap/connect/pool.html">http://java.sun.com/products/jndi/tutorial/ldap/connect/pool.html</A><BR><BR>Sample：<BR><PRE>import javax.naming.*;<BR>import javax.naming.directory.*;<BR><BR>import java.util.Hashtable;<BR><BR>/**<BR> * Demonstrates how to enable connection pooling. Use debug option<BR> * to observe connection usage.<BR> *<BR> * usage: java -Dcom.sun.jndi.ldap.connect.pool.debug=fine UsePool<BR> */<BR>class UsePool {<BR>    public static void main(String[] args) {<BR>	// Set up environment for creating initial context<BR>	Hashtable env = new Hashtable(11);<BR>	env.put(Context.INITIAL_CONTEXT_FACTORY, <BR>	    "com.sun.jndi.ldap.LdapCtxFactory");<BR>	env.put(Context.PROVIDER_URL, "ldap://localhost:389/o=JNDITutorial");<BR><BR>	// Enable connection pooling<BR>	env.put("com.sun.jndi.ldap.connect.pool", "true");<BR><BR>	try {<BR>	    // Create one initial context (Get connection from pool)<BR>	    DirContext ctx = new InitialDirContext(env);<BR><BR>	    System.out.println(ctx.getAttributes("ou=NewHires"));<BR><BR>	    // do something useful with ctx<BR><BR>	    // Close the context when we're done<BR>	    ctx.close();   // Return connection to pool<BR><BR>	    // Create another initial context (Get connection from pool)<BR>	    DirContext ctx2 = new InitialDirContext(env);<BR><BR>	    System.out.println(ctx2.getAttributes("ou=People"));<BR><BR>	    // do something useful with ctx2<BR><BR>	    // Close the context when we're done<BR>	    ctx2.close();   // Return connection to pool<BR><BR>	} catch (NamingException e) {<BR>	    e.printStackTrace();<BR>	}<BR>    }<BR>}</PRE><A name=TIMEOUT>
<H4>Creation Timeout</H4></A>The pool of connections maintained by the LDAP service provider may be limited in size; this is described in detail in the <A href="http://java.sun.com/products/jndi/tutorial/ldap/connect/config.html">Connection Pooling Configuration</A> section. When connection pooling has been enabled and no pooled connection is available, the client application will block, waiting for an available connection. You can use the <TT>"com.sun.jndi.ldap.connect.timeout"</TT> environment property to specify how long to wait for a pooled connection. If you omit this property, the application will wait indefinitely. 
<P>This same property is also used to specify a timeout period for establishment of the LDAP connection, as described in the <A href="http://java.sun.com/products/jndi/tutorial/ldap/connect/create.html#TIMEOUT">Connection Creation</A> section. </P>
<H4>When Not to Use Pooling</H4>Pooled connections are intended to be reused. Therefore, if you plan to perform operations on a <TT>Context</TT> instance that might alter the underlying connection's state, then you should not use connection pooling for that <TT>Context</TT> instance. For example, if you plan to invoke the Start TLS extended operation on a <TT>Context</TT> instance, or plan to change security-related properties (such as <TT>"java.naming.security.principal"</TT> or <TT>"java.naming.security.protocol"</TT>) after the initial context has been created, you should not use connection pooling for that <TT>Context</TT> instance because the LDAP provider does not track any such state changes. If you use connection pooling in such situations, you might be compromising the security of your application.<BR><BR>----------------------------------------------------------------------------------------------------<BR>
<H2>Connection Pooling Configuration</H2><A href="http://java.sun.com/products/jndi/tutorial/ldap/connect/config.html">http://java.sun.com/products/jndi/tutorial/ldap/connect/config.html</A> <img src ="http://www.blogjava.net/Hut/aggbug/8942.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Hut/" target="_blank">Hut</a> 2005-08-01 17:21 <a href="http://www.blogjava.net/Hut/archive/2005/08/01/8942.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>