Re: Data Manager Null

2011-06-07 Thread Karl Wright
Sorry, I wasn't clear. The dataManager initialization can certainly occur in every setThreadContext method call because that's when you have the threadContext available. But as long as you save the thread context when setThreadContext is called, you can certainly do it in getSession() instead - p

Re: Data Manager Null

2011-06-07 Thread Farzad Valad
I think I get it now why you said put getSession in addOrReplaceDocument. This way you construct the dataManager when you need it as oppose to each set and clear pair : ) On 6/7/2011 5:10 PM, Farzad Valad wrote: I don't fully understand how a connector instance can be used by multiple threads

Re: Data Manager Null

2011-06-07 Thread Farzad Valad
I don't fully understand how a connector instance can be used by multiple threads without each thread calling setThread. Here is what I think I know. The contract does say that addOrReplaceDocument is only called after setTC, right? Because you first have to have connection handle before a

Re: Data Manager Null

2011-06-07 Thread Karl Wright
The recommendation to have getSession be called in addOrReplaceDocument is because there is nothing in the contract which states that the connector instance will switch threads between calls. Therefore there is no guarantee that clearThreadContext/setThreadContext will be called right prior to addO

Re: Data Manager Null

2011-06-07 Thread Farzad Valad
Thanks for the confirmation. So if I have code to set dataManager to null in clearThreadContext and create a dataManager in setThreadContext. Why do I need the getSession method in addOrReplaceDocument method? From what I learnt about ManifoldCF architecture, setThreadContext will get called

Re: Data Manager Null

2011-06-07 Thread Karl Wright
It sounds like you are on the right track for fixing all of these problems. Karl On Tue, Jun 7, 2011 at 4:38 PM, Farzad Valad wrote: > I think I found the problem.  I should be tearing down the dataManager and > recreating it between clear and set thread context calls, because it has a > thread

Re: Data Manager Null

2011-06-07 Thread Farzad Valad
I think I found the problem. I should be tearing down the dataManager and recreating it between clear and set thread context calls, because it has a thread context. I'm not doing that. I guess I did learn something reading : ) let me know if you believe otherwise. Also do you think this is

Data Manager Null

2011-06-07 Thread Farzad Valad
So I think I figured it out. For some reason I'm getting a db error, bad transaction id, which then kills my dataManager object, or I should say the framework is setting it to null. What does a Bad transaction ID mean? Thoughts? This happened after I did a LockClean and restart both the age