This statement takes all the time:
| ProcessDeployer.java line 134, method checkKey().
|
|
| List<ProcessDefinition> existingProcesses =
repositorySession.createProcessDefinitionQuery()
| .processDefinitionName(processDefinitionName)
| .list();
|
Then the code goes on to perform a "find":
| for (ProcessDefinition existingProcess: existingProcesses) {
| if (!processDefinitionKey.equals(existingProcess.getKey())) {
| deployment.addProblem("invalid key
'"+processDefinitionKey+"' in process
"+processDefinition.getName()+". Existing process has name
'"+processDefinitionName+"' and key
'"+processDefinitionKey+"'");
| }
| }
|
uuumm.... shouldn't the query actually be performed at the database level !?!?
On top of that, here is the code that performs the actual query:
| public Object execute(Session session) {
| List<Map<String, Object>> propertyMaps = (List<Map<String,
Object>>) super.execute(session);
|
| List<ProcessDefinition> processDefinitions = new
ArrayList<ProcessDefinition>();
| for (Map<String, Object> properties: propertyMaps) {
| String deploymentId = properties.get("deploymentDbid").toString();
| String objectName = (String)properties.get("objectName");
| RepositorySession repositorySession =
EnvironmentImpl.getFromCurrent(RepositorySession.class);
| ProcessDefinitionImpl processDefinition = (ProcessDefinitionImpl)
repositorySession.getObject(deploymentId, objectName);
| processDefinitions.add(processDefinition);
| }
|
| return processDefinitions;
| }
|
So, instead of loading everything from the database in one go, its loading data one row at
a time! - FROM THE DATABASE !! HOLY PENGUIN!
Whats going on?
The symptom is magnified, by the fact that the process is running in US, and the database
is in UK!
Or am I using it wrong?
Ajay
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4270066#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...