Title: RE: [JBoss-dev] Backend session information - Tx - Data distribution

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.&nbsp; 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

Reply via email to