• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

WFLY in Domainmode run @Schedule on each server process...

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I setup a server cluster (domainmode) with WFLY 8 based on <profile name="full-ha">
Domain starts without errors and both server are running.
The deployed ear file contains a timer, but both servers dealing the timer task.





When using the following annotation:



The ear deloyment faild:

[Server:server-four] 14:53:08,006 INFO [org.jboss.as.messaging] (ServerService Thread Pool -- 64) JBAS011601: Bound messaging object to jndi name queue/HiNetHimResponderBeanQueue
[Server:server-four] 14:53:08,006 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ221003: trying to deploy queue jms.queue.HiNetHimReceiverBeanQueue
[Server:server-four] 14:53:08,007 INFO [org.jboss.as.messaging] (ServerService Thread Pool -- 61) JBAS011601: Bound messaging object to jndi name java:jboss/exported/queue/HiNetHimReceiverBeanQueue
[Server:server-four] 14:53:08,007 INFO [org.jboss.as.messaging] (ServerService Thread Pool -- 61) JBAS011601: Bound messaging object to jndi name queue/HiNetHimReceiverBeanQueue
[Server:server-four] 14:53:08,040 INFO [org.jboss.as.connector.deployment] (MSC service thread 1-9) JBAS010406: Registered connection factory java:/JmsXA
[Server:server-four] 14:53:08,070 INFO [org.hornetq.ra] (MSC service thread 1-9) HornetQ resource adaptor started
[Server:server-four] 14:53:08,071 INFO [org.jboss.as.connector.services.resourceadapters.ResourceAdapterActivatorService$ResourceAdapterActivator] (MSC service thread 1-9) IJ020002: Deployed: file://RaActivatorhornetq-ra
[Server:server-four] 14:53:08,074 INFO [org.jboss.as.connector.deployment] (MSC service thread 1-4) JBAS010401: Bound JCA ConnectionFactory [java:/JmsXA]
[Server:server-four] 14:53:08,074 INFO [org.jboss.as.messaging] (MSC service thread 1-15) JBAS011601: Bound messaging object to jndi name java:jboss/DefaultJMSConnectionFactory
[Server:server-four] 14:53:08,129 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.0.0.Final "WildFly" started in 4644ms - Started 233 of 360 services (175 services are lazy, passive or on-demand)
[Server:server-three] 14:53:08,370 INFO [org.hornetq.core.server] (Thread-13 (HornetQ-server-HornetQServerImpl::serverUUID=d08c0501-d741-11e3-82b0-957b73dfb0a7-952534631)) HQ221027: Bridge ClusterConnectionBridge@ddf5eaf [name=sf.my-cluster.d1abccdb
-d741-11e3-9a5d-c17f6a9b34ca, queue=QueueImpl[name=sf.my-cluster.d1abccdb-d741-11e3-9a5d-c17f6a9b34ca, postOffice=PostOfficeImpl [server=HornetQServerImpl::serverUUID=d08c0501-d741-11e3-82b0-957b73dfb0a7]]@43c13a46 targetConnector=ServerLocatorImpl (
identity=(Cluster-connection-bridge::ClusterConnectionBridge@ddf5eaf [name=sf.my-cluster.d1abccdb-d741-11e3-9a5d-c17f6a9b34ca, queue=QueueImpl[name=sf.my-cluster.d1abccdb-d741-11e3-9a5d-c17f6a9b34ca, postOffice=PostOfficeImpl [server=HornetQServerImp
l::serverUUID=d08c0501-d741-11e3-82b0-957b73dfb0a7]]@43c13a46 targetConnector=ServerLocatorImpl [initialConnectors=[TransportConfiguration(name=http-connector, factory=org-hornetq-core-remoting-impl-netty-NettyConnectorFactory) ?port=8430&http-upgrad
e-endpoint=http-acceptor&host=127-0-0-1&http-upgrade-enabled=true], discoveryGroupConfiguration=null]]::ClusterConnectionImpl@988983904[nodeUUID=d08c0501-d741-11e3-82b0-957b73dfb0a7, connector=TransportConfiguration(name=http-connector, factory=org-h
ornetq-core-remoting-impl-netty-NettyConnectorFactory) ?port=8330&host=127-0-0-1&http-upgrade-endpoint=http-acceptor&http-upgrade-enabled=true, address=jms, server=HornetQServerImpl::serverUUID=d08c0501-d741-11e3-82b0-957b73dfb0a7])) [initialConnecto
rs=[TransportConfiguration(name=http-connector, factory=org-hornetq-core-remoting-impl-netty-NettyConnectorFactory) ?port=8430&http-upgrade-endpoint=http-acceptor&host=127-0-0-1&http-upgrade-enabled=true], discoveryGroupConfiguration=null]] is connec
ted
[Server:server-four] 14:53:08,388 INFO [org.hornetq.core.server] (Thread-13 (HornetQ-server-HornetQServerImpl::serverUUID=d1abccdb-d741-11e3-9a5d-c17f6a9b34ca-610028270)) HQ221027: Bridge ClusterConnectionBridge@7ce0739c [name=sf.my-cluster.d08c0501
-d741-11e3-82b0-957b73dfb0a7, queue=QueueImpl[name=sf.my-cluster.d08c0501-d741-11e3-82b0-957b73dfb0a7, postOffice=PostOfficeImpl [server=HornetQServerImpl::serverUUID=d1abccdb-d741-11e3-9a5d-c17f6a9b34ca]]@2ace5778 targetConnector=ServerLocatorImpl (
identity=(Cluster-connection-bridge::ClusterConnectionBridge@7ce0739c [name=sf.my-cluster.d08c0501-d741-11e3-82b0-957b73dfb0a7, queue=QueueImpl[name=sf.my-cluster.d08c0501-d741-11e3-82b0-957b73dfb0a7, postOffice=PostOfficeImpl [server=HornetQServerIm
pl::serverUUID=d1abccdb-d741-11e3-9a5d-c17f6a9b34ca]]@2ace5778 targetConnector=ServerLocatorImpl [initialConnectors=[TransportConfiguration(name=http-connector, factory=org-hornetq-core-remoting-impl-netty-NettyConnectorFactory) ?port=8330&http-upgra
de-endpoint=http-acceptor&host=127-0-0-1&http-upgrade-enabled=true], discoveryGroupConfiguration=null]]::ClusterConnectionImpl@493601061[nodeUUID=d1abccdb-d741-11e3-9a5d-c17f6a9b34ca, connector=TransportConfiguration(name=http-connector, factory=org-
hornetq-core-remoting-impl-netty-NettyConnectorFactory) ?port=8430&host=127-0-0-1&http-upgrade-endpoint=http-acceptor&http-upgrade-enabled=true, address=jms, server=HornetQServerImpl::serverUUID=d1abccdb-d741-11e3-9a5d-c17f6a9b34ca])) [initialConnect
ors=[TransportConfiguration(name=http-connector, factory=org-hornetq-core-remoting-impl-netty-NettyConnectorFactory) ?port=8330&http-upgrade-endpoint=http-acceptor&host=127-0-0-1&http-upgrade-enabled=true], discoveryGroupConfiguration=null]] is conne
cted
[Host Controller] 14:53:28,695 INFO [org.jboss.as.repository] (XNIO-1 task-5) JBAS014900: Content added at location r:\enviroment\serversdomain\wildfly-8.0.0.Final\domain\data\content\46\2f867fa59dba8d34685f8994ffe03e4be23206\content
[Server:server-three] 14:53:36,073 INFO [org.jboss.as.server.deployment] (MSC service thread 1-13) JBAS015876: Starting deployment of "HiNetServer.ear" (runtime-name: "HiNetServer.ear")
[Server:server-four] 14:53:36,075 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015876: Starting deployment of "HiNetServer.ear" (runtime-name: "HiNetServer.ear")
[Server:server-four] 14:53:37,264 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015876: Starting deployment of "null" (runtime-name: "HiNetProcessing.jar")
[Server:server-four] 14:53:37,264 INFO [org.jboss.as.server.deployment] (MSC service thread 1-10) JBAS015876: Starting deployment of "null" (runtime-name: "HiNetExtension.jar")
[Server:server-four] 14:53:37,264 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "null" (runtime-name: "HiNetBase.jar")
[Server:server-four] 14:53:37,264 INFO [org.jboss.as.server.deployment] (MSC service thread 1-14) JBAS015876: Starting deployment of "null" (runtime-name: "HiNetWebserviceAccess.war")
[Server:server-three] 14:53:37,270 INFO [org.jboss.as.server.deployment] (MSC service thread 1-10) JBAS015876: Starting deployment of "null" (runtime-name: "HiNetExtension.jar")
[Server:server-three] 14:53:37,270 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "null" (runtime-name: "HiNetBase.jar")
[Server:server-three] 14:53:37,270 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of "null" (runtime-name: "HiNetWebserviceAccess.war")
[Server:server-three] 14:53:37,270 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "null" (runtime-name: "HiNetProcessing.jar")
[Server:server-four] 14:53:37,382 INFO [org.jboss.as.jpa] (MSC service thread 1-15) JBAS011401: Read persistence.xml for HIMSTORAGE
[Server:server-four] 14:53:37,387 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.subunit."HiNetServer.ear"."HiNetProcessing.jar".PARSE: org.jboss.msc.service.StartException in service j
boss.deployment.subunit."HiNetServer.ear"."HiNetProcessing.jar".PARSE: JBAS018733: Failed to process phase PARSE of subdeployment "HiNetProcessing.jar" of deployment "HiNetServer.ear"
[Server:server-four] at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.0.0.Final.jar:8.0.0.Final]
[Server:server-four] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
[Server:server-four] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
[Server:server-three] 14:53:37,392 INFO [org.jboss.as.jpa] (MSC service thread 1-13) JBAS011401: Read persistence.xml for HIMSTORAGE
[Server:server-four] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_09]
[Server:server-four] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_09]
[Server:server-four] at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09]
[Server:server-three] 14:53:37,394 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-11) MSC000001: Failed to start service jboss.deployment.subunit."HiNetServer.ear"."HiNetProcessing.jar".PARSE: org.jboss.msc.service.StartException in service
jboss.deployment.subunit."HiNetServer.ear"."HiNetProcessing.jar".PARSE: JBAS018733: Failed to process phase PARSE of subdeployment "HiNetProcessing.jar" of deployment "HiNetServer.ear"
[Server:server-four] Caused by: java.lang.IllegalArgumentException: JBAS011046: A component named 'TimerTasksBean' is already defined in this module
[Server:server-three] at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.0.0.Final.jar:8.0.0.Final]
[Server:server-four] at org.jboss.as.ee.component.EEModuleDescription.addComponent(EEModuleDescription.java:158)
[Server:server-three] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
[Server:server-three] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
[Server:server-three] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_09]
[Server:server-four] at org.jboss.as.ejb3.deployment.processors.EJBComponentDescriptionFactory.addComponent(EJBComponentDescriptionFactory.java:60)
[Server:server-three] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_09]
[Server:server-three] at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09]
[Server:server-four] at org.jboss.as.ejb3.deployment.processors.SessionBeanComponentDescriptionFactory.processSessionBeans(SessionBeanComponentDescriptionFactory.java:169)
[Server:server-three] Caused by: java.lang.IllegalArgumentException: JBAS011046: A component named 'TimerTasksBean' is already defined in this module
[Server:server-four] at org.jboss.as.ejb3.deployment.processors.SessionBeanComponentDescriptionFactory.processAnnotations(SessionBeanComponentDescriptionFactory.java:98)
[Server:server-three] at org.jboss.as.ee.component.EEModuleDescription.addComponent(EEModuleDescription.java:158)
[Server:server-four] at org.jboss.as.ejb3.deployment.processors.AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.processAnnotations(AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.java:58)
[Server:server-three] at org.jboss.as.ejb3.deployment.processors.EJBComponentDescriptionFactory.addComponent(EJBComponentDescriptionFactory.java:60)
[Server:server-four] at org.jboss.as.ejb3.deployment.processors.AbstractDeploymentUnitProcessor.deploy(AbstractDeploymentUnitProcessor.java:81)
[Server:server-three] at org.jboss.as.ejb3.deployment.processors.SessionBeanComponentDescriptionFactory.processSessionBeans(SessionBeanComponentDescriptionFactory.java:169)
[Server:server-four] at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.0.0.Final.jar:8.0.0.Final]
[Server:server-four] ... 5 more
[Server:server-four]
[Server:server-three] at org.jboss.as.ejb3.deployment.processors.SessionBeanComponentDescriptionFactory.processAnnotations(SessionBeanComponentDescriptionFactory.java:98)
[Server:server-four] 14:53:37,407 ERROR [org.jboss.as.controller.management-operation] (host-controller-connection-threads - 1) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "HiNetServer.ear")]) - failure description: {"JBAS01
4671: Failed services" => {"jboss.deployment.subunit.\"HiNetServer.ear\".\"HiNetProcessing.jar\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"HiNetServer.ear\".\"HiNetProcessing.jar\".PARSE: JBAS018733: Failed
to process phase PARSE of subdeployment \"HiNetProcessing.jar\" of deployment \"HiNetServer.ear\"
[Server:server-four] Caused by: java.lang.IllegalArgumentException: JBAS011046: A component named 'TimerTasksBean' is already defined in this module"}}
[Server:server-three] at org.jboss.as.ejb3.deployment.processors.AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.processAnnotations(AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.java:58)
[Server:server-four] 14:53:37,409 ERROR [org.jboss.as.server] (host-controller-connection-threads - 1) JBAS015870: Deploy of deployment "HiNetServer.ear" was rolled back with the following failure message:
[Server:server-three] at org.jboss.as.ejb3.deployment.processors.AbstractDeploymentUnitProcessor.deploy(AbstractDeploymentUnitProcessor.java:81)
[Server:server-three] at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.0.0.Final.jar:8.0.0.Final]
[Server:server-three] ... 5 more
[Server:server-three]
[Server:server-four] {"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"HiNetServer.ear\".\"HiNetProcessing.jar\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"HiNetServer.ear\".\"HiNetProcessing.ja
r\".PARSE: JBAS018733: Failed to process phase PARSE of subdeployment \"HiNetProcessing.jar\" of deployment \"HiNetServer.ear\"
[Server:server-three] 14:53:37,412 ERROR [org.jboss.as.controller.management-operation] (host-controller-connection-threads - 1) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "HiNetServer.ear")]) - failure description: {"JBAS0
14671: Failed services" => {"jboss.deployment.subunit.\"HiNetServer.ear\".\"HiNetProcessing.jar\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"HiNetServer.ear\".\"HiNetProcessing.jar\".PARSE: JBAS018733: Faile
d to process phase PARSE of subdeployment \"HiNetProcessing.jar\" of deployment \"HiNetServer.ear\"
[Server:server-four] Caused by: java.lang.IllegalArgumentException: JBAS011046: A component named 'TimerTasksBean' is already defined in this module"}}
[Server:server-four] 14:53:37,419 INFO [org.jboss.as.server.deployment] (MSC service thread 1-9) JBAS015877: Stopped deployment null (runtime-name: HiNetBase.jar) in 9ms
[Server:server-four] 14:53:37,419 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877: Stopped deployment null (runtime-name: HiNetProcessing.jar) in 9ms
[Server:server-four] 14:53:37,421 INFO [org.jboss.as.server.deployment] (MSC service thread 1-16) JBAS015877: Stopped deployment null (runtime-name: HiNetExtension.jar) in 11ms
[Server:server-three] Caused by: java.lang.IllegalArgumentException: JBAS011046: A component named 'TimerTasksBean' is already defined in this module"}}
[Server:server-three] 14:53:37,415 ERROR [org.jboss.as.server] (host-controller-connection-threads - 1) JBAS015870: Deploy of deployment "HiNetServer.ear" was rolled back with the following failure message:
[Server:server-three] {"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"HiNetServer.ear\".\"HiNetProcessing.jar\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"HiNetServer.ear\".\"HiNetProcessing.j
ar\".PARSE: JBAS018733: Failed to process phase PARSE of subdeployment \"HiNetProcessing.jar\" of deployment \"HiNetServer.ear\"
[Server:server-three] Caused by: java.lang.IllegalArgumentException: JBAS011046: A component named 'TimerTasksBean' is already defined in this module"}}
[Server:server-three] 14:53:37,426 INFO [org.jboss.as.server.deployment] (MSC service thread 1-11) JBAS015877: Stopped deployment null (runtime-name: HiNetProcessing.jar) in 10ms
[Server:server-three] 14:53:37,426 INFO [org.jboss.as.server.deployment] (MSC service thread 1-14) JBAS015877: Stopped deployment null (runtime-name: HiNetBase.jar) in 10ms
[Server:server-three] 14:53:37,426 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment null (runtime-name: HiNetExtension.jar) in 10ms
[Server:server-four] 14:53:37,546 INFO [org.jboss.as.server.deployment] (MSC service thread 1-9) JBAS015877: Stopped deployment null (runtime-name: HiNetWebserviceAccess.war) in 136ms
[Server:server-three] 14:53:37,547 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment null (runtime-name: HiNetWebserviceAccess.war) in 131ms
[Server:server-four] 14:53:37,572 INFO [org.jboss.as.server.deployment] (MSC service thread 1-9) JBAS015877: Stopped deployment HiNetServer.ear (runtime-name: HiNetServer.ear) in 163ms
[Server:server-three] 14:53:37,573 INFO [org.jboss.as.server.deployment] (MSC service thread 1-9) JBAS015877: Stopped deployment HiNetServer.ear (runtime-name: HiNetServer.ear) in 157ms
[Server:server-four] 14:53:37,573 INFO [org.jboss.as.controller] (host-controller-connection-threads - 1) JBAS014774: Service status report
[Server:server-four] JBAS014777: Services which failed to start: service jboss.deployment.subunit."HiNetServer.ear"."HiNetProcessing.jar".PARSE
[Server:server-three] 14:53:37,574 INFO [org.jboss.as.controller] (host-controller-connection-threads - 1) JBAS014774: Service status report
[Server:server-four]
[Server:server-three] JBAS014777: Services which failed to start: service jboss.deployment.subunit."HiNetServer.ear"."HiNetProcessing.jar".PARSE
[Server:server-three]



Is there something additionally to configure / is the annotation usage wrong?
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's not the @Schedule annotation but your usage of @Stateless and @Singleton annotations on the same bean. You can either mark it as stateless or singleton component but not both.
 
mike riemer
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the hint. The usage of the following annotations fits into a running server:




But now again, both servers are processing the timer:

Line 8156: [Server:server-three] 10:50:00,007 INFO [...extension.timers.ejb.AutoTimer] (EJB default - 3) Check if robots are to fire....
Line 8214: [Server:server-four] 10:50:00,035 INFO [...extension.timers.ejb.AutoTimer] (EJB default - 2) Check if robots are to fire....

Is there something additionally to be able to start a timer once per timeslot in a cluster?
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The timers are invoked per JVM. Clustered timers (where the timeout happens on a single node in the cluster) aren't supported yet in WildFly https://issues.jboss.org/browse/WFLY-283
 
mike riemer
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the hint. I will wait for the next WFLY 8)
reply
    Bookmark Topic Watch Topic
  • New Topic