2. Who Am I?
● Mark Clarke – Java Developer
● Working for Jumping Bean, an open source
solutions integration company
● Working with Java & open source
technologies since 2001
● Co-founder of Jozi JUG
4. Jozi JUG
● Meet once a month in Johannesburg,
● Talk
● Beer
● Pizza
● All FREE!
● Where to find us?
– Meetup
– Facebook
– Web Site
5. GlassFish History
● 6 June 2005 – Glassfish launched by SUN
– based on Sun Java System Application
Server PE 9
– TopLink persistence code donated by Oracle.
● 4 May 2006 – Version 1 JEE 5 RI - aimed at
developers
● 17 Sep 2007 – Version 2 Clustering, MS
interop web services. Aimed at enterprise
6. GlassFish History
● 10 Dec 2009 – Version 3 Java EE6 RI.
Introduced OSGI, fast startup & redeploy on
change.
– New architecture,
7. Recent Releases
● Version 3.1 shipped Feb 28th 2011
– ssh-based provisioning, centralised admin,
clustering & load balancing (reintroduced)
● Version 3.1.1 shipped Jul 2011
– Bug fix release
● Version 3.1.2 shipped Feb 2012
– – bug fixes, new admin console features, new
thread pool properties, transaction recovery
from database
9. GlassFish Versions
● Oracle Glassfish Server
– Oracle supported version,
– Based on Open Source Edition + some closed
source bits,
– Similar to SUN's Glassfish Enterprise Server
● Glassfish Open Source Edition
– GPL or CDDL
– Community Supported
11. GlassFish Versions
● Certified interoperability with Oracle Fusion
Middleware products:
– Oracle Internet Directory,
– Oracle Virtual Directory,
– Oracle, WebLogic Server,
– Oracle Access Manager
● Includes Oracle GlassFish Server Control for
improved manageability and performance of
production deployments
14. GlassFish Adoption
● World wide - 23,257,762 active users,
● South Africa – 268,449 active users.
* from maps.glassfish,org/server
15. Installing GlassFish
● Zip package
– No configuration wizard
– Update tool must be installed manually
– Manual uninstall
● Self-extracting bundle
– GUI installer, installer can be used to perform
configuration after installation,
– Can do silent mode installs, useful for scripting
– Option to install Update Tool,
– Uninstaller provided
16. Installing/Upgrading GlassFish
● Update tool
– Used to update server components,
– Install additional functionality
– Graphical & command line (pkg)
– In place upgrades
17. Why GlassFish?
● Easy to administer with GUI,
● Cluster wide management and deployment,
● Load balancing,
● Centralised administration,
● Support for the latest web services specs +
interoperability with Microsoft WCF,
18. Why GlassFish?
● Developer productivity,
● Modular architecture
– Extensible
– Embeddable
● Support for multiple languages
● In place upgrade.
● Built-in, fine-grained, monitoring
19. Developer Productivity
● Fast startup times
● User friendly Admin console interface,
● Excellent tooling
– Netbeans,
● Compile on Save
● Deploy on Change
– Eclipse,
– Maven support,
– IntelliJ,
● Scriptable via command line interface
22. GlassFish Architecture
● Container - Handle user applications
● E.G. Web container, EJB container
23. GlassFish Sub-Projects
● HK2 Kernel
– hundred kilobyte kernel
● Grizzly
– NIO based network listeners/connectors http
● OSGi
– Used for module system, swappable Apache
Felix or Knoperfish
● Tomcat – (modified) for servlet container
24. GlassFish Architecture
● Jersey – Provides REST Web Service
functionality
● Metro – Web service stack, SOAP etc
● Shoal – Clustering framework
● Majorra – JSF
● OpenMQ – Message Service
25. Embedded
● Testing
– EJBContainer API (EJB 3.1)
– Simple testing using Java SE (Junit, Maven)
● Packaging/Bundling
– Integration testing,
– Ship server with app
26. GlassFish Administration
Concepts
● Domain – An administrative name space.
Can administer multiple instances, on same or
different node.
– Domain Administration Server (DAS) used to
centrally administer domain
● Instance – Is a JVM process. Applications are
deployed to instances.
● Virtual Hosting – Each instance can do
virtual hosting
27. GlassFish Domains
● Multiple instances in a domain
● Instance can belong to only one
administrative domains
● One DAS per domain
● Each domain has own isolated configuration
● Standalone instances or clusters
– share applications and resources
● Each instance has own config for ports etc
28. GlassFish Administration
Channels
● Web App: Admin Console – easy to use,
● Command line: asadmin – bash scripting
● JMX – Admin GlassFish from your code,
● Restful API – REST client
29. GlassFish Administration
● Ease of administration - Can create
– new domains,
– New instances,
– Deploy applications
● Across nodes using SSH (Unix/Linux( or
DCOM(Windows)
30. GlassFish Clustering
● High Availability with clustering,
● Session replication,
● Fail-over,
● Application deployment support,
32. Multi-Language Support
● Support can be installed via update manager
● PHP via
– jfastcgi
– php/java bridge
– Quercus – Java implementation of PHP
● Pyhton
– Jython container can run Django apps
– fastcgi
36. Application Scoped Resource
● Created and Destroyed when application is
deployed and undeployed
● Ensures no other application uses your
resources which are usually globally defined
● Modules with deployment descriptor scoped to
those modules only