Hey  :-)

> Let me take a wild guess here:
> Do you start the tx in one servlet invocation and end it in another? In
> that case it wont work:
> 1. Using tx:s to do long transactions is a Bad Idea. Don't do it. Use
> locking or similar instead
> 2. Consider this:
> * The tx initiator servlet is called from client 1. Tx 1 is started
> * The tx initiator servlet is called from client 2 and the same handler
> thread as above is used.
> Since tx:es are thread associated nr 2 will interfere with nr 1 and
> hence it wont work (you can only have 1 tx/thread)

It does seem like a thread problem. We are using ASP and I thought that when
the web server gets concurrent http requests , the JVM on the webserver
would pass on the requests to the EJB server is seperate threads. But looks
like the JVM on the web server is creating the transactions in the same
thread.

Does JSP behave the same way ?

Is there any way of creating the transactions in seperate threads without us
trying to do it explicitly ?

On the EJB server side we can have simultaneous transactions. So now when an
EJB server get's a method invocation , how does it know which transaction
does it belongs to ? I thought it was the InitialContext. But now I realize
that if the same client thread started the 2 transactions , then it doesn't
work even if the transactions and contexts are maintained seperately.

I'm trying to find out that if there is any thing that we can do ( via JTA)
when creating transactions so that that we can have multiple transactions
within the same thread.

Are than any good articles on some web site on these issues?


Though I would like short lived transactions, our e-commerce solution
requires longer client demarcated transactions. Rickard , we wanted to let
transactions (which get passed on to the database by weblogic) to take care
of the locking . Why do you suggest that it be done manually in the code ?




>
> /Rickard
>
> --
> Rickard �berg
>
> Computer Science student@LiTH
> @home: +46 13 177937
> Email: [EMAIL PROTECTED]
> Homepage: http://www-und.ida.liu.se/~ricob684
>
> ==================================================================
> =========
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to