[JBoss Messaging Users] - Re: message publishing to stopped topic
by strzyga
OK, maybe it'll help if I provide more context for what I'm doing.
In my application remote clients call stateless ejb to send data to specified topic. An ejb calls singleton object which holds a map with entries in the form "topic name"->"TopicPublisher object". If there is no map entry for specified topic, a new connection, session and publisher are created and a new entry is added (in this way we have only one publisher to each topic). If topic specified by remote client does not exist or there is any other kind of error, ejb sends a false value back to the client.
Problem happens when jboss is shutting down. If jboss stops topic before stopping ejb, there are a few milliseconds when ejb sends messages to stopped topic. In this case ejb should send false value back to the client to tell that there was an error and message wasn't persisted. But since there are no exceptions thrown by publisher.publish() method while publishing to stopped topic, it can't do this.
In the above test topic is stopped by invoking manually it's jmx-console stop() method, and this test shows that indeed publisher.publish() returns succesfully when publishing to stopped topic.
If it's normal for publisher, then what can I do with this situation? Should I create new session for each message or recover it?
Many thanks in advance for any assistance with this issue.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267518#4267518
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267518
14 years, 7 months
[JBoss Messaging Users] - Database Failure and JBM
by ekobir
Hi All
I have duplicate message/stop delivery message problem after database failure. Please check the scenario below.
Is it misconfiguration of transactions? Do you I need to play with some parameters to make JBM aware of database failures?
AS: Jboss 5.0.1-GA
JBoss Messaging 1.4.1.GA
Persistence for JBoss Messaging : Mysql Ver 14.12 Distrib 5.0.77
Mysql is used as shared database for application and jbm
Application and jbm are running different instance of Jboss 5.0.1-GA
Scenario:
1) Put 1000 messages in queue while consumer is not running
2) Shutdown Mysql instance while JBoss As instance is running
3) Start Mysql instance again
4) Start consumer for the queue on jbm
Result:
1) Consumer was able to consume some messages with 10 duplications in the application table. This consumption didnt remove some messages from queue.
| org.jboss.jms.exception.MessagingJMSException: A failure has occurred during processing of the request. Please consult the server logs for more details. ConnectionEndpoint[hb-pew07g2g-1-bonizf2g-794abn-z24o4c5] sendTransaction [ve-d7mg7g2g-1-bonizf2g-794abn-z24o4c5]
| at org.jboss.messaging.util.ExceptionUtil.handleJMSInvocation(ExceptionUtil.java:72)
| at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendTransaction(ServerConnectionEndpoint.java:526)
| at org.jboss.jms.server.endpoint.advised.ConnectionAdvised.org$jboss$jms$server$endpoint$advised$ConnectionAdvised$sendTransaction$aop(ConnectionAdvised.java:101)
| at org.jboss.jms.server.endpoint.advised.ConnectionAdvised$sendTransaction_N3268650789275322226.invokeTarget(ConnectionAdvised$sendTransaction_N3268650789275322226.java)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
| at org.jboss.jms.server.container.SecurityAspect.handleSendTransaction(SecurityAspect.java:195)
| at sun.reflect.GeneratedMethodAccessor281.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:122)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.jms.server.endpoint.advised.ConnectionAdvised.sendTransaction(ConnectionAdvised.java)
| at org.jboss.jms.wireformat.ConnectionSendTransactionRequest.serverInvoke(ConnectionSendTransactionRequest.java:82)
| at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:143)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908)
| at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:742)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:695)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:549)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:230)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:206)
| at org.jboss.remoting.Client.invoke(Client.java:1708)
| at org.jboss.remoting.Client.invoke(Client.java:612)
| at org.jboss.remoting.Client.invoke(Client.java:600)
| at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:189)
| at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:160)
| at org.jboss.jms.client.delegate.ClientConnectionDelegate.org$jboss$jms$client$delegate$ClientConnectionDelegate$sendTransaction$aop(ClientConnectionDelegate.java:221)
| at org.jboss.jms.client.delegate.ClientConnectionDelegate$sendTransaction_N3268650789275322226.invokeTarget(ClientConnectionDelegate$sendTransaction_N3268650789275322226.java)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
| at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:92)
| at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
| at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.jms.client.delegate.ClientConnectionDelegate.sendTransaction(ClientConnectionDelegate.java)
| at org.jboss.jms.tx.ResourceManager.commitLocal(ResourceManager.java:206)
| ... 23 more
|
|
2) After consuming some messages ~45, consumption completely stopped.
After only restarting jboss instance which host jbm, all the messages are consumed within a second.
Thanks a lot...
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267516#4267516
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267516
14 years, 7 months
[jBPM Users] - IdentityService
by TejJBPM
I am successfully able to create users, groups and memberships.
But I dont find any api calls to update user-group relationship.
So i tried to use the deletemembership and createmembership to reestablish the relationships.But the problem is the deleteMembership() method does not seem to work. Has anybody tried it? What am i doing wrong? The api says I can pass null for role
| identityService.deleteMembership(identityService.findUserById("testuser")),
| identityService.findGroupById("testgroup").getId(),null); // userid,groupid,roleid
It returns the following error
java.lang.IllegalArgumentException: attempt to create delete event with null entity
| at org.hibernate.event.DeleteEvent.<init>(DeleteEvent.java:47)
| at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:771)
| at org.jbpm.pvm.internal.identity.impl.IdentitySessionImpl.deleteMembership(IdentitySessionImpl.java:197)
| at org.jbpm.pvm.internal.identity.cmd.DeleteMembershipCmd.execute(DeleteMembershipCmd.java:48)
| at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
| at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
| at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
| at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
| at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
| at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
| at org.jbpm.pvm.internal.svc.IdentityServiceImpl.deleteMembership(IdentityServiceImpl.java:111)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267488#4267488
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267488
14 years, 7 months