users@glassfish.java.net

Re: EJB 3.1 Embedded

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Mon, 18 Oct 2010 10:10:15 -0700

EJB Embeddable API are intended to test EJB modules packaged in a jar or
unpacked in a directory. If you want to run a webapp, it's beyond their
scope.

-marina

Gregory Gerard wrote:
> Should it matter though? I ask because I've had problems with running a webapp with an EJB in it for JUnit testing - very frustrating.
>
> Is there a canonical projects to get from GlassFish that demonstrate everything working? I'm looking for a maven based project for doing webapp with ejb and jpa and jax-rs all hooked up and tested with JUnit through the embedded API.
>
> I think a reference application would go a long way in resolving these kind of getting-going issues.
>
> Thanks,
> Greg
>
> On Oct 17, 2010, at 5:16, Alexis Moussine-Pouchkine <alexis.moussine-pouchkine_at_oracle.com> wrote:
>
>
>> No need to deploy the app, that's the point of using EJBContainer instead.
>> Is this packaged in a WAR or in a EJB-JAR or EAR?
>> -Alexis
>>
>> On 17 oct. 2010, at 14:23, glassfish_at_javadesktop.org wrote:
>>
>>
>>> Hello Alexis,
>>>
>>> I have a simple project in Eclipse (Helios), running Ubuntu 10.10 (may be of some importance), that looks like this:
>>>
>>> A simple EJB:
>>>
>>>
>>> package com.eugen.java6.ee.ejb31.EmbeddableAPI;
>>>
>>> import javax.ejb.Stateless;
>>>
>>> @Stateless
>>> public class Person {
>>> public String getPersonName(){
>>> return "SomeName";
>>> }
>>> }
>>>
>>>
>>> And the testing code in the previous post. What I do is deploy the whole project (Run As --> Run on Server). Then I run the TestTheEJB class.
>>>
>>> Am i doing something wrong?
>>>
>>> Thanks,
>>> Eugene.
>>> [Message sent by forum member 'wind57']
>>>
>>> http://forums.java.net/jive/thread.jspa?messageID=485364
>>>
>>> ---------------------------------------------------------------------
>>> 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
>
>