Re: can not unsubscribe durable subscriber in jboss-messaging 1.
by samk@twinix.com
See Thread at: http://www.techienuggets.com/Detail?tx=39229 Posted on behalf of a User
Try subscriber.close() before unsubscribe.
In Response To:
When my program tries to unsubscribe its durable subscriber, it throws errors:
javax.jms.IllegalStateException: Cannot unsubscribe durable subscription esssub since it has active subscribers
at org.jboss.jms.server.endpoint.ServerSessionEndpoint.unsubscribe(ServerSessionEndpoint.java:796)
at org.jboss.jms.server.endpoint.advised.SessionAdvised.org$jboss$jms$server$endpoint$advised$SessionAdvised$unsubscribe$aop(SessionAdvised.java:135)
at org.jboss.jms.server.endpoint.advised.SessionAdvised$unsubscribe_8775578479443985821.invokeNext(SessionAdvised$unsubscribe_8775578479443985821.java)
at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)
at org.jboss.jms.server.endpoint.advised.SessionAdvised$unsubscribe_8775578479443985821.invokeNext(SessionAdvised$unsubscribe_8775578479443985821.java)
at org.jboss.jms.server.endpoint.advised.SessionAdvised.unsubscribe(SessionAdvised.java)
at org.jboss.jms.wireformat.SessionUnsubscribeRequest.serverInvoke(SessionUnsubscribeRequest.java:74)
at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:143)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:795)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:387)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
14:47:37,932 ERROR [ExceptionUtil] SessionEndpoint[9-k95qv3hf-1-e89nv3hf-bm7xkn-100j3] unsubscribe [c-07dqv3hf-1-e89nv3hf-bm7xkn-100j3]
please help. Thanks.
17 years, 9 months
[JBoss jBPM] - dynamically create tasks
by AJanz
i got the following code to generate dynamically tasks on a node.
| public Object execute(JbpmContext jbpmContext) throws Exception {
| // TODO Auto-generated method stub
| // TODO Auto-generated method stub
|
| Boolean b;
| try {
| b = Boolean.TRUE;
| ProcessInstance pi = jbpmContext
| .loadProcessInstance(processid);
| for (int i = 0; i < actors.size(); i++) {
| String actor = (String) actors.get(i);
| TaskInstance ti = pi.getTaskMgmtInstance()
| .createTaskInstance();
| ti.setActorId(actor);
| jbpmContext.save(ti);
| }
| jbpmContext.save(pi);
| } catch (Exception e) {
| // TODO: handle exception
| e.printStackTrace();
| b= Boolean.FALSE;
| }
| return b;
| }
|
|
sometimes i got a nullpointer exception on
TaskInstance ti = pi.getTaskMgmtInstance()
the processid is set correct.
any idea what might be wrong?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180295#4180295
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180295
17 years, 9 months