Tom Wang wrote:
> Bita,
>
> I don't have sample code to show you but I'll try to explain better. Take a
> look at J2EEDescriptorsStore. It maintains a connection map to support
> concurrent clients. This way the store knows which connection to use when
> dealing with a specific thread. What I was suggesting is to save the
> connection reference in the current thread context (you'll need to create
> the context yourself, maybe using ThreadLocal). Since at the app layer you
> only have the handle to NamespaceAccessToken, which means you can't get to
> the connection map since it's hidden by the store impl. But you can get the
> connection from your current thread context. Am i making sense?
>
> Tom Wang
> Panscopic Corporation
> Web Reporting, Just Add Data
> http://www.panscopic.com/download
Tom & Lukasz
Now I understand your mean quite better. But still I am not clear when there
were some other tables in the same database as slide's tables, and we are going
to consider a bunch of operations, whether on the Slide's tables or other
tables, as one transaction. In this case I don't know how the thread context
can help me, or even does it help or not?
To make it more clear, consider the following operations as one transaction in
a given thread:
try {
TA.start()
operation on my tables
Mkcol method--> which causes some operations on the slide's tables and is
considered as one transaction in slide.
operation on my tables
TA.commit()
} catch ( Exception e) {
TA.rollback()
}
I know that we can not have nested transaction, so practically what I have
written is wrong, but logically I want to have above order of transaction and I
don't know how can I cancel the transaction commands in the Mkcol method.
Is there any way??
Regards,
Bita.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>