users@glassfish.java.net

Re: [Fwd: [embedded] How to unit test an EJB with Maven ?]

From: Jerome Dochez <Jerome.Dochez_at_Sun.COM>
Date: Tue, 22 Sep 2009 14:29:34 -0700

we should make it work with the cooked jar, any reason why it would
not work today ?

On Sep 22, 2009, at 2:12 PM, Marina Vatkina wrote:

> Yes, EJB embeddable container has been tested only with the shell jar.
>
> Regards,
> -marina
>
> Siraj Ghaffar wrote:
>> The cooked jar is at :
>> http://download.java.net/maven/glassfish/org/glassfish/extras/glassfish-embedded-all/
>> and can be specified as a maven dependency. But I thought Marina
>> had been working only with the shell jar...
>> Jerome Dochez wrote:
>>> since he is using maven, maybe Antonio wants the use the cooked
>>> jar rather than the shell jar that requires a locally installed
>>> distribution...
>>>
>>>
>>> On Sep 22, 2009, at 1:43 PM, Siraj Ghaffar wrote:
>>>
>>>> The shell jar points to other jars in the distribution, so it
>>>> requires the glassfish distribution.
>>>>
>>>> Antonio Goncalves wrote:
>>>>
>>>>> Hum... I need a full GlassFish distribution ? Isn't this jar is
>>>>> the GF Maven repository ? At the moment I'm using :
>>>>> <dependency>
>>>>> <groupId>org.glassfish</groupId>
>>>>> <artifactId>javax.ejb</artifactId>
>>>>> <version>3.0-b64</version>
>>>>> </dependency>
>>>>> <dependency>
>>>>> <groupId>org.glassfish.ejb</groupId>
>>>>> <artifactId>ejb-container</artifactId>
>>>>> <version>3.0-b64</version>
>>>>> </dependency>
>>>>>
>>>>> Antonio
>>>>>
>>>>> 2009/9/22 Alexis Moussine-Pouchkine <alexis.mp <http://
>>>>> alexis.mp>@sun.com <http://sun.com>>
>>>>>
>>>>> glassfish/lib/embedded/glassfish-embedded-static-shell.jar is
>>>>> your
>>>>> friend.
>>>>> Requires full GlassFish distribution. No properties required.
>>>>> -Alexis
>>>>>
>>>>>
>>>>> On Sep 22, 2009, at 21:54, Antonio Goncalves wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I'm still trying to make the EJBContainer work in a test
>>>>> environment. I'm using the latest GlassFish build (3.0-b64)
>>>>> but this time I have other exceptions :
>>>>>
>>>>>
>>>>> Exception in thread "main" javax.ejb.EJBException: No
>>>>> EJBContainer provider available
>>>>> Provider named
>>>>> org.glassfish.ejb.embedded.EJBContainerProviderImpl threw
>>>>> unexpected exception at create EJBContainer:
>>>>> java.lang.NoSuchMethodError
>>>>> java.lang.NoSuchMethodError:
>>>>> javax.ejb.spi.EJBContainerProvider.createEJBContainer
>>>>> (Ljava/util/Map;)Ljavax/ejb/embeddable/EJBContainer;
>>>>> at
>>>>> javax.ejb.embeddable.EJBContainer.createEJBContainer
>>>>> (EJBContainer.java:102)
>>>>> at
>>>>> javax.ejb.embeddable.EJBContainer.createEJBContainer
>>>>> (EJBContainer.java:78)
>>>>>
>>>>>
>>>>> In my code I do the following :
>>>>>
>>>>> EJBContainer ec = EJBContainer.createEJBContainer();
>>>>> Context ctx = ec.getContext();
>>>>> BookService bookEJB = (BookService)
>>>>> ctx.lookup("java:global/BookService");
>>>>>
>>>>> book = bookEJB.createBook(book);
>>>>>
>>>>>
>>>>> I call the createEJBContainer() method but I was wondering
>>>>> if
>>>>> I should pass some properties with the createEJBContainer
>>>>> (Map
>>>>> <?,?>) method.
>>>>>
>>>>> Any idea ?
>>>>>
>>>>> Thanks,
>>>>> Antonio
>>>>>
>>>>> 2009/9/7 <glassfish_at_javadesktop.org
>>>>> <mailto:glassfish_at_javadesktop.org>>
>>>>> I also read Antonio's book :)
>>>>>
>>>>> @Antonio: do you have any news on this? Did you get to
>>>>> have a
>>>>> working method to unit test EJBs ?
>>>>>
>>>>> Regards,
>>>>> J.
>>>>> [Message sent by forum member 'jayeff' (jforns_at_gmail.com
>>>>> <mailto:jforns_at_gmail.com>)]
>>>>>
>>>>> http://forums.java.net/jive/thread.jspa?messageID=363119
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail:
>>>>> users-unsubscribe_at_glassfish.dev.java.net
>>>>> <mailto:users-unsubscribe_at_glassfish.dev.java.net>
>>>>> For additional commands, e-mail:
>>>>> users-help_at_glassfish.dev.java.net
>>>>> <mailto:users-help_at_glassfish.dev.java.net>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -- --
>>>>> Antonio Goncalves (antonio.goncalves_at_gmail.com
>>>>> <mailto:antonio.goncalves_at_gmail.com>)
>>>>> Software architect
>>>>>
>>>>> Web site : www.antoniogoncalves.org
>>>>> <http://www.antoniogoncalves.org>
>>>>> Blog: agoncal.wordpress.com <http://agoncal.wordpress.com>
>>>>> Feed: feeds2.feedburner.com/AntonioGoncalves
>>>>> <http://feeds2.feedburner.com/AntonioGoncalves>
>>>>> Paris JUG leader : www.parisjug.org <http://
>>>>> www.parisjug.org>
>>>>> LinkedIn: www.linkedin.com/in/agoncal
>>>>> <http://www.linkedin.com/in/agoncal>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>>>> <mailto:users-unsubscribe_at_glassfish.dev.java.net>
>>>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>>> <mailto:users-help_at_glassfish.dev.java.net>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> --
>>>>> Antonio Goncalves (antonio.goncalves_at_gmail.com <mailto:antonio.goncalves_at_gmail.com
>>>>> >)
>>>>> Software architect
>>>>>
>>>>> Web site : www.antoniogoncalves.org <http://www.antoniogoncalves.org
>>>>> >
>>>>> Blog: agoncal.wordpress.com <http://agoncal.wordpress.com>
>>>>> Feed: feeds2.feedburner.com/AntonioGoncalves <http://feeds2.feedburner.com/AntonioGoncalves
>>>>> >
>>>>> Paris JUG leader : www.parisjug.org <http://www.parisjug.org>
>>>>> LinkedIn: www.linkedin.com/in/agoncal <http://www.linkedin.com/in/agoncal
>>>>> >
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>