Return-Path: Delivered-To: apmail-incubator-cayenne-commits-archive@locus.apache.org Received: (qmail 65053 invoked from network); 1 Sep 2006 16:35:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Sep 2006 16:35:59 -0000 Received: (qmail 60943 invoked by uid 500); 1 Sep 2006 16:35:59 -0000 Delivered-To: apmail-incubator-cayenne-commits-archive@incubator.apache.org Received: (qmail 60911 invoked by uid 500); 1 Sep 2006 16:35:58 -0000 Mailing-List: contact cayenne-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cayenne-dev@incubator.apache.org Delivered-To: mailing list cayenne-commits@incubator.apache.org Received: (qmail 60902 invoked by uid 99); 1 Sep 2006 16:35:58 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Sep 2006 09:35:58 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Sep 2006 09:35:57 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 26FA81A981A; Fri, 1 Sep 2006 09:35:37 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r439371 - in /incubator/cayenne/sandbox/jpa-webapp-example/src/main: java/cayenne/example/jpa/CachingEntityManagerFactory.java webapp/index.jsp Date: Fri, 01 Sep 2006 16:35:35 -0000 To: cayenne-commits@incubator.apache.org From: aadamchik@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060901163537.26FA81A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: aadamchik Date: Fri Sep 1 09:35:33 2006 New Revision: 439371 URL: http://svn.apache.org/viewvc?rev=439371&view=rev Log: adding persist code to the web example Modified: incubator/cayenne/sandbox/jpa-webapp-example/src/main/java/cayenne/example/jpa/CachingEntityManagerFactory.java incubator/cayenne/sandbox/jpa-webapp-example/src/main/webapp/index.jsp Modified: incubator/cayenne/sandbox/jpa-webapp-example/src/main/java/cayenne/example/jpa/CachingEntityManagerFactory.java URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/jpa-webapp-example/src/main/java/cayenne/example/jpa/CachingEntityManagerFactory.java?rev=439371&r1=439370&r2=439371&view=diff ============================================================================== --- incubator/cayenne/sandbox/jpa-webapp-example/src/main/java/cayenne/example/jpa/CachingEntityManagerFactory.java (original) +++ incubator/cayenne/sandbox/jpa-webapp-example/src/main/java/cayenne/example/jpa/CachingEntityManagerFactory.java Fri Sep 1 09:35:33 2006 @@ -60,6 +60,7 @@ public EntityManager createEntityManager() { if (entityManager == null) { entityManager = delegate.createEntityManager(); + entityManager.getTransaction().begin(); } return entityManager; @@ -68,6 +69,7 @@ public EntityManager createEntityManager(Map properties) { if (entityManager == null) { entityManager = delegate.createEntityManager(properties); + entityManager.getTransaction().begin(); } return entityManager; Modified: incubator/cayenne/sandbox/jpa-webapp-example/src/main/webapp/index.jsp URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/jpa-webapp-example/src/main/webapp/index.jsp?rev=439371&r1=439370&r2=439371&view=diff ============================================================================== --- incubator/cayenne/sandbox/jpa-webapp-example/src/main/webapp/index.jsp (original) +++ incubator/cayenne/sandbox/jpa-webapp-example/src/main/webapp/index.jsp Fri Sep 1 09:35:33 2006 @@ -31,6 +31,10 @@ insert.executeUpdate(); Entity1 e = em.find(Entity1.class, 1); + Entity1 e1 = new Entity1(); + e1.setId(2); + e1.setName("yyy"); + em.persist(e1); %>