[JBoss Microcontainer Development] New message: "Activating OnDemand beans from child controller"
by Kabir Khan
User development,
A new message was posted in the thread "Activating OnDemand beans from child controller":
http://community.jboss.org/message/520083#520083
Author : Kabir Khan
Profile : http://community.jboss.org/people/kabir.khan@jboss.com
Message:
--------------------------------------------------------------
Fixing http://lists.jboss.org/pipermail/jboss-development/2010-January/015434.html I am adding a ScopedOnDemandDependencyTestCase (extends OnDemandDependencyTestCase similar to (Scoped)DuplicateAliasTestCase), but have found a deeper problem. If an OnDemand bean is installed in the main controller and is depended on by a bean in a child controller the OnDemand bean never gets activated and the child controller bean's dependency never resolved.
I install Bean1 with OnDemand, goes to Describe state
I install scoped Bean2 with Automatic and a dependency on Bean1, goes to Instantiated state fine
When trying to move Bean2 to Configured state it does not resolve for the following reasons:
When enabling ondemand beans in AbstractDependencyItem.resolve(), it was looking at the wrong controller, I changed:
if (unresolvedContext != null && ControllerMode.ON_DEMAND.equals(unresolvedContext.getMode()))
{
try
{
controller.enableOnDemand(unresolvedContext);
to
if (unresolvedContext != null && ControllerMode.ON_DEMAND.equals(unresolvedContext.getMode()))
{
try
{
unresolvedContext.getController().enableOnDemand(unresolvedContext);
Now Bean1 correctly gets its requiredState set to INSTALLED. Unfortunately this is not enough.
In the normal/unscoped mode the mechanism is that AbstractDI.resolve() returns false, and we end up back in the resolveContexts() loop which finds Bean1 is not in its requiredState (INSTALLED).
In the scoped test, it does not get picked up since Bean2 was installed in the scoped controller whose resolveContexts() does not involve the main controller so Bean1 is never found.
I'll see if I can fix this
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/520083#520083
16 years, 3 months
[jBPM] New message: "TaskService issue"
by Tej jbpm
User development,
A new message was posted in the thread "TaskService issue":
http://community.jboss.org/message/520066#520066
Author : Tej jbpm
Profile : http://community.jboss.org/people/tejJBPM
Message:
--------------------------------------------------------------
Hi
I had to run the following line multiple times to get the list of tasks for a list of process instance ids.
List<Task> tasks =
taskService.createTaskQuery().processInstanceId(processInstanceId).list();
The problem is that everytime this query is run the JBPM API opens a connection to my MYSQL database and is not explicitly closing it.(when i run netstat i see a list of connections in the ESTABLISHED state)
So i get too many connections error even if I run for 20 times.
Has anybody faced this problem? Is there any method in the API to cleanup the task query (and all connections related to it).
Any help is appreciated.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/520066#520066
16 years, 3 months