Tempo研究之在Eclipse中调试FDS

FDS是什么就不过多解释了,参考“ Tempo针对BPEL4People的实现构架”和“ Tempo研究之FDS”即可。 

和Tempo的负责人Nico聊天的时候,问他们如何调试fds,nico说他们都是依靠testcase来调试和测试的,不是在eclipse中debug。我想可能是因为他们都比较熟悉Tempo了,所以运行testcase和分析问题都比较得心应手。而对于我来讲,我对Tempo还只是一个初学者,Tempo项目中有很多testcase,但是我不是很清楚输入输出,而且围绕web service的soap消息又很多,实在是仅仅依靠testcase很难track code。

Tempo中,FDS的结构是最为简单,所以决定先从FDS入手,尝试在eclipse中debug。上一篇blog “ Tempo研究之在Eclipse中运行Intalio Server” 中已经讲了如何在eclipse建intalio server以及运行。

我们进入/tempo/trunk代码目录,也就是从svn上更新下来的目录,采用 build eclipse 命令,可以为各个组件产生各自的eclipse项目文件。当然,在此之前,你需要参考我的另一篇blog “ Build Tempo” 来了解如何build。

不过,采用build eclipse命令所产生的项目,只是普通的java project,而不是可以在eclipse中作为web app的web app project。但是这并不是很难的事情,你可以利用现有/tempo/trunk/fds目录在eclipse(lomboz)中新建一个Dynamic Web Project。这一步就不多叙述,结果如下:


然后需要更改geronimo-web.xml配置。因为这个配置是默认生成的,并不包含一些dependencies。可以参考intalio-bpms\repository\org\intalio\tempo\workflow\fds\5.0.0.3\fds-5.0.0.3.war\WEB-INF 目录下的geronimo-web.xml文件,获取dependencies配置,修改后的内容如下:
<? xml version="1.0" encoding="UTF-8" ?>
< web-app  xmlns ="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"  xmlns:nam ="http://geronimo.apache.org/xml/ns/naming-1.1"  xmlns:sec ="http://geronimo.apache.org/xml/ns/security-1.1"  xmlns:dep ="http://geronimo.apache.org/xml/ns/deployment-1.1" >
  
< dep:environment >
    
< dep:moduleId >
      
< dep:groupId > org.intalio.tempo.workflow </ dep:groupId >
      
< dep:artifactId > fds </ dep:artifactId >
      
< dep:version > 5.0.0.3 </ dep:version >
      
< dep:type > war </ dep:type >
    
</ dep:moduleId >
        
< dep:dependencies >
            
< dep:dependency >
                
< dep:groupId > xalan </ dep:groupId >
                
< dep:artifactId > xalan </ dep:artifactId >
                
< dep:version > 2.7.0 </ dep:version >
            
</ dep:dependency >
            
<!--  2.6.2 is required  -->
            
< dep:dependency >
                
< dep:groupId > xerces </ dep:groupId >
                
< dep:artifactId > xercesImpl </ dep:artifactId >
                
< dep:version > 2.8.1 </ dep:version >
            
</ dep:dependency >
            
< dep:dependency >
                
< dep:groupId > xom </ dep:groupId >
                
< dep:artifactId > xom </ dep:artifactId >
                
< dep:version > 1.1 </ dep:version >
            
</ dep:dependency >
            
< dep:dependency >
                
< dep:groupId > dom4j </ dep:groupId >
                
< dep:artifactId > dom4j </ dep:artifactId >
                
< dep:version > 1.6.1 </ dep:version >
            
</ dep:dependency >
            
<!--  3.0 is required  -->
            
< dep:dependency >
                
< dep:groupId > commons-httpclient </ dep:groupId >
                
< dep:artifactId > commons-httpclient </ dep:artifactId >
                
< dep:version > 3.1-alpha1 </ dep:version >
            
</ dep:dependency >
            
< dep:dependency >
                
< dep:groupId > jdom </ dep:groupId >
                
< dep:artifactId > jdom </ dep:artifactId >
                
< dep:version > 1.0 </ dep:version >
            
</ dep:dependency >
            
<!--  1.0 is required  -->
            
< dep:dependency >
                
< dep:groupId > stax </ dep:groupId >
                
< dep:artifactId > stax-api </ dep:artifactId >
                
< dep:version > 1.0.1 </ dep:version >
            
</ dep:dependency >
            
<!--  1.2 is required  -->
            
< dep:dependency >
                
< dep:groupId > commons-codec </ dep:groupId >
                
< dep:artifactId > commons-codec </ dep:artifactId >
                
< dep:version > 1.3 </ dep:version >
            
</ dep:dependency >
        
</ dep:dependencies >     
  
</ dep:environment >
  
< context-root > /fds </ context-root >
</ web-app >

此时,暂且不要把fds工程增加到 eclipse中建立的 Intalio Server(其实是Geronimo Server),先启动server,然后进入Geronimo Web Console,将原有的org.intalio.tempo.workflow/fds/5.0.0.3/war这个web app war进行unintall操作。然后再将fds增加到server上,并同步。

但是,此时还有问题的,因为从svn上获取的fds代码,已经比原Intalio Server中的fds war版本更新,有一定的变动。需要将 fds-config.xml 文件,放到intalio-bpms\var\config目录下,而不是原来的fds war/web-inf/classes中。

做完这些操作,即可在eclipse中调试FDS了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值