Hi Excuse me for the late reply Thanks for your replies and helps My problem was solved . I have an embeddable class that I use it as embedded property in some entity class and we forgot to list it on the persistence.xml file and then enhancer didn’t enhance it .I think this embeddable class was the cause of my problem. I simply add it to the list and my problem was solved. Also OpenJPA enhancer works fine in glassfish .I can see enhancer and cache operations in glassfish logs . Thanks all Ahad Javadi
Michael Dick wrote: > > Glassfish should automatically enhance your entities if you use a > container > managed EntityManagerFactory. The container is required to use the > createContainerEntityManagerFactory method, this is where OpenJPA provides > a > ClassTransformer (actually the same agent that you mentioned before). > > So if you're using @PersistenceContext or @PersistenceUnit you should get > enhancement for free in a JEE environment. > > If you create the EntityManagerFactory yourself through > javax.persistence.Persistence then you'll have to do your own enhancement. > Of course doing the enhancement yourself like Rick mentioned never hurts. > > I have no real experience with Glassfish either, there might be something > you need to do to install a third party provider (non EclipseLink / > Toplink). It might be worth posting on the Glassfish email lists and see > if > anyone else has had similar experiences. > > Hope this helps, > > -mike > On Tue, Aug 18, 2009 at 2:01 PM, Rick Curtis <curti...@gmail.com> wrote: > >> >> Another option would be to enhance your classes at build time. That would >> ensure that you are running with enhanced Entities. >> >> -Rick >> >> http://openjpa.apache.org/entity-enhancement.html -- Checkout the Build >> Time >> Enhancement section. >> -- >> View this message in context: >> http://n2.nabble.com/java.lang.StackOverflowError-Exception-after-enabling-cach-tp3458426p3467935.html >> Sent from the OpenJPA Users mailing list archive at Nabble.com. >> > > -- View this message in context: http://n2.nabble.com/java-lang-StackOverflowError-Exception-after-enabling-cach-tp3458426p3601590.html Sent from the OpenJPA Users mailing list archive at Nabble.com.