[Resin-interest] ActiveMQ transaction problem

2008-04-25 Thread wesley
As I'm using ActiveMQ jca adapter on snapshot080331, eventually when producing messages it will throw exceptions. My message sender: == @Named("clearCache") Topic clearCacheTopic; @In ConnectionFactory jmsFactory; public void sendClearCacheMessa

[Resin-interest] question about UserTransaction

2008-04-25 Thread Riccardo Cohen
Hi I've learnt how to use UserTransaction, and even if it works, I don't know if my implementation has good performance. I added a single UserTransaction in one of my servlets : public class globalaction extends HttpServlet { @In public static UserTransaction m_ut; I use this m_ut from all

Re: [Resin-interest] question about UserTransaction

2008-04-25 Thread wesley
Hi Riccardo, I'm using @In TransactionManager transaction; in servlets and @Component and it proved to be robust and of good performance. ps> I don't think "static" is a good directive. -Wesley - Original Message - From: "Riccardo Cohen" <[EMAIL PROTECTED]> To: "General Discussion f

Re: [Resin-interest] question about UserTransaction

2008-04-25 Thread Riccardo Cohen
Thanks for this information. The member is static for now because it is the same transaction used in all servlets. Anyway most of my servlets have static only methods. wesley wrote: > Hi Riccardo, > > I'm using > @In > TransactionManager transaction; > in servlets and @Component > > and it pr

Re: [Resin-interest] question about UserTransaction

2008-04-25 Thread Scott Ferguson
On Apr 25, 2008, at 5:29 AM, Riccardo Cohen wrote: > Thanks for this information. > The member is static for now because it is the same transaction used > in > all servlets. The UserTransaction is basically a singleton, so you can use @In UserTransaction anywhere and it'll all become part of

Re: [Resin-interest] question about UserTransaction

2008-04-25 Thread Riccardo Cohen
all right, and what happens if 2 or 3 threads running the same code, call m_ut.Begin in the same time ? I suppose then that they all go in the same transaction ? Scott Ferguson wrote: > On Apr 25, 2008, at 5:29 AM, Riccardo Cohen wrote: > >> Thanks for this information. >> The member is static

Re: [Resin-interest] question about UserTransaction

2008-04-25 Thread Scott Ferguson
On Apr 25, 2008, at 9:18 AM, Riccardo Cohen wrote: > all right, > and what happens if 2 or 3 threads running the same code, call > m_ut.Begin in the same time ? I suppose then that they all go in the > same transaction ? No, each thread gets its own transaction. Transactions are always thread

Re: [Resin-interest] question about UserTransaction

2008-04-25 Thread Riccardo Cohen
Thanks a lot for the clarification Scott Ferguson wrote: > On Apr 25, 2008, at 9:18 AM, Riccardo Cohen wrote: > >> all right, >> and what happens if 2 or 3 threads running the same code, call >> m_ut.Begin in the same time ? I suppose then that they all go in the >> same transaction ? > > No, ea

Re: [Resin-interest] ActiveMQ transaction problem

2008-04-25 Thread Scott Ferguson
On Apr 25, 2008, at 1:10 AM, wesley wrote: As I'm using ActiveMQ jca adapter on snapshot080331, eventually when producing messages it will throw exceptions. My message sender: I've added this as a bug report, but it might take some time to track down, since none of the stack shows Resin c