Re: [Resin-interest] questions about Java Persistence API implementation
Lucas, We are reviewing the JPA interfaces based on the final release of the JPA specification. This will be released in Resin 3.1. Regards, -- Rodrigo --- Lucas Bergman [EMAIL PROTECTED] wrote: Hi -- I was trying to prepare some application work that uses JPA but has to support many container and JPA implementation vendors (e.g., Glassfish nee TopLink, Hibernate EntityManager, Amber), and I had a couple of questions about Resin's JPA code: 1. It appears that Persistence.java is checking for JPA service provider classes by reading the resource META-INF/services/javax.persistence.PersistenceProvider This seems odd. It seems like it should be META-INF/services/javax.persistence.spi.PersistenceProvider 2. The JPA interfaces with Resin seem out of date. In particular, the PersistenceProvider interface shipped with Resin has methods: createEntityManagerFactory(String): EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo): EntityManagerFactory and the PersistenceProvider interface specified by Java EE 5 has methods [JavaEE5]: createEntityManagerFactory(String, Map): EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo, Map): EntityManagerFactory Both of these seem to be present in the 3.0.21 release, as well as the 3.0 snapshot (060920) and the 3.1 snapshot (060913). Any ideas? Thanks, -- Lucas [JavaEE5] http://tinyurl.com/o2eym ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Problem with relation
--- Sergey Plehov [EMAIL PROTECTED] wrote: When i try execute user.getAccs() i get SQLException ORA-00936: Missing Expression. Hi Sergey, I have filed a new bug report: http://bugs.caucho.com/view.php?id=2037 The issue seems to be the many-to-one using one of the compound pk columns as the foreign key. As a workaround, it looks possible to use a @ManyToMany where APP_ACCESS would be the map table. Regards, -- Rodrigo ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Problem with relation
--- Sergey Plehov [EMAIL PROTECTED] wrote: This issue with Resin 3.1.2 and Resin 3.1.3 I send in attachment source files. Thanks Sergey. I have filed a new bug report: http://bugs.caucho.com/view.php?id=2048 At the moment, there is not a good workaround, i.e. you would need to send the SQL explicitly like: ... public class UserDAOBean implements UserDAO { ... @javax.annotation.Resource(name=jdbc/test) // (*) Change to your database JNDI private DataSource _ds; ... public void delApp(int userId, int appId) { Connection conn = null; try { conn = _ds.getConnection(); PreparedStatement pstmt = conn.prepareStatement(DELETE FROM APP_ACCESS WHERE USER_ID = ? AND APP_ID = ?); pstmt.setInt(1, userId); pstmt.setInt(2, appId); pstmt.executeUpdate(); conn.commit(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (conn != null) conn.close(); } catch (Exception e) { e.printStackTrace(); } } } } -- Rodrigo ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest