openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Bauer (JIRA)" <j...@apache.org>
Subject [jira] Closed: (OPENJPA-1598) How to set role using OpenJPA
Date Wed, 24 Mar 2010 19:27:27 GMT

     [ 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.


Mime
View raw message