Do you have a timeline when this feature might be available?  Do I
need to make a feature request in the bug tracker on the project
site?

Thanks again, Chris

On Feb 6, 3:04 pm, chenson42 <[email protected]> wrote:
> A function would be perfect!  A String would work for SymmetricDS.
> The value needs to be unique across database restarts.  The faster the
> better.  We use it to track changes that need to be 'synchronized'
> atomically.  I am really looking for the equivalent of
> DBMS_TRANSACTION.local_transaction_id(false) on Oracle.  I would think
> the name could be as simple as TRANSACTION_ID() ??
>
> Thank you.
>
> On Feb 6, 2:10 pm, Thomas Mueller <[email protected]>
> wrote:
>
> > Hi,
>
> > > I am currently implementing an H2 'database dialect' for SymmetricDS
> > > (www.symmetricds.org).    I am trying to figure out the best way to
> > > access a 'transactionid' from an H2 trigger.  The following is the
> > > Java code I have come up with.  Does anybody have suggestions for
> > > improvements (or more likely can they poke holes in my approach)?
>
> > >    protected String getTransactionId(Connection c) {
> > >            JdbcConnection con = (JdbcConnection) c;
> > >            Session session = (Session) con.getSession();
> > >            return StringUtils.leftPad(Integer.toString(session.getId
> > > ()), 3, "0") + "-"
> > >                    + session.getFirstUncommittedLog() + "-" +
> > > session.getFirstUncommittedPos();
> > >    }
>
> > There is currently no good way to do that. How unique does the
> >transactionidneed to be? I mean, is it a problem if theidstarts
> > from 0 when you restart the application? Is there a sort requirements
> > (largertransactionids means later)?
>
> > Your solution doesn't work for remote connections. I suggest I add a
> > SQL system function that returns the currenttransactionid. What is
> > your preferred function name?
>
> > Is a String good enough, or is a byte array better? How fast does it
> > need to be?
>
> > Regards,
> > Thomas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to