Development of GlassFish Embedded has moved to the core GlassFish project as it's really just another way to start the server (and it is aligned with the v3 release).
Issues are filed in the GlassFish Issue tracker with the [embedded] prefix. Discussions for GlassFish Embedded are welcome on the main USERS mailing list or on the GlassFish Forum. To get started with GlassFish Embedded, you may want to read this blog entry.
This module provides the core part of the embedded GlassFish, namely the API. The API allows you to programatically configure GlassFish and perform basic operations like deploy and undeploy.
The following code example should give you a feeling of how this API looks like:
EmbeddedInfo info = new EmbeddedInfo(); info.setServerName("server"); info.setHttpPort("8080"); Server server = new Server(info); server.start(); Application app = server.deploy(new File("path/to/simple.war")); System.out.println("Ready!"); ... app.undeploy(); server.stop();
In addition to the operations available for stand-alone GFv3 like above, embedded GlassFish can be customized/used in ways that only in-VM program can. For example, you can deploy a web application without ever creating a WAR file or directory in the first place, or add/replace any of the internal components that make up GFv3.
What jars do I need?
To use the embedded GFv3, you need two pieces. One is the API jar and the other is the GFv3 jar(s). The former is a jar whose name looks like glassfish-embedded-api-3.0-Prelude-Embedded-m2.jar . The latter depends on what you need for your application. For example, those who need EJB functionality would need several more jars than those who just need the servlet container functionality.
Maven is the easiest way to do this. You can declare dependencies to GFv3 feature POMs that you need (which talks in terms of feature granularity), or you can even selectively include/exclude specific modules.)
Ant users, OTOH, would probably find it easier to use "all-in-one" jars ; these are single jar distributions of the common GFv3 profiles, so that you don't have to worry about several dozen jar files.
Once you pick up these two pieces, simply place them in your classpath and you are all set.