+ All Categories
Home > Technology > Glassfish An Introduction

Glassfish An Introduction

Date post: 14-May-2015
Category:
Upload: jumping-bean
View: 2,144 times
Download: 0 times
Share this document with a friend
Description:
An introduction to GlassFish. Presented at the South African Oracle Java Developer Conference in May 2012.
Popular Tags:
39
GlassFish Application Server An Introduction By Jumping Bean 21 May 2012
Transcript
Page 1: Glassfish An Introduction

GlassFish Application Server

An IntroductionBy

Jumping Bean21 May 2012

Page 2: Glassfish An Introduction

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

Page 3: Glassfish An Introduction

Jozi JUG

Page 4: Glassfish An Introduction

Jozi JUG

● Meet once a month in Johannesburg,● Talk● Beer● Pizza● All FREE!● Where to find us?

– Meetup

– Facebook

– Web Site

Page 5: Glassfish An Introduction

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

Page 6: Glassfish An Introduction

GlassFish History

● 10 Dec 2009 – Version 3 Java EE6 RI. Introduced OSGI, fast startup & redeploy on change.

– New architecture,

Page 7: Glassfish An Introduction

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

Page 8: Glassfish An Introduction

Future Releases

● Version 4.0 – Java EE7 – PaaS– Some hints in V3

Page 9: Glassfish An Introduction

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

Page 10: Glassfish An Introduction

GlassFish Versions* from blogs.oracle.com

Page 11: Glassfish An Introduction

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

Page 12: Glassfish An Introduction

GlassFish Adoption

* from maps.glassfish,org/server

Page 13: Glassfish An Introduction

GlassFish Adoption

* from maps.glassfish,org/server

Page 14: Glassfish An Introduction

GlassFish Adoption

● World wide - 23,257,762 active users,● South Africa – 268,449 active users.

* from maps.glassfish,org/server

Page 15: Glassfish An Introduction

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

Page 16: Glassfish An Introduction

Installing/Upgrading GlassFish

● Update tool– Used to update server components,

– Install additional functionality

– Graphical & command line (pkg)

– In place upgrades

Page 17: Glassfish An Introduction

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,

Page 18: Glassfish An Introduction

Why GlassFish?

● Developer productivity,● Modular architecture

– Extensible

– Embeddable

● Support for multiple languages● In place upgrade.● Built-in, fine-grained, monitoring

Page 19: Glassfish An Introduction

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

Page 20: Glassfish An Introduction

Developer Productivity

● Session retention on redeploy

Page 21: Glassfish An Introduction

GlassFish Architecture

● Kernel – hundred kilobyte kernel

– Startup/shutdown sequence

– Basic service deployment

– Reading config

● Services cross container functionality– Security, JNDI

– Admin Console

Page 22: Glassfish An Introduction

GlassFish Architecture

● Container - Handle user applications● E.G. Web container, EJB container

Page 23: Glassfish An Introduction

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

Page 24: Glassfish An Introduction

GlassFish Architecture

● Jersey – Provides REST Web Service functionality

● Metro – Web service stack, SOAP etc● Shoal – Clustering framework● Majorra – JSF● OpenMQ – Message Service

Page 25: Glassfish An Introduction

Embedded

● Testing – EJBContainer API (EJB 3.1)

– Simple testing using Java SE (Junit, Maven)

● Packaging/Bundling– Integration testing,

– Ship server with app

Page 26: Glassfish An Introduction

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

Page 27: Glassfish An Introduction

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

Page 28: Glassfish An Introduction

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

Page 29: Glassfish An Introduction

GlassFish Administration

● Ease of administration - Can create – new domains,

– New instances,

– Deploy applications

● Across nodes using SSH (Unix/Linux( or DCOM(Windows)

Page 30: Glassfish An Introduction

GlassFish Clustering

● High Availability with clustering,● Session replication, ● Fail-over,● Application deployment support,

Page 31: Glassfish An Introduction

GlassFish Monitoring

● Monitoring via– Admin console

– Asadmin command line utility

– REST interface

– JMX

● Monitoring Server– Services – Off/Low/High

● JDBC connection● HTTP services etc

Page 32: Glassfish An Introduction

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

Page 33: Glassfish An Introduction

Multi-Language Support

● Grails● Jruby

– Jruby container

● Scala/Lift● Phobos

– javascript

Page 34: Glassfish An Introduction

Application Versioning

● Deploy multiple versions of an app, only one enabled

● Commands– asadmin deploy foo.war

– Asadmin deploy -name=foo:beta-1 foo.war

– Asadmin deploy -name-foo:beat-2 -enable false foo.war

– Asadmin enable foo:beta-2

Page 35: Glassfish An Introduction

Application Versioning

● asadmin deploy -name=foo:rc1 foo.war● asadmin undeploy foo:beat*● asadmin undeploy foo:*

Page 36: Glassfish An Introduction

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

Page 37: Glassfish An Introduction

Application Scoped Resource

● glassfish-resources.xml– JDBC connection pool,

– JDBC rsources

– Connector Connection pools

– Resource adapters

– External JNDI resources,

– JavaMail resources

Page 38: Glassfish An Introduction

GlassFish – Java EE 7

● Multi-tenacy● Application Versioning● Virtualisation● Modularity● New Roles

Page 39: Glassfish An Introduction

GlassFish – An Introduction

The End


Recommended