I must be asleep. The jms + xa scheme is the way to go. david jencks
On 2002.06.06 12:38:35 -0400 David Jencks wrote: > What I suggested would let you notify after transaction completion > without > modifying your ejbs. This is apparently not what you want. I therefore > suggest you write another layer of session beans around everything you > want > notifications from. The session bean will generate an abstract > transaction > id, added to every outgoing method call. Upon successful return, the > session bean will do the notifications using the transaction id as key to > find the correct info. I don't see the point of your mbean scheme, nor > how > it would work. > > david jencks > > On 2002.06.06 11:22:38 -0400 "Keysers, Wonne" wrote: > > Thanks for replying. > > What I want is the following: > > > > During a CMT, all changes are logged to the distribution engine. When > the > > transaction is about to commit, the dist. engine tries to distribute > the > > right changes. (basically this is a copy of the new values in an export > > table) > > The engine not only has to use the running transaction (I could use a > > statefull session bean), but also has to save the password > authenticated > > (JAAS) user(id) and the distribution information (dependant of the > > context) in the export table. > > > > I would like to keep my hands of JBoss' source code. > > > > I was thinking of making an MBean for the distribution engine, which is > > able to reuse the Tx associated with the current Thread and which > allows > > EJB's (afterBegin()?) and other clients to register the required > context > > information as soon as a new Tx is started. > > In other words, Transaction, User and other context information must be > > linked to the same thread just like the TxManager does with a Tx and > > TimeOut? (Or have I interpreted this in the wrong way?) > > > > Is all that possible? > > > > Oh yes, when I create a new ThreadLocal attribute in my new MBean, will > > the ThreadLocal attribute within the TxManager be overwritten or are > > these only known internally? > > > > > > Thanks a lot! > > Wonne > > > > > > -----Original Message----- > > From: David Jencks > > To: [EMAIL PROTECTED] > > Sent: 6/6/02 3:20 PM > > Subject: Re: [JBoss-dev] Backend session information - Tx - Data > > distribution > > > > I'm still a little unclear about what you want. I think it is to be > > notified right after every transaction commits. Unfortuneately there > is > > no > > way to register a listener with the tx manager for all transactions. > > > > I think the simplest ways to do this are: > > if you use only cmt, no bmt, modify the tx interceptor to call > something > > after (successful) commit > > > > If you use bmt as well, modify the tx manager to notify you. > > > > david jencks > > > > On 2002.06.06 02:29:52 -0400 "Keysers, Wonne" wrote: > > > Hi, > > > > > > I already asked this question on the user-list, but got not a single > > > answer. Could somebody help me please? > > > > > > I want to create something which keeps track of some backend session > > > information, for data distribution purposes to offline clients. > > > In that session-info are things like the user logged in, data sharing > > > information (some distribution of data is use case specific, most are > > DB > > > based though), etc. It is important that data is distributed only > > when > > > the container transaction commits. > > > > > > What's the best way to do this? > > > > > > Create an MBean, just like the TxManager works, with a ThreadLocal > > > variable? > > > What will happen with the transaction information of that current > > thread > > > (ThreadInfo inside the TxManager) in this case? > > > > > > Also, is it possible to lookup the current transaction or > > transactionID > > > or info or transaction information? > > > > > > > > > Thanks in advance for any tips! > > > > > > Wonne > > > > > > > > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> > > > <HTML> > > > <HEAD> > > > <META HTTP-EQUIV="Content-Type" CONTENT="text/html; > charset=US-ASCII"> > > > <META NAME="Generator" CONTENT="MS Exchange Server version > > 5.5.2654.19"> > > > <TITLE>Backend session information - Tx - Data distribution</TITLE> > > > </HEAD> > > > <BODY> > > > > > > <P><FONT SIZE=2>Hi, </FONT> > > > </P> > > > > > > <P><FONT SIZE=2>I already asked this question on the user-list, but > > got > > > not a single answer. Could somebody help me please?</FONT> > > > </P> > > > > > > <P><FONT SIZE=2>I want to create something which keeps track of some > > > backend session information, for data distribution purposes to > offline > > > clients.</FONT></P> > > > > > > <P><FONT SIZE=2>In that session-info are things like the user logged > > in, > > > data sharing information (some distribution of data is use case > > specific, > > > most are DB based though), etc. It is important that data is > > > distributed only when the container transaction commits.</FONT></P> > > > > > > <P><FONT SIZE=2>What's the best way to do this?</FONT> > > > </P> > > > > > > <P><FONT SIZE=2>Create an MBean, just like the TxManager works, with > a > > > ThreadLocal variable? </FONT> > > > <BR><FONT SIZE=2>What will happen with the transaction information of > > > that current thread (ThreadInfo inside the TxManager) in this case? > > > </FONT></P> > > > > > > <P><FONT SIZE=2>Also, is it possible to lookup the current > transaction > > or > > > transactionID or info or transaction information?</FONT> > > > </P> > > > <BR> > > > > > > <P><FONT SIZE=2>Thanks in advance for any tips!</FONT> > > > </P> > > > > > > <P><FONT SIZE=2>Wonne</FONT> > > > </P> > > > > > > </BODY> > > > </HTML> > > > > > > > _______________________________________________________________ > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > > > _______________________________________________ > > Jboss-development mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-development > > > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> > > <HTML> > > <HEAD> > > <META HTTP-EQUIV="Content-Type" CONTENT="text/html; > charset=iso-8859-1"> > > <META NAME="Generator" CONTENT="MS Exchange Server version > 5.5.2654.19"> > > <TITLE>RE: [JBoss-dev] Backend session information - Tx - Data > > distribution</TITLE> > > </HEAD> > > <BODY> > > > > <P><FONT SIZE=2>Thanks for replying.</FONT> > > <BR><FONT SIZE=2>What I want is the following:</FONT> > > </P> > > > > <P><FONT SIZE=2>During a CMT, all changes are logged to the > distribution > > engine. When the transaction is about to commit, the dist. engine tries > > to distribute the right changes. (basically this is a copy of the new > > values in an export table)</FONT></P> > > > > <P><FONT SIZE=2>The engine not only has to use the running transaction > (I > > could use a statefull session bean), but also has to save the password > > authenticated (JAAS) user(id) and the distribution information > (dependant > > of the context) in the export table.</FONT></P> > > > > <P><FONT SIZE=2>I would like to keep my hands of JBoss' source > > code.</FONT> > > </P> > > > > <P><FONT SIZE=2>I was thinking of making an MBean for the distribution > > engine, which is able to reuse the Tx associated with the current > Thread > > and which allows EJB's (afterBegin()?) and other clients to register > the > > required context information as soon as a new Tx is started.</FONT></P> > > > > <P><FONT SIZE=2>In other words, Transaction, User and other context > > information must be linked to the same thread just like the TxManager > > does with a Tx and TimeOut? (Or have I interpreted this in the wrong > > way?)</FONT></P> > > > > <P><FONT SIZE=2>Is all that possible?</FONT> > > </P> > > > > <P><FONT SIZE=2>Oh yes, when I create a new ThreadLocal attribute in my > > new MBean, will the ThreadLocal attribute within the TxManager be > > overwritten or are these only known internally?</FONT></P> > > <BR> > > > > <P><FONT SIZE=2>Thanks a lot!</FONT> > > <BR><FONT SIZE=2>Wonne</FONT> > > </P> > > <BR> > > > > <P><FONT SIZE=2>-----Original Message-----</FONT> > > <BR><FONT SIZE=2>From: David Jencks</FONT> > > <BR><FONT SIZE=2>To: [EMAIL PROTECTED]</FONT> > > <BR><FONT SIZE=2>Sent: 6/6/02 3:20 PM</FONT> > > <BR><FONT SIZE=2>Subject: Re: [JBoss-dev] Backend session information - > > Tx - Data distribution</FONT> > > </P> > > > > <P><FONT SIZE=2>I'm still a little unclear about what you want. I > > think it is to be</FONT> > > <BR><FONT SIZE=2>notified right after every transaction commits. > > Unfortuneately there is</FONT> > > <BR><FONT SIZE=2>no</FONT> > > <BR><FONT SIZE=2>way to register a listener with the tx manager for all > > transactions.</FONT> > > </P> > > > > <P><FONT SIZE=2>I think the simplest ways to do this are:</FONT> > > <BR><FONT SIZE=2>if you use only cmt, no bmt, modify the tx interceptor > > to call something</FONT> > > <BR><FONT SIZE=2>after (successful) commit</FONT> > > </P> > > > > <P><FONT SIZE=2>If you use bmt as well, modify the tx manager to notify > > you.</FONT> > > </P> > > > > <P><FONT SIZE=2>david jencks</FONT> > > </P> > > > > <P><FONT SIZE=2>On 2002.06.06 02:29:52 -0400 "Keysers, Wonne" > > wrote:</FONT> > > <BR><FONT SIZE=2>> Hi, </FONT> > > <BR><FONT SIZE=2>> </FONT> > > <BR><FONT SIZE=2>> I already asked this question on the user-list, > but > > got not a single</FONT> > > <BR><FONT SIZE=2>> answer. Could somebody help me please?</FONT> > > <BR><FONT SIZE=2>> </FONT> > > <BR><FONT SIZE=2>> I want to create something which keeps track of > > some backend session</FONT> > > <BR><FONT SIZE=2>> information, for data distribution purposes to > > offline clients.</FONT> > > <BR><FONT SIZE=2>> In that session-info are things like the user > > logged in, data sharing</FONT> > > <BR><FONT SIZE=2>> information (some distribution of data is use > case > > specific, most are</FONT> > > <BR><FONT SIZE=2>DB</FONT> > > <BR><FONT SIZE=2>> based though), etc. It is important that > data > > is distributed only</FONT> > > <BR><FONT SIZE=2>when</FONT> > > <BR><FONT SIZE=2>> the container transaction commits.</FONT> > > <BR><FONT SIZE=2>> </FONT> > > <BR><FONT SIZE=2>> What's the best way to do this?</FONT> > > <BR><FONT SIZE=2>> </FONT> > > <BR><FONT SIZE=2>> Create an MBean, just like the TxManager works, > > with a ThreadLocal</FONT> > > <BR><FONT SIZE=2>> variable? </FONT> > > <BR><FONT SIZE=2>> What will happen with the transaction information > > of that current</FONT> > > <BR><FONT SIZE=2>thread</FONT> > > <BR><FONT SIZE=2>> (ThreadInfo inside the TxManager) in this case? > > </FONT> > > <BR><FONT SIZE=2>> </FONT> > > <BR><FONT SIZE=2>> Also, is it possible to lookup the current > > transaction or</FONT> > > <BR><FONT SIZE=2>transactionID</FONT> > > <BR><FONT SIZE=2>> or info or transaction information?</FONT> > > <BR><FONT SIZE=2>> </FONT> > > <BR><FONT SIZE=2>> </FONT> > > <BR><FONT SIZE=2>> Thanks in advance for any tips!</FONT> > > <BR><FONT SIZE=2>> </FONT> > > <BR><FONT SIZE=2>> Wonne</FONT> > > <BR><FONT SIZE=2>> </FONT> > > <BR><FONT SIZE=2>> </FONT> > > <BR><FONT SIZE=2>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML > > 3.2//EN"></FONT> > > <BR><FONT SIZE=2>> <HTML></FONT> > > <BR><FONT SIZE=2>> <HEAD></FONT> > > <BR><FONT SIZE=2>> <META HTTP-EQUIV="Content-Type" > > CONTENT="text/html; charset=US-ASCII"></FONT> > > <BR><FONT SIZE=2>> <META NAME="Generator" > > CONTENT="MS Exchange Server version</FONT> > > <BR><FONT SIZE=2>5.5.2654.19"></FONT> > > <BR><FONT SIZE=2>> <TITLE>Backend session information - Tx - > > Data distribution</TITLE></FONT> > > <BR><FONT SIZE=2>> </HEAD></FONT> > > <BR><FONT SIZE=2>> <BODY></FONT> > > <BR><FONT SIZE=2>> </FONT> > > <BR><FONT SIZE=2>> <P><FONT SIZE=2>Hi, > > </FONT></FONT> > > <BR><FONT SIZE=2>> </P></FONT> > > <BR><FONT SIZE=2>> </FONT> > > <BR><FONT SIZE=2>> <P><FONT SIZE=2>I already asked this > > question on the user-list, but</FONT> > > <BR><FONT SIZE=2>got</FONT> > > <BR><FONT SIZE=2>> not a single answer. Could somebody help me > > please?</FONT></FONT> > > <BR><FONT SIZE=2>> </P></FONT> > > <BR><FONT SIZE=2>> </FONT> > > <BR><FONT SIZE=2>> <P><FONT SIZE=2>I want to create > > something which keeps track of some</FONT> > > <BR><FONT SIZE=2>> backend session information, for data > distribution > > purposes to offline</FONT> > > <BR><FONT SIZE=2>> clients.</FONT></P></FONT> > > <BR><FONT SIZE=2>> </FONT> > > <BR><FONT SIZE=2>> <P><FONT SIZE=2>In that session-info > > are things like the user logged</FONT> > > <BR><FONT SIZE=2>in,</FONT> > > <BR><FONT SIZE=2>> data sharing information (some distribution of > data > > is use case</FONT> > > <BR><FONT SIZE=2>specific,</FONT> > > <BR><FONT SIZE=2>> most are DB based though), etc.&nbsp; It is > > important that data is</FONT> > > <BR><FONT SIZE=2>> distributed only when the container transaction > > commits.</FONT></P></FONT> > > <BR><FONT SIZE=2>> </FONT> > > <BR><FONT SIZE=2>> <P><FONT SIZE=2>What's the best way > to > > do this?</FONT></FONT> > > <BR><FONT SIZE=2>> </P></FONT> > > <BR><FONT SIZE=2>> </FONT> > > <BR><FONT SIZE=2>> <P><FONT SIZE=2>Create an MBean, just > > like the TxManager works, with a</FONT> > > <BR><FONT SIZE=2>> ThreadLocal variable? </FONT></FONT> > > <BR><FONT SIZE=2>> <BR><FONT SIZE=2>What will happen > with > > the transaction information of</FONT> > > <BR><FONT SIZE=2>> that current thread (ThreadInfo inside the > > TxManager) in this case?</FONT> > > <BR><FONT SIZE=2>> </FONT></P></FONT> > > <BR><FONT SIZE=2>> </FONT> > > <BR><FONT SIZE=2>> <P><FONT SIZE=2>Also, is it possible > to > > lookup the current transaction</FONT> > > <BR><FONT SIZE=2>or</FONT> > > <BR><FONT SIZE=2>> transactionID or info or transaction > > information?</FONT></FONT> > > <BR><FONT SIZE=2>> </P></FONT> > > <BR><FONT SIZE=2>> <BR></FONT> > > <BR><FONT SIZE=2>> </FONT> > > <BR><FONT SIZE=2>> <P><FONT SIZE=2>Thanks in advance for > > any tips!</FONT></FONT> > > <BR><FONT SIZE=2>> </P></FONT> > > <BR><FONT SIZE=2>> </FONT> > > <BR><FONT SIZE=2>> <P><FONT > > SIZE=2>Wonne</FONT></FONT> > > <BR><FONT SIZE=2>> </P></FONT> > > <BR><FONT SIZE=2>> </FONT> > > <BR><FONT SIZE=2>> </BODY></FONT> > > <BR><FONT SIZE=2>> </HTML></FONT> > > <BR><FONT SIZE=2>> </FONT> > > </P> > > > > <P><FONT >SIZE=2>_______________________________________________________________</FONT> > > </P> > > > > <P><FONT SIZE=2>Don't miss the 2002 Sprint PCS Application Developer's > > Conference</FONT> > > <BR><FONT SIZE=2>August 25-28 in Las Vegas -- <A > > HREF="http://devcon.sprintpcs.com/adp/index.cfm" > > TARGET="_blank">http://devcon.sprintpcs.com/adp/index.cfm</A></FONT> > > </P> > > > > <P><FONT SIZE=2>_______________________________________________</FONT> > > <BR><FONT SIZE=2>Jboss-development mailing list</FONT> > > <BR><FONT SIZE=2>[EMAIL PROTECTED]</FONT> > > <BR><FONT SIZE=2><A >HREF="https://lists.sourceforge.net/lists/listinfo/jboss-development" > > >TARGET="_blank">https://lists.sourceforge.net/lists/listinfo/jboss-development</A></FONT> > > </P> > > > > </BODY> > > </HTML> > > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Jboss-development mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-development > > _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
