alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Glassfish example source code file (README)

This example Glassfish source code file (README) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Glassfish tags/keywords

a, an, apserver, client, ejb, ejb, here, here, javaee, javaee, principal, se, servlet, servlet

The Glassfish README source code

It tests the security feature of JavaEE service engine. JavaEE SE is used on consumer as well as on the provider side. 
An EJB webservice is invoked by a servlet that requires authentication. This webservice method returns the caller principal associated with the invocation. 
A temporary file user is created in this test.

Here is the invocation flow-

1. Standalone client invokes the servlet after passing proper user credential.
2. Apserver invokes the servlet with a Principal.
3. Servlet calls the EJB webservice.
4. EJB webservice returns the caller principal associated with the EJBContext.
5. Servlet sends the returned value of EJB webservice in the response.
6. Client checks whether the returned principal matches with the one it was invoked.

Other Glassfish examples (source code examples)

Here is a short list of links related to this Glassfish README source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.