[jBPM] - Adding a timer between Service tasks causes ProcessInstance.getStatus() to be STATE_ACTIVE
by Ryan Peterson
Ryan Peterson [http://community.jboss.org/people/rrpeterson] created the discussion
"Adding a timer between Service tasks causes ProcessInstance.getStatus() to be STATE_ACTIVE"
To view the discussion, visit: http://community.jboss.org/message/626795#626795
--------------------------------------------------------------
Hey guys,
I've got two identical custom service tasks setup to be called one after another in my .bpmn file. Each does its job, and when complete calls workItemManager.completeWorkItem
With just a start -> serviceTask -> serviceTask -> end, defined, both get called twice, and retrieving the session status at the completion of the tasks results in STATE_COMPLETED as expected.
Adding a timer as: start -> serviceTask -> timer(5 seconds, 0 period) -> serviceTask -> end, both get called twice, but after retrieving the session status at the completion of the tasks results in STATE_ACTIVE. Shouldn't it be STATE_COMPLETED same as the other? Examining the log output for the tasks in the database shows the same state status throughout both runs, each node being entered/exited, so it seems like they should both have the same status at completion.
I also have trouble when starting with a timer, such as:
start -> timer(5 seconds, 0 period) -> serviceTask -> end
my serviceTask is never invoked after calling ksession.startProcess I've tried inserting various Thread.sleep() in an effort to see if my serviceTask will be invoked, with no luck. Is there something special that needs to happen once the timer is complete? I don't seem to have any handle to the timer itself other than that it needs to begin using ksession.startProcess
Any advice/suggestions would be appreciated!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/626795#626795]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[JNDI and Naming] - java:comp/ vs java/
by iconnj
iconnj [http://community.jboss.org/people/iconnj] created the discussion
"java:comp/ vs java/"
To view the discussion, visit: http://community.jboss.org/message/626758#626758
--------------------------------------------------------------
I am trying to lookup TransactionSynchronizationRegistry using JNDI from a pojo. When I try
new InitialContext().lookup(java:TransactionSynchronizationRegistry) the lookup is successful
however
new InitialContext().lookup(java:comp/TransactionSynchronizationRegistry) doesn't work
The javaDoc for TransactionSynchronizationRegistry specifically says that the standard jndi name should be java:comp/TransactionSynchronizationRegistry.
I am trying to build a standard solution which works on all major app servers and the standard jndi name works on Websphere and Weblogic, but just not on JBOSS.
Has anyone come around similar issues before and how about would you go to resolve this?
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/626758#626758]
Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[EJB3] - EJB3 Session Bean Pool
by Robert Geisler
Robert Geisler [http://community.jboss.org/people/robert.geisler] created the discussion
"EJB3 Session Bean Pool"
To view the discussion, visit: http://community.jboss.org/message/597611#597611
--------------------------------------------------------------
hello...
during the last few weeks we experienced some problems with session bean instantiation.
in the past we used default session bean pool, ThreadlocalPool. this pool implementation creates instances for every newly created thread, but these instances seem to never be destroyed, not even if the threads, they were created for, die.
so we tried StrictMaxPool pool implementation and set a maximum of 100.000. with this pool we see much less bean instances, because the pool creates them only if there are no free instances left. existing beans (released earlier) get reused later, allthough they are not destroyed until container/ server shuts down.
a simple scenario: in the morning 200 users log in and read their private messages. they all start working at 8 a.m. and they are using mostly the same services. every single user needs one bean instance for one request and because all users request concurrently, StrictMaxPool creates 200 instances. later the users have lunch, so no one fires request to the server, all beans (200!) are released and waiting in the pool. but because StrictMaxPool does not destroy beans, the 200 instances are kept in server vm/ heap all the day (until shutdown!).
we think this behaviour is a waste of resources! a pool should destroy instances if there a more instances in the pool than we want to reserve for further usage. because later the day our 200 users will almost never produce 200 concurrent requests again, we would like to configure the pool to just keep a maximum of 50 beans.
so my questions are:
1) why are instances not destroyed by StrictMaxPool? there is an idea of destroying instances in StrictMaxPool.release, but because pool.size will never be more than maxSize (an attemp to get one more bean always fails!), remove is never called!?
2) is there a pool implementation that destroys instances and just holds a configurable amount of beans? or do we have to implement it on our own (TolerantMinPool ; ))?
3) ?some more suggestions?
thanks in advance
robert
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/597611#597611]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[jBPM] - What is the right way to work with persistent sessions and processes?
by Miljenko Norsic
Miljenko Norsic [http://community.jboss.org/people/mnorsic] created the discussion
"What is the right way to work with persistent sessions and processes?"
To view the discussion, visit: http://community.jboss.org/message/626678#626678
--------------------------------------------------------------
Hi,
I've seen a couple of samples that make use of JPA persistence built into the jBPM5, but I do not understand what is the preferred way to work with persistent knowledge sessions and processes?
For example, I'd like to know when to create a new persistent knowledge session (and its processes)? One ksession for everything? Or maybe one ksession per group of processes that are related to the same fact (eg. if I'm creating a set of processes that manage Person facts, is it normal to create one persistent ksession per Person fact, and create processes on top of that ksession)?
I wonder because if the number of facts per ksession is high, I might have a performance problem when serializing/deserializing facts from database...
Another question: is it possible to use "custom" persistence strategy, e.g. if I want Person object instance from ksession to be stored into a separate table instead into a raw byte array?
Thanks,
Miljenko
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/626678#626678]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[JBoss Messaging] - Standalone JMS - connection dropped
by Denis Demichev
Denis Demichev [http://community.jboss.org/people/demichev] created the discussion
"Standalone JMS - connection dropped"
To view the discussion, visit: http://community.jboss.org/message/624096#624096
--------------------------------------------------------------
Hello All,
Trying to utilize JBoss 5.1.0 JMS server in our project. This is a standalone server without any clustering capabilities.
Running it as: run.bat -c default -b DTCJDBWFXJM1
The application with JBoss client tries to connect to the server and works pretty fine for 40-45 minutes.
After that I see an error message (see below) and the application is using fail-over functionality to reconnect to server again and it does.
I.e. the problem is resolved just by re-connecting again. I cannot say that this could be reproduced with some specific steps, but
rather I see it sporadically happens under stress.
Unfortunately I cannot add any additional information from the server logs as soon as there's nothing unusual there - just a standard boot process.
One more note that potentially can give someone a clue. From time to time under stress again I see that JBoss just stops responding and delivering JMS messages to JMS clients, I'm not sure if that is cause by GC (stop the world?) - I'm using just a set of standard out-of-the-box configuration files with 5-7 JMS queues (all durable).
Would appreciate ideas on why this happens and how to workaround. Although this is not a big issue in DEV environment, potentialy It could be quite annoying to support people who receive e-mails every time some exception occurrs.
Here's Exception stacktrace:
org.jboss.jms.exception.MessagingNetworkFailureException
at org.jboss.jms.client.delegate.DelegateSupport.handleThrowable(DelegateSupport.java:240)
at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:205)
at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:160)
at org.jboss.jms.client.delegate.ClientConnectionDelegate.org$jboss$jms$client$delegate$ClientConnectionDelegate$createSessionDelegate$aop(ClientConnectionDelegate.java:186)
at org.jboss.jms.client.delegate.ClientConnectionDelegate$createSessionDelegate_6052335267724906805.invokeTarget(ClientConnectionDelegate$createSessionDelegate_6052335267724906805.java)
......
Caused by: org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [bisocket://DTCJDBWFXJM1:4457/?JBM_clientMaxPoolSize=200&clientLeasePeriod=10000&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&connectionWait=10&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&pingFrequency=214748364&pingWindowFactor=10&socket.check_connection=false&stopLeaseOnFailure=true&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat&validatorPingPeriod=10000&validatorPingTimeout=5000]
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:776)
at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport(BisocketClientInvoker.java:426)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
.....
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.jboss.remoting.transport.socket.SocketClientInvoker$1.run(SocketClientInvoker.java:299)
at java.security.AccessController.doPrivileged(Native Method)
Thanks!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/624096#624096]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months