??xml version="1.0" encoding="utf-8" standalone="yes"?>成人福利在线,国产福利电影一区二区三区,国产精品短视频http://www.aygfsteel.com/JetGeng/category/30099.html我的Java天堂zh-cnSat, 23 Jul 2011 17:20:04 GMTSat, 23 Jul 2011 17:20:04 GMT60Gemini试工?/title><link>http://www.aygfsteel.com/JetGeng/archive/2011/07/22/354828.html</link><dc:creator>Jet Geng</dc:creator><author>Jet Geng</author><pubDate>Thu, 21 Jul 2011 17:01:00 GMT</pubDate><guid>http://www.aygfsteel.com/JetGeng/archive/2011/07/22/354828.html</guid><wfw:comment>http://www.aygfsteel.com/JetGeng/comments/354828.html</wfw:comment><comments>http://www.aygfsteel.com/JetGeng/archive/2011/07/22/354828.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/JetGeng/comments/commentRss/354828.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/JetGeng/services/trackbacks/354828.html</trackback:ping><description><![CDATA[<br /> <div id="wmqeeuq" class="body"> <div class="wmqeeuq" id="gemini" class="section"> <h1>Gemini试工?a title="怹链接x? href="#gemini" class="headerlink">¶</a></h1> <table rules="none" frame="void" class="docutils field-list"> <colgroup><col class="field-name"> <col class="field-body"> </colgroup> <tbody valign="top"> <tr class="field"> <th class="field-name">??</th> <td class="field-body">Jet Geng</td> </tr> <tr class="field"> <th class="field-name">??</th> <td class="field-body">2011-07-22</td> </tr> </tbody> </table> <div class="wmqeeuq" id="id1" class="section"> <h2>概述<a title="怹链接x? href="#id1" class="headerlink">¶</a></h2> <p>?<em>Blueprint</em> h中我们已l成功的通过 <em>Blueprint</em> 容器创徏了一个POJO。我们只是通过log的方式查看到我们的POJO已经被创Z。无法深入的M解容器内部Bean的运行状态和行ؓ? 所以才有必要创Z个Gemini控制台这LE序。这个控制台最初的需求是Q?/p> <blockquote> <div> <ul class="simple"> <li>能够动态查看特定的Bean是否被创建?/li> <li>能够动态的获取特定的Bean?/li> <li>能够查特定Bean的行为是否正?/li> </ul> </div> </blockquote> </div> <div class="wmqeeuq" id="id2" class="section"> <h2>解决Ҏ(gu)<a title="怹链接x? href="#id2" class="headerlink">¶</a></h2> <dl class="docutils"> <dt>Z解决以上的问题。我做了一个小工具?q个工L目的让客L动态脚本能在最l的目标环境中运行。用方式如下:</dt> <dd> <ol class="first last arabic simple"> <li>?git://github.com/jetgeng/OSGi.git 下蝲 <strong>org.gunn.gemini.console</strong> ?<strong>org.codehaus.groovy</strong> q两个项目?/li> <li>q把q两目加入C的TargetPlatform中?/li> <li>使用 <strong>invokegv</strong> 来运行groovy脚本? <ol class="arabic"> <li>直接在命令行输入脚本。例如: <tt class="docutils literal"><span id="wmqeeuq" class="pre">invokegv</span> <span id="wmqeeuq" class="pre">print</span> <span id="wmqeeuq" class="pre">act.getBean(''myPOJO'')</span></tt></li> <li>通过输入Groovy文g。例如: <tt class="docutils literal"><span id="wmqeeuq" class="pre">invokegv</span> <span id="wmqeeuq" class="pre">file:///Users/Puer/.../script.groovy</span></tt></li> </ol> </li> </ol> </dd> </dl> <div id="wmqeeuq" class="admonition note"> <p class="first admonition-title">注解</p> <p class="last">在Groovy脚本中有一个内建的变量 <strong>act</strong> Q?他又一个叫?<strong>getBean</strong> 的方法。通过q个Ҏ(gu)你可以获得当?<strong>OSGi</strong> q_中所有的BlueprintContainer中的lg。他的输入参数时Bean或Service的id? 如果是用Groovy文g的Ş式,注意文g的url格式。他是通过如下的正则表辑ּ <tt class="docutils literal"><span id="wmqeeuq" class="pre">file:\\/{2}(\\/[:\\w\\.]+)+</span></tt> q行验证的。ƈ且\径中暂时不支持中文?/p> </div> <p>q个周末(23?4?完成一个简单的录屏Q来演示q个工L使用?/p> </div> </div> </div> <img src ="http://www.aygfsteel.com/JetGeng/aggbug/354828.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/JetGeng/" target="_blank">Jet Geng</a> 2011-07-22 01:01 <a href="http://www.aygfsteel.com/JetGeng/archive/2011/07/22/354828.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Blueprint 使用手记http://www.aygfsteel.com/JetGeng/archive/2011/07/10/354034.htmlJet GengJet GengSun, 10 Jul 2011 03:06:00 GMThttp://www.aygfsteel.com/JetGeng/archive/2011/07/10/354034.htmlhttp://www.aygfsteel.com/JetGeng/comments/354034.htmlhttp://www.aygfsteel.com/JetGeng/archive/2011/07/10/354034.html#Feedback0http://www.aygfsteel.com/JetGeng/comments/commentRss/354034.htmlhttp://www.aygfsteel.com/JetGeng/services/trackbacks/354034.html Blueprint 使用手记 Jet Geng
July 10, 2011
Blueprint ?OSGi Service Platform Enterprise Specification 标准的一 部分。很多最?jng)_践中也都推荐在应用程序中使用他。最q在目中用?来发布和应用服务。感觉效果不错。所以就有了q篇使用手记!Ƣ迎各位 看官拍砖!
2 配置环境
我们在前期找C两个 Blueprint 的实?一个是 Apache ?aries,?外一个就?Eclipse ?Gemini。最后选择?Gemini。做L军_Z 两点考虑:
• Blueprint的标准就是由Spring提出?br /> • Gemini的初始代码由Srping所捐献?下面我就单介l一下环境的配置q程:
• 从http://eclipse.org/gemini/ 下蝲 Gemini 的合适的版本。我?采用的是 1.0.0M1。ƈ解压到\?A
• 从http://static.springsource.org/downloads/nightly/milestone-download. php下蝲 spring-osgi-2.0.0.M1-with-dependencies。ƈ解压到\?B?他里面包括了 Gemini 所依赖?bundle。说白了也就?SpringFrame- work?br /> • Eclipse 中新Z?Target Platform。把上述的\?A?B 加入到新 建的 Target Platform 中去?br /> • 选择新徏?Target Platform 为当前活动的 Platform?3 启航
个h理解 Gemini 是 OSGi 世界中的 IOC。既然是一?IOC 框架,?我们׃创徏一?Bean 开始吧!

3.1    创徏一?Bean 首先我们来看一下我们要存入 Container 中的 POJO?br /> Listing 1: POJOWillInContainer.java
package org.gunn.gemini.demo;
import org.slf4j.Logger; import org.slf4j.LoggerFactory; /**
* This pojo will create by blueprint container * 
@author Jet Geng * */
public class POJOWillInContainer { private Logger logger =
}
LoggerFactory.getLogger(POJOWillInContainer.
class); private String name ;
private String age;
public void setName(String name) { logger.info("the new name is:" + name); this.name = name;
}
public void setAge(String age) { logger.info("the new age value is:" + age); this.age = age;
}

q个񔽎单的一?POJO,我们如何通过 Gemini 来创Z?我们通过 一个简单的配置文g。具体如下?br /> Listing 2: pojoconfig.xml

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
    
<bean id="myPOJO" class="org.gunn.gemini.demo.POJOWillInContainer" >
        
<property name="name" value="JetGeng"/>
        
<property name="age" value="32"/>
    
</bean>
</blueprint>

用过 spring 的兄?W一眼就能看明白q个配置文g说的是什么。其实就 是创Z一?bean。到q里,我们所需要做的工作其实就已经完成了。下 面就可以通过 Debug 来启动了?br /> 3.2    q行 Blueprint 容器 首先?pojoconfig.xml 文g攑ֈ project path/OSGi INF/blueprint 目录
下。或者在 MANiFEST.MF 文g中通过如下语句q行指定?Blueprint-Bundle: config/account-data-context.xml, config/osgi-*.xml
更多内容参考http://www.eclipse.org/gemini/blueprint/documentation/ reference/1.0.0.RC1/html/app-deploy.html中的 8.2 Blueprint Manifest Configuration Comparison。好?我们可以启动我们的应用程序了。ؓ?能够?blueprint 利的跑h,我们必须要把 blueprint 相关 bundle 以及 他所依赖?bundle 都加入到q行时中?按照上图配置?点击q行。我?br /> Figure 1: Debug 配置

在控制台得到如下内宏V?br />
控制C的黑色行昄我们?POJO 已经?BlueprintContainer 创徏

?q且讑֮了相兛_性?br /> .
q个部分的全部代码已l放C git://github.com/jetgeng/OSGi.git 中了?感兴的{子可以 down 下来玩玩?img src ="http://www.aygfsteel.com/JetGeng/aggbug/354034.html" width = "1" height = "1" />

Jet Geng 2011-07-10 11:06 发表评论
]]>
关于《Developing Eclipse/OSGi Web Applications Part》一文中的例?/title><link>http://www.aygfsteel.com/JetGeng/archive/2008/03/15/186494.html</link><dc:creator>Jet Geng</dc:creator><author>Jet Geng</author><pubDate>Sat, 15 Mar 2008 07:33:00 GMT</pubDate><guid>http://www.aygfsteel.com/JetGeng/archive/2008/03/15/186494.html</guid><wfw:comment>http://www.aygfsteel.com/JetGeng/comments/186494.html</wfw:comment><comments>http://www.aygfsteel.com/JetGeng/archive/2008/03/15/186494.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/JetGeng/comments/commentRss/186494.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/JetGeng/services/trackbacks/186494.html</trackback:ping><description><![CDATA[<span style="font-size: 11pt; font-family: 宋体;">关于?/span><span style="font-size: 11pt; font-family: "Times New Roman";" lang="EN-US">Developing Eclipse/OSGi Web Applications Part</span><span style="font-size: 11pt; font-family: 宋体;">》一文中的例?br /> <br /> </span> <p class="MsoNormal"><span style="font-family: 宋体;">q来看看?/span><span lang="EN-US">OSGI</span><span style="font-family: 宋体;">?/span><span lang="EN-US">Web</span><span style="font-family: 宋体;">开发中的应用。看到这个方面的东西肯定会搜?/span><span lang="EN-US">EclipseZone</span><span style="font-family: 宋体;">上面的一文章,他叫?/span><span lang="EN-US">Developing Eclipse/OSGI Web Application</span><span style="font-family: 宋体;">》。说实话q个文章写的真的没说的,入出的同时还l你真正带来不少好东ѝ他的所有的内容是围l着一个叫</span><span lang="EN-US">Rsp</span><span style="font-family: 宋体;">的例子进行的。这个例子在</span><span lang="EN-US"><a >http://sourceforge.net/project/showfiles.php?group_id=122298</a> </span><span style="font-family: 宋体;">处可以下载到?/span></p> <span style="font-size: 10.5pt; font-family: "Times New Roman";" lang="EN-US"><!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter" /> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0" /> <v:f eqn="sum @0 1 0" /> <v:f eqn="sum 0 0 @1" /> <v:f eqn="prod @2 1 2" /> <v:f eqn="prod @3 21600 pixelWidth" /> <v:f eqn="prod @3 21600 pixelHeight" /> <v:f eqn="sum @0 0 1" /> <v:f eqn="prod @6 1 2" /> <v:f eqn="prod @7 21600 pixelWidth" /> <v:f eqn="sum @8 21600 0" /> <v:f eqn="prod @7 21600 pixelHeight" /> <v:f eqn="sum @10 21600 0" /> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" /> <o:lock v:ext="edit" aspectratio="t" /> </v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" style='width:414.75pt; height:68.25pt'> <v:imagedata src="file:///C:/DOCUME~1/user/LOCALS~1/Temp/msoclip1/01/clip_image001.jpg" o:title="Wor243" /> </v:shape><![endif]--><!--[if !vml]--><img src="http://www.aygfsteel.com/images/blogjava_net/jetgeng/Eclipse/rsp_download.jpg" alt="" border="0" /><!--[endif]--></span><br /> <p class="MsoNormal"><span style="font-family: 宋体;">q里我下载了</span><span lang="EN-US">rspDemo-0.2.zip</span><span style="font-family: 宋体;">q个包。按照要求把包打开Qƈ且运行。果然可以运行,q且能够得到文中所说的l果?/span></p> <span style="font-size: 10.5pt; font-family: 宋体;">下面我们来看看解压后的文g夹:<br /> <img src="http://www.aygfsteel.com/images/blogjava_net/jetgeng/Eclipse/rsp_folder.JPG" alt="" border="0" /><br /> </span><span style="font-size: 10.5pt; font-family: 宋体;">q个里面不光包括了示例代码还包含了一?/span><span style="font-size: 10.5pt; font-family: "Times New Roman";" lang="EN-US">tomcat-5.5.15</span><span style="font-size: 10.5pt; font-family: 宋体;">生怕被人机器上没有?/span><span style="font-size: 10.5pt; font-family: "Times New Roman";" lang="EN-US">tomcat</span><span style="font-size: 10.5pt; font-family: 宋体;">。好了,把我自己?/span><span style="font-size: 10.5pt; font-family: "Times New Roman";" lang="EN-US">eclipse</span><span style="font-size: 10.5pt; font-family: 宋体;">?/span><span style="font-size: 10.5pt; font-family: "Times New Roman";" lang="EN-US">workspace</span><span style="font-size: 10.5pt; font-family: 宋体;">讄?/span><span style="font-size: 10.5pt; font-family: "Times New Roman";" lang="EN-US">c:\rsp\workspace</span><span style="font-size: 10.5pt; font-family: 宋体;">。这h得C一个如下图的工作界面:<br /> <img src="http://www.aygfsteel.com/images/blogjava_net/jetgeng/Eclipse/rsp_workspace.jpg" alt="" border="0" /><br /> </span> <p class="MsoNormal"><span style="font-family: 宋体;">q个时候我不想使用</span><span lang="EN-US">rsp</span><span style="font-family: 宋体;">中自己带的那?/span><span lang="EN-US">tomcat</span><span style="font-family: 宋体;">Q我惌己已l有?/span><span lang="EN-US">tomcat</span><span style="font-family: 宋体;">。就在这个时候我遇到问题了。什么问题呢Q我们来看看启动时的</span><span lang="EN-US">log</span></p> <p class="MsoNormal" style="text-align: left;" align="left"><span style="font-size: 8pt; font-family: 宋体; color: black;">严重</span><span style="font-size: 8pt; font-family: "Courier New"; color: black;" lang="EN-US">: Servlet.service() for servlet jsp threw exception</span><span style="font-size: 8pt; font-family: "Courier New";" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal" style="text-align: left;" align="left"><u><span style="font-size: 8pt; font-family: "Courier New"; color: navy;" lang="EN-US">org.apache.jasper.JasperException</span></u><span style="font-size: 8pt; font-family: "Courier New"; color: black;" lang="EN-US">: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application</span><span style="font-size: 8pt; font-family: "Courier New";" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal" style="text-align: left;" align="left"><span style="font-size: 8pt; font-family: "Courier New"; color: black;" lang="EN-US"><span>    </span></span><span style="font-size: 8pt; font-family: 宋体; color: black;">很明显是没有扑ֈ</span><span style="font-size: 8pt; font-family: "Courier New"; color: black;" lang="EN-US">uri</span><span style="font-size: 8pt; font-family: 宋体; color: black;">?/span><span style="font-size: 8pt; font-family: "Courier New"; color: black;" lang="EN-US"><a >http://java.sun.com/jsp/jstl/core</a> </span><span style="font-size: 8pt; font-family: 宋体; color: black;">?/span><span style="font-size: 8pt; font-family: "Courier New"; color: black;" lang="EN-US">tld</span><span style="font-size: 8pt; font-family: 宋体; color: black;">文g。不对啊Q这个应该都是在</span><span style="font-size: 8pt; font-family: "Courier New"; color: black;" lang="EN-US">web</span><span style="font-size: 8pt; font-family: 宋体; color: black;">应用E序里面的啊。但是他自己带的</span><span style="font-size: 8pt; font-family: "Courier New"; color: black;" lang="EN-US">tomcat</span><span style="font-size: 8pt; font-family: 宋体; color: black;">可以。肯定是他自己加了。我找了好大一会儿l于?/span><span style="font-size: 8pt; font-family: "Courier New"; color: black;" lang="EN-US">C:\rsp\apache-tomcat-5.5.15\common\lib</span><span style="font-size: 8pt; font-family: 宋体; color: black;">多出两个包他们分别是<span style="color: rgb(255, 40, 40);"><span style="color: rgb(255, 40, 40);"><span style="font-size: 8pt; font-family: "Courier New"; color: black;" lang="EN-US"><span style="color: rgb(255, 40, 40);"><span style="color: rgb(255, 40, 40);">jstl.jar</span></span></span></span></span></span><span style="font-size: 8pt; font-family: 宋体; color: black;">?/span><span style="font-size: 8pt; font-family: "Courier New"; color: black;" lang="EN-US">standard.jar</span><span style="font-size: 8pt; font-family: 宋体; color: black;">。查看了一?/span><span style="font-size: 8pt; font-family: "Courier New"; color: black;" lang="EN-US"><span style="color: rgb(255, 40, 40);">standard.jar</span></span><span style="font-size: 8pt; font-family: 宋体; color: black;">所有真相大白。他包含了一?/span><span style="font-size: 8pt; font-family: "Courier New"; color: black;" lang="EN-US">c.tld</span><span style="font-size: 8pt; font-family: 宋体; color: black;">的文件。其中有q么一D?/span><span style="font-size: 8pt; font-family: "Courier New"; color: black;" lang="EN-US"><o:p></o:p></span></p> <p class="MsoNormal" style="text-align: left;" align="left"><span style="font-size: 8pt; font-family: "Courier New";" lang="EN-US"><description>JSTL 1.1 core library</description><o:p></o:p></span></p> <p class="MsoNormal" style="text-align: left;" align="left"><span style="font-size: 8pt; font-family: "Courier New";" lang="EN-US"><display-name>JSTL core</display-name><o:p></o:p></span></p> <p class="MsoNormal" style="text-align: left;" align="left"><span style="font-size: 8pt; font-family: "Courier New";" lang="EN-US"><tlib-version>1.1</tlib-version><o:p></o:p></span></p> <p class="MsoNormal" style="text-align: left;" align="left"><span style="font-size: 8pt; font-family: "Courier New";" lang="EN-US"><short-name>c</short-name><o:p></o:p></span></p> <p class="MsoNormal" style="text-align: left;" align="left"><span style="font-size: 8pt; font-family: "Courier New";" lang="EN-US"><uri>http://java.sun.com/jsp/jstl/core</uri><o:p></o:p></span></p> <p class="MsoNormal" style="text-align: left;" align="left"><span style="font-size: 8pt; font-family: 宋体;">好了Q把q两个包攑օ到我自己?/span><span style="font-size: 8pt; font-family: "Courier New";" lang="EN-US">tomcat</span><span style="font-size: 8pt; font-family: 宋体;">中,所有问题都解决了。终于顺畅的跑v来了?/span><span style="font-size: 8pt; font-family: "Courier New";" lang="EN-US"><o:p></o:p></span></p> <br /> <img src ="http://www.aygfsteel.com/JetGeng/aggbug/186494.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/JetGeng/" target="_blank">Jet Geng</a> 2008-03-15 15:33 <a href="http://www.aygfsteel.com/JetGeng/archive/2008/03/15/186494.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>