Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 35892 invoked from network); 24 Mar 2010 19:27:50 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Mar 2010 19:27:50 -0000 Received: (qmail 49608 invoked by uid 500); 24 Mar 2010 19:27:50 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 49577 invoked by uid 500); 24 Mar 2010 19:27:50 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 49569 invoked by uid 99); 24 Mar 2010 19:27:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Mar 2010 19:27:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Mar 2010 19:27:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2AD1A234C4E2 for ; Wed, 24 Mar 2010 19:27:27 +0000 (UTC) Message-ID: <1579508930.468851269458847174.JavaMail.jira@brutus.apache.org> Date: Wed, 24 Mar 2010 19:27:27 +0000 (UTC) From: "Jeremy Bauer (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Closed: (OPENJPA-1598) How to set role using OpenJPA In-Reply-To: <2098538388.467641269455367480.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-1598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeremy Bauer closed OPENJPA-1598. --------------------------------- > How to set role using OpenJPA > ----------------------------- > > Key: OPENJPA-1598 > URL: https://issues.apache.org/jira/browse/OPENJPA-1598 > Project: OpenJPA > Issue Type: Question > Environment: Windows > Reporter: Rajeev Chaudhary > Assignee: Jeremy Bauer > Original Estimate: 24h > Remaining Estimate: 24h > > I have weblogic system libraries having javax.persistence_1.0.0.0_1-0.jar and org.apache.openjpa_2.2.0.0_1-1-0.jar. > EntityManager em = eClepRoleFactory.createEntityManager(); > > 1. Connection c = (Connection)OpenJPAPersistence.cast(em).getConnection(); > String s = "SET ROLE "+role+" IDENTIFIED BY "+pass; > Statement stmt = c.createStatement(); > stmt.execute(s); > stmt.close(); > 2. em.getTransaction().begin(); > Query q = em.createNativeQuery("SET ROLE eclep_hpn_role IDENTIFIED BY role55"); > em.getTransaction().commit(); > Note: I am able to set the role using the steps in 1, but not with the steps in 2. > Question: What is missing in steps 2, because of which I am not able to set the role. Doesn't createNatvieQuery support this feature. Please help me urgently. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.