??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲91中文字幕无线码三区,国产日韩成人精品,精品少妇v888avhttp://www.aygfsteel.com/icestream/八戒的梦?农妇,山泉,有点?/description>zh-cnSat, 17 May 2025 22:31:20 GMTSat, 17 May 2025 22:31:20 GMT60Architexa的暴力破?/title><link>http://www.aygfsteel.com/icestream/archive/2010/06/15/323627.html</link><dc:creator>高老庄</dc:creator><author>高老庄</author><pubDate>Tue, 15 Jun 2010 09:34:00 GMT</pubDate><guid>http://www.aygfsteel.com/icestream/archive/2010/06/15/323627.html</guid><wfw:comment>http://www.aygfsteel.com/icestream/comments/323627.html</wfw:comment><comments>http://www.aygfsteel.com/icestream/archive/2010/06/15/323627.html#Feedback</comments><slash:comments>14</slash:comments><wfw:commentRss>http://www.aygfsteel.com/icestream/comments/commentRss/323627.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/icestream/services/trackbacks/323627.html</trackback:ping><description><![CDATA[ Architexa的前w是relo,q个工具在分析开源项目的源码时很好用,relo已经不再l护,变成了新的插件Architexa,其网址是http://www.architexa.com/,虽然说architexa东西不错Q可惜需要付?另外他的注册|站好像有问题,因此q评C做不了,无奈之下Q动了暴力破解的念头.下面x暴力破解的过E,需要的人可以参考下.<br /> 1.architexa 通过eclipse的update manager 下蝲?在eclipse_HOME/plugins会存在几个jar和目录,如下:<br /> <img alt="" src="http://www.aygfsteel.com/images/blogjava_net/icestream/201006/plusinsA.png" width="804" height="122" /><br /> <img alt="" src="http://www.aygfsteel.com/images/blogjava_net/icestream/201006/plusinsB.png" width="813" height="225" /><br /> 1.architexa 没有对编译后的代码؜?先用java decompiler 反编译出如下的类:<br /> <ul> <li>com.architexa.diagrams.RSECore 位于com.architexa.diagrams_1.2.2.201006051418.jar?</li> <li>com.architexa.rse.ConnectAccountDialog 位于com.architexa.intro_1.2.2.201006051418/ReloIntro.jar?/li> </ul> 2.修改RSECorecȝҎ:<br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 128, 128);"> 1</span> <span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">boolean</span><span style="color: rgb(0, 0, 0);"> validInstall()<br /> </span><span style="color: rgb(0, 128, 128);"> 2</span> <span style="color: rgb(0, 0, 0);">{<br /> </span><span style="color: rgb(0, 128, 128);"> 3</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(0, 0, 0);">!</span><span style="color: rgb(0, 0, 0);">AccountStatusUtils.testAccountValid()) {<br /> </span><span style="color: rgb(0, 128, 128);"> 4</span> <span style="color: rgb(0, 0, 0);">      String email </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> AccountSettings.getStoredAccountEmail();<br /> </span><span style="color: rgb(0, 128, 128);"> 5</span> <span style="color: rgb(0, 0, 0);">      AccountSettings.getStoredAccountPassword();<br /> </span><span style="color: rgb(0, 128, 128);"> 6</span> <span style="color: rgb(0, 0, 0);">      </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);"> ((email </span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">) </span><span style="color: rgb(0, 0, 0);">&&</span><span style="color: rgb(0, 0, 0);"> (email.length() </span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">))<br /> </span><span style="color: rgb(0, 128, 128);"> 7</span> <span style="color: rgb(0, 0, 0);">        AccountErrorMsgs.displayErr(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">Account Has Expired </span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /> </span><span style="color: rgb(0, 128, 128);"> 8</span> <span style="color: rgb(0, 0, 0);">      </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">;<br /> </span><span style="color: rgb(0, 128, 128);"> 9</span> <span style="color: rgb(0, 0, 0);">    }<br /> </span><span style="color: rgb(0, 128, 128);">10</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">true</span><span style="color: rgb(0, 0, 0);">;<br /> </span><span style="color: rgb(0, 128, 128);">11</span><span style="color: rgb(0, 0, 0);"> }<br /> </span><span style="color: rgb(0, 128, 128);">12</span> <span style="color: rgb(0, 0, 0);"><br /> </span></div> 中间的判断可以完全拿掉,修改为如下即?<br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 128, 128);">1</span> <span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">boolean</span><span style="color: rgb(0, 0, 0);"> validInstall()<br /> </span><span style="color: rgb(0, 128, 128);">2</span> <span style="color: rgb(0, 0, 0);">{<br /> </span><span style="color: rgb(0, 128, 128);">3</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">true</span><span style="color: rgb(0, 0, 0);">;<br /> </span><span style="color: rgb(0, 128, 128);">4</span> <span style="color: rgb(0, 0, 0);">}</span></div> <br /> 3.修改ConnectAccountDialogcȝ代码(反编译后的代码有炚w,q里不列Z)Q最l改成如下即?<br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 128, 128);">1</span> <span style="color: rgb(0, 0, 255);">protected</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);"> okPressed_Internal() {<br /> </span><span style="color: rgb(0, 128, 128);">2</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">.emailEntered </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">.emailField.getText();<br /> </span><span style="color: rgb(0, 128, 128);">3</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">.passwordEntered </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">.passwordField.getText();<br /> </span><span style="color: rgb(0, 128, 128);">4</span> <span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 128, 128);">5</span> <span style="color: rgb(0, 0, 0);">    AccountConnection ac </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> AccountConnection();<br /> </span><span style="color: rgb(0, 128, 128);">6</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">.enableOnOK) ac.setMenuToDisable(</span><span style="color: rgb(0, 0, 0);">!</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">.disableOnCancel);<br /> </span><span style="color: rgb(0, 128, 128);">7</span> <span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">super</span><span style="color: rgb(0, 0, 0);">.okPressed();<br /> </span><span style="color: rgb(0, 128, 128);">8</span> <span style="color: rgb(0, 0, 0);">}</span></div> <br /> ~译后将上述两个cL到对应的jar中,重启eclipse.<br /> <br /> 4.在architexa的认证对话框Q输入Q意email和password,architexa 重建烦?<br /> 5.在某个javacȝ上下文菜单中Q可以看到Open in Diagram 可以生成类的布局图,cd和序列图?可以通过工具栏上的button来输出图?<br /> <br /> 下面贴几个通过q个插g构成的图Q欣赏下<br /> <img alt="" src="http://www.aygfsteel.com/images/blogjava_net/icestream/201006/spring_class.png" width="975" height="477" /><br /> <img alt="" src="http://www.aygfsteel.com/images/blogjava_net/icestream/201006/spring_seq.png" width="932" height="1128" /><br /> <br /> <br /> <br /> <img src ="http://www.aygfsteel.com/icestream/aggbug/323627.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/icestream/" target="_blank">高老庄</a> 2010-06-15 17:34 <a href="http://www.aygfsteel.com/icestream/archive/2010/06/15/323627.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>hudson step by stephttp://www.aygfsteel.com/icestream/archive/2010/01/25/310763.html高老庄高老庄Mon, 25 Jan 2010 10:58:00 GMThttp://www.aygfsteel.com/icestream/archive/2010/01/25/310763.htmlhttp://www.aygfsteel.com/icestream/comments/310763.htmlhttp://www.aygfsteel.com/icestream/archive/2010/01/25/310763.html#Feedback0http://www.aygfsteel.com/icestream/comments/commentRss/310763.htmlhttp://www.aygfsteel.com/icestream/services/trackbacks/310763.html     使用:
    1.下蝲 
        hudson的官方网?a target="_blank">https://hudson.dev.java.net/下提供了下蝲
    2.安装
        hudson以war包的方式提供,因此安装方式极其单,直接攑ֈ服务器的相应目录?q里攑ֈtomcat的webapp?启动后,讉Khttp://localhost:8088/hudson 可以q入hudson的控制台面.
      
    4.l织待构建的目
        q里我们创徏一个最为简单的d.q个d的目的是构徏一个标准的java工程Q将其中的源码编译,打包{?
        回顾下一般的、最为简单的开发流E?开发h员开发代码,然后利用诸如ant,mvn{负责构建系l?然后执行试,最后发布到服务器上.通常Q每个项目都会有一个完整的脚本来自动化的做qg?如何驱动自动化脚本的执行(什么时间点,以什么频?理构徏l果)Q是hudson提供l我们的功能Qhudson不关注特定一ơ构建的内部q程,q对hudson是透明?目前Qhudson通过插g的方式,提供了对Zant 、mvn{常见构建工L支持.本质上,hudson是一个Q务管理和驱动执行工具,只不q,它驱动的软g开发流E中的构建等q程.
        准备:解决我们特定一ơ构ZQ做什么的问题.
        Z试的目的,我们创徏一个示例java工程,l构如下:
    
    此项目的采用ant,构徏,ant脚本如下:
    
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="build.hudsondemo">
    
<!-- ================================= 
          target: compile              
         ================================= 
-->
    
<target name="compile" depends="prepare" description="compile the project to the bin">
        
<javac debug="true" destdir="${basedir}/bin">
            
<src path="${basedir}/src" />
            
<src path="${basedir}/test"  />
            
<classpath>
                
<fileset dir="${basedir}/lib">
                    
<include name="*.jar"/>    
                
</fileset>
            
</classpath>
        
</javac>
    
</target>
    
    
<!-- ================================= 
          target: jar              
         ================================= 
-->
    
<target name="jar" depends="compile" description="jar the project">
        
<mkdir dir="${basedir}/target"/>
        
<jar  destfile="${basedir}/target/hudsondemo_${common.version}.jar">
            
<fileset dir="${basedir}/bin" />
        
</jar>
    
</target>
    
    
<!-- ================================= 
          target: prepare              
         ================================= 
-->
    
<target name="prepare" depends="clean"  description="prepare the jar to the lib">
        
<copy todir="${basedir}/lib">
            
<fileset dir="${common.libs.dir}">
                
<include name="*.jar"/>
            
</fileset>
        
</copy>
    
</target>
    
    
<!-- ================================= 
              target: prepare              
             ================================= 
-->
    
<target name="clean">
        
<delete dir="${basedir}/bin"></delete>
        
<delete dir="${basedir}/lib"></delete>
        
        
<mkdir dir="${basedir}/bin" />
        
<mkdir dir="${basedir}/lib" />
    
</target>
</project>

    Z说明问题Q我Ҏ的设定两个构建时参数:
    common.libs.dir 指出从什么位|获取编译项目所需要的jar
    common.version 指出构徏的jar的版本号.

    5.配置hudson的通用配置
        Ҏ使用插g的多,通用配置数量同,对上q的CZ目,我们需要配|?nbsp;ant 和jdk(可?如果需要指定用特定的jdk构徏pȝ的话).
        点击hudson主页面右上角的manger hudson,q入配置面,有多w|可以处理,但是目前仅仅需要用到System configurate 功能.在System configurate面Q可以如下的配置:

    
    贴此囄目的是需要关注下home directoryq个配置Q默认是当前用户目录下的.hudson,可以更改Q一般在环境变量中设定一个HUSDON_HOME卛_Q同时将原有目录下文件copy到新目录下,重启hudson卛_.也可以用其他的方式,比如讑֮容器参数{来指定.
    上述配置取默认既?
    
    配置jdk:
    
    
    配置ant:
    
    
     
   6. 创徏构徏d
        hudson能提供的功能都以d存在.点击右上角的new job,构Z个新的Q?
    
    输入d名称Qƈ选择W二?

    配置d:解决如何安排构徏d的执行的问题.
    首先Q我们需要指定如何保留构建历?一U是Z旉的,保留多少天,一U是Zơ数的,保留自当前开始多次以内?q里我们选择保留最?ơ构?
    
    再次Q我们需要指定利用什么版本ant执行构徏Q同时指定构建时参数.
    
    ant version 版本中,使用了在通用配置部分配置的ant.
    targets 中,指明了,每次构徏旉要完成的target,可以指定多个target.
    build file 指明了,使用什么样的ant完成实际的构E?
    properties 指明了ant脚本中的使用的运行时参数.q些参数可以使用变量替换,hudson 会解析出实际的值再传给ant.

    q就是这个Q务可以执行的最基本配置,保存,q点d上角的build new ,可以立即执行一个构?构徏l果如下:
    
    U色表示p|构徏,如果p|Q可以在%HUDSON_HOME%\jobs\下查看对应Q务构建的日志来排查问?
    
    8. 两个可能l常需要关注的配置.
    1.每个job?workspace.
        
        如果不指定绝对\径,配置的ant{脚本就是相对这个工作空间的.在上面的例子中工作空间的用处不大Q但是在一些其他类型的构徏Q比如从svn中签Z码构建时Q用处就体现出来了,另外,一些hudson的插Ӟ所利用的文?构徏脚本生成,q些插g不会d注文件生,而是对这些文件做二次处理)都是攑ֈ工作I间?工作I间相当与构建系l和hudson的一个交中?推荐是每个项目有自己独立的工作空?
    2.自动构徏的频率设?br />     
    也就是什么时候触发构建,三种方式:
        当别的项目构建完毕后发生构徏
        利用cron表到式来指定频率,对cron表达式不熟悉的话Q可以参考quartz(hudson内部使用的调度框?相关的文?
        scm(svn、cvs{?的状态,如果到变化Q自动发生构?

    借助husdon,基本能做到无人值守构徏和部|Ԍ不少插g可以利用Q也可以开发自q插g.上面的仅仅是一个例子而与Q如果要应对实际工作中的问题Q得好好研究才行.
    



高老庄 2010-01-25 18:58 发表评论
]]>
osgi d自定义命?/title><link>http://www.aygfsteel.com/icestream/archive/2010/01/22/310549.html</link><dc:creator>高老庄</dc:creator><author>高老庄</author><pubDate>Fri, 22 Jan 2010 09:34:00 GMT</pubDate><guid>http://www.aygfsteel.com/icestream/archive/2010/01/22/310549.html</guid><wfw:comment>http://www.aygfsteel.com/icestream/comments/310549.html</wfw:comment><comments>http://www.aygfsteel.com/icestream/archive/2010/01/22/310549.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/icestream/comments/commentRss/310549.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/icestream/services/trackbacks/310549.html</trackback:ping><description><![CDATA[<p>    在用osgi实现?可以使用诸如install,start,stopq样的命令来理bundle或者调用服?有时我们可能x加一些自定义命o.可以通过如下的步骤来实现<br />     1.~写一个服务,实现如下的接?/p> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #008080">1</span><img id="Codehighlighter1_33_169_Open_Image" onclick="this.style.display='none'; Codehighlighter1_33_169_Open_Text.style.display='none'; Codehighlighter1_33_169_Closed_Image.style.display='inline'; Codehighlighter1_33_169_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_33_169_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_33_169_Closed_Text.style.display='none'; Codehighlighter1_33_169_Open_Image.style.display='inline'; Codehighlighter1_33_169_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">interface</span><span style="color: #000000"> CommandProvider </span><span id="Codehighlighter1_33_169_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img alt="" src="http://www.aygfsteel.com/Images/dot.gif" /></span><span id="Codehighlighter1_33_169_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">2</span><span style="color: #000000"><img id="Codehighlighter1_36_140_Open_Image" onclick="this.style.display='none'; Codehighlighter1_36_140_Open_Text.style.display='none'; Codehighlighter1_36_140_Closed_Image.style.display='inline'; Codehighlighter1_36_140_Closed_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_36_140_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_36_140_Closed_Text.style.display='none'; Codehighlighter1_36_140_Open_Image.style.display='inline'; Codehighlighter1_36_140_Open_Text.style.display='inline';" alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span><span id="Codehighlighter1_36_140_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff">/** */</span><span id="Codehighlighter1_36_140_Open_Text"><span style="color: #008000">/**</span><span style="color: #008000"><br /> </span><span style="color: #008080">3</span><span style="color: #008000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     Answer a string (may be as many lines as you like) with help<br /> </span><span style="color: #008080">4</span><span style="color: #008000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />     texts that explain the command.<br /> </span><span style="color: #008080">5</span><span style="color: #008000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />     </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">6</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> String getHelp();<br /> </span><span style="color: #008080">7</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /> </span><span style="color: #008080">8</span><span style="color: #000000"><img alt="" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span></div> <p><br /> 如果惛_义helloҎ,可以如下实现该接?<br /> </p> <p> </p> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #0000ff">import</span><span style="color: #000000"> java.util.Dictionary;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> java.util.Properties;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> org.eclipse.osgi.framework.console.CommandInterpreter;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> org.eclipse.osgi.framework.console.CommandProvider;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> org.osgi.framework.BundleActivator;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> org.osgi.framework.BundleContext;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> org.osgi.framework.Constants;<br /> <img id="Codehighlighter1_368_1265_Open_Image" onclick="this.style.display='none'; Codehighlighter1_368_1265_Open_Text.style.display='none'; Codehighlighter1_368_1265_Closed_Image.style.display='inline'; Codehighlighter1_368_1265_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_368_1265_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_368_1265_Closed_Text.style.display='none'; Codehighlighter1_368_1265_Open_Image.style.display='inline'; Codehighlighter1_368_1265_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> Activator </span><span style="color: #0000ff">implements</span><span style="color: #000000"> BundleActivator,CommandProvider  </span><span id="Codehighlighter1_368_1265_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_368_1265_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    BundleContext bundleContext</span><span style="color: #000000">=</span><span style="color: #0000ff">null</span><span style="color: #000000">;<br /> <img id="Codehighlighter1_464_827_Open_Image" onclick="this.style.display='none'; Codehighlighter1_464_827_Open_Text.style.display='none'; Codehighlighter1_464_827_Closed_Image.style.display='inline'; Codehighlighter1_464_827_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_464_827_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_464_827_Closed_Text.style.display='none'; Codehighlighter1_464_827_Open_Image.style.display='inline'; Codehighlighter1_464_827_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> start(BundleContext context) </span><span style="color: #0000ff">throws</span><span style="color: #000000"> Exception </span><span id="Codehighlighter1_464_827_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_464_827_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        System.out.println(</span><span style="color: #000000">"</span><span style="color: #000000">start<img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000">context.getBundle().getLocation());<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        bundleContext</span><span style="color: #000000">=</span><span style="color: #000000">context;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        context.registerService(CommandProvider.</span><span style="color: #0000ff">class</span><span style="color: #000000">.getName(), </span><span style="color: #0000ff">new</span><span style="color: #000000"> AntherCommandProvider(), </span><span style="color: #0000ff">null</span><span style="color: #000000">);<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        Dictionary dictionary</span><span style="color: #000000">=</span><span style="color: #0000ff">new</span><span style="color: #000000"> Properties();<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        dictionary.put(Constants.SERVICE_RANKING, </span><span style="color: #000000">10</span><span style="color: #000000">);<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        context.registerService(CommandProvider.</span><span style="color: #0000ff">class</span><span style="color: #000000">.getName(), </span><span style="color: #0000ff">this</span><span style="color: #000000">,dictionary);<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img id="Codehighlighter1_888_958_Open_Image" onclick="this.style.display='none'; Codehighlighter1_888_958_Open_Text.style.display='none'; Codehighlighter1_888_958_Closed_Image.style.display='inline'; Codehighlighter1_888_958_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_888_958_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_888_958_Closed_Text.style.display='none'; Codehighlighter1_888_958_Open_Image.style.display='inline'; Codehighlighter1_888_958_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> stop(BundleContext context) </span><span style="color: #0000ff">throws</span><span style="color: #000000"> Exception </span><span id="Codehighlighter1_888_958_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_888_958_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        System.out.println(</span><span style="color: #000000">"</span><span style="color: #000000">end<img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000">context.getBundle().getLocation());<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img id="Codehighlighter1_986_1032_Open_Image" onclick="this.style.display='none'; Codehighlighter1_986_1032_Open_Text.style.display='none'; Codehighlighter1_986_1032_Closed_Image.style.display='inline'; Codehighlighter1_986_1032_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_986_1032_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_986_1032_Closed_Text.style.display='none'; Codehighlighter1_986_1032_Open_Image.style.display='inline'; Codehighlighter1_986_1032_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> String getHelp() </span><span id="Codehighlighter1_986_1032_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_986_1032_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">you are using the help command</span><span style="color: #000000">"</span><span style="color: #000000">;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> _helloa(CommandInterpreter intp)<br /> <img id="Codehighlighter1_1083_1140_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1083_1140_Open_Text.style.display='none'; Codehighlighter1_1083_1140_Closed_Image.style.display='inline'; Codehighlighter1_1083_1140_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_1083_1140_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1083_1140_Closed_Text.style.display='none'; Codehighlighter1_1083_1140_Open_Image.style.display='inline'; Codehighlighter1_1083_1140_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span id="Codehighlighter1_1083_1140_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1083_1140_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        intp.println(</span><span style="color: #000000">"</span><span style="color: #000000">helloa </span><span style="color: #000000">"</span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #0000ff">this</span><span style="color: #000000">.getClass().getName());<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    <br /> <img id="Codehighlighter1_1206_1263_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1206_1263_Open_Text.style.display='none'; Codehighlighter1_1206_1263_Closed_Image.style.display='inline'; Codehighlighter1_1206_1263_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_1206_1263_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1206_1263_Closed_Text.style.display='none'; Codehighlighter1_1206_1263_Open_Image.style.display='inline'; Codehighlighter1_1206_1263_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> _hello(CommandInterpreter intp) </span><span style="color: #0000ff">throws</span><span style="color: #000000"> Exception </span><span id="Codehighlighter1_1206_1263_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1206_1263_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        intp.println(</span><span style="color: #000000">"</span><span style="color: #000000">hello </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #0000ff">this</span><span style="color: #000000">.getClass().getName());<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span></div> <p><br />  </p> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #0000ff">import</span><span style="color: #000000"> org.eclipse.osgi.framework.console.CommandInterpreter;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> org.eclipse.osgi.framework.console.CommandProvider;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /> <img id="Codehighlighter1_184_336_Open_Image" onclick="this.style.display='none'; Codehighlighter1_184_336_Open_Text.style.display='none'; Codehighlighter1_184_336_Closed_Image.style.display='inline'; Codehighlighter1_184_336_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_184_336_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_184_336_Closed_Text.style.display='none'; Codehighlighter1_184_336_Open_Image.style.display='inline'; Codehighlighter1_184_336_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> AntherCommandProvider </span><span style="color: #0000ff">implements</span><span style="color: #000000"> CommandProvider </span><span id="Codehighlighter1_184_336_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_184_336_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> _hello(CommandInterpreter intp)<br /> <img id="Codehighlighter1_233_289_Open_Image" onclick="this.style.display='none'; Codehighlighter1_233_289_Open_Text.style.display='none'; Codehighlighter1_233_289_Closed_Image.style.display='inline'; Codehighlighter1_233_289_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_233_289_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_233_289_Closed_Text.style.display='none'; Codehighlighter1_233_289_Open_Image.style.display='inline'; Codehighlighter1_233_289_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span id="Codehighlighter1_233_289_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_233_289_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        intp.println(</span><span style="color: #000000">"</span><span style="color: #000000">hello </span><span style="color: #000000">"</span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #0000ff">this</span><span style="color: #000000">.getClass().getName());<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img id="Codehighlighter1_316_334_Open_Image" onclick="this.style.display='none'; Codehighlighter1_316_334_Open_Text.style.display='none'; Codehighlighter1_316_334_Closed_Image.style.display='inline'; Codehighlighter1_316_334_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_316_334_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_316_334_Closed_Text.style.display='none'; Codehighlighter1_316_334_Open_Image.style.display='inline'; Codehighlighter1_316_334_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> String getHelp() </span><span id="Codehighlighter1_316_334_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_316_334_Open_Text"><span style="color: #000000">{<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">;<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000"><br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span></div> <p><br /> 其中,通过CommandInterpretercd的nextArgument()Ҏ可以q代出所有的命o参数.<br />     2.注册服务<br />         如果不将该接口注册ؓ服务Q这个hello命o不产生M作用.注册的服务名U必Lorg.eclipse.osgi.framework.console.CommandProvider.<br />        当系l中存在多个此接口的实现?可以通过SERVICE_RANKING属性来军_了命令执行的序,既有最高值的服务被优先执行.q种方式可以重蝲pȝ中已l存在的同名服务.<br />      3.执行命o<br />     请仔l体会输出结?br /> <img alt="" src="http://www.aygfsteel.com/images/blogjava_net/icestream/out.PNG" border="0" /><br /> </p> <img src ="http://www.aygfsteel.com/icestream/aggbug/310549.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/icestream/" target="_blank">高老庄</a> 2010-01-22 17:34 <a href="http://www.aygfsteel.com/icestream/archive/2010/01/22/310549.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>q_、品、项目三层结构下的配|解x?/title><link>http://www.aygfsteel.com/icestream/archive/2009/11/04/301078.html</link><dc:creator>高老庄</dc:creator><author>高老庄</author><pubDate>Wed, 04 Nov 2009 07:45:00 GMT</pubDate><guid>http://www.aygfsteel.com/icestream/archive/2009/11/04/301078.html</guid><wfw:comment>http://www.aygfsteel.com/icestream/comments/301078.html</wfw:comment><comments>http://www.aygfsteel.com/icestream/archive/2009/11/04/301078.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/icestream/comments/commentRss/301078.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/icestream/services/trackbacks/301078.html</trackback:ping><description><![CDATA[先谈下这个解x案的背景:<br />     假设一个公司的产品遵@的是先有基础q_,然后在此q_上构Z同的产品,最后每一个品被实施到特定的目,那么Q他们就构成了一U层ơ化的结?每一个层?需要覆盖一些上一层次的配|或者创建新的配|?如何分割层次间的影响从而保证层ơ间的独立性,是一个挑?<br />     L层次,可能有多个模块或者组件构成,不同的组仉Q配|的cd可能一P但是配置的数据不一?那么,如果在配|某个模块时Q不比考虑其他模块的配|情况,那么q个模块拥有开发时的独立?当组件被集成到同一层次部vq行Ӟ配置的合q和重组是一个问?q且Q组仉可能存在依赖关系,q种依赖关系同时产生了依赖组仉配置加蝲的优先问题.<br />     成熟的YӞ一般不会直接将W三方的软g集成Q而是其装后在U_q来,W三方组件的配置往往不具备配|的层次化或者模块独立?在设计第三方lg的集成策略时Q需要考虑使其拥有上述两种能力.<br />     解决上述问题Q方式有很多U?我们谈论比较Ҏ实现的一U?<br />     q种解决Ҏ的基本思\如下:<br />     首先Q设计一个特定的扩展名称的配|文?模块配置索引文g,MCIF,xml格式)Q此配置文g面向的是lgU别Q即每个lg定义自己的MCIF.MCIF中定义若q配|类?卛_U空?每一个名U空间负责完成一c配|,一?一个名U空间对应一个配|获取接?q个名称I间中仅仅配|所x的配|的文g的相对位|?相对此MCIF),q样Q最大化的减了不同配置文g格式对MCIF的媄?<br />     每一个MCIF的根元素拥有一个parent属?指向了上一层次,同一层次的MCIF的parent属性都相同.通过parent属性,配置的层ơ化׃是问题了.<br />     MCIF有两个特D的名称I间:<br />     1.register 定义了所支持的名U空间及其对应的配置解析?q样,此配|框架就可以允许对名U空间进行扩?<br />     2.depends 定义了同一层次的模块间的依赖关p?q个是可选的Q如果没有实现或者配|,同一层次的module即ؓq?<br />     <br />     当系l启动时,扫描所有的MCIF,q根据parent属性解析出一个层ơ关p?Ҏ一个层ơ下module,参考相应的depends讄定义Z个依赖关p?<br />     当请求某特定的配|时,Ҏ上述的两个关pd成配|的l合Qƈq回l用?<br />     <br />     公司最q的重构中,Zq个思想开发的配置框Ӟ很好完成了多层次Q多lg的配|覆盖问?配置相对以前更清晰、简单,配置q程中的x点大大减? <img src ="http://www.aygfsteel.com/icestream/aggbug/301078.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/icestream/" target="_blank">高老庄</a> 2009-11-04 15:45 <a href="http://www.aygfsteel.com/icestream/archive/2009/11/04/301078.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>开博手?/title><link>http://www.aygfsteel.com/icestream/archive/2009/11/01/300546.html</link><dc:creator>高老庄</dc:creator><author>高老庄</author><pubDate>Sun, 01 Nov 2009 03:13:00 GMT</pubDate><guid>http://www.aygfsteel.com/icestream/archive/2009/11/01/300546.html</guid><wfw:comment>http://www.aygfsteel.com/icestream/comments/300546.html</wfw:comment><comments>http://www.aygfsteel.com/icestream/archive/2009/11/01/300546.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/icestream/comments/commentRss/300546.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/icestream/services/trackbacks/300546.html</trackback:ping><description><![CDATA[<p>        工作三年有余,接触的东襉K不?U下研究不少,可惜工作中很?随着旉的久q而逐渐忘却,一直有个想?能讲所学所思整理出?以便日后参考查?<br />         长久以来Q看别h的blog不少,虽然有深度的原创不多,也l了我莫大的帮助,本着取于?回馈于斯的精?军_也在|上选择一片信手涂鸦之?几经斟酌,最l敲定了blogjava,希望能将q个blog坚持下去,见证一个尘世迷途小卒的成长历程.<br />          希望不至于虎头蛇?that't all!<br />         <br />        </p> <img src ="http://www.aygfsteel.com/icestream/aggbug/300546.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/icestream/" target="_blank">高老庄</a> 2009-11-01 11:13 <a href="http://www.aygfsteel.com/icestream/archive/2009/11/01/300546.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> վ֩ģ壺 <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ĺ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">¤</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">üɽ</a>| <a href="http://" target="_blank">ũ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ʯ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">˳</a>| <a href="http://" target="_blank">лͨ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ˮ</a>| <a href="http://" target="_blank">Ž</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">绯</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">⿪</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">¡</a>| <a href="http://" target="_blank">ֵ</a>| <a href="http://" target="_blank">°Ͷ</a>| <a href="http://" target="_blank">Ƹ</a>| <a href="http://" target="_blank">ͨ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ҵ</a>| <a href="http://" target="_blank">ͩ</a>| <a href="http://" target="_blank"></a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>