Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #7992

Re: JSF/JPA problem

From markspace <-@.>
Newsgroups comp.lang.java.programmer
Subject Re: JSF/JPA problem
Date 2011-09-13 15:38 -0700
Organization A noiseless patient Spider
Message-ID <j4om1r$a40$1@dont-email.me> (permalink)
References <j4nvr9$4ld$1@dont-email.me> <VZObq.20744$oz6.19581@newsfe11.iad> <XcPbq.17471$CQ4.165@newsfe09.iad>

Show all headers | View raw


On 9/13/2011 1:40 PM, Arved Sandstrom wrote:

>> You're using application-managed entity managers because of your use of
>> an EntityManagerFactory. You must therefore use EntityTransaction.
>>
>> If you want container-managed then inject with @PersistenceContext, and
>> specify JTA in your persistence.xml


Wow, are you kidding me?  I have three books and I've read the spec and 
don't recall seeing that piece of magic documentation.  Could I trouble 
you to point out where you found it?

(Yes, I'm using JEE 6 and JTA transactions.)


> On a side note: if you're Java EE 6 (and judging by the
> "postBean.createNewPost()" maybe you are) then you might want to use CDI
> and the @Named and @Inject annotations rather than @ManagedBean and
> @ManagedProperty. With a Java EE 6 server (like Glassfish 3) you'll have
> the Weld reference implementation of CDI


Yes, I have CDI available.  I haven't read up on CDI completely yet, and 
it's a bit more involved than ManagedBean/ManagedProperty, so I'm 
playing with those two while I come up to speed on CDI.  It'll happen soon.

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

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