下载安装包:amoeba-mysql-binary-2.1.0-RC5.tar.gz
下载源代码:http://amoeba.googlecode.com/svn/trunk
1.定位Amoeba启动类
打开amoeba.bat,经过分析,amoeba的启动是通过classworlds进行加载的,关于classworlds请参见http://classworlds.codehaus.org/launchusage.html
在amoeba.bat中是通过以下语句来定位classworlds启动应用的配置项的
 
 set DEFAULT_OPTS=%DEFAULT_OPTS% "-Dclassworlds.conf=%AMOEBA_HOME%\bin\amoeba.classworlds"
set DEFAULT_OPTS=%DEFAULT_OPTS% "-Dclassworlds.conf=%AMOEBA_HOME%\bin\amoeba.classworlds"


以下是amoeba.classworlds的内容
 main is com.meidusa.amoeba.server.AmoebaProxyServer from amoeba
main is com.meidusa.amoeba.server.AmoebaProxyServer from amoeba

 [amoeba]
[amoeba]

 load $
load $ {amoeba.home}/lib/**//*.jar
{amoeba.home}/lib/**//*.jar
 load ${amoeba.home}/lib/classes
load ${amoeba.home}/lib/classes


意思就是amoeba应用是从com.meidusa.amoeba.server.AmoebaProxyServer开始启动的。
接下来把amoeba下的源文件和amoeba-mysql下的源文件导入到项目中,以及相关jar;
为了能在bebug模式下启动,建议在debug-arguments下增加start arguments;
	posted on 2011-06-24 17:08 
zhangxl 阅读(1399) 
评论(0)  编辑  收藏