参考文档

http://tomee.apache.org/

http://download.oracle.com/otndocs/jcp/ejb-3.1-pfd-oth-JSpec/

http://download.oracle.com/otndocs/jcp/7195-jms-1.1-fr-spec-oth-JSpec/

http://www.oracle.com/technetwork/java/jndi-150206.pdf

下载 tomee(可代替tomcat)

下载 tomee war(用于远程调用EJB)

About the 'tomee' webapp

编写EJB

ejb-jar.xml

<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
version="3.0">
<enterprise-beans>
<session>
<ejb-name>HelloBean</ejb-name>
<business-remote>cn.zno.Hello</business-remote>
<ejb-class>cn.zno.HelloBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>

Hello.java

package cn.zno;

public interface Hello {

    public void say(String str);
}

HelloBean.java

package cn.zno;

public class HelloBean implements Hello {

    public void say(String str) {
System.out.println(str); } }

pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cn.zno</groupId>
<artifactId>helloejb</artifactId>
<version>1.0</version>
<name>enterprise java beans</name>
<dependencies>
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0-6</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>

目录结构

编写remote client

ClientTest.java

package cn.zno;

import javax.jms.JMSException;
import javax.naming.InitialContext;
import javax.naming.NamingException; import cn.zno.Hello; public class ClientTest { public static void main(String[] args) throws NamingException, JMSException {
InitialContext ctx = new InitialContext(); Hello hello = (Hello) ctx.lookup("java:global/helloejb-1.0/HelloBean!cn.zno.Hello");
hello.say("------"); } }

jndi.properties

java.naming.provider.url=http://localhost:8080/tomee/ejb
java.naming.factory.initial=org.apache.openejb.client.RemoteInitialContextFactory
#java.naming.security.principal=tomee
#java.naming.security.credentials=tomee

pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cn.zno</groupId>
<artifactId>helloejbClient</artifactId>
<version>0.0.1-SNAPSHOT</version> <dependencies>
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0-6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>openejb-client</artifactId>
<version>4.7.4</version>
</dependency> </dependencies>
</project>

目录结构

部署启动服务

将 helloejb-1.0.jar 和 tomee.war 放置在%tomee_home%/webapps/ 下

启动 tomee (%tomee_home%/bin/startup.bat)

八月 28, 2016 1:58:09 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat (TomEE)/7.0.68 (1.7.4)
八月 28, 2016 1:58:09 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built: Feb 8 2016 20:25:54 UTC
八月 28, 2016 1:58:09 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number: 7.0.68.0
八月 28, 2016 1:58:09 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name: Windows 7
八月 28, 2016 1:58:09 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version: 6.1
八月 28, 2016 1:58:09 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture: amd64
八月 28, 2016 1:58:09 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home: E:\e\java\jdk1.7.0_79\jre
八月 28, 2016 1:58:09 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version: 1.7.0_79-b15
八月 28, 2016 1:58:09 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor: Oracle Corporation
八月 28, 2016 1:58:09 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: E:\e\tomee\apache-tomee-webprofile-1.7.4
八月 28, 2016 1:58:09 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: E:\e\tomee\apache-tomee-webprofile-1.7.4
八月 28, 2016 1:58:09 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -javaagent:E:\e\tomee\apache-tomee-webprofile-1.7.4\lib\openejb-javaagent.jar
八月 28, 2016 1:58:09 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.util.logging.config.file=E:\e\tomee\apache-tomee-webprofile-1.7.4\conf\logging.properties
八月 28, 2016 1:58:09 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
八月 28, 2016 1:58:09 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=E:\e\tomee\apache-tomee-webprofile-1.7.4\endorsed
八月 28, 2016 1:58:09 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=E:\e\tomee\apache-tomee-webprofile-1.7.4
八月 28, 2016 1:58:09 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=E:\e\tomee\apache-tomee-webprofile-1.7.4
八月 28, 2016 1:58:09 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.io.tmpdir=E:\e\tomee\apache-tomee-webprofile-1.7.4\temp
八月 28, 2016 1:58:09 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: E:\e\java\jdk1.7.0_79\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;E:\e\Git\cmd;D:\Program Files\TortoiseGit\bin;E:\e\maven\apache-maven-3.3.9\bin;E:\e\java\jdk1.7.0_79\bin;D:\Program Files\VanDyke Software\SecureCRT\;D:\Program Files\VanDyke Software\SecureFX\;.
八月 28, 2016 1:58:09 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
八月 28, 2016 1:58:09 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
八月 28, 2016 1:58:09 下午 org.apache.openejb.util.OptionsLog info
信息: Using 'tomee.remote.support=true'
八月 28, 2016 1:58:09 下午 org.apache.openejb.util.OptionsLog info
信息: Using 'openejb.jdbc.datasource-creator=org.apache.tomee.jdbc.TomEEDataSourceCreator'
八月 28, 2016 1:58:10 下午 org.apache.openejb.OpenEJB$Instance <init>
信息: ********************************************************************************
八月 28, 2016 1:58:10 下午 org.apache.openejb.OpenEJB$Instance <init>
信息: OpenEJB http://tomee.apache.org/
八月 28, 2016 1:58:10 下午 org.apache.openejb.OpenEJB$Instance <init>
信息: Startup: Sun Aug 28 13:58:10 CST 2016
八月 28, 2016 1:58:10 下午 org.apache.openejb.OpenEJB$Instance <init>
信息: Copyright 1999-2015 (C) Apache OpenEJB/TomEE Project, All Rights Reserved.
八月 28, 2016 1:58:10 下午 org.apache.openejb.OpenEJB$Instance <init>
信息: Version: 4.7.4
八月 28, 2016 1:58:10 下午 org.apache.openejb.OpenEJB$Instance <init>
信息: Build date: 20160304
八月 28, 2016 1:58:10 下午 org.apache.openejb.OpenEJB$Instance <init>
信息: Build time: 09:05
八月 28, 2016 1:58:10 下午 org.apache.openejb.OpenEJB$Instance <init>
信息: ********************************************************************************
八月 28, 2016 1:58:10 下午 org.apache.openejb.OpenEJB$Instance <init>
信息: openejb.home = E:\e\tomee\apache-tomee-webprofile-1.7.4
八月 28, 2016 1:58:10 下午 org.apache.openejb.OpenEJB$Instance <init>
信息: openejb.base = E:\e\tomee\apache-tomee-webprofile-1.7.4
八月 28, 2016 1:58:10 下午 org.apache.openejb.cdi.CdiBuilder initializeOWB
信息: Created new singletonService org.apache.openejb.cdi.ThreadSingletonServiceImpl@ba94b54
八月 28, 2016 1:58:10 下午 org.apache.openejb.cdi.CdiBuilder initializeOWB
信息: Succeeded in installing singleton service
八月 28, 2016 1:58:10 下午 org.apache.openejb.config.ConfigurationFactory init
信息: openejb configuration file is 'E:\e\tomee\apache-tomee-webprofile-1.7.4\conf\tomee.xml'
八月 28, 2016 1:58:10 下午 org.apache.openejb.config.ConfigurationFactory configureService
信息: Configuring Service(id=Tomcat Security Service, type=SecurityService, provider-id=Tomcat Security Service)
八月 28, 2016 1:58:10 下午 org.apache.openejb.config.ConfigurationFactory configureService
信息: Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
八月 28, 2016 1:58:10 下午 org.apache.openejb.util.OptionsLog info
信息: Using 'openejb.system.apps=true'
八月 28, 2016 1:58:10 下午 org.apache.openejb.config.ConfigurationFactory configureApplication
信息: Configuring enterprise application: openejb
八月 28, 2016 1:58:10 下午 org.apache.openejb.config.InitEjbDeployments deploy
信息: Using openejb.deploymentId.format '{ejbName}'
八月 28, 2016 1:58:10 下午 org.apache.openejb.config.InitEjbDeployments deploy
信息: Auto-deploying ejb openejb/Deployer: EjbDeployment(deployment-id=openejb/Deployer)
八月 28, 2016 1:58:10 下午 org.apache.openejb.config.InitEjbDeployments deploy
信息: Auto-deploying ejb openejb/ConfigurationInfo: EjbDeployment(deployment-id=openejb/ConfigurationInfo)
八月 28, 2016 1:58:10 下午 org.apache.openejb.config.InitEjbDeployments deploy
信息: Auto-deploying ejb MEJB: EjbDeployment(deployment-id=MEJB)
八月 28, 2016 1:58:10 下午 org.apache.openejb.config.ConfigurationFactory configureService
信息: Configuring Service(id=Default Stateless Container, type=Container, provider-id=Default Stateless Container)
八月 28, 2016 1:58:10 下午 org.apache.openejb.config.AutoConfig createContainer
信息: Auto-creating a container for bean openejb/Deployer: Container(type=STATELESS, id=Default Stateless Container)
八月 28, 2016 1:58:10 下午 org.apache.openejb.config.AppInfoBuilder build
信息: Enterprise application "openejb" loaded.
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.Assembler createRecipe
信息: Creating TransactionManager(id=Default Transaction Manager)
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.Assembler createRecipe
信息: Creating SecurityService(id=Tomcat Security Service)
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.Assembler createRecipe
信息: Creating Container(id=Default Stateless Container)
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.Assembler createAppClassLoader
信息: Not creating another application classloader for openejb
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Assembling app: openejb
八月 28, 2016 1:58:10 下午 org.apache.openejb.util.OptionsLog info
信息: Using 'openejb.jndiname.format={deploymentId}{interfaceType.openejbLegacyName}'
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=openejb/DeployerBusinessRemote) --> Ejb(deployment-id=openejb/Deployer)
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=global/openejb/openejb/Deployer!org.apache.openejb.assembler.Deployer) --> Ejb(deployment-id=openejb/Deployer)
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=global/openejb/openejb/Deployer) --> Ejb(deployment-id=openejb/Deployer)
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=openejb/ConfigurationInfoBusinessRemote) --> Ejb(deployment-id=openejb/ConfigurationInfo)
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=global/openejb/openejb/ConfigurationInfo!org.apache.openejb.assembler.classic.cmd.ConfigurationInfo) --> Ejb(deployment-id=openejb/ConfigurationInfo)
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=global/openejb/openejb/ConfigurationInfo) --> Ejb(deployment-id=openejb/ConfigurationInfo)
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=MEJB) --> Ejb(deployment-id=MEJB)
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=global/openejb/MEJB!javax.management.j2ee.ManagementHome) --> Ejb(deployment-id=MEJB)
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=global/openejb/MEJB) --> Ejb(deployment-id=MEJB)
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.Assembler startEjbs
信息: Created Ejb(deployment-id=openejb/Deployer, ejb-name=openejb/Deployer, container=Default Stateless Container)
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.Assembler startEjbs
信息: Created Ejb(deployment-id=MEJB, ejb-name=MEJB, container=Default Stateless Container)
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.Assembler startEjbs
信息: Created Ejb(deployment-id=openejb/ConfigurationInfo, ejb-name=openejb/ConfigurationInfo, container=Default Stateless Container)
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.Assembler startEjbs
信息: Started Ejb(deployment-id=openejb/Deployer, ejb-name=openejb/Deployer, container=Default Stateless Container)
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.Assembler startEjbs
信息: Started Ejb(deployment-id=MEJB, ejb-name=MEJB, container=Default Stateless Container)
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.Assembler startEjbs
信息: Started Ejb(deployment-id=openejb/ConfigurationInfo, ejb-name=openejb/ConfigurationInfo, container=Default Stateless Container)
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.Assembler deployMBean
信息: Deployed MBean(openejb.user.mbeans:application=openejb,group=org.apache.openejb.assembler.monitoring,name=JMXDeployer)
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Deployed Application(path=openejb)
八月 28, 2016 1:58:10 下午 org.apache.openejb.server.SimpleServiceManager start
信息: ** Bound Services **
八月 28, 2016 1:58:10 下午 org.apache.openejb.server.SimpleServiceManager printRow
信息: NAME IP PORT
八月 28, 2016 1:58:10 下午 org.apache.openejb.server.SimpleServiceManager start
信息: -------
八月 28, 2016 1:58:10 下午 org.apache.openejb.server.SimpleServiceManager start
信息: Ready!
八月 28, 2016 1:58:10 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 2001 ms
八月 28, 2016 1:58:10 下午 org.apache.tomee.catalina.OpenEJBNamingContextListener bindResource
信息: Importing a Tomcat Resource with id 'UserDatabase' of type 'org.apache.catalina.UserDatabase'.
八月 28, 2016 1:58:10 下午 org.apache.openejb.assembler.classic.Assembler createRecipe
信息: Creating Resource(id=UserDatabase)
八月 28, 2016 1:58:10 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
八月 28, 2016 1:58:10 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat (TomEE)/7.0.68 (1.7.4)
八月 28, 2016 1:58:10 下午 org.apache.catalina.startup.HostConfig deployWAR
信息: Deploying web application archive E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\tomee.war
八月 28, 2016 1:58:10 下午 org.apache.tomee.catalina.TomcatWebAppBuilder init
信息: ------------------------- localhost -> /tomee
八月 28, 2016 1:58:11 下午 org.apache.openejb.config.ConfigurationFactory configureApplication
信息: Configuring enterprise application: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\tomee
八月 28, 2016 1:58:11 下午 org.apache.openejb.config.AppInfoBuilder build
信息: Enterprise application "E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\tomee" loaded.
八月 28, 2016 1:58:11 下午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Assembling app: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\tomee
八月 28, 2016 1:58:11 下午 org.apache.openejb.cdi.CdiBuilder initSingleton
信息: Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@ba94b54
八月 28, 2016 1:58:11 下午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container is starting...
八月 28, 2016 1:58:11 下午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [CdiPlugin]
八月 28, 2016 1:58:11 下午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
八月 28, 2016 1:58:11 下午 org.apache.webbeans.config.BeansDeployer validateInjectionPoints
信息: All injection points were validated successfully.
八月 28, 2016 1:58:11 下午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container has started, it took 94 ms.
八月 28, 2016 1:58:11 下午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Deployed Application(path=E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\tomee)
八月 28, 2016 1:58:11 下午 org.apache.catalina.startup.HostConfig deployWAR
信息: Deployment of web application archive E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\tomee.war has finished in 453 ms
八月 28, 2016 1:58:11 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\docs
八月 28, 2016 1:58:11 下午 org.apache.tomee.catalina.TomcatWebAppBuilder init
信息: ------------------------- localhost -> /docs
八月 28, 2016 1:58:11 下午 org.apache.openejb.config.ConfigurationFactory configureApplication
信息: Configuring enterprise application: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\docs
八月 28, 2016 1:58:11 下午 org.apache.openejb.config.AppInfoBuilder build
信息: Enterprise application "E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\docs" loaded.
八月 28, 2016 1:58:11 下午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Assembling app: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\docs
八月 28, 2016 1:58:11 下午 org.apache.openejb.cdi.CdiBuilder initSingleton
信息: Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@ba94b54
八月 28, 2016 1:58:11 下午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container is starting...
八月 28, 2016 1:58:11 下午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [CdiPlugin]
八月 28, 2016 1:58:11 下午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
八月 28, 2016 1:58:11 下午 org.apache.webbeans.config.BeansDeployer validateInjectionPoints
信息: All injection points were validated successfully.
八月 28, 2016 1:58:11 下午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container has started, it took 15 ms.
八月 28, 2016 1:58:11 下午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Deployed Application(path=E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\docs)
八月 28, 2016 1:58:11 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\docs has finished in 125 ms
八月 28, 2016 1:58:11 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\host-manager
八月 28, 2016 1:58:11 下午 org.apache.tomee.catalina.TomcatWebAppBuilder init
信息: ------------------------- localhost -> /host-manager
八月 28, 2016 1:58:11 下午 org.apache.openejb.config.ConfigurationFactory configureApplication
信息: Configuring enterprise application: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\host-manager
八月 28, 2016 1:58:11 下午 org.apache.openejb.config.AppInfoBuilder build
信息: Enterprise application "E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\host-manager" loaded.
八月 28, 2016 1:58:11 下午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Assembling app: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\host-manager
八月 28, 2016 1:58:11 下午 org.apache.openejb.cdi.CdiBuilder initSingleton
信息: Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@ba94b54
八月 28, 2016 1:58:11 下午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container is starting...
八月 28, 2016 1:58:11 下午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [CdiPlugin]
八月 28, 2016 1:58:11 下午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
八月 28, 2016 1:58:11 下午 org.apache.webbeans.config.BeansDeployer validateInjectionPoints
信息: All injection points were validated successfully.
八月 28, 2016 1:58:11 下午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container has started, it took 16 ms.
八月 28, 2016 1:58:11 下午 org.apache.tomee.catalina.TomcatWebAppBuilder deployWebApps
信息: using context file E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\host-manager\META-INF\context.xml
八月 28, 2016 1:58:11 下午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Deployed Application(path=E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\host-manager)
八月 28, 2016 1:58:11 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\host-manager has finished in 125 ms
八月 28, 2016 1:58:11 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\manager
八月 28, 2016 1:58:11 下午 org.apache.tomee.catalina.TomcatWebAppBuilder init
信息: ------------------------- localhost -> /manager
八月 28, 2016 1:58:11 下午 org.apache.openejb.config.ConfigurationFactory configureApplication
信息: Configuring enterprise application: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\manager
八月 28, 2016 1:58:11 下午 org.apache.openejb.config.AppInfoBuilder build
信息: Enterprise application "E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\manager" loaded.
八月 28, 2016 1:58:11 下午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Assembling app: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\manager
八月 28, 2016 1:58:11 下午 org.apache.openejb.cdi.CdiBuilder initSingleton
信息: Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@ba94b54
八月 28, 2016 1:58:11 下午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container is starting...
八月 28, 2016 1:58:11 下午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [CdiPlugin]
八月 28, 2016 1:58:11 下午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
八月 28, 2016 1:58:11 下午 org.apache.webbeans.config.BeansDeployer validateInjectionPoints
信息: All injection points were validated successfully.
八月 28, 2016 1:58:11 下午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container has started, it took 16 ms.
八月 28, 2016 1:58:11 下午 org.apache.tomee.catalina.TomcatWebAppBuilder deployWebApps
信息: using context file E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\manager\META-INF\context.xml
八月 28, 2016 1:58:11 下午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Deployed Application(path=E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\manager)
八月 28, 2016 1:58:11 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\manager has finished in 109 ms
八月 28, 2016 1:58:11 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\ROOT
八月 28, 2016 1:58:11 下午 org.apache.tomee.catalina.TomcatWebAppBuilder init
信息: ------------------------- localhost -> /
八月 28, 2016 1:58:11 下午 org.apache.openejb.config.ConfigurationFactory configureApplication
信息: Configuring enterprise application: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\ROOT
八月 28, 2016 1:58:11 下午 org.apache.openejb.config.AppInfoBuilder build
信息: Enterprise application "E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\ROOT" loaded.
八月 28, 2016 1:58:11 下午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Assembling app: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\ROOT
八月 28, 2016 1:58:11 下午 org.apache.openejb.cdi.CdiBuilder initSingleton
信息: Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@ba94b54
八月 28, 2016 1:58:11 下午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container is starting...
八月 28, 2016 1:58:11 下午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [CdiPlugin]
八月 28, 2016 1:58:11 下午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
八月 28, 2016 1:58:11 下午 org.apache.webbeans.config.BeansDeployer validateInjectionPoints
信息: All injection points were validated successfully.
八月 28, 2016 1:58:11 下午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container has started, it took 15 ms.
八月 28, 2016 1:58:11 下午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Deployed Application(path=E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\ROOT)
八月 28, 2016 1:58:11 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\ROOT has finished in 109 ms
八月 28, 2016 1:58:11 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
八月 28, 2016 1:58:11 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
八月 28, 2016 1:58:11 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 1000 ms
八月 28, 2016 1:58:21 下午 org.apache.openejb.config.ConfigurationFactory configureApplication
信息: Configuring enterprise application: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\helloejb-1.0.jar
八月 28, 2016 1:58:21 下午 org.apache.openejb.config.InitEjbDeployments deploy
信息: Auto-deploying ejb HelloBean: EjbDeployment(deployment-id=HelloBean)
八月 28, 2016 1:58:21 下午 org.apache.openejb.config.AppInfoBuilder build
信息: Enterprise application "E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\helloejb-1.0.jar" loaded.
八月 28, 2016 1:58:21 下午 org.apache.openejb.assembler.classic.Assembler createAppClassLoader
信息: Creating dedicated application classloader for helloejb-1.0
八月 28, 2016 1:58:21 下午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Assembling app: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\helloejb-1.0.jar
八月 28, 2016 1:58:21 下午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=HelloBeanRemote) --> Ejb(deployment-id=HelloBean)
八月 28, 2016 1:58:21 下午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=global/helloejb-1.0/HelloBean!cn.zno.Hello) --> Ejb(deployment-id=HelloBean)
八月 28, 2016 1:58:21 下午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=global/helloejb-1.0/HelloBean) --> Ejb(deployment-id=HelloBean)
八月 28, 2016 1:58:21 下午 org.apache.openejb.cdi.CdiBuilder initSingleton
信息: Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@ba94b54
八月 28, 2016 1:58:21 下午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container is starting...
八月 28, 2016 1:58:21 下午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [CdiPlugin]
八月 28, 2016 1:58:21 下午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
八月 28, 2016 1:58:21 下午 org.apache.webbeans.config.BeansDeployer validateInjectionPoints
信息: All injection points were validated successfully.
八月 28, 2016 1:58:21 下午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container has started, it took 16 ms.
八月 28, 2016 1:58:21 下午 org.apache.openejb.assembler.classic.Assembler startEjbs
信息: Created Ejb(deployment-id=HelloBean, ejb-name=HelloBean, container=Default Stateless Container)
八月 28, 2016 1:58:21 下午 org.apache.openejb.assembler.classic.Assembler startEjbs
信息: Started Ejb(deployment-id=HelloBean, ejb-name=HelloBean, container=Default Stateless Container)
八月 28, 2016 1:58:21 下午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Deployed Application(path=E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\helloejb-1.0.jar)

执行 client (main方法)

成功!!

tomee 第一个 远程调用 Session Bean的更多相关文章

  1. tomee 第一个 远程调用 Message-driven bean(MDB)

    MDB 整体结构 HelloMDB.java package cn.zno; import javax.jms.Connection; import javax.jms.ConnectionFacto ...

  2. ABAP RFC远程调用

    声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...

  3. Java[2] 分布式服务架构之java远程调用技术浅析(转http://www.uml.org.cn/zjjs/201208011.asp)

    转自:http://www.uml.org.cn/zjjs/201208011.asp 在分布式服务框架中,一个最基础的问题就是远程服务是怎么通讯的,在Java领域中有很多可实现远程通讯的技术,例如: ...

  4. JavaEE(19) - Web层和EJB的整合(Session Bean)

    1. 通过依赖注入访问无状态Session Bean #1. EJB注入Servlet中 #2. EJB注入JSF中 2. 通过EJB引用访问有状态Session Bean 3. 在工具类中访问Ses ...

  5. JavaEE(8) - 本地和远程调用的有状态以及无状态Session EJB

    1. 使用NetBeans开发Session Bean #1. 创建项目:File-->New Project-->Java EE-->EJB Module #2. 在项目中创建Se ...

  6. Ejb远程调用-jboss服务器调用服务器-Bean调用Bean

    英文参考地址 https://docs.jboss.org/author/display/AS71/Remote+EJB+invocations+via+JNDI+-+EJB+client+API+o ...

  7. 架构设计:远程调用服务架构设计及zookeeper技术详解(下篇)

    一.下篇开头的废话 终于开写下篇了,这也是我写远程调用框架的第三篇文章,前两篇都被博客园作为[编辑推荐]的文章,很兴奋哦,嘿嘿~~~~,本人是个很臭美的人,一定得要截图为证: 今天是2014年的第一天 ...

  8. EJB开发第一个无状态会话bean、开发EJBclient

    开发第一个无状态会话bean EJB中的三中bean: 会话Bean(Session Bean) 负责与client交互,是编写业务逻辑的地方.在会话bean中能够通过JDBC直接操作数据库.但大多数 ...

  9. EJB开发第一个无状态会话bean、开发EJB客户端

    开发第一个无状态会话bean EJB中的三中bean: 会话Bean(Session Bean) 负责与客户端交互,是编写业务逻辑的地方,在会话bean中可以通过JDBC直接操作数据库,但大多数情况下 ...

随机推荐

  1. Karma: 3 - 测试覆盖率

    karma 的插件 karma-coverage 提供了测试代码覆盖率的支持. karma 的页面:http://karma-runner.github.io/0.8/config/coverage. ...

  2. 剑指Offer:面试题25——二叉树中和为某一值的路径(java实现)

    问题描述: 输入一棵二叉树和一个整数,打印出二叉树中结点指的和为输入整数的所有路径.从树的根结点开始往下一直到叶结点所经过的结点形成一条路径.二叉树结点的定义如下: public class Tree ...

  3. 解决hibernate只能插入一条数据的问题

    hibernate初学,根据视频教程写好代码后,发现无论执行多少次main函数,数据库中只有一条数据,尝试多次,后来终于发现问题... 使用的工具是:MYSQL 5.7.13   eclipse 4. ...

  4. js进度条实现

    1.先设置CSS样式(可自定义) /*#region 进度条 */ .progbar { background-color: #e1e1e1; width:auto; color: #222; hei ...

  5. WinServer2008R2 部署.NET4.0程序 注意事项

    部署注意事项:   1.IIS应用程序池 集成模式   2.在web.config中的system.webServer下,添加 <modules runAllManagedModulesForA ...

  6. Linux: vi 编辑器中文乱码

    [问题] vi编辑器中文乱码 [解决方案] vi /etc/sysconfig/i18n改成如下即可:LANG="en_US.UTF-8"LANGUAGE="zh_CN. ...

  7. delphi Inc函数和Dec函数的用法

    inc自增函数 .inc(i,n)://i,n:integer;n为自增量 相当于i:=i+n: .inc(i)://i:integer; 相当于i:=i+;   dec自减函数 .dec(i,n): ...

  8. Solr Cloud搭建

    1:搭建tomcat 配置connector: server.xm文件中: <Connector port="8080"maxThreads="200" ...

  9. 先进先出集合queue

    先进先出集合queue Enqueue添加到集合最后 Dequeue移除集合第一个对象并返回

  10. mysql convert

    SELECT id,boshidianshu,boshidianshu_shuzi,CONVERT(REPLACE(boshidianshu, '个', ''),SIGNED) aaa from lg ...