在Lomboz中JBoss4.0.1的配置文件.
\eclipse\plugins\com.objectlearn.jdt.j2ee_3.0.1\servers\jboss401.server.
<serverDefinition
name="JBOSS 4.0.1"
ejbModules="true"
webModules="true"
earModules="true">
<property id="serverRootDirectory"
label="Application Server Directory:"
type="directory"
default="D:/jboss-4.0.1" />
<property id="serverAddress"
label="Address:"
type="string"
default="127.0.0.1" />
<property id="serverPort"
label="Port:"
type="string"
default="8080" />
<property id="serverConfig"
label="Server Configuration (minimal/default/all):"
type="string"
default="default" />
<property id="classPathVariableName"
label="Classpath Variable Name:"
type="string"
default="JBOSS401" />
<property id="classPath"
label="Classpath Variable:"
type="directory"
default="D:/jboss-4.0.1" />
<property id="minimumHeapSize"
label="Minimun Heap Size:"
type="string"
default="128M" />
<property id="maximumHeapSize"
label="Maximum Heap Size:"
type="string"
default="256M" />
<serverHome>${serverRootDirectory}</serverHome>
<webModulesDeployDirectory>${serverRootDirectory}/server/all/deploy</webModulesDeployDirectory>
<ejbModulesDeployDirectory>${serverRootDirectory}/server/all/deploy</ejbModulesDeployDirectory>
<earModulesDeployDirectory>${serverRootDirectory}/server/all/deploy</earModulesDeployDirectory>
<jndiInitialContextFactory>org.jnp.interfaces.NamingContextFactory</jndiInitialContextFactory>
<jndiProviderUrl>jnp://${serverAddress}:1099</jndiProviderUrl>
<startClass>org.jboss.Main</startClass>
<startWorkingDirectory>${serverRootDirectory}/bin</startWorkingDirectory>
<startVmParameters> -Dprogram.name=run.bat -Djava.endorsed.dirs=${serverRootDirectory}/lib/endorsed -Xms${minimumHeapSize} -Xmx${maximumHeapSize}</startVmParameters>
<startProgramArguments>-c ${serverConfig}</startProgramArguments>
<stopClass>org.jboss.Shutdown</stopClass>
<stopWorkingDirectory>${serverRootDirectory}/bin</stopWorkingDirectory>
<stopVmParameters>-cp ${classPathVariableName}/bin/shutdown.jar -Djboss.boot.loader.name=shutdown.bat</stopVmParameters>
<stopProgramArguments>-S</stopProgramArguments>
<serverClassPath>
<jar type="variable">JDK_TOOLS</jar>
<jar type="variable">${classPathVariableName}/bin/run.jar</jar>
<jar type="variable">${classPathVariableName}/lib/commons-httpclient.jar</jar>
<jar type="variable">${classPathVariableName}/lib/commons-logging.jar</jar>
<jar type="variable">${classPathVariableName}/lib/concurrent.jar</jar>
<jar type="variable">${classPathVariableName}/lib/dom4j.jar</jar>
<jar type="variable">${classPathVariableName}/lib/getopt.jar</jar>
<jar type="variable">${classPathVariableName}/lib/gnu-regexp.jar</jar>
<jar type="variable">${classPathVariableName}/lib/jaxen.jar</jar>
<jar type="variable">${classPathVariableName}/lib/jboss-common.jar</jar>
<jar type="variable">${classPathVariableName}/lib/jboss-jmx.jar</jar>
<jar type="variable">${classPathVariableName}/lib/jboss-system.jar</jar>
<jar type="variable">${classPathVariableName}/lib/log4j-boot.jar</jar>
<jar type="variable">${classPathVariableName}/lib/namespace.jar</jar>
<jar type="variable">${classPathVariableName}/lib/webdavlib.jar</jar>
</serverClassPath>
<clientClassPath>
<jar type="variable">${classPathVariableName}/client/jboss-j2ee.jar</jar>
<jar type="variable">${classPathVariableName}/client/jnp-client.jar</jar>
<jar type="variable">${classPathVariableName}/client/jbossall-client.jar</jar>
<jar type="variable">${classPathVariableName}/client/jboss-common-client.jar</jar>
<jar type="variable">${classPathVariableName}/client/jbosssx-client.jar</jar>
<jar type="variable">${classPathVariableName}/client/log4j.jar</jar>
<jar type="variable">${classPathVariableName}/client/jnet.jar</jar>
<jar type="variable">${classPathVariableName}/client/jboss-jaas.jar</jar>
</clientClassPath>
<projectClassPath>
<jar type="variable">${classPathVariableName}/client/jboss-j2ee.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/javax.servlet.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss-j2ee.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss-management.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jbossmq.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jbosssx.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jpl-pattern.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jpl-util.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jnpserver.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss-transaction.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/bcel.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss-jsr77.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/log4j.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/hsqldb.jar</jar>
<jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/hsqldb-plugin.jar</jar>
</projectClassPath>
</serverDefinition> 遇到的几个问题:
1)Classpath问题:配置完服务器后,有一个选项是自动更新项目的Classpath,从别人那里拷贝过来的server配置文件里面总有几个jar文件是没有的,所以导致编译都不能通过.(另:Lomboz里面的projectClasspath是什么意思,现在没搞懂,反正如果删除这一项它就会自动从serverClasspath里面拷贝过去)
2)NamingService问题:启动jndi服务后总是再报一个jndi的错,后来发现是serverClasspath里面多加了shutdown.jar.打开来看,里面有一个jndi.properties文件,应该是这里的问题,不过还没搞懂.(又是一个)
3)三个classpath的作用:其实只需serverClasspath里面留JDK_TOOLS和run.jar就能正常启动.
以后弄明白了再补充.
参考文献:
1)
http://dev.csdn.net/article/67/67893.shtm2)
http://www.tusc.com.au/tutorial/html/chap1.htmlMake things as simple as possible, but no simpler.