[jBPM] - understanding taskclient
by Odelya Holiday
Odelya Holiday [http://community.jboss.org/people/odelyaholiday] created the discussion
"understanding taskclient"
To view the discussion, visit: http://community.jboss.org/message/581352#581352
--------------------------------------------------------------
I understood that in order to run HumanTask I have to register an handler. for example:
StatefulKnowledgeSession session = session.getWorkItemManager().registerWorkItemHandler("Human Task", new CommandBasedWSHumanTaskHandler());
I looked in the implementation of the class and realized that CommandBasedWSHumanTaskHandler in connect() method connects to port 9123 and starts a client task.
However, I saw in some examples, that I need to initialize this task:
TaskClient client = new TaskClient(new MinaTaskClientConnector("client 1",new MinaTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
client.connect("127.0.0.1", 9123);
When do I have to invoke this TaskClient manually?
Who kills the task so it wouldn't sit on the same port with other tasks?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/581352#581352]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 9 months
Re: [jboss-user] [jBPM] - Human Task Problem
by candy_633
candy_633 [http://community.jboss.org/people/candy_633] commented on the document
"Human Task Problem"
To view all comments on this document, visit: http://community.jboss.org/docs/DOC-16508#comment-5460
--------------------------------------------------
Hello, Juan,
Thank you so much for replying! I just download the human-task-problem.zip and tried to import this project. But it seems that I can not do it. Is the maven file and dependencies are included in pom.xml file? Sorry that I am beginner of JBPM and not quite familiar with maven file. Could you please attach your testing project?
I appreicate your help so much :)
Best Regards,
Shanshan
--------------------------------------------------
13 years, 9 months
[jBPM] - Re: JBPM 4.0 in Web Application
by Anand Prakash
Anand Prakash [http://community.jboss.org/people/anandintouch] created the discussion
"Re: JBPM 4.0 in Web Application"
To view the discussion, visit: http://community.jboss.org/message/570145#570145
--------------------------------------------------------------
Hi Deepak,
Did you get your answer about creating sample web application and using JBPM4 in it?
I'm using user doc from jboss jbpm4 and able to run jbpm-console application but they have target to create user-webapp in build.xml file under >install
directory and I'm able to build sample user-weapp which creates user-webapp under \jbpm-4.4\install\generated\user-webapp .But not sure how to deploy on jboss5.1.0 and i've noticed that user-webapp folder doesn't have web.xml.So that could be the reason ,it's not deploying on jboss properly.
If you have done this sample user-webapp deployment successfully or any other sample web app using jbpm4 in it then please let me know.
Thanks,
Anand
mailto:anandintouch@gmail.com anandintouch(a)gmail.com
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/570145#570145]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 9 months
[jBPM] - jBPM basic question
by Ilja Kondrush
Ilja Kondrush [http://community.jboss.org/people/theros] created the discussion
"jBPM basic question"
To view the discussion, visit: http://community.jboss.org/message/588854#588854
--------------------------------------------------------------
Hello, everyone!
I have a few simple questions (well..they should be simple enough for people who have some experience working with/understanding jBPM..):
Because i'm really new to jBPM, i'll try to formulate questions correctly (btw.. excuse me for my poor english..)
I'm planning to create some sort of web-portal, where i can create/share business processes, maybe tasks for programmers or other employees. So..
1)Is this possible with Java/jBPM?
2)If it is, can i separate the "viewable" parts of this portal by giving permissions for employees? (for instance, project managaer "A" has his/her own username/password, and, according to some sort of "check" he/she should be able to see/add/update some business processes, while programmer "B" should see only tasks that are given to HIM/HER, or the tasks that currently are "free to take")
3) Is there any way to notificate some participant (employee) on how "thing are going"? (meaning the processes)
4)Are there any good examples on how to use jBPM "in such manner" somewhere? Where should i start learning from?
Any good and answers and advices would be greatly appreciated..
Sincerely,
Ilja Kondrush
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/588854#588854]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 9 months
[Javassist] - Changing array fields into java.util.concurrent.atomic.AtomicReferenceArray
by Christoph Angerer
Christoph Angerer [http://community.jboss.org/people/chmaruni] created the discussion
"Changing array fields into java.util.concurrent.atomic.AtomicReferenceArray"
To view the discussion, visit: http://community.jboss.org/message/589069#589069
--------------------------------------------------------------
Hi,
I am trying to replace fields of array type into fields of type java.util.concurrent.atomic.AtomicReferenceArray
My approach was like this:
1) change the field type through CtField.setType()
2) redirect reads/writes to arrays to static methods using CodeConverter.replaceArrayAccess(). In the static methods I would call the AtomicReferenceArray.set() and .get() methods.
3) rewrite array new bytecodes to calls to new java.util.concurrent.atomic.AtomicReferenceArray()
Besides several more or less small problems (e.g., I would have to rewrite local arrays and method signatures, too) my biggest problem is in step 3. I was trying inside ExprEditor.edit(NewArray a) something like: a.replace("$_ = new java.util.concurrent.atomic.AtomicReferenceArray(" + dim + ");");
However, this does not work because the javassist bytecode checks the type and sees that AtomicReferenceArray is not an array. Which is true, but since I will rewrite subsequent array accesses, too, I think that should be fine.
So my question(s) is (are): Does anybody have experience with something as intrusive as replacing all arrays in a program with a non-array object and if yes, is there any code out there from which I could learn or which I could use? If not, does anybody have an idea how I could make the third step work without the javassist compiler complaining about the type?
Thanks in advance for your time and effort!
Christoph
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/589069#589069]
Start a new discussion in Javassist at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 9 months
[EJB3] - release ThreadlocalPool resources?
by Robert Geisler
Robert Geisler [http://community.jboss.org/people/robert.geisler] created the discussion
"release ThreadlocalPool resources?"
To view the discussion, visit: http://community.jboss.org/message/589030#589030
--------------------------------------------------------------
hello community...
i have got some questions concerning invoking and pooling of Stateless Session Beans (SLSB).
we use JBoss 4.2.2 default configuration, EJB3 SLSBs are pooled by ThreadlocalPool (deploy/ejb3-interceptors-aop.xml). we noticed from JMX Console that the SLSB pools blow up in the long run, meaning that a lot of SLSB objects are kept in heap space. we investigated this behaviour and it seems that thread creation may be the root case of the problem.
our client uses Remote Method Invocation (RMI) through the DefaultEjb3Connector (JBoss Remoting Connector, deploy\ejb3.deployer\META-INF\jboss-service.xml). the Remoting Connector installs an AcceptorThread. whenever a client does invoke a Remote Business Interface method a SocketServerInvoker routes the client invocation from this AcceptorThread to a WorkerThread (ServerThread) that actually handles the request.
in case multiple clients invoke methods concurrent, multiple WorkerThreads are created from AcceptorThread, thus we got t running WorkerThreads on the server (where t corresponds to the maximum of concurrent client invocations at a single moment). it seems that these WorkerThreads stay alive after invocation response and get used by next client invocations.
now a client invocation triggers some business logic to be performed on the server. this process involves b SLSBs (starts from client with remote invocation and uses several local invocations between EJBs!). for each SLSB there is a pool (ThreadlocalPool as mentioned before). the ThreadlocalPool creates new instances of our EJBs for every WorkerThread on the server (see StatelessInstanceInterceptor.invoke) and always keeps one of these instances (see ThreadlocalPool.release). as the result there are (t * b) bean instances that will never be destroyed until server shutdown (note: it is possible to stop SLSB pool, destroying all the bean instances (InfinitePool.destroy), but we dont want to manually start/ stop these pools during runtime!).
we think this is a strange behaviour! just imagine 100 clients invoke some business functionality at the same time. that creates 100 WorkerThreads. assumming that the business logic involves 5 different EJBs there will be 100 * 5 = 500 objects (bean instances) in the heap space. and these objects will never be released/ destroyed!?
maybe i just did not find it... so let me simply ask for it:
* is there a mechanism that removes (killes or finishes) WorkerThreads after responding to the client?
or are these threads supposed to stay alive forever?
in addition we deploy a MessageDrivenBean (MDB) on the server and register it to a Queue. the MDB is a single instance MDB (configured through ActivationConfigProperty maxSession=1). the clients may send messages to this Queue to inform the server about some status and the MDB will process these messages one by one.
when a message is received the onMessage method of our MDB is invoked in so called WorkManager thread (PooledInvoker invokes JmsServerSession.run which invokes onMessage on the MDB). the onMessage again involves several EJBs (local invocations!) and therefor instances of these EJBs are create from ThreadlocalPool. after a message is processed the WorkManager thread finishes, thus dies. but after the thread died the bean instances created by the ThreadlocalPool are kept in InfinitePool.active. that means if JBoss is running some days without restart and the MDB receives more and more messages (processed by newly created threads), the pool blows up, because ThreadlocalPool does not destroy the bean instances ever. is this the way it is supposed to be?? or
* is there a mechanism that removes bean instances from ThreadlocalPool (respectively from InfinitePool.active) after the corresponding thread died??
i read some documentation in WIKI and the forums. there was mentioned another Pool implementation: StrictMaxPool. StrictMaxPool does not create bean instances per thread, but creates instances on demand, restricted by a maximum pool size. for MDBs the StrictMaxPool is configured as default in ejb3-interceptors-aop.xml, but for SessionBeans it is ThreadlocalPool.
* why are there different default pool configurations for Session and MessageDrivenBeans?
* what are the advantages and disadvantages of ThreadlocalPool and StrictMaxPool (performance??)?
are there general guide lines that explain when to use ThreadlocalPool or StrictMaxPool?
* could StrictMaxPool solve the problems that ThreadlocalPool causes in the situations described above?
StrictMaxPool should not keep bean instances, but release them after response -independent of which thread created and used the bean, shouldnt it?
i am confused by the different mechanism to Remote Method Invocations and incovations through Java Messaging are handled... i would be glad if someone could explain these differences to, especially in case of the SLSB pools, threading and client invocations.
thanks in advance
robert
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/589030#589030]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 9 months