[jBPM] - LocalTaskService don't remove listeners, it is a bug?
by gardellajp
gardellajp [https://community.jboss.org/people/gardellajp] created the discussion
"LocalTaskService don't remove listeners, it is a bug?"
To view the discussion, visit: https://community.jboss.org/message/721802#721802
--------------------------------------------------------------
Hi,
Recently I've found that when use LocalTaskService don't remove the listeners that are created in:
public void registerForEvent(EventKey key, boolean remove, EventResponseHandler responseHandler) {
SimpleEventTransport transport =
new SimpleEventTransport(taskServiceSession, responseHandler, remove);
taskServiceSession.getService().getEventKeys().register(key, transport);
}
Notice that a client of this method can't remove it later, becouse the method return void.
This method is called by SyncWSHumanTaskHandler.connect()
private void registerTaskEvents() {
TaskCompletedHandler eventResponseHandler = new TaskCompletedHandler();
TaskEventKey key = new TaskEventKey(TaskCompletedEvent.class, -1);
client.registerForEvent(key, false, eventResponseHandler);
key = new TaskEventKey(TaskFailedEvent.class, -1);
client.registerForEvent(key, false, eventResponseHandler);
key = new TaskEventKey(TaskSkippedEvent.class, -1);
client.registerForEvent(key, false, eventResponseHandler);
}
See that the listeners aren't save to remove later. If don't remove the listeners, they are invoqued later.
I fixed this with an update of LocalTaskService. When register the events, I save each listener to then dispose it.
public void registerForEvent(EventKey key, boolean remove, EventResponseHandler responseHandler) {
SimpleEventTransport transport =
new SimpleEventTransport(taskServiceSession, responseHandler, remove);
taskServiceSession.getService().getEventKeys().register(key, transport);
//ADDED
eventsRegistered.add(new KeyAndTransport(key, transport));
//END ADDED
}
The class KeyAndTransport have two instances variables, the key and the transport. The instance variable eventsRegistered is a collection. Then, when is disconnected, I remove the listeners.
public void disconnect() throws Exception {
// do nothing
// ADDED
removeListeners();
// END ADDED
}
private synchronized void removeListeners() {
for (KeyAndTransport k : eventsRegistered) {
taskServiceSession.getService().getEventKeys().unregister(k.getKey(), k.getTransport());
}
eventsRegistered.clear();
}
I attach the complete file. I want to know if this is a bug or a miss use of this clasess. I have problems when use more than one session, with this change, work well with multiple sessions. Note that in my project I open and close session in each request, so when I close the session (and other resources) I can't remove the listener with the actual API.
Juan
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/721802#721802]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months
[jBPM] - Hi I'm new to JBPM, and am trying to set up a working environment. I'm using Centos 6, Java SDK 7u3. I have tried using the installer, and that was largely successful, I'm now working through component by component. I've installed JBoss AS 7.0.2, as 7
by Timothy Charman
Timothy Charman [https://community.jboss.org/people/tcharman] created the discussion
"Hi I'm new to JBPM, and am trying to set up a working environment. I'm using Centos 6, Java SDK 7u3. I have tried using the installer, and that was largely successful, I'm now working through component by component. I've installed JBoss AS 7.0.2, as 7"
To view the discussion, visit: https://community.jboss.org/message/722781#722781
--------------------------------------------------------------
Hi
I'm new to JBPM, and am trying to set up a working environment.
I'm using Centos 6, Java SDK 7u3.
I have tried using the installer, and that was largely successful, I'm now working through component by component.
I've installed JBoss AS 7.0.2, as 7.1.0 didn't seem to want to play with JBPM. I guess it is too new.
I've installed mysql, and deployed drools-guvnor (I believe correctly) against mysql. I'm using guvnor-distribution-wars-5.3.1.Final-jboss-as-7.0.war. Context is drools-guvnor
I've deployed Designer - designer-2.0-jboss7.war - under context designer.
I created the sample app in Eclipse (the hello world one) and check the BPMN into Guvnor. All good so far.
In the Guvnor web UI, I find the BPMN, and try to open it in Designer - I get the "Please wait while loading..." message but nothing more.
In the page, I get a JavaScript error:
namespace is undefined
var splitted = namespace.split("#", 1);
In the server log I get:
12:47:10,232 INFO [com.intalio.web.preprocessing.impl.JbpmPreprocessingUnit] (http--0.0.0.0-8080-5) Successfully deleted file :/opt/jboss/as/jboss_current/standalone/tmp/vfs/tempfffea734628e24ad/designer.war-f2ef12e22fa5851b/stencilsets/bpmn2.0jbpm/bpmn2.0jbpm.json
12:47:10,232 INFO [com.intalio.web.preprocessing.impl.JbpmPreprocessingUnit] (http--0.0.0.0-8080-5) Created file:/opt/jboss/as/jboss_current/standalone/tmp/vfs/tempfffea734628e24ad/designer.war-f2ef12e22fa5851b/stencilsets/bpmn2.0jbpm/bpmn2.0jbpm.json
The generated file bpmn2.0jbpm.json exists, has an appropriate last modified timestamp, but is empty.
I notice on my server I installed using the installer, this file is populated, and contains namespace information, which is why, I guess, it works there but not on my new server.
Other things:
I'm using the default package in Guvnor.
I have no credentials set - user logging in as guest.
Other issues with the same symptoms don't seem to apply:
- I'm using Chrome.
- I have no special characters in my map.
Does anyone have any ideas?
Many thanks
Tim
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/722781#722781]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months
[JBoss Tools] - Remote Server Configuration does not match JBoss 7 directory layout
by djabba74
djabba74 [https://community.jboss.org/people/djabba74] created the discussion
"Remote Server Configuration does not match JBoss 7 directory layout"
To view the discussion, visit: https://community.jboss.org/message/722768#722768
--------------------------------------------------------------
Hi
In Eclipse Runtime Server, I'm trying to configure a remote Runtime Server. (JBoss 7.1, running in a CentOS VM).
It looks like the *Remote Server Configuration* is hard coded to the directory structure of JBoss 6 or earlier and does not work with JBoss 7. The "Test" button obviously looks for the existence of path <Remote Server Home> + "/*server*/" + <Remote Server Configuration>
*Problem 1*: The JBoss AS 7 layout obviously does no longer have a "server/" directory.
workaround:
{code}
mkdir server
cd server
ln -s ../standalone
{code}
*Problem 2*: The default value "default" in the field Remote Server Configuration will not work, there is no default/ in JBoss 7.
*Problem 3*: How to specify the standalone-full.xml profile, which resides in the standalone/configuration/ directory?
*Problem 4*: The claim "The remote server is properly configured." by just testing for the existence of the remote directory is far from my expectation of a rudimentary, static server configuration analysis... I pointed it to an empty directory and it still claimed that the remote server is properly configured.
Could someone please confirm my findings?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/722768#722768]
Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months
[jBPM] - Process and human task variable constraints
by Márton Steierlein
Márton Steierlein [https://community.jboss.org/people/stmarci] created the discussion
"Process and human task variable constraints"
To view the discussion, visit: https://community.jboss.org/message/722735#722735
--------------------------------------------------------------
Greetings!
Our company is planning to utilise jBPM in one of out projects involving business processes. We decided to use jBPM 5.2, and our plan is to store large XML data in process variables (talking about a couple hundred megabytes) and mediate these from (human) task to (human) task and query these from a custom application through the Task Client API. These large files are supposted to be maps by the way and as such they could be even larger. Our 3rd party application would visualize these maps and present a view for clients based on process variables.
My question is, that is it possible for jBPM to store such large data in process variables, and whether are there any constraints regarding the storage limits for these. If you have any experience with such large process variables, I would like to hear your a priori experience regarding the performance impacts or other issues as well.
I appreciate your help and thank you for your time in advance,
Márton
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/722735#722735]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months
[JBoss Messaging] - I am getting the exception "java.lang.UnsupportedOperationException: Destination not specified" in the MDB
by chithu21
chithu21 [https://community.jboss.org/people/chithu21] created the discussion
"I am getting the exception "java.lang.UnsupportedOperationException: Destination not specified" in the MDB"
To view the discussion, visit: https://community.jboss.org/message/722728#722728
--------------------------------------------------------------
I am getting the exception "java.lang.UnsupportedOperationException: Destination not specified" in the MDB. The MDB is set to send a reply as and when a message arrives. I am sending 5 messages from he client program.
And in the server log I am able to see 5 messages with proper destination. But the client program is receiving only 2 messages as reply & the above exception is shown in the server log.
Can anyone help please?
TextMDB.sendReply, this=1547439314, dest=JBossQueue[QueueB]
13:18:01,176 INFO [STDOUT] TextMDB.sendReply, this=311219737, dest=JBossQueue[QueueB]
13:18:01,176 INFO [STDOUT] TextMDB.onMessage, this=1785585228
13:18:01,176 INFO [STDOUT] TextMDB.onMessage, this=807596970
13:18:01,177 INFO [STDOUT] TextMDB.sendReply, this=1785585228, dest=JBossQueue[QueueB]
13:18:01,177 INFO [STDOUT] TextMDB.onMessage, this=1185625750
13:18:01,177 INFO [STDOUT] TextMDB.sendReply, this=807596970, dest=JBossQueue[QueueB]
13:18:01,177 INFO [STDOUT] TextMDB.sendReply, this=1185625750, dest=JBossQueue[QueueB]
13:18:01,273 INFO [STDOUT] TextMDB.onMessage, this=1785585228
13:18:01,273 INFO [STDOUT] TextMDB.sendReply, this=1785585228, dest=null
13:18:01,274 ERROR [STDERR] java.lang.UnsupportedOperationException: Destination not specified
13:18:01,274 ERROR [STDERR] at org.jboss.jms.client.container.ProducerAspect.handleSend(ProducerAspect.java:157)
13:18:01,274 ERROR [STDERR] at org.jboss.aop.advice.org.jboss.jms.client.container.ProducerAspect_z_handleSend_222993194.invoke(ProducerAspect_z_handleSend_222993194.java)
13:18:01,274 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:18:01,274 ERROR [STDERR] at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
13:18:01,275 ERROR [STDERR] at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
13:18:01,275 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:18:01,275 ERROR [STDERR] at org.jboss.jms.client.delegate.ClientProducerDelegate.send(ClientProducerDelegate.java)
13:18:01,275 ERROR [STDERR] at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:164)
13:18:01,275 ERROR [STDERR] at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:207)
13:18:01,275 ERROR [STDERR] at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:145)
13:18:01,275 ERROR [STDERR] at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:136)
13:18:01,275 ERROR [STDERR] at com.mdb.sample.XibToCatMdb.sendReply(XibToCatMdb.java:98)
13:18:01,275 ERROR [STDERR] at com.mdb.sample.XibToCatMdb.onMessage(XibToCatMdb.java:77)
13:18:01,275 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:18:01,276 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
13:18:01,276 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
13:18:01,276 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:601)
13:18:01,276 ERROR [STDERR] at org.jboss.invocation.Invocation.performCall(Invocation.java:386)
13:18:01,276 ERROR [STDERR] at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:513)
13:18:01,276 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:156)
13:18:01,276 ERROR [STDERR] at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:115)
13:18:01,277 ERROR [STDERR] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
13:18:01,277 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
13:18:01,277 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
13:18:01,277 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
13:18:01,277 ERROR [STDERR] at org.jboss.ejb.plugins.RunAsSecurityInterceptor.process(RunAsSecurityInterceptor.java:133)
13:18:01,277 ERROR [STDERR] at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:103)
13:18:01,277 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
13:18:01,277 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
13:18:01,277 ERROR [STDERR] at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:415)
13:18:01,278 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:1029)
13:18:01,278 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:18:01,278 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
13:18:01,278 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
13:18:01,285 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:601)
13:18:01,285 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
13:18:01,285 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
13:18:01,285 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
13:18:01,285 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
13:18:01,285 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
13:18:01,285 ERROR [STDERR] at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
13:18:01,286 ERROR [STDERR] at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
13:18:01,286 ERROR [STDERR] at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
13:18:01,286 ERROR [STDERR] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
13:18:01,286 ERROR [STDERR] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
13:18:01,286 ERROR [STDERR] at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.delivery(MessageEndpointInterceptor.java:249)
13:18:01,286 ERROR [STDERR] at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(MessageEndpointInterceptor.java:128)
13:18:01,286 ERROR [STDERR] at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
13:18:01,287 ERROR [STDERR] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)
13:18:01,287 ERROR [STDERR] at $Proxy249.onMessage(Unknown Source)
13:18:01,287 ERROR [STDERR] at org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:178)
13:18:01,287 ERROR [STDERR] at org.jboss.jms.client.container.ClientConsumer.callOnMessageStatic(ClientConsumer.java:160)
13:18:01,287 ERROR [STDERR] at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:831)
13:18:01,287 ERROR [STDERR] at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect_z_handleRun_222993194.invoke(SessionAspect_z_handleRun_222993194.java)
13:18:01,287 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:18:01,287 ERROR [STDERR] at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
13:18:01,287 ERROR [STDERR] at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
13:18:01,288 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:18:01,288 ERROR [STDERR] at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
13:18:01,292 ERROR [STDERR] at org.jboss.jms.client.JBossSession.run(JBossSession.java:199)
13:18:01,292 ERROR [STDERR] at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:234)
13:18:01,292 ERROR [STDERR] at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:205)
13:18:01,292 ERROR [STDERR] at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
13:18:01,293 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
13:18:01,293 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
13:18:01,293 ERROR [STDERR] at java.lang.Thread.run(Thread.java:722)
13:18:01,296 INFO [STDOUT] TextMDB.onMessage, this=1785585228
13:18:01,297 INFO [STDOUT] TextMDB.sendReply, this=1785585228, dest=null
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/722728#722728]
Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 7 months