users@glassfish.java.net

What is "embedded"? [Re: How do logon or set principle/roles/groups when using Embedded API]

From: Alexis Moussine-Pouchkine <alexis.mp_at_sun.com>
Date: Thu, 11 Feb 2010 10:29:31 +0100

Trying to clarify here what is "embedded" :

EJBContainer.createEJBContainer() is a new standard API defined by EJB 3.1
It uses GlassFish embedded as the implementation.

GlassFish embedded refers to the APIs [1] available to drive all the features of GlassFish v3 (not just the EJB container).
Of course this API is specific to GlassFish. The Maven plugin [2] also uses the embedded API under the covers.

In all cases, there is only one GlassFish with multiple ways to run/start it.
The source code is all at https://glassfish-svn.dev.java.net/source/browse/glassfish-svn/

You may want to read the "Embedded Server Guide" http://docs.sun.com/app/docs/doc/821-1208/gjldt?l=en&a=view
and possibly this series of shameless plugs :
- http://blogs.sun.com/alexismp/entry/testing_ejb_3_1_s
- http://blogs.sun.com/alexismp/entry/glassfish_embedded_reloaded
- http://blogs.sun.com/alexismp/entry/glassfish_embedded_and_javadb_embedded

hope this helps,
-Alexis

[1]: Check out http://javadoc.glassfish.org/v3/apidoc/org/glassfish/api/embedded/Server.html for instance
[2]: http://docs.sun.com/app/docs/doc/821-1208/gijhs?l=en&a=view


On 11 févr. 2010, at 07:16, glassfish_at_javadesktop.org wrote:

> Just to confirm and make sure I understand and am on the same page:
>
> 1) The Embedded API and Embedded Glassfish really are two completely different animals (although perhaps aspects of Embedded Glassfish are used to implement the Embedded API), at least that was what I came away with (and if true, I tend to think they should make the documentation highlight that a little more than it does to avoid confusion).
>
> 2) While I was using the Embedded API, the solution you propose uses Embedded Glassfish. This is not an issue, just asking to confirm. I like the idea of using Embedded Glassfish, it feels more like a unit/integration test because it feels more "stand alone". I only started with the Embedded API because it seemed a lot simpler to setup and I did not see examples of using Embedded Glassfish to directly invoke EJB's for a unit/integration test like I did with the Embedded API.
>
> Thank *so much* for the info. I'm hoping to try it out tonight.
> [Message sent by forum member 'markkr2' (mark_at_the-kruegers.name)]
>
> http://forums.java.net/jive/thread.jspa?messageID=386019
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>