[JBoss Messaging] - Re: Queue MaxSize Not Obeyed When Using Transacted Sessions
by vishalrao
"ataylor" wrote : You'll probably find you aren't committing your transaction, add a session.commit() and you'll see the exception thrown.
Hi Andy,
Thanks for the response.
I am doing a session.commit() and I am seeing the output that shows this
in my code:
|
| // Start sending messages
| sendLoop(session, producer);
|
| if (transacted)
| {
| System.err.println("About to commit the session.");
| session.commit();
| System.err.println("Finished commiting the session.");
| }
| System.out.println("Done.");
|
|
|
|
Here's the interesting thing:
With 0 messages in the queue and MaxSize=20, the transaction
of 200 messages is allowed to commit:
|
| ...
| ...
| Sending message: 188
| Sending message: 189
| Sending message: 190
| Sending message: 191
| Sending message: 192
| Sending message: 193
| Sending message: 194
| Sending message: 195
| Sending message: 196
| Sending message: 197
| Sending message: 198
| Sending message: 199
| About to commit the session.
| Finished commiting the session.
| Done.
|
| We have reached the finally block.
| About to close JMS connection.
| Finished closing the JMS connection.
|
|
With 200 messages in the queue and MaxSize=20, the transaction
of 200 messags is NOT allowed to commit:
|
|
| ...
| ...
| ...
| Sending message: 199
| About to commit the session.
| Caught: org.jboss.jms.exception.MessagingTransactionRolledBackException: Failed to route Reference[3246080]:RELIABLE to FR.SYNC.RESPONSE
| org.jboss.jms.exception.MessagingTransactionRolledBackException: Failed to route Reference[3246080]:RELIABLE to FR.SYNC.RESPONSE
| at org.jboss.jms.tx.ResourceManager.commitLocal(ResourceManager.java:228)
| at org.jboss.jms.client.container.SessionAspect.handleCommit(SessionAspect.java:557)
| at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect26.invoke(SessionAspect26.java)
| at org.jboss.jms.client.delegate.ClientSessionDelegate$commit_8461082169793485964.invokeNext(ClientSessionDelegate$commit_8461082169793485964.java)
| at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
| at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
| at org.jboss.jms.client.delegate.ClientSessionDelegate$commit_8461082169793485964.invokeNext(ClientSessionDelegate$commit_8461082169793485964.java)
| at org.jboss.jms.client.delegate.ClientSessionDelegate.commit(ClientSessionDelegate.java)
| at org.jboss.jms.client.JBossSession.commit(JBossSession.java:164)
| at ProducerJBM.run(ProducerJBM.java:122)
| at ProducerJBM.main(ProducerJBM.java:42)
| Caused by: javax.jms.JMSException: Failed to route Reference[3246080]:RELIABLE to FR.SYNC.RESPONSE
| at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendMessage(ServerConnectionEndpoint.java:743)
| at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.processTransaction(ServerConnectionEndpoint.java:792)
|
|
|
I'm wondering if the first case here is a bug or a feature.
Thanks,
Vishal
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4162904#4162904
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4162904
17 years, 9 months
[JBoss Messaging] - Re: problem with creating Queue with JbossAS 5 Beta4 !
by Nouredine13
"Nouredine13" wrote : Hello,
|
| I try to create a Queue on JBoss 5, so I added the following line to file:destinations-service.xml situated in deploy/messaging directory:
|
| <mbean code = "org.jboss.jms.server.destination.QueueService"
| name = "jboss.messaging.destination: service = Queue, name = jms / Ping"
| xmbean-dd = "xmdesc / Queue-xmbean.xml">
| @ org.jboss.system.deployers.managed.ManagementObjectClass (code = org.jboss.jms.server.destination.QueueServiceMO) </ annotation>
| <depends optional-attribute-name="ServerPeer"> jboss.messaging: service = ServerPeer </ depends>
| jboss.messaging: service = PostOffice </ depends>
| </ mbean>
|
|
| after that, i've the following error message at the startup of JBossAS 5.0.0 Beta4:
|
| 2008-07-07 14:37:22,075 ERROR [org.jboss.messaging.util.ExceptionUtil] Queue[/queue/jms/Ping, name=jms/Ping] startService
| javax.naming.NameNotFoundException: jms not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:542)
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:550)
| at org.jnp.server.NamingServer.getObject(NamingServer.java:556)
| at org.jnp.server.NamingServer.rebind(NamingServer.java:165)
| at org.jnp.server.NamingServer.rebind(NamingServer.java:168)
| at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:518)
| at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:482)
| at org.jboss.jms.server.DestinationJNDIMapper.registerDestination(DestinationJNDIMapper.java:142)
| at org.jboss.jms.server.destination.QueueService.startService(QueueService.java:134)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:299)
| at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:196)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:184)
| at $Proxy5.start(Unknown Source)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
| at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
| at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
| at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:255)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
| at org.jboss.system.ServiceController.doChange(ServiceController.java:659)
| at org.jboss.system.ServiceController.start(ServiceController.java:431)
| at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:150)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:108)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
| at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:65)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:853)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:874)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:794)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:498)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:506)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:246)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:131)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:408)
| at org.jboss.Main.boot(Main.java:208)
| at org.jboss.Main$1.run(Main.java:534)
| at java.lang.Thread.run(Thread.java:595)
| 2008-07-07 14:37:22,076 DEBUG [org.jboss.jms.server.destination.QueueService] Started jboss.messaging.destination:service=Queue,name=jms/Ping
|
| but at the end we can see the line put in bold that jms/Ping is started!
| Can anyone tell me what could be the possible cause for the following error?? Thanks a lot!!
|
| Best Regards.
|
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4162897#4162897
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4162897
17 years, 9 months
[JBoss jBPM] - Using multiple tokens
by twiceknightly
Hi,
I am using jbpm to produce a bit of software that allows 3 different people to work on a process instance concurrently. Each of these roles have different things they can do to the process instance and they can work concurrently on a single process instance.
My process graph has 3 different branches corresponding to the roles. A new token is created for each of the role types. At the start the tokens traverse to the appropriate bit of the process graph for them.
Most of the time these three parts of the process graph don't interact. So a user in a role just merrily closes task related to him/makes traversals to other nodes that concern him. Basically all three tokens (threads) run until the process instance is destroyed. There is no joining of the tokens.
My problem is that occasionally there must be some communication between the 3 threads. For example the first token wants to signal the second token into a certain state on completion of some work. On another occassion they want to share info in the contextinstance.
The concurrency issues really worry me. For example if someone is working token two via a UI driven client however at the same time token one wants to move thread two into a different state. This could result in a race condition. Thread one updates could be lost.
Any thoughts on how I could have multiple threads running over a process graph. Then periodically I want to be able to synchronize them (perhaps put them into a node with no transitions)? Then I want to perform some action. Then I want to return the tokens to the nodes they were at and return them to running as if nothing had happened.
Could anyone outline how the join node works and how it's synchronization is accomplished? Perhaps that will provide a clue.
thanks in advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4162894#4162894
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4162894
17 years, 9 months