[jBPM] - Getting task summaries
by Gareth Edwards
Gareth Edwards [https://community.jboss.org/people/garethed] created the discussion
"Getting task summaries"
To view the discussion, visit: https://community.jboss.org/message/784314#784314
--------------------------------------------------------------
Hello,
I'm writing a Rest API to manage user tasks.
The code below is some test code to return a list of task summaries based on a user.
This works the first time and the correct tasks are returned.
If I then claim a task for exapmple, It will still show up in the list if the code below is called.
If I restart JBoss inbetween then the list is correct.
jBoss is running on a server on the LAN and Tomcat is running the REST API locally.
It's like the data returned is being cached.
Any help would be appriciated.
Thanks.
public TaskSummaryJson getPotentialTasks(String user, String locale){
TaskClient client = new TaskClient(new HornetQTaskClientConnector("client 1", new HornetQTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
client.connect("10.0.0.101", 5153);
BlockingTaskSummaryResponseHandler taskSummaryResponseHandler = new BlockingTaskSummaryResponseHandler();
client.getTasksAssignedAsPotentialOwner(user, locale, taskSummaryResponseHandler);
List<TaskSummary> tasks = taskSummaryResponseHandler.getResults();
TaskSummaryJson summary = new TaskSummaryJson();
summary.setListObjects(tasks);
summary.setSuccess(true);
summary.setMessage("ok");
try {
client.disconnect();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return summary;
}
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/784314#784314]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 6 months
[Datasource Configuration] - Timing Issue with Datasource configuration?
by Tom Brey
Tom Brey [https://community.jboss.org/people/tombrey] created the discussion
"Timing Issue with Datasource configuration?"
To view the discussion, visit: https://community.jboss.org/message/784517#784517
--------------------------------------------------------------
In our JBOSS environment, we have many services that come up when initially starting up JBOSS. Most of these are scheduled or on-demand services, but we have one where it comes up and starts on its own. This service initiates a routine we call our 'InitialCleanupThread', which will attempt to re-queue or complete any entries in our MySQL DB. The problem we are having that the datasource for the MySQL DB is not properly configured at startup time. If we 'stop' and 'start' the service with the 'InitialCleanupThread', then everything runs fine. We have a lot of people with some experience with JBOSS, but no one person who really knows it in detail.
The general consensus here is that it is simply a timing issue when JBOSS is initially started. Obviously we have a workaround that I mentioned above, and I know I can code around it by requiring a manual intervention to start this process. I am just wondering if there is a way we can configure our way around this. I am not the guy who originally created the JBOSS configuration, so I don't know what configuration / XML files to include here. In truth, I am a developer who needs more information about the JBOSS configuration, but online searches have been fruitless. Any suggestions or insights will be helpful.
Output from the service is shown below:
2012-12-21 10:03:54,213 INFO [ - ][com.syniverse.SMSIGLoaderTierOne.SMSIGManager] Loading the configuration properties.
2012-12-21 10:03:54,222 INFO [ - ][com.syniverse.SMSIGLoaderTierOne.SMSIGManager] The configuration properties are successfully loaded. The number of properties loaded is:57
2012-12-21 10:03:55,953 INFO [ - ][com.syniverse.SMSIGLoaderTierOne.SMSIGManager] Query version number = '02.00.00'. Query = select version_num from icsms.reftbl where schema_name = 'smsig' and schema_date IN (select MAX(schema_date) from icsms.reftbl).
2012-12-21 10:03:55,954 INFO [ - ][com.syniverse.SMSIGLoaderTierOne.SMSIGManager] SMSIGLoader is ok to run. Starting Initial Clean Up Thread.
2012-12-21 10:03:55,960 INFO [ - ][com.syniverse.SMSIGLoaderTierOne.SMSIGManager] Create a control thread to read the load file from the source file directory.
2012-12-21 10:03:55,968 INFO [ - ][com.syniverse.SMSIGLoaderTierOne.SMSIGManager] **** FTP directory Monitor - Started with scan rate 60 *****
2012-12-21 10:03:55,969 INFO [ - ][com.syniverse.SMSIGLoaderTierOne.SMSIGManager] **** Status 0 Load Control Record Monitor - Started with scan rate 60 *****
2012-12-21 10:03:55,998 INFO [ - ][com.syniverse.SMSIGLoaderTierOne.ControllerThread] Offset Increment = 3600000
2012-12-21 10:03:55,996 ERROR [ - ][com.syniverse.SMSIGLoaderTierOne.SMSIGManager] ErrorCode[VLD-MGR-4001] AppErrorDesc[Error when looking up the data source of the control table connection pool. Please see tool error detail and verify mysql-ds.xml is deployed in JBoss.] ToolError[MySqlSmsigControlTableDS not boundParameters[DataSourceJNDIName:java:/MySqlSmsigControlTableDS]
2012-12-21 10:03:56,077 ERROR [ - ][com.syniverse.SMSIGLoaderTierOne.SMSIGManager] ErrorCode[VLD-MGR-4001] AppErrorDesc[Error when looking up the data source of the control table connection pool. Please see tool error detail and verify mysql-ds.xml is deployed in JBoss.] ToolError[MySqlSmsigControlTableDS not boundParameters[DataSourceJNDIName:java:/MySqlSmsigControlTableDS]
2012-12-21 10:03:56,139 ERROR [ - ][com.syniverse.SMSIGLoaderTierOne.SMSIGManager] ErrorCode[VLD-MGR-4001] AppErrorDesc[Error when looking up the data source of the control table connection pool. Please see tool error detail and verify mysql-ds.xml is deployed in JBoss.] ToolError[MySqlSmsigControlTableDS not boundParameters[DataSourceJNDIName:java:/MySqlSmsigControlTableDS]
2012-12-21 10:03:56,332 ERROR [ - ][com.syniverse.SMSIGLoaderTierOne.InitialCleanUpThread] ErrorCode[VLD-ICU-3003] AppErrorDesc[ICU completed abnormally.] ToolError[Service Stopped.]
2012-12-21 10:03:56,332 INFO [ - ][com.syniverse.SMSIGLoaderTierOne.InitialCleanUpThread] ICU Completed.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/784517#784517]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 6 months