Re: Blind shot
"Goncalo E.D. Luiz" <[email protected]>
| Newsgroups | gmane.comp.java.ozone.user |
|---|---|
| Message-ID | <[email protected]> |
Could you please ask Falko what he thinks ?
If this is not possible I'll have to find another solution to our
workflow system, because it is mandatory that we have a multi-thread
system (you see, if we have 3 tasks we do not want to wait for one to
finish if we can execute them at pararell). All I would need was to bind
the newly crfeated thread to the ongoing transaction (just like it was
an inheritance).
Could you please help ? I'm getting stucked :(
Leo Mekenkamp wrote:
>On Sat, 2004-03-20 at 19:27, "Gonçalo E.D. Luiz" wrote:
>
>
>>I've been reading Ozone Core code and I found out that MAYBE the issue
>>is comming from here:
>>
>> /**
>> * der aktuelle thread is auch die aktuelle transaktion (wenn der
>> * thread ueberhaupt eine transaktion ist)
>> */
>> public Transaction currentTA() {
>> Thread thread = Thread.currentThread();
>> // see startTransaction()
>> if (thread instanceof CommandThread) {
>> return ((CommandThread) thread).ta;
>> } else {
>> Transaction result = (Transaction)
>>threadTable.elementForKey(thread);
>> return result;
>> }
>> }
>>
>>I will not try to translate the comment but I may guess that is saying
>>something about the "current thread and current transaction".
>>
>>
>
>Fortunately Chris Zumbrunn already xlated that (thanx Chris).
>
>
>
>>So my last mail maybe right. Ozone is trying to get the transaction on
>>the current thread, but because it is a new thread it has none ! Then at
>>Database.java when it does
>>env.currentTA().xxxxx() we get the null pointer when trying to execute
>>xxxxxx().
>>
>>
>
>Which is logical, because the ozone server has no way of knowing which
>transaction a newly started thread should be bound to; every thread
>needs its own transaction
>
>
>
>>Is there a way to use thread like I'm trying to do ? Please say yes
>>
>>
>
>:-/ I don't know. You are certainly doing stuff that is out of the
>ordinary. Maybe it would be possible to start an external transaction
>from within the server, but I don't know the consequences of that. Maybe
>one of the more veteran developers can provide more inside on this.
>
>Cheers,
>Leo
>
>
>
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click