Thanks! One problem though
| @Startup
| public class PopulateDB
| {
| @In
| private EntityManager em;
|
| @Create
| public void populateDB(){
| em.beginTransaction();
| CreateTestData.createData(em);
| }
| }
|
Leads to this exception: javax.persistence.TransactionRequiredException: no transaction is
in progress
I can't start a transaction from the EntityManager either: using
getTransaction().begin() gives this exception: java.lang.IllegalStateException: JTA
EntityManager cannot access a transactions
And yes, I am aware of the import.sql mechanism, however doing it programmatically would
help me tremendously in my setting. Any ideas?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036994#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...