应用程序客户端是在“应用程序客户端容器”中运行的 Java EE 客户端应用程序。
但是这里的命令行用法:
https://docs.jboss.org/author/display/WFLY8/Application+Client+Reference
似乎启动了一个全新的 wildfly 实例,即使--host=localhost
设置了标志。我没有看到任何证据表明它正在连接到我正在运行的服务器。
我误解了这些是如何工作的吗?如何在正在运行的服务器中运行此应用程序客户端?
c:\wildfly\bin>appclient.bat --host=anything-can-go-here-apparently producer.jar
Calling "c:\wildfly\bin\appclient.conf.bat"
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
18:32:48,372 INFO [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final
18:32:48,460 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.2.Final
18:32:48,510 INFO [org.jboss.as] (MSC service thread 1-6) JBAS015899: WildFly 8.2.0.Final "Tweek" starting
18:32:49,314 INFO [org.jboss.as.jacorb] (ServerService Thread Pool -- 16) JBAS016300: Activating JacORB Subsystem
18:32:49,327 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 19) JBAS011800: Activating Naming Subsystem
18:32:49,330 INFO [org.jboss.as.security] (ServerService Thread Pool -- 20) JBAS013171: Activating Security Subsystem
18:32:49,332 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 21) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique.
18:32:49,335 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 22) JBAS015537: Activating WebServices Extension
18:32:49,367 INFO [org.jboss.as.security] (MSC service thread 1-1) JBAS013170: Current PicketBox version=4.0.21.Final
18:32:49,382 INFO [org.jboss.as.connector.logging] (MSC service thread 1-1) JBAS010408: Starting JCA Subsystem (IronJacamar 1.1.9.Final)
18:32:49,406 INFO [org.jboss.as.naming] (MSC service thread 1-4) JBAS011802: Starting Naming Service
18:32:49,433 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 13) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
18:32:49,462 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) JBAS010417: Started Driver service with driver-name = h2
18:32:49,704 INFO [org.jboss.ws.common.management] (MSC service thread 1-8) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.3.2.Final
18:32:49,749 WARN [jacorb.codeset] (MSC service thread 1-6) Warning - unknown codeset (Cp1252) - defaulting to ISO-8859-1
18:32:49,758 INFO [org.jboss.as.jacorb] (MSC service thread 1-6) JBAS016330: CORBA ORB Service started
18:32:49,900 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
18:32:49,911 INFO [org.jboss.as.jacorb] (MSC service thread 1-6) JBAS016328: CORBA Naming Service started
18:32:49,932 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.2.0.Final "Tweek" started in 1813ms - Started 118 of 120 services (9 services are lazy, passive or on-demand)
18:32:49,939 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "producer.jar" (runtime-name: "producer.jar")
18:32:50,079 ERROR [org.jboss.as.controller.management-operation] (Thread-35) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "producer.jar")]) - failure description: {"JBAS01477
1: Services with missing/unavailable dependencies" => [
"jboss.naming.context.java.module.producer.producer.env.\"javaeetutorial.producer.Producer\".topic is missing [jboss.naming.context.java.module.producer.producer.env.jms.MyTopic]",
"jboss.naming.context.java.module.producer.producer.env.\"javaeetutorial.producer.Producer\".connectionFactory is missing [jboss.naming.context.java.module.producer.producer.DefaultJMSConnectionFa
ctory]",
"jboss.naming.context.java.module.producer.producer.env.\"javaeetutorial.producer.Producer\".queue is missing [jboss.naming.context.java.module.producer.producer.env.jms.MyQueue]"
]}
18:32:50,080 ERROR [org.jboss.as.server] (Thread-35) JBAS015870: Deploy of deployment "producer.jar" was rolled back with the following failure message:
{"JBAS014771: Services with missing/unavailable dependencies" => [
"jboss.naming.context.java.module.producer.producer.env.\"javaeetutorial.producer.Producer\".topic is missing [jboss.naming.context.java.module.producer.producer.env.jms.MyTopic]",
"jboss.naming.context.java.module.producer.producer.env.\"javaeetutorial.producer.Producer\".connectionFactory is missing [jboss.naming.context.java.module.producer.producer.DefaultJMSConnectionFa
ctory]",
"jboss.naming.context.java.module.producer.producer.env.\"javaeetutorial.producer.Producer\".queue is missing [jboss.naming.context.java.module.producer.producer.env.jms.MyQueue]"
]}
18:32:50,085 ERROR [org.jboss.as.appclient.logging] (Thread-43) JBAS013201: InterruptedException running app client main: java.lang.InterruptedException
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:998) [rt.jar:1.8.0_25]
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304) [rt.jar:1.8.0_25]
at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231) [rt.jar:1.8.0_25]
at org.jboss.as.appclient.service.ApplicationClientStartService$1.run(ApplicationClientStartService.java:108)
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_25]
18:32:50,104 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010409: Unbound data source [java:jboss/datasources/ExampleDS]
18:32:50,110 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-6) HV000001: Hibernate Validator 5.1.3.Final
18:32:50,108 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-5) JBAS010418: Stopped Driver service with driver-name = h2
18:32:50,154 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment producer.jar (runtime-name: producer.jar) in 72ms
18:32:50,162 INFO [org.jboss.as.controller] (Thread-35) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.deployment.unit."producer.jar".component.AppClientComponent.CREATE (missing) dependents: [service jboss.deployment.unit."producer.jar".component.AppClientComponent.START]
service jboss.deployment.unit."producer.jar".component.AppClientComponent.JndiBindingsService (missing) dependents: [service jboss.deployment.unit."producer.jar".jndiDependencyService]
service jboss.deployment.unit."producer.jar".component.AppClientComponent.START (missing) dependents: [service jboss.deployment.unit."producer.jar".deploymentCompleteService]
service jboss.naming.context.java.app.producer.env (missing) dependents: [service jboss.deployment.unit."producer.jar".jndiDependencyService]
service jboss.naming.context.java.module.producer.producer.DefaultContextService (missing) dependents: [service jboss.deployment.unit."producer.jar".jndiDependencyService]
service jboss.naming.context.java.module.producer.producer.DefaultDataSource (missing) dependents: [service jboss.deployment.unit."producer.jar".jndiDependencyService]
service jboss.naming.context.java.module.producer.producer.DefaultJMSConnectionFactory (missing) dependents: [service jboss.naming.context.java.module.producer.producer.env."javaeetutorial.produ
cer.Producer".connectionFactory]
service jboss.naming.context.java.module.producer.producer.DefaultManagedExecutorService (missing) dependents: [service jboss.deployment.unit."producer.jar".jndiDependencyService]
service jboss.naming.context.java.module.producer.producer.DefaultManagedScheduledExecutorService (missing) dependents: [service jboss.deployment.unit."producer.jar".jndiDependencyService]
service jboss.naming.context.java.module.producer.producer.DefaultManagedThreadFactory (missing) dependents: [service jboss.deployment.unit."producer.jar".jndiDependencyService]
service jboss.naming.context.java.module.producer.producer.env (missing) dependents: [service jboss.deployment.unit."producer.jar".jndiDependencyService]
service jboss.naming.context.java.module.producer.producer.env."javaeetutorial.producer.Producer".connectionFactory (missing) dependents: [service jboss.deployment.unit."producer.jar".component.
AppClientComponent.START, service jboss.deployment.unit."producer.jar".jndiDependencyService]
service jboss.naming.context.java.module.producer.producer.env."javaeetutorial.producer.Producer".queue (missing) dependents: [service jboss.deployment.unit."producer.jar".component.AppClientCom
ponent.START, service jboss.deployment.unit."producer.jar".jndiDependencyService]
service jboss.naming.context.java.module.producer.producer.env."javaeetutorial.producer.Producer".topic (missing) dependents: [service jboss.deployment.unit."producer.jar".component.AppClientCom
ponent.START, service jboss.deployment.unit."producer.jar".jndiDependencyService]
service jboss.naming.context.java.module.producer.producer.env.jms.MyQueue (missing) dependents: [service jboss.naming.context.java.module.producer.producer.env."javaeetutorial.producer.Producer
".queue]
service jboss.naming.context.java.module.producer.producer.env.jms.MyTopic (missing) dependents: [service jboss.naming.context.java.module.producer.producer.env."javaeetutorial.producer.Producer
".topic]
18:32:50,166 INFO [org.jboss.as] (MSC service thread 1-5) JBAS015950: WildFly 8.2.0.Final "Tweek" stopped in 63ms