| 发表于:2008-02-19 12:09:545楼 得分:0 |
当然可以,只是不能使用ejb的所有功能,下面是不可用的功能(应用官方文档原文): ·xa connection pool is not available yet. ·when embedding into tomcat, you still require a jboss specific jndi implementation. tomcat's jndi is read-only. ·you still must use the jboss transaction manager even when embedding in another app server vendor. this will be remedied in the future when the jboss aop/microcontainer integration is complete. ·distributed remote communication is not supported yet. ·ejb timer service not supported ·even though @remote interfaces are local, you can only communicate through local connections. ·you cannot access jms remotely. only locally. thus, you have to lookup the "java:/connectionfactory". ·jndi is not available remotely 用现在的ejb3的话,如下就可以部署在tomcat中: 1.根据应用的需要,把调用ejb所依赖的jar 包拷贝到tomcat下的/shared/lib目录或web应用的 web-inf/lib下,所依赖的jar 一般在jboss安装目录的client,/server/all/deploy/jboss-aop-jdk50.deployer,/server/all/deploy/ejb3.deployer,/lib/endorsed等文件夹下。 下面的jar 文件是必需的: [jboss安装目录]\client\jbossall-client.jar [jboss安装目录]\server\all\deploy\jboss-aop-jdk50.deployer\jboss-aop-jdk50.jar [jboss安装目录]\server\all\deploy\jboss-aop-jdk50.deployer\jboss-aspect-library-jdk50.jar [jboss安装目录]\server\all\deploy\ejb3.deployer\jboss-ejb3.jar [jboss安装目录]\client\jboss-remoting.jar 2.把调用的ejb接口拷贝到应用的/web-inf/classes/目录下 要注意的是:在此环境下不能调用ejb的local 接口,因为他与jboss不在同一个vm中。 | | |
|