users@glassfish.java.net

Re: Running embedded test with multimodule project

From: Major Péter <majorpetya_at_sch.bme.hu>
Date: Thu, 17 Jun 2010 23:32:16 +0200

> Yes. Please check the complete contents of the test-classes dir.

The content of the dir is:
+ hu/sch/ejb/
 + UserManagerTest.class
+ META-INF
 + application.xml (or not)
 + ejb-jar.xml
 + persistence.xml
+ org/glassfish/embed
 + domain.xml

> We should make it work :).
>
> Can you check the content of the exploded ear? It will be called
> ejb-app<digits> and located in "java.io.temp" dir.

I have the feeling that my current packaging (without testing) is buggy
right now, since I saw this zero ejb messages before with maven tweaking
(I had to set some modules to compile scope multiple times to be able to
deploy the ear on standalone GF), so if you could check my pom's it
would be great and probably much faster:
http://idp.sch.bme.hu/cgi-bin/gitweb.cgi?p=aldaris/korok;a=shortlog;h=refs/heads/testing

Anyways the output of 'ls -R' in the /tmp/ejb-app* folder:
[code]
.:
classes_jar lib test-classes_jar

./classes_jar:
hu META-INF

./classes_jar/hu:
sch

./classes_jar/hu/sch:
ejb

./classes_jar/hu/sch/ejb:
EntitlementManagerBean.class LdapManagerBean.class
 LdapManagerBean$PersonForSearchContextMapper.class
MailManagerBean.class SvieManagerBean.class TimerServiceBean$1.class
 UserManagerBean.class
LdapManagerBean$1.class LdapManagerBean$PersonContextMapper.class
 LogManagerBean.class
PostManagerBean.class SystemManagerBean.class TimerServiceBean.class
  ValuationManagerBean.class

./classes_jar/META-INF:
ejb-jar.xml persistence.xml

./lib:
activation-1.1.jar commons-lang-2.1.jar hibernate-3.0.jar
junit-4.8.1.jar mail-1.4.2.jar
sch-kp-domain-2.3.1-SNAPSHOT.jar spring-beans-2.5.6.jar
spring-core-2.5.6.jar spring-tx-2.5.6.jar
aopalliance-1.0.jar commons-logging-1.0.4.jar javaee-api-6.0.jar
log4j-1.2.14.jar postgresql-8.4-701.jdbc4.jar
sch-kp-ejb-services-2.3.1-SNAPSHOT.jar spring-context-2.5.6.jar
spring-ldap-core-1.3.0.RELEASE.jar

./test-classes_jar:
hu META-INF org

./test-classes_jar/hu:
sch

./test-classes_jar/hu/sch:
ejb

./test-classes_jar/hu/sch/ejb:
UserManagerTest.class

./test-classes_jar/META-INF:
application.xml ejb-jar.xml persistence.xml

./test-classes_jar/org:
glassfish

./test-classes_jar/org/glassfish:
embed

./test-classes_jar/org/glassfish/embed:
domain.xml
[/code]

as you can see there are two persistence.xml's one with test config and
one with production classes_jar and test-classes_jar.

Thanks again,
Peter