Hi, I have some problems to get a basic setup with the ApplcationComposer running, unfortunately without an option of use the persistence.xml, wherein hibernate JPA is configured and does all the entity loading and initialisation stuff automatically.
I noticed and read somewhere that the responsibility of the persistence unit is isolated in the ApplicationComposer and therefore all required entities needs to setup here, of course all needed EJBs also. So I tried hard to resolve each dependency within our application integration tests and added entities "by hand" without success and ended up in using the reqular test environment with extreme long running startup time of 15sec due automized EJB loading. Please do not ask me for specific error messages, sometimes I got NullPointers, sometimes IncompatibleClassChangeErrors, it varies in the amount of classes (Entites / EJBs) I loaded and thrown by Hibernate or OpenEJB.... The application I do testing consists of more than 100 EJBs and a couple of hundred entities, for that the automized EJB loading is not really applicable for building fast test cases where only a few EJBs are for interest. I read in the JIRA OPENEJB-1526, one suggestion of using the arquillian adapter which should be intended for such cases, but I didn't find any examples. The example were I build up my test case is based on this article: http://tomee.apache.org/examples-trunk/application-composer/ I have some questions: 1.) In release 4.5.2 of OpenEJB core the Configuration and Module annotations are marked as depreciated: import org.apache.openejb.junit.Configuration; import org.apache.openejb.junit.Module; why? 2.) Instead of the constructing the Persistence unit programmatically / manually, it should be possible to let Hibernate (or other JPA Provider) do that work - ergo loading the persistence.xml. Are there any planning or workarounds exist? 3.) It should be possible to pin down some EJBs for loading ergo do not load all I rely on an old article which reflect the same: http://www.marchwicki.pl/blog/2011/07/testing-ejb-applicatin-openejb-without-classpath-scanning/ and did read this tutorial: http://tomee.apache.org/application-discovery-via-the-classpath.html 4.) Does there are more complete JPA / EJB example for testing exist?? Hopefully someone can help! Thank you for some comments, thoughts and ideas. Kind regards, Andreas -- View this message in context: http://openejb.979440.n4.nabble.com/ApplicationComposer-JUnit-EJB-Tests-autoscanning-issue-and-Hibernate-tp4663182.html Sent from the OpenEJB Dev mailing list archive at Nabble.com.
