|
The workaround could be ... InitialContext ctx = new InitialContext(); DataSource datasource = (javax.sql.DataSource) ctx.lookup ("java:/comp/env/jdbc/DS"); Map<String, Object> props = new HashMap<String, Object>(); props.put(Environment.DATASOURCE, dataSource); EntityManagerFactory emf = Persistence.createEntityManagerFactory(UNIT_NAME, props); ...
|