Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

[04:27:14 EST(-0500)] * higmad (n=chatzill@pcit-8752.HIG.SE) has joined ##uportal
[06:54:47 EST(-0500)] * lennard1 (n=sparhk@wsip-98-174-242-39.ph.ph.cox.net) has joined ##uportal
[08:16:06 EST(-0500)] * bszabo (n=bszabo@wsip-98-174-242-39.ph.ph.cox.net) has joined ##uportal
[09:00:11 EST(-0500)] * EricDalquist (n=dalquist@bohemia.doit.wisc.edu) has joined ##uportal
[09:02:52 EST(-0500)] * athena7 (n=athena7@adsl-99-136-251-32.dsl.wlfrct.sbcglobal.net) has joined ##uportal
[09:07:02 EST(-0500)] <athena7> hey EricDalquist - i had a question about your response on the postgres import/export thing
[09:07:10 EST(-0500)] <EricDalquist> ok
[09:07:27 EST(-0500)] <athena7> do we know for sure that there's always transactions available now?
[09:07:48 EST(-0500)] <EricDalquist> we should assume so
[09:07:48 EST(-0500)] <athena7> i was hesitant to do anything transaction-specific in that code since i saw there was a supportsTransactions test
[09:07:59 EST(-0500)] <EricDalquist> I don't think the portal will work right on a db without Tx support
[09:08:10 EST(-0500)] <athena7> ok, thanks
[09:08:17 EST(-0500)] <athena7> i figured that might be the case but i wanted to make sure
[09:08:29 EST(-0500)] <athena7> wonder if we want to keep that test there
[09:10:11 EST(-0500)] <EricDalquist> yeah ... we can probably just hardcode it to true and move the test to the portal startup checks
[09:10:19 EST(-0500)] <EricDalquist> if it fails then fail starting the portal?
[09:10:40 EST(-0500)] <athena7> yeah, probably a good idea if we're counting on it
[09:11:53 EST(-0500)] <athena7> so will the transaction manager allow us to cleanly start a new transaction if there's already one running?
[09:17:43 EST(-0500)] <EricDalquist> yes
[09:18:35 EST(-0500)] <EricDalquist> let me find an example ....
[09:19:30 EST(-0500)] <EricDalquist> so in the code that does the join tests ....
[09:19:34 EST(-0500)] <EricDalquist> you'd inject a PlatformTransactionManager
[09:20:00 EST(-0500)] <EricDalquist> then in the afterPropertiesSet you would setup a local TransactionTemplate like:
[09:20:02 EST(-0500)] <EricDalquist> this.transactionTemplate = new TransactionTemplate(this.transactionManager);
[09:20:02 EST(-0500)] <EricDalquist> this.transactionTemplate.setPropagationBehavior(TransactionTemplate.PROPAGATION_REQUIRES_NEW);
[09:20:02 EST(-0500)] <EricDalquist> this.transactionTemplate.afterPropertiesSet();
[09:20:42 EST(-0500)] <EricDalquist> that propagation behavior setting there ensures that when you do: this.transactionTemplate.execute(TransactionCallback) it will happen in a new transaction
[09:20:58 EST(-0500)] <EricDalquist> handling creating a new connection and everything
[09:21:29 EST(-0500)] <athena7> ok, that makes sense

  • No labels