Skip to main content

Request For Comments - Embeddable GlassFish Functional Specifications

7 replies [Last post]
bnevins
Offline
Joined: 2005-03-28

The initial draft of the functional specifications for Embeddable GlassFish for V3 Prelude is now available.

http://wiki.glassfish.java.net/Wiki.jsp?page=GFV3EmbeddableOnePager

We would be delighted to hear any feedback, comments, suggestions you have.

The feedback deadline for V3 Prelude ends this Friday.

But comments, suggestions and requests for later releases will be happily accepted any time.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
bnevins
Offline
Joined: 2005-03-28

Thanks for the comments.

The draft is now FINAL.

bnevins
Offline
Joined: 2005-03-28

Submitted on behalf of Mahesh Kannan

Section 4.1.3

1. Can you explain how the ClassLoaders are setup (if any) when embedded GF starts? If we are going to use just the caller's ClassLoader please state that.

2. Are we going to support running JPA applications inside this embedded GF? Typically, JPA implementations (like TopLink) require special ClassLoaders to add Transformers to instrument classes.

3. Can you list what services will be available in the embedded GF? (Like Security, Transaction etc.)

4. If the Embedding (the caller's) VM already using a NamingManager, does the embedded GF should use that (instead of creating our NamingManager)? Please clarify.

Section 4.1.6

The example that uses ScatteredWar seem to suggest that the deployed app need not follow the regular .war structure? Can you elaborate more about the layout (if any) of the apps that can be deployed?

Also, instead of the user having to create a ScatteredWar, can we not do glassfish.deploy(String appName, File... locations)?

Can you explain what exactly is done during glassfish.stop()

Thanks,
--Mahesh

bnevins
Offline
Joined: 2005-03-28

Section 4.1.3

1. Can you explain how the ClassLoaders are setup (if any) when embedded GF starts? If we are going to use just the caller's ClassLoader please state that.

[b]*** A quick answer is -- Yes we use the caller's ClassLoader[/b]

2. Are we going to support running JPA applications inside this embedded GF? Typically, JPA implementations (like TopLink) require special ClassLoaders to add Transformers to instrument classes.

[b]This is one of many future complications that we will need to address. But, yes, we do plan to support JPA.[/b]

3. Can you list what services will be available in the embedded GF? (Like Security, Transaction etc.)
[b]All Services that are in the web distribution -- for Prelude[/b]

4. If the Embedding (the caller's) VM already using a NamingManager, does the embedded GF should use that (instead of creating our NamingManager)? Please clarify.

[b]Again this is another complication that will be addresses post-prelude[/b]

Section 4.1.6

The example that uses ScatteredWar seem to suggest that the deployed app need not follow the regular .war structure? Can you elaborate more about the layout (if any) of the apps that can be deployed?

[b]It's pretty simple. You pass in: Name of App, web.xml location, resources location and classes location.[/b]
Also, instead of the user having to create a ScatteredWar, can we not do glassfish.deploy(String appName, File... locations)?
[b]No. ScatteredWar is doing more than just gathering file locations. It is needed...[/b]

Can you explain what exactly is done during glassfish.stop()

[b]All Startup services are released then all Init Services are released.[/b]

Thanks,
--Mahesh

Jeanfrancois Arcand

Salut,

probably late, but anyway :-)

I looked at the one pager, but there is one thing we are missing. There
is two reason to use an Embed API:

(1) Embed the Container into your application
(2) Embed and *extend* the Container into your application

The current proposal only supports (1). If someone wants to add features
to GlassFish, there is no way to do such thing as nothing is exposed.
You should take a look at

Grizzly Embed [1] (GrizzlyAdapter, AsyncFilter)
Jetty Embed [2] (Handler)
Tomcat Embed [3] (Adapter, Valves)

They *all* support a mechanism to extend the default behavior. The
current proposal is missing that, and I do think we should think about
exposing either some of the WebContainer extension point (Valve),
Grizzly (Adapter, AsyncFilter, ProtocolFilter) or some GlassFish home made.

Thanks

-- Jeanfrancois

[1]
https://grizzly.dev.java.net/nonav/apidocs/com/sun/grizzly/http/embed/Gr...
[2] http://docs.codehaus.org/display/JETTY/Embedding+Jetty
[3]
http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/cat...

glassfish@javadesktop.org wrote:
> Section 4.1.3
>
> 1. Can you explain how the ClassLoaders are setup (if any) when embedded GF starts? If we are going to use just the caller's ClassLoader please state that.
>
> [b]*** A quick answer is -- Yes we use the caller's ClassLoader[/b]
>
> 2. Are we going to support running JPA applications inside this embedded GF? Typically, JPA implementations (like TopLink) require special ClassLoaders to add Transformers to instrument classes.
>
> [b]This is one of many future complications that we will need to address. But, yes, we do plan to support JPA.[/b]
>
> 3. Can you list what services will be available in the embedded GF? (Like Security, Transaction etc.)
> [b]All Services that are in the web distribution -- for Prelude[/b]
>
> 4. If the Embedding (the caller's) VM already using a NamingManager, does the embedded GF should use that (instead of creating our NamingManager)? Please clarify.
>
> [b]Again this is another complication that will be addresses post-prelude[/b]
>
> Section 4.1.6
>
> The example that uses ScatteredWar seem to suggest that the deployed app need not follow the regular .war structure? Can you elaborate more about the layout (if any) of the apps that can be deployed?
>
> [b]It's pretty simple. You pass in: Name of App, web.xml location, resources location and classes location.[/b]
> Also, instead of the user having to create a ScatteredWar, can we not do glassfish.deploy(String appName, File... locations)?
> [b]No. ScatteredWar is doing more than just gathering file locations. It is needed...[/b]
>
> Can you explain what exactly is done during glassfish.stop()
>
> [b]All Startup services are released then all Init Services are released.[/b]
>
> Thanks,
> --Mahesh
> [Message sent by forum member 'bnevins' (bnevins)]
>
> http://forums.java.net/jive/thread.jspa?messageID=287740
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Nazrul Islam

glassfish@javadesktop.org wrote:
> The [i]initial [/i]draft of the functional specifications for Embeddable GlassFish for V3 Prelude is now available.
>
> http://wiki.glassfish.java.net/Wiki.jsp?page=GFV3EmbeddableOnePager
>
>
Thanks for putting this together. Looks good. Here are some comments....

0) Usage Examples: It would help if you provide some usage examples in
the spec to set the tone about how the embeddable APIs are expected to
be used.

1) Deployed Applications: It is not clear how deployed applications are
expected to behave. For example,

* Is it always exploded in a temp dir?
* Does the server forget about the deployed apps after a re-start?
Is it possible to tell the server a list of pre-deployed apps and
resources? (see comment bellow about domain.xml url)
* Is it possible to deploy a exploded app (dir)? Perhaps using the
ScatteredWar APIs? Will there be support for ScatteredEar later?

2) Resources: Is it possible to create a JDBC resource and connection
pool? How do I do that?

3) Application Classloader: How is application classloader constructed?
What will be in its path?

4) Section 4.4 - Out of Scope : How about maven support?
- maven distribution for web tier
- maven distribution for EJB

5) Section 4.6 - Doc Impact : Please clarify that we will have to
document the APIs and example usage.

6) Section 4.7 - Admin/Config Impact: Will there be support to provide
an URL to the domain.xml so that users can customize the domain.xml?

7) Section 4.9 - I18N/L10N: Please specify if it will be possible to
translate the message properties for embeddable GlassFish.

8) Section 4.10 - Distribution - It was not clear in the spec how
embeddable GlassFish jars will be distributed and what are their names.
Could you please clarify that? The picture in the spec seems to suggest
we will have an embeddable api jar plus the container jars.

9) Size of the jars: What are the expected size of the jars?

10) Do we need more configuration support? Will there be a need to
configure log levels, etc.?

--
Nazrul Islam - (408) 276-6468 - Sun Microsystems, Inc.

[att1.html]

bnevins
Offline
Joined: 2005-03-28

There are many questions here, thanks for taking the time to scrutinize the spec.

---------------------------------

1) Deployed Applications: It is not clear how deployed applications are
expected to behave. For example,

* Is it always exploded in a temp dir?
**** Yes. Web archive files are always exploded into a temporary directory

* Does the server forget about the deployed apps after a re-start?
**** The server forgets about everything, including deployed apps, after a restart

Is it possible to tell the server a list of pre-deployed apps and
resources? (see comment bellow about domain.xml url)
**** Prelude: no. Final: yes

* Is it possible to deploy a exploded app (dir)? Perhaps using the
ScatteredWar APIs? Will there be support for ScatteredEar later?
**** Even better there is a ScatteredWar implementation available and working - it is **** part of the Embeddable GlassFish API.
**** ScatteredWar is fully supported in Prelude.
**** Directory deployment is fully supported in Prelude.

2) Resources: Is it possible to create a JDBC resource and connection
pool? How do I do that?
**** You can do it, but it is very messy. It requires low-level XML processing and an intimate knowledge of the structure of domain.xml
**** A simple way to do this might be available in Prelude and will definitely be provided **** in the Final Release.

3) Application Classloader: How is application classloader constructed?
What will be in its path?
**** This is rather low-level. You can see the exact procedure in org.glassfish.embed.GlassFish.deploy(ReadableArchive)

4) Section 4.4 - Out of Scope : How about maven support?
- maven distribution for web tier
- maven distribution for EJB

**** I don't understand. Please elaborate.

5) Section 4.6 - Doc Impact : Please clarify that we will have to
document the APIs and example usage.

6) Section 4.7 - Admin/Config Impact: Will there be support to provide
an URL to the domain.xml so that users can customize the domain.xml?
**** No. Not planned for Prelude.

7) Section 4.9 - I18N/L10N: Please specify if it will be possible to
translate the message properties for embeddable GlassFish.
**** Why not? Maybe I'm missing something here????

8) Section 4.10 - Distribution - It was not clear in the spec how
embeddable GlassFish jars will be distributed and what are their names.
Could you please clarify that? The picture in the spec seems to suggest
we will have an embeddable api jar plus the container jars.

**** for a non-maven developer they will need one and only one jar, currently named gf-embedded-api-1.0-alpha-5-SNAPSHOT-with-full-v3.jar
**** A maven developer will use the API jar, currently named gf-embedded-api-1.0-alpha-5-SNAPSHOT.jar, and add in the GlassFish core modules in the maven way.
**** I don't know the details of how the files will be distributed at this time. It is an implementation detail that will be solved before release.

9) Size of the jars: What are the expected size of the jars?
**** API jar: 30,354
**** API + entire GF: 21,884,800

10) Do we need more configuration support? Will there be a need to
configure log levels, etc.?
**** Yes -- for the final release

bnevins
Offline
Joined: 2005-03-28

Retraction

question 4.7

Yes a way for a user to provide a URL or file path to their own domain.xml will be provided.
This will override the default domain.xml that is inside the API jar.