users@glassfish.java.net

Re: Running embedded test with multimodule project

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Thu, 17 Jun 2010 11:30:59 -0700

OK. It's EJB embeddable API. With 3.0.1 there is no support for
"libraries" in the classpath - they are ignored.

If an ejb in an ejb jar fails to load because of unresolved dependencies
(or any other issues), the jar becomes a non-ejb jar :( and you get this
famous zero ejb message.

Can you try with the latest trunk (but either add 'Bundle-SymbolicName:
org.glassfish.embedded.all' to its manifest or wait until tomorrow when
the fix is available in the nightly build)? The only missing feature for
separate entity jar currently is dropping tables in case of more than 1
ejb jar in the classpath.

Best,
-marina

Major Péter wrote:
> public class UserManagerTest {
>
> private static UserManagerLocal userManager;
>
> @BeforeClass
> public static void initialize() {
> try {
> EJBContainer ejb = EJBContainer.createEJBContainer();
> Context ic = ejb.getContext();
> userManager = (UserManagerLocal) ic.lookup("UserManagerBean");
> } catch (Throwable t) {
> t.printStackTrace();
> }
> }
>
> @Test
> public void doSomething() {
> assertTrue(userManager != null);
> }
> }
>
> Here the createEJBContainer() fails, the embedded glassfish should
> notice the domain.xml AFAIK at
> test/resources/org/glassfish/embed/domain.xml.
> What am I missing?
>
> Thanks,
> Peter
>
> 2010-06-17 20:19 keltezéssel, Marina Vatkina írta:
>
>> How does your test code look like?
>>
>> thanks,
>> -marina
>>
>> Major Péter wrote:
>>
>>> I'm trying to use exactly this:
>>> <dependency>
>>> <groupId>org.glassfish.extras</groupId>
>>> <artifactId>glassfish-embedded-all</artifactId>
>>> <version>3.0.1</version>
>>> <scope>test</scope>
>>> </dependency>
>>>
>>> Thanks,
>>> Peter
>>>
>>> 2010-06-17 20:12 keltezéssel, Marina Vatkina írta:
>>>
>>>
>>>> Are you using EJB embeddable API or embedded GF API?
>>>>
>>>> Best,
>>>> -marina
>>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>