Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #8002
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!news.glorb.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe11.iad.POSTED!8ad76e89!not-for-mail |
|---|---|
| From | Arved Sandstrom <asandstrom3minus1@eastlink.ca> |
| User-Agent | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.21) Gecko/20110831 Lightning/1.0b2 Thunderbird/3.1.13 |
| MIME-Version | 1.0 |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: JSF/JPA problem |
| References | <j4nvr9$4ld$1@dont-email.me> <VZObq.20744$oz6.19581@newsfe11.iad> <XcPbq.17471$CQ4.165@newsfe09.iad> <j4om1r$a40$1@dont-email.me> <EWRbq.10526$EP3.6864@newsfe05.iad> <j4or6k$ctb$1@dont-email.me> <MqTbq.18258$YA4.3466@newsfe14.iad> |
| In-Reply-To | <MqTbq.18258$YA4.3466@newsfe14.iad> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| Lines | 42 |
| Message-ID | <UtTbq.20792$oz6.12673@newsfe11.iad> (permalink) |
| X-Complaints-To | abuse@newsgroups-download.com |
| NNTP-Posting-Date | Wed, 14 Sep 2011 01:31:32 UTC |
| Organization | Public Usenet Newsgroup Access |
| Date | Tue, 13 Sep 2011 22:31:30 -0300 |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8002 |
Show key headers only | View raw
On 11-09-13 10:28 PM, Arved Sandstrom wrote: > On 11-09-13 09:06 PM, markspace wrote: >> On 9/13/2011 4:45 PM, Arved Sandstrom wrote: >> >>> You could try leaving out the flush(), and simply close the EM at the >>> end of createPost(). This would track Example 5.7.1.1. Let's see if you >>> still get the TransactionRequiredException. That would then demonstrate >>> that there really is no active JTA transaction... >> >>> Since you expect to be set up for JTA, you could also dispense with the >>> use of application-managed, and use @PersistenceContext DI instead, a la >>> Example 5.6.4.1 - this is about as easy as it gets. >> >> >> Just to reiterate the post I just added to this thread, I already >> switched to PersistenceContext for DI, and the error has now moved from >> the em.flush() to the em.persist( post ) on the line previous. So I >> have to conclude that if I add an em.close(), I'll still now have the >> error previous to the close(). I'll give it a try at some point. >> >> >>> You have me interested; I will try this situation out on Glassfish. >> >> >> Thanks for playing around with this, it really has me stumped. > > I just now fired up a new EAR app in Eclipse Indigo running Glassfish > 3.1; two projects, a WAR, and a EJB project with the JPA facet. I am > using PostgreSQL 9.0, and set up a datasourec against that in the > Glassfish admin console. The persistence.xml was extremely simple: > [ SNIP ] Err...I should have added, my setup works just fine. I see new data being persisted. This being the application-managed JTA entity manager scenario. AHS -- job creator: US Republican term for a wealthy party contributor
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
JSF/JPA problem markspace <-@.> - 2011-09-13 09:19 -0700
Re: JSF/JPA problem Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-09-13 17:24 -0300
Re: JSF/JPA problem Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-09-13 17:40 -0300
Re: JSF/JPA problem markspace <-@.> - 2011-09-13 15:38 -0700
Re: JSF/JPA problem markspace <-@.> - 2011-09-13 17:06 -0700
Re: JSF/JPA problem Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-09-13 22:28 -0300
Re: JSF/JPA problem Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-09-13 22:31 -0300
Re: JSF/JPA problem markspace <-@.> - 2011-09-13 19:27 -0700
Re: JSF/JPA problem Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-09-14 05:59 -0300
Re: JSF/JPA problem markspace <-@.> - 2011-09-14 10:36 -0700
Re: JSF/JPA problem Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-09-14 17:51 -0300
Re: JSF/JPA problem markspace <-@.> - 2011-09-13 16:12 -0700
csiph-web