Cargo是一个J2EE容器的轻量级封装,提供操作容器的API
Cargo提供的API有:
用于启动和停止以及发布新应用到容器的JavaAPI,同时提供有ANT、Maven、IntellijIDEA和Netbeans的插件;用于解析、创建和合并应用的JavaAPICargo的使用例子:
Deployablewar=newWAR("path/to/simple.war");LocalConfigurationconfiguration=newResin3xStandaloneLocalConfiguration("target/myresin3x");configuration.addDeployable(war);InstalledLocalContainercontainer=newResin3xInstalledLocalContainer(configuration);container.setHome("c:/apps/resin-3.0.18");container.start();//Hereyouareassuredthecontainerisstarted.container.stop();//Hereyouareassuredthecontainerisstopped.
评论