tomee 第一个 远程调用 Message-driven bean(MDB)
MDB 整体结构
HelloMDB.java
package cn.zno; import javax.jms.Connection; import javax.jms.ConnectionFactory; import javax.jms.DeliveryMode; import javax.jms.JMSException; import javax.jms.Message; import javax.jms.MessageListener; import javax.jms.MessageProducer; import javax.jms.Queue; import javax.jms.Session; import javax.jms.TextMessage; public class HelloMDB implements MessageListener { private ConnectionFactory connectionFactory; private Queue answerQueue; public void onMessage(Message message) { try { final TextMessage textMessage = (TextMessage) message; final String msg = textMessage.getText(); System.out.println("++++ onMessage method is invoked ++++"); respond("Your msg is :[" + msg + "]"); } catch (JMSException e) { throw new IllegalStateException(e); } } private void respond(String text) throws JMSException { Connection connection = null; Session session = null; try { connection = connectionFactory.createConnection(); connection.start(); // Create a Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); // Create a MessageProducer from the Session to the Topic or Queue MessageProducer producer = session.createProducer(answerQueue); producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); // Create a message TextMessage message = session.createTextMessage(text); // Tell the producer to send the message producer.send(message); } finally { // Clean up if (session != null)session.close(); if (connection != null)connection.close(); } } }
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> <message-driven> <ejb-name>HelloMDB</ejb-name> <ejb-class>cn.zno.HelloMDB</ejb-class> <messaging-type>javax.jms.MessageListener</messaging-type> <activation-config> <activation-config-property> <activation-config-property-name>destination</activation-config-property-name> <activation-config-property-value>jms/destinationQueue</activation-config-property-value> </activation-config-property> <activation-config-property> <activation-config-property-name>destinationType</activation-config-property-name> <activation-config-property-value>javax.jms.Queue</activation-config-property-value> </activation-config-property> </activation-config> <resource-ref> <res-ref-name>jms/connectionFactory</res-ref-name> <res-type>javax.jms.QueueConnectionFactory</res-type> <injection-target> <injection-target-class>cn.zno.HelloMDB</injection-target-class> <injection-target-name>connectionFactory</injection-target-name> </injection-target> </resource-ref> <resource-env-ref> <resource-env-ref-name>jms/answerQueue</resource-env-ref-name> <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type> <injection-target> <injection-target-class>cn.zno.HelloMDB</injection-target-class> <injection-target-name>answerQueue</injection-target-name> </injection-target> </resource-env-ref> </message-driven> </enterprise-beans> </ejb-jar>
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>helloMDB</artifactId> <version>1.0</version> <name>message-driven bean</name> <dependencies> <dependency> <groupId>org.apache.openejb</groupId> <artifactId>javaee-api</artifactId> <version>6.0-6</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-ra</artifactId> <version>5.14.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.geronimo.components</groupId> <artifactId>geronimo-connector</artifactId> <version>3.1.3</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>
Client 整体结构
HelloMDBClient.java
package cn.zno; import javax.jms.Connection; import javax.jms.ConnectionFactory; import javax.jms.JMSException; import javax.jms.MessageConsumer; import javax.jms.MessageProducer; import javax.jms.Queue; import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; public class HelloMDBClient { public static void main(String[] args) throws NamingException, JMSException { Context ctx = new InitialContext(); ConnectionFactory connectionFactory = (ConnectionFactory) ctx.lookup("ConnectionFactory"); Queue destinationQueue = (Queue) ctx.lookup("jndiName1"); Queue answerQueue = (Queue) ctx.lookup("jndiName2"); Connection connection = connectionFactory.createConnection(); connection.start(); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer producer = session.createProducer(destinationQueue); MessageConsumer consumer = session.createConsumer(answerQueue); // send message TextMessage textMessage = session.createTextMessage("Yahoooooooooooooo"); producer.send(textMessage); // receive message TextMessage answerMessage = (TextMessage) consumer.receive(1000); String answerText = answerMessage.getText(); // print message System.out.println(answerText); if (session != null)session.close(); if (connection != null)connection.close(); } }
jndi.properties
java.naming.provider.url=tcp://localhost:61616 # ------------------------------------------------------------------------------------------- # below is the rule of tomee activeMQ [org.apache.activemq.jndi.ActiveMQInitialContextFactory] # ------------------------------------------------------------------------------------------- # jndiName is [connectionFactory] or [queueConnectionFactory] or [topicConnectionFactry] java.naming.factory.initial= org.apache.activemq.jndi.ActiveMQInitialContextFactory # queue.[jndiName] = [physicalName] queue.jndiName1=jms/destinationQueue queue.jndiName2=jms/answerQueue
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>helloMDBClient</artifactId> <version>1.0</version> <dependencies> <dependency> <groupId>org.apache.openejb</groupId> <artifactId>javaee-api</artifactId> <version>6.0-6</version> </dependency> <dependency> <groupId>org.apache.openejb</groupId> <artifactId>openejb-client</artifactId> <version>4.7.4</version> </dependency> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-ra</artifactId> <version>5.14.0</version> </dependency> <dependency> <groupId>org.apache.geronimo.components</groupId> <artifactId>geronimo-connector</artifactId> <version>3.1.3</version> </dependency> </dependencies> </project>
部署运行
八月 29, 2016 12:00:36 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat (TomEE)/7.0.68 (1.7.4)
八月 29, 2016 12:00:36 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built: Feb 8 2016 20:25:54 UTC
八月 29, 2016 12:00:36 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number: 7.0.68.0
八月 29, 2016 12:00:36 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name: Windows 7
八月 29, 2016 12:00:36 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version: 6.1
八月 29, 2016 12:00:36 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture: amd64
八月 29, 2016 12:00:36 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home: E:\e\java\jdk1.7.0_79\jre
八月 29, 2016 12:00:36 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version: 1.7.0_79-b15
八月 29, 2016 12:00:36 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor: Oracle Corporation
八月 29, 2016 12:00:36 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: E:\e\tomee\apache-tomee-webprofile-1.7.4
八月 29, 2016 12:00:36 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: E:\e\tomee\apache-tomee-webprofile-1.7.4
八月 29, 2016 12:00:36 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -javaagent:E:\e\tomee\apache-tomee-webprofile-1.7.4\lib\openejb-javaagent.jar
八月 29, 2016 12:00:36 上午 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
八月 29, 2016 12:00:36 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
八月 29, 2016 12:00:36 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=E:\e\tomee\apache-tomee-webprofile-1.7.4\endorsed
八月 29, 2016 12:00:36 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=E:\e\tomee\apache-tomee-webprofile-1.7.4
八月 29, 2016 12:00:36 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=E:\e\tomee\apache-tomee-webprofile-1.7.4
八月 29, 2016 12:00:36 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.io.tmpdir=E:\e\tomee\apache-tomee-webprofile-1.7.4\temp
八月 29, 2016 12:00:36 上午 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\;.
八月 29, 2016 12:00:36 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
八月 29, 2016 12:00:36 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
八月 29, 2016 12:00:36 上午 org.apache.openejb.util.OptionsLog info
信息: Using 'tomee.remote.support=true'
八月 29, 2016 12:00:36 上午 org.apache.openejb.util.OptionsLog info
信息: Using 'openejb.jdbc.datasource-creator=org.apache.tomee.jdbc.TomEEDataSourceCreator'
八月 29, 2016 12:00:36 上午 org.apache.openejb.OpenEJB$Instance <init>
信息: ********************************************************************************
八月 29, 2016 12:00:36 上午 org.apache.openejb.OpenEJB$Instance <init>
信息: OpenEJB http://tomee.apache.org/
八月 29, 2016 12:00:36 上午 org.apache.openejb.OpenEJB$Instance <init>
信息: Startup: Mon Aug 29 00:00:36 CST 2016
八月 29, 2016 12:00:36 上午 org.apache.openejb.OpenEJB$Instance <init>
信息: Copyright 1999-2015 (C) Apache OpenEJB/TomEE Project, All Rights Reserved.
八月 29, 2016 12:00:36 上午 org.apache.openejb.OpenEJB$Instance <init>
信息: Version: 4.7.4
八月 29, 2016 12:00:36 上午 org.apache.openejb.OpenEJB$Instance <init>
信息: Build date: 20160304
八月 29, 2016 12:00:36 上午 org.apache.openejb.OpenEJB$Instance <init>
信息: Build time: 09:05
八月 29, 2016 12:00:37 上午 org.apache.openejb.OpenEJB$Instance <init>
信息: ********************************************************************************
八月 29, 2016 12:00:37 上午 org.apache.openejb.OpenEJB$Instance <init>
信息: openejb.home = E:\e\tomee\apache-tomee-webprofile-1.7.4
八月 29, 2016 12:00:37 上午 org.apache.openejb.OpenEJB$Instance <init>
信息: openejb.base = E:\e\tomee\apache-tomee-webprofile-1.7.4
八月 29, 2016 12:00:37 上午 org.apache.openejb.cdi.CdiBuilder initializeOWB
信息: Created new singletonService org.apache.openejb.cdi.ThreadSingletonServiceImpl@62cb094b
八月 29, 2016 12:00:37 上午 org.apache.openejb.cdi.CdiBuilder initializeOWB
信息: Succeeded in installing singleton service
八月 29, 2016 12:00:37 上午 org.apache.openejb.config.ConfigurationFactory init
信息: openejb configuration file is 'E:\e\tomee\apache-tomee-webprofile-1.7.4\conf\tomee.xml'
八月 29, 2016 12:00:37 上午 org.apache.openejb.config.ConfigurationFactory configureService
信息: Configuring Service(id=Tomcat Security Service, type=SecurityService, provider-id=Tomcat Security Service)
八月 29, 2016 12:00:37 上午 org.apache.openejb.config.ConfigurationFactory configureService
信息: Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
八月 29, 2016 12:00:37 上午 org.apache.openejb.util.OptionsLog info
信息: Using 'openejb.system.apps=true'
八月 29, 2016 12:00:37 上午 org.apache.openejb.config.ConfigurationFactory configureApplication
信息: Configuring enterprise application: openejb
八月 29, 2016 12:00:37 上午 org.apache.openejb.config.InitEjbDeployments deploy
信息: Using openejb.deploymentId.format '{ejbName}'
八月 29, 2016 12:00:37 上午 org.apache.openejb.config.InitEjbDeployments deploy
信息: Auto-deploying ejb openejb/Deployer: EjbDeployment(deployment-id=openejb/Deployer)
八月 29, 2016 12:00:37 上午 org.apache.openejb.config.InitEjbDeployments deploy
信息: Auto-deploying ejb openejb/ConfigurationInfo: EjbDeployment(deployment-id=openejb/ConfigurationInfo)
八月 29, 2016 12:00:37 上午 org.apache.openejb.config.InitEjbDeployments deploy
信息: Auto-deploying ejb MEJB: EjbDeployment(deployment-id=MEJB)
八月 29, 2016 12:00:37 上午 org.apache.openejb.config.ConfigurationFactory configureService
信息: Configuring Service(id=Default Stateless Container, type=Container, provider-id=Default Stateless Container)
八月 29, 2016 12:00:37 上午 org.apache.openejb.config.AutoConfig createContainer
信息: Auto-creating a container for bean openejb/Deployer: Container(type=STATELESS, id=Default Stateless Container)
八月 29, 2016 12:00:37 上午 org.apache.openejb.config.AppInfoBuilder build
信息: Enterprise application "openejb" loaded.
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.Assembler createRecipe
信息: Creating TransactionManager(id=Default Transaction Manager)
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.Assembler createRecipe
信息: Creating SecurityService(id=Tomcat Security Service)
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.Assembler createRecipe
信息: Creating Container(id=Default Stateless Container)
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.Assembler createAppClassLoader
信息: Not creating another application classloader for openejb
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Assembling app: openejb
八月 29, 2016 12:00:37 上午 org.apache.openejb.util.OptionsLog info
信息: Using 'openejb.jndiname.format={deploymentId}{interfaceType.openejbLegacyName}'
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=openejb/DeployerBusinessRemote) --> Ejb(deployment-id=openejb/Deployer)
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=global/openejb/openejb/Deployer!org.apache.openejb.assembler.Deployer) --> Ejb(deployment-id=openejb/Deployer)
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=global/openejb/openejb/Deployer) --> Ejb(deployment-id=openejb/Deployer)
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=openejb/ConfigurationInfoBusinessRemote) --> Ejb(deployment-id=openejb/ConfigurationInfo)
八月 29, 2016 12:00:37 上午 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)
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=global/openejb/openejb/ConfigurationInfo) --> Ejb(deployment-id=openejb/ConfigurationInfo)
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=MEJB) --> Ejb(deployment-id=MEJB)
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=global/openejb/MEJB!javax.management.j2ee.ManagementHome) --> Ejb(deployment-id=MEJB)
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=global/openejb/MEJB) --> Ejb(deployment-id=MEJB)
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.Assembler startEjbs
信息: Created Ejb(deployment-id=openejb/Deployer, ejb-name=openejb/Deployer, container=Default Stateless Container)
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.Assembler startEjbs
信息: Created Ejb(deployment-id=MEJB, ejb-name=MEJB, container=Default Stateless Container)
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.Assembler startEjbs
信息: Created Ejb(deployment-id=openejb/ConfigurationInfo, ejb-name=openejb/ConfigurationInfo, container=Default Stateless Container)
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.Assembler startEjbs
信息: Started Ejb(deployment-id=openejb/Deployer, ejb-name=openejb/Deployer, container=Default Stateless Container)
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.Assembler startEjbs
信息: Started Ejb(deployment-id=MEJB, ejb-name=MEJB, container=Default Stateless Container)
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.Assembler startEjbs
信息: Started Ejb(deployment-id=openejb/ConfigurationInfo, ejb-name=openejb/ConfigurationInfo, container=Default Stateless Container)
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.Assembler deployMBean
信息: Deployed MBean(openejb.user.mbeans:application=openejb,group=org.apache.openejb.assembler.monitoring,name=JMXDeployer)
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Deployed Application(path=openejb)
八月 29, 2016 12:00:37 上午 org.apache.openejb.server.SimpleServiceManager start
信息: ** Bound Services **
八月 29, 2016 12:00:37 上午 org.apache.openejb.server.SimpleServiceManager printRow
信息: NAME IP PORT
八月 29, 2016 12:00:37 上午 org.apache.openejb.server.SimpleServiceManager start
信息: -------
八月 29, 2016 12:00:37 上午 org.apache.openejb.server.SimpleServiceManager start
信息: Ready!
八月 29, 2016 12:00:37 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 2014 ms
八月 29, 2016 12:00:37 上午 org.apache.tomee.catalina.OpenEJBNamingContextListener bindResource
信息: Importing a Tomcat Resource with id 'UserDatabase' of type 'org.apache.catalina.UserDatabase'.
八月 29, 2016 12:00:37 上午 org.apache.openejb.assembler.classic.Assembler createRecipe
信息: Creating Resource(id=UserDatabase)
八月 29, 2016 12:00:37 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
八月 29, 2016 12:00:37 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat (TomEE)/7.0.68 (1.7.4)
八月 29, 2016 12:00:37 上午 org.apache.catalina.startup.HostConfig deployWAR
信息: Deploying web application archive E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\tomee.war
八月 29, 2016 12:00:37 上午 org.apache.tomee.catalina.TomcatWebAppBuilder init
信息: ------------------------- localhost -> /tomee
八月 29, 2016 12:00:38 上午 org.apache.openejb.config.ConfigurationFactory configureApplication
信息: Configuring enterprise application: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\tomee
八月 29, 2016 12:00:38 上午 org.apache.openejb.config.AppInfoBuilder build
信息: Enterprise application "E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\tomee" loaded.
八月 29, 2016 12:00:38 上午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Assembling app: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\tomee
八月 29, 2016 12:00:38 上午 org.apache.openejb.cdi.CdiBuilder initSingleton
信息: Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@62cb094b
八月 29, 2016 12:00:38 上午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container is starting...
八月 29, 2016 12:00:38 上午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [CdiPlugin]
八月 29, 2016 12:00:38 上午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
八月 29, 2016 12:00:38 上午 org.apache.webbeans.config.BeansDeployer validateInjectionPoints
信息: All injection points were validated successfully.
八月 29, 2016 12:00:38 上午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container has started, it took 94 ms.
八月 29, 2016 12:00:38 上午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Deployed Application(path=E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\tomee)
八月 29, 2016 12:00:38 上午 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 608 ms
八月 29, 2016 12:00:38 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\docs
八月 29, 2016 12:00:38 上午 org.apache.tomee.catalina.TomcatWebAppBuilder init
信息: ------------------------- localhost -> /docs
八月 29, 2016 12:00:38 上午 org.apache.openejb.config.ConfigurationFactory configureApplication
信息: Configuring enterprise application: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\docs
八月 29, 2016 12:00:38 上午 org.apache.openejb.config.AppInfoBuilder build
信息: Enterprise application "E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\docs" loaded.
八月 29, 2016 12:00:38 上午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Assembling app: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\docs
八月 29, 2016 12:00:38 上午 org.apache.openejb.cdi.CdiBuilder initSingleton
信息: Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@62cb094b
八月 29, 2016 12:00:38 上午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container is starting...
八月 29, 2016 12:00:38 上午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [CdiPlugin]
八月 29, 2016 12:00:38 上午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
八月 29, 2016 12:00:38 上午 org.apache.webbeans.config.BeansDeployer validateInjectionPoints
信息: All injection points were validated successfully.
八月 29, 2016 12:00:38 上午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container has started, it took 16 ms.
八月 29, 2016 12:00:38 上午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Deployed Application(path=E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\docs)
八月 29, 2016 12:00:38 上午 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 172 ms
八月 29, 2016 12:00:38 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\host-manager
八月 29, 2016 12:00:38 上午 org.apache.tomee.catalina.TomcatWebAppBuilder init
信息: ------------------------- localhost -> /host-manager
八月 29, 2016 12:00:38 上午 org.apache.openejb.config.ConfigurationFactory configureApplication
信息: Configuring enterprise application: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\host-manager
八月 29, 2016 12:00:38 上午 org.apache.openejb.config.AppInfoBuilder build
信息: Enterprise application "E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\host-manager" loaded.
八月 29, 2016 12:00:38 上午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Assembling app: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\host-manager
八月 29, 2016 12:00:38 上午 org.apache.openejb.cdi.CdiBuilder initSingleton
信息: Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@62cb094b
八月 29, 2016 12:00:38 上午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container is starting...
八月 29, 2016 12:00:38 上午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [CdiPlugin]
八月 29, 2016 12:00:38 上午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
八月 29, 2016 12:00:38 上午 org.apache.webbeans.config.BeansDeployer validateInjectionPoints
信息: All injection points were validated successfully.
八月 29, 2016 12:00:38 上午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container has started, it took 16 ms.
八月 29, 2016 12:00:38 上午 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
八月 29, 2016 12:00:38 上午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Deployed Application(path=E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\host-manager)
八月 29, 2016 12:00:38 上午 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 156 ms
八月 29, 2016 12:00:38 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\manager
八月 29, 2016 12:00:38 上午 org.apache.tomee.catalina.TomcatWebAppBuilder init
信息: ------------------------- localhost -> /manager
八月 29, 2016 12:00:38 上午 org.apache.openejb.config.ConfigurationFactory configureApplication
信息: Configuring enterprise application: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\manager
八月 29, 2016 12:00:38 上午 org.apache.openejb.config.AppInfoBuilder build
信息: Enterprise application "E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\manager" loaded.
八月 29, 2016 12:00:38 上午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Assembling app: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\manager
八月 29, 2016 12:00:38 上午 org.apache.openejb.cdi.CdiBuilder initSingleton
信息: Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@62cb094b
八月 29, 2016 12:00:38 上午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container is starting...
八月 29, 2016 12:00:38 上午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [CdiPlugin]
八月 29, 2016 12:00:38 上午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
八月 29, 2016 12:00:38 上午 org.apache.webbeans.config.BeansDeployer validateInjectionPoints
信息: All injection points were validated successfully.
八月 29, 2016 12:00:38 上午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container has started, it took 32 ms.
八月 29, 2016 12:00:38 上午 org.apache.tomee.catalina.TomcatWebAppBuilder deployWebApps
信息: using context file E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\manager\META-INF\context.xml
八月 29, 2016 12:00:38 上午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Deployed Application(path=E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\manager)
八月 29, 2016 12:00:38 上午 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 140 ms
八月 29, 2016 12:00:38 上午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\ROOT
八月 29, 2016 12:00:38 上午 org.apache.tomee.catalina.TomcatWebAppBuilder init
信息: ------------------------- localhost -> /
八月 29, 2016 12:00:39 上午 org.apache.openejb.config.ConfigurationFactory configureApplication
信息: Configuring enterprise application: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\ROOT
八月 29, 2016 12:00:39 上午 org.apache.openejb.config.AppInfoBuilder build
信息: Enterprise application "E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\ROOT" loaded.
八月 29, 2016 12:00:39 上午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Assembling app: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\ROOT
八月 29, 2016 12:00:39 上午 org.apache.openejb.cdi.CdiBuilder initSingleton
信息: Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@62cb094b
八月 29, 2016 12:00:39 上午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container is starting...
八月 29, 2016 12:00:39 上午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [CdiPlugin]
八月 29, 2016 12:00:39 上午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
八月 29, 2016 12:00:39 上午 org.apache.webbeans.config.BeansDeployer validateInjectionPoints
信息: All injection points were validated successfully.
八月 29, 2016 12:00:39 上午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container has started, it took 16 ms.
八月 29, 2016 12:00:39 上午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Deployed Application(path=E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\ROOT)
八月 29, 2016 12:00:39 上午 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 140 ms
八月 29, 2016 12:00:39 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
八月 29, 2016 12:00:39 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
八月 29, 2016 12:00:39 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 1280 ms
八月 29, 2016 12:00:49 上午 org.apache.openejb.config.ConfigurationFactory configureApplication
信息: Configuring enterprise application: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\helloMDB-1.0.jar
八月 29, 2016 12:00:49 上午 org.apache.openejb.config.InitEjbDeployments deploy
信息: Auto-deploying ejb HelloMDB: EjbDeployment(deployment-id=HelloMDB)
八月 29, 2016 12:00:49 上午 org.apache.openejb.config.ConfigurationFactory configureService
信息: Configuring Service(id=Default MDB Container, type=Container, provider-id=Default MDB Container)
八月 29, 2016 12:00:49 上午 org.apache.openejb.config.AutoConfig createContainer
信息: Auto-creating a container for bean HelloMDB: Container(type=MESSAGE, id=Default MDB Container)
八月 29, 2016 12:00:49 上午 org.apache.openejb.config.ConfigurationFactory configureService
信息: Configuring Service(id=Default JMS Resource Adapter, type=Resource, provider-id=Default JMS Resource Adapter)
八月 29, 2016 12:00:49 上午 org.apache.openejb.config.ConfigurationFactory configureService
信息: Configuring Service(id=Default Unmanaged JDBC Database, type=Resource, provider-id=Default Unmanaged JDBC Database)
八月 29, 2016 12:00:49 上午 org.apache.openejb.assembler.classic.Assembler createRecipe
信息: Creating Resource(id=Default Unmanaged JDBC Database)
八月 29, 2016 12:00:49 上午 org.apache.tomee.jdbc.TomEEDataSourceCreator$TomEEDataSource readOnly
信息: Disabling testOnBorrow since no validation query is provided
八月 29, 2016 12:00:49 上午 org.apache.openejb.assembler.classic.Assembler createRecipe
信息: Creating Resource(id=Default JMS Resource Adapter)
八月 29, 2016 12:00:49 上午 org.apache.openejb.assembler.classic.Assembler doCreateResource
信息: Thread pool size for 'Default JMS Resource Adapter' is (30)
八月 29, 2016 12:00:49 上午 org.apache.openejb.resource.activemq.ActiveMQ5Factory createBroker
信息: ActiveMQ5Factory creating broker
八月 29, 2016 12:00:49 上午 org.apache.openejb.resource.activemq.ActiveMQ5Factory createBroker
信息: Using ActiveMQ startup timeout of 10000ms
八月 29, 2016 12:00:49 上午 org.apache.openejb.resource.activemq.ActiveMQ5Factory$1 run
信息: Starting ActiveMQ BrokerService
八月 29, 2016 12:00:49 上午 org.apache.activemq.broker.BrokerService checkMemorySystemUsageLimits
警告: Memory Usage for the Broker (1024mb) is more than the maximum available for the JVM: 850 mb - resetting to 70% of maximum available: 595 mb
八月 29, 2016 12:00:49 上午 org.apache.activemq.broker.BrokerService doStartPersistenceAdapter
信息: Using Persistence Adapter: MemoryPersistenceAdapter
八月 29, 2016 12:00:49 上午 org.apache.activemq.broker.BrokerService doStartBroker
信息: Apache ActiveMQ 5.14.0 (localhost, ID:Wi-PC-64224-1472400049390-0:1) is starting
八月 29, 2016 12:00:49 上午 org.apache.activemq.transport.TransportServerThreadSupport doStart
信息: Listening for connections at: tcp://127.0.0.1:61616
八月 29, 2016 12:00:49 上午 org.apache.activemq.broker.TransportConnector start
信息: Connector tcp://127.0.0.1:61616 started
八月 29, 2016 12:00:49 上午 org.apache.activemq.broker.BrokerService doStartBroker
信息: Apache ActiveMQ 5.14.0 (localhost, ID:Wi-PC-64224-1472400049390-0:1) started
八月 29, 2016 12:00:49 上午 org.apache.activemq.broker.BrokerService doStartBroker
信息: For help or more information please see: http://activemq.apache.org
八月 29, 2016 12:00:49 上午 org.apache.openejb.resource.activemq.ActiveMQ5Factory$1 run
信息: Starting ActiveMQ checkpoint
八月 29, 2016 12:00:49 上午 org.apache.openejb.resource.activemq.ActiveMQ5Factory createBroker
信息: ActiveMQ broker started
八月 29, 2016 12:00:49 上午 org.apache.openejb.assembler.classic.Assembler createRecipe
信息: Creating Container(id=Default MDB Container)
八月 29, 2016 12:00:49 上午 org.apache.openejb.config.ConfigurationFactory configureService
信息: Configuring Service(id=Default JMS Connection Factory, type=Resource, provider-id=Default JMS Connection Factory)
八月 29, 2016 12:00:49 上午 org.apache.openejb.config.AutoConfig logAutoCreateResource
信息: Auto-creating a Resource with id 'Default JMS Connection Factory' of type 'javax.jms.QueueConnectionFactory for 'HelloMDB'.
八月 29, 2016 12:00:49 上午 org.apache.openejb.assembler.classic.Assembler createRecipe
信息: Creating Resource(id=Default JMS Connection Factory)
八月 29, 2016 12:00:49 上午 org.apache.openejb.assembler.classic.Assembler doCreateResource
信息: Creating ConnectionManager for Resource(id=Default JMS Connection Factory)
八月 29, 2016 12:00:49 上午 org.apache.geronimo.connector.outbound.GenericConnectionManager$InterceptorsImpl <init>
信息: No runtime TransactionSupport
八月 29, 2016 12:00:49 上午 org.apache.openejb.config.AutoConfig processResourceRef
信息: Auto-linking resource-ref 'jms/connectionFactory' in bean HelloMDB to Resource(id=Default JMS Connection Factory)
八月 29, 2016 12:00:49 上午 org.apache.openejb.config.ConfigurationFactory configureService
信息: Configuring Service(id=jms/answerQueue, type=Resource, provider-id=Default Queue)
八月 29, 2016 12:00:49 上午 org.apache.openejb.config.AutoConfig logAutoCreateResource
信息: Auto-creating a Resource with id 'jms/answerQueue' of type 'javax.jms.Queue for 'HelloMDB'.
八月 29, 2016 12:00:49 上午 org.apache.openejb.assembler.classic.Assembler createRecipe
信息: Creating Resource(id=jms/answerQueue)
八月 29, 2016 12:00:49 上午 org.apache.openejb.config.AutoConfig processResourceEnvRef
信息: Auto-linking resource-env-ref 'jms/answerQueue' in bean HelloMDB to Resource(id=jms/answerQueue)
八月 29, 2016 12:00:49 上午 org.apache.openejb.config.ConfigurationFactory configureService
信息: Configuring Service(id=jms/destinationQueue, type=Resource, provider-id=Default Queue)
八月 29, 2016 12:00:49 上午 org.apache.openejb.config.AutoConfig logAutoCreateResource
信息: Auto-creating a Resource with id 'jms/destinationQueue' of type 'javax.jms.Queue for 'HelloMDB'.
八月 29, 2016 12:00:49 上午 org.apache.openejb.assembler.classic.Assembler createRecipe
信息: Creating Resource(id=jms/destinationQueue)
八月 29, 2016 12:00:49 上午 org.apache.openejb.config.AppInfoBuilder build
信息: Enterprise application "E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\helloMDB-1.0.jar" loaded.
八月 29, 2016 12:00:49 上午 org.apache.openejb.assembler.classic.Assembler createAppClassLoader
信息: Creating dedicated application classloader for helloMDB-1.0
八月 29, 2016 12:00:49 上午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Assembling app: E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\helloMDB-1.0.jar
八月 29, 2016 12:00:49 上午 org.apache.openejb.assembler.classic.JndiBuilder bind
信息: Jndi(name=HelloMDB) --> Ejb(deployment-id=HelloMDB)
八月 29, 2016 12:00:49 上午 org.apache.openejb.cdi.CdiBuilder initSingleton
信息: Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@62cb094b
八月 29, 2016 12:00:49 上午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container is starting...
八月 29, 2016 12:00:49 上午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [CdiPlugin]
八月 29, 2016 12:00:49 上午 org.apache.webbeans.plugins.PluginLoader startUp
信息: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
八月 29, 2016 12:00:49 上午 org.apache.webbeans.config.BeansDeployer validateInjectionPoints
信息: All injection points were validated successfully.
八月 29, 2016 12:00:49 上午 org.apache.openejb.cdi.OpenEJBLifecycle startApplication
信息: OpenWebBeans Container has started, it took 32 ms.
八月 29, 2016 12:00:49 上午 org.apache.activemq.ra.ActiveMQEndpointWorker start
信息: Starting
八月 29, 2016 12:00:49 上午 org.apache.openejb.assembler.classic.Assembler startEjbs
信息: Created Ejb(deployment-id=HelloMDB, ejb-name=HelloMDB, container=Default MDB Container)
八月 29, 2016 12:00:49 上午 org.apache.geronimo.connector.work.WorkerContext run
信息: Removing non-required WorkContextHandler with no context: org.apache.geronimo.connector.work.TransactionContextHandler@3cd6d0
八月 29, 2016 12:00:49 上午 org.apache.openejb.assembler.classic.Assembler startEjbs
信息: Started Ejb(deployment-id=HelloMDB, ejb-name=HelloMDB, container=Default MDB Container)
八月 29, 2016 12:00:49 上午 org.apache.geronimo.connector.work.WorkerContext run
信息: Removing non-required WorkContextHandler with no context: org.apache.openejb.core.security.SecurityContextHandler@1a3af1cf
八月 29, 2016 12:00:49 上午 org.apache.openejb.assembler.classic.Assembler createApplication
信息: Deployed Application(path=E:\e\tomee\apache-tomee-webprofile-1.7.4\webapps\helloMDB-1.0.jar)
八月 29, 2016 12:00:49 上午 org.apache.geronimo.connector.work.WorkerContext run
信息: Removing non-required WorkContextHandler with no context: org.apache.geronimo.connector.work.HintsContextHandler@13d95a7d
八月 29, 2016 12:00:49 上午 org.apache.activemq.ra.ActiveMQEndpointWorker$1 run
信息: Establishing connection to broker [vm://localhost?waitForStart=20000&async=true]
八月 29, 2016 12:00:49 上午 org.apache.activemq.broker.TransportConnector start
信息: Connector vm://localhost started
八月 29, 2016 12:00:49 上午 org.apache.activemq.ra.ActiveMQEndpointWorker$1 run
信息: Successfully established connection to broker [vm://localhost?waitForStart=20000&async=true]
运行客户端