I'm seeing a weird EclipseLink issue.
The code is an @Stateless with one method that creates a new entity and calls em.persist(obj) on it.
This works fine when loaded into the embedded glassfish and triggered through Jersey -- the tables are automatically created, I hit the EJBs by way of CURL and Jersey, I shutdown the server, the data is still there.
I run a JUnit test calling the same method that Jersey calls and things go odd from there. I don't see the tables I should in the DB much less the data.
Using MySQL proxy to inspect the whole conversation, I can actually see that the tables are being created and data is inserted. When I put in a Thread...sleep(20000) before closing the EJBContainer, I can see the data in mysql client.
However, when EJBContainer.close() gets called, I see drop table get sent!
This is unexpected.
Why the difference in behavior? How can I convince the EJBContainer to not drop my tables?
thanks!