-
1. Re: Changes don't commit on the database
kukeltje Apr 4, 2007 8:47 PM (in response to remon_sherin)please don't expect us to be clairvoyant
-
2. Re: Changes don't commit on the database
remon_sherin Apr 6, 2007 1:40 PM (in response to remon_sherin)>please don't expect us to be clairvoyant
Plz don't be satirical. If you found that my description is not sufficient tell me.
All what I want to say are the following: normal procedures that causes a change in the database, don't cause any change at all, i.e. if I create a ProcessDefinition and deploy it, I should navigate to JBPM_PROCESSDEFINITION table to find that it has 1 new row, I found that it contains 0 rows.
What makes me not to describe the details of the problem, is that I'm new to JBPM, and i think that a lot of you have faced this problem before. -
3. Re: Changes don't commit on the database
dmlloyd Apr 6, 2007 1:48 PM (in response to remon_sherin)You probably aren't closing your jbpm context, or not committing the database transaction.
-
4. Re: Changes don't commit on the database
remon_sherin Apr 7, 2007 6:30 AM (in response to remon_sherin)I wonder if I should close the context after every context?, If I should how could I open it again?
Regards
Remon -
5. Re: Changes don't commit on the database
remon_sherin Apr 7, 2007 3:58 PM (in response to remon_sherin)I'll be grateful if any body could help me
-
6. Re: Changes don't commit on the database
iantimothy Apr 8, 2007 11:47 PM (in response to remon_sherin)Hello.
I'm guessing that somewhere in your code, you should be having these lines:
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
// Your code below these lines...
I think what you could try doing is put the above two lines inside a try block, catch any exceptions and then finally close the context i.e.
try{
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
//your code...
}
catch(Exception e){
throw e;
}
finally{
jbpmContext.close();
}
I think it is good practice to close the context each time you create a new one in a method to ensure what you are doing persists.
Sometimes the method that you are writing needs to do call other methods which require the use of a JbpmContext. Instead of creating a new JbpmContext in those other methods, you could pass the first JbpmContext created to them.
I have also just started using Jbpm, but so far this seems to work for me. If I have said anything wrong, maybe the seniors in this forum could add to it or correct it.
Hopefully, your problem will be solved soon. Take care.