Discussion:
TG2 / Elixir Transaction Issue
erisian
2011-03-03 00:48:21 UTC
Permalink
I used to be a serious user of Elixir / SQLAlchemy a few years ago and
really liked it. So when I needed to deploy a light application for
our workgroup I naturally turned to TG. TG2 looked to be the most
flexible so I went with that. I installed it on Linux, walked through
the quick start installed web site and started hacking on the default
web app.

So far everything has been straight forward. I'm learning TG2 by the
seat of my pants etc.

I've run into a problem though. My object model was created in
Elixir and it worked fine under interactive testing in IPython etc.
There was a little bit of an impedance mismatch because I had to
retrofit my Elixir code into the TG2 demo app, but I found most of the
code I needed in various examples. I converted the repoze User/Group/
Perm model into Elixir and integrated it with the rest of my model. I
can login, look at restricted pages etc. I was very pleased to see
that the "admin" page introspected my object model and was offering to
let me perform CRUD ops.

Here's my issue:

In admin I examined my User/Group/Perm objects. It properly displayed
my users and groups so I thought I'd try editing a user.

1. I was able to bring a user up in the editing form.
2. I modified the display name and hit 'submit' and received:

ResourceClosedError: The transaction is closed

I tried hunting this error down, but I think it might take a while
considering that I'm new to the framework. Has anyone seen anything
like this or know of a likely place to fix it?

I did notice that some of the older Elixir demo code that I tried also
used a transaction option when creating the session, but it was a
different transaction subsystem. The new transaction manager seems to
have come from Zope and it might be possible that it's interface isn't
totally transparent to Elixir.

Anyway, I'll keep looking for the solution but if anyone knows a
solution to this I'd really appreciate it.

Thanks,

erisian
--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com.
To unsubscribe from this group, send email to turbogears+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.
Maxim Oganesyan
2011-03-03 09:16:56 UTC
Permalink
Erisian, do You use commiting/rolling back/etc. of transactions?

Maxim.
--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com.
To unsubscribe from this group, send email to turbogears+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.
erisian
2011-03-03 16:43:17 UTC
Permalink
Maxim,

I don't, but apparently the AdminController does. This means I have
to open my session using the Zope Transaction option (or soemthing
compatible that's not breaking). I guess this means that I have to
figure out how AdminController uses the Zope transaction layer and why
it's not working.


erisian
Post by Maxim Oganesyan
Erisian, do You use commiting/rolling back/etc. of transactions?
Maxim.
--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to ***@googlegroups.com.
To unsubscribe from this group, send email to turbogears+***@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.
D R Dinesh Kumar
2017-05-11 17:56:23 UTC
Permalink
Hi Erisian,

have you found the solution for this? I got stuck with the same issue.
Please help.

With Regards,
Dinesh.
Post by erisian
I used to be a serious user of Elixir / SQLAlchemy a few years ago and
really liked it. So when I needed to deploy a light application for
our workgroup I naturally turned to TG. TG2 looked to be the most
flexible so I went with that. I installed it on Linux, walked through
the quick start installed web site and started hacking on the default
web app.
So far everything has been straight forward. I'm learning TG2 by the
seat of my pants etc.
I've run into a problem though. My object model was created in
Elixir and it worked fine under interactive testing in IPython etc.
There was a little bit of an impedance mismatch because I had to
retrofit my Elixir code into the TG2 demo app, but I found most of the
code I needed in various examples. I converted the repoze User/Group/
Perm model into Elixir and integrated it with the rest of my model. I
can login, look at restricted pages etc. I was very pleased to see
that the "admin" page introspected my object model and was offering to
let me perform CRUD ops.
In admin I examined my User/Group/Perm objects. It properly displayed
my users and groups so I thought I'd try editing a user.
1. I was able to bring a user up in the editing form.
ResourceClosedError: The transaction is closed
I tried hunting this error down, but I think it might take a while
considering that I'm new to the framework. Has anyone seen anything
like this or know of a likely place to fix it?
I did notice that some of the older Elixir demo code that I tried also
used a transaction option when creating the session, but it was a
different transaction subsystem. The new transaction manager seems to
have come from Zope and it might be possible that it's interface isn't
totally transparent to Elixir.
Anyway, I'll keep looking for the solution but if anyone knows a
solution to this I'd really appreciate it.
Thanks,
erisian
--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbogears+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.
Loading...