GlassFish v2, Java EE and their Future
Document Sample


GlassFish v2, Java EE
and their Future
Daniel Adelhardt
Software & Java Ambassador
Sun Microsystems GmbH
1
Goal of this talk
Learn about Project GlassFish, it's Foundation Java Enterprise
Edition 5 and future Developments
2
Agenda
Themes
• Java Enterprise Edition 5
• Sun Project GlassFish
> Overview, Architecture & Adoption
> GlassFish for Developers
> GlassFish for Administrators
• Advanced GlassFish Topics
> Clustering & High Availability
> Projects around GlassFish: OpenSSO, Portal & Open ESB
• Java EE.next
3
Java Enterprise Edition 5
Ease of Enterprise Development
• Java EE 5 is a complete revamp of the Java EE
Platform
> Focus: Make it easier to develop server side Java applications
• Platform APIs have been significantly simplified
> POJO style development for Web, Web Services and EJB
> Wide spread usage of Java Annotations to simplify programming
models and overcome deployment descriptors
• Dependency Injection to declare external
dependencies
• “Convention over Configuration”
4
Java EE 5 Specifications
New or reworked APIs
JAX-B (JSR-222)
XML
JAX-WS (JSR-224) /W eb S
ervi
ces
StAX (JSR-173)
Web Services Metadata (JSR-181)
JSP Standard Tag Library (JSR-52) Web
Tech
nolo
Java Server Faces 1.2 (JSR-252) gies
EJB 3.0 und Java Persistence API (JSR-220) EoD
Common Annotations (JSR-250)
5
Java EE 5 Specifications
Advantages of new APIs
• Enterprise Java Beans 3.0 (JSR-220)
> Uses @Stateful, @Stateless, @Remote to annotate EJBs
> Simple Java interface and implementation class
> No more scary callback methods!
• Java Persistence API
> New and unified approach to Java persistence
> Simple to use annotation based object relational mapping
> Annotations like @Entity, @Table, @NamedQuery, @Id,
@Column for mapping, @OneToMany,@ManyToMany for relations
• Web Services with JAX-WS 2.0
> New API for SOAP based Web Services replacing JAX-RPC
> Expose POJOs and EJBs as Web Services using @WebService,
@WebMethod etc. 6
Example
Remote Stateless Session Bean exposed as Web Service
@Remote
public interface CustomerServiceRemote {
List getCustomers();
} Business Interface
@Stateless @WebService
public class CustomerServiceBean
implements CustomerServiceRemote {
@PersistenceContext
private EntityManager em;
public List getCustomers() {
//retrieve Customers using em
//... em.createNamedQuery(...)
return customers;
} POJO Bean
}
7
What is Project GlassFish?
http://glassfish.dev.java.net
• GlassFish - Open Source Java EE Application
Server
> Enterprise quality application server build as open source
> Sun offers 24x7 support and indemnification as Sun AS 9.1
> Also shipped as Java EE 5 SDK, Java EE Reference Impl
> Project started in 2005, GlassFish v2 released 09/2007
• Dual Licensing under CDDL + GPLv2
• Complete transparancy of the development process
> Source & builds available
> Open Issue Tracking
> Developer forums and mailing lists
> Wiki for roadmap and feature planning
8
GlassFish – The Community
• GlassFish Home - http://glassfish.dev.java.net
> Source + Binaries
> Mailing lists and forums
• GlassFish Wiki
> http://www.glassfishwiki.org/
• The Aquarium
> http://blogs.sun.com/aquarium
9
Gone Fishing – People using GlassFish
Feb'07 – Sep'07: 1,000,438 hits; 165,997 different IPs
(Admin-console based- Overcount and undercount)
10
GlassFish around Frankfurt
11
Top Reasons to choose GlassFish
• 100% Standards Compliance
De
• Java Business Integration included vel
op
• Leading Web Services Stack er
• Ease of Development
• Support for usage profiles Ad
min
• World Class Performance and Scalability istr
ato
• Ease of Administration rs
• Integrated Profiling and Troubleshooting Tools
• Cost efficient support
12
GlassFish - Developer Features
Developer Usage Profile
• Developer Profile provides a single JVM GlassFish
architecture
> All services – including admin app – run in the same JVM
> Provides fast startup, less resource consumption
• Developer profile characteristics
> Usage of Java Key Store
JAX-WS Tooling, NetBeans, and Studio Support
> No Clustering / HA Admin JMS Message Broker
Metadata
> Client VM Web HTTP/S WSDL
HTTP
HTTP JCA
> Security Clients listener Web MEX
Manager off CMPI Policy
SOAP-based Messaging (WSA, MTOM)
IIOP IIOP/S IIOP
ORB EJB
Clients listener JMS
JVM + Server Instance
13
GlassFish - Developer Features
Integration in Software Dev Lifecycle
• GlassFish provides Integration in popular IDEs
> NetBeans, IntelliJ IDEA
> Eclipse Web Tools Project
• Integration in build, deploy & test processes can
also be achieved by
> GlassFish ANT tasks
JAX-WS Tooling, NetBeans, and Studio Support
> GlassFish asadmin command line interface
• Configuration, monitoring and management can be
done using
> Web based Admin GUI SOAP-based Messaging (WSA, MTOM)
> ANT or asadmin
> JMX/AMX API
14
GlassFish - Developer Features
Java Business Integration
• Java Business Integration (JBI – JSR 208) is
included in GlassFish
> JBI provides a pluggable architecture for composite application
infrastructures
> Binding components and service engines are the pluggable
aspects of JBI
• GlassFish delivers JAX-WS Tooling, NetBeans, and Studio Support
> A JBI Runtime and Metadata
Infrastructure BPEL JEE WSDL
> SOAP/HTTP binding Engines BPEL XSLT JEE MEX
Admin
Policy
> Java EE Service SOAP-based Messaging (WSA, MTOM)
WS-I JMS EDI
Bindings
Engine
> Foundation for
Open ESB Service Service Service Service Service Service Service Service
15
GlassFish - Developer Features
Web Services Stack - Metro
• The GlassFish XML/Web Services Stack is
developed as Project Metro on java.net
> Most comprehensive Open Source Web Services Stack
> High performance & production ready
> Consists of JAX-WS 2.x Reference Implementation + Project
Tango (Sun/Microsoft Interoperability Project)
> Seperation of Transport and JAX-WS Tooling, NetBeans, and Studio Support
Encoding (HTTP, JMS, Security Reliability Transactions Metadata
TCP/IP,...) Secure Conv. Reliable- Atomic-TX WSDL
> Also partially used by Trust,XWSS Messaging Coordination
MEX
TmaxSoft, BEA WLS10, Policy
JBoss SOAP-based Messaging (WSA, MTOM)
JAXB-based XML Data Binding (XSD, XPATH)
HTTP TCP SMTP
16
GlassFish - Developer Features
Web Services Stack – Monitoring & Troubleshooting
• Web Services can be tested and
monitored with GlassFish out of
the box
> Built in generic Web Services Tester
> Web Services Monitoring
> Request/Response Tracing
17
GlassFish - Developer Features
Configuration & Management
• Management using Java Management Extensions
(JMX)
> GlassFish has a internal JMX instrumentation
> JMXConnector for JMX Remoting (JSR-160)
> Usefull to attach tools like
Jconsole, MX4J or
commercial monitoring tools
• Custom MBeans can be
deployed & registered
> Use asadmin create-mbean
or Admin GUI
> Implement JMX Interface
NotificationListener for
GlassFish Events 18
GlassFish – Features for Admins
Record Performance
• GlassFish v2 / Sun AS 9.1 delivered world class
SpecJAppServer2004 results 900
SPECjAppServer 2004 Results
> SJS Application Server 9.1: 883.66 JOPS
800
700
> 60% faster than GlassFish V1 600
500
> Best-in-class Performance 400
300
– 10% better than BEA WebLogic 9.2 200
– 30% better than IBM WebSphere 6.1
100
0
Sun BEA IBM JBoss
• New Result – with 6 App Server Machines:
> 8,439.36 SPECjAppServer2004 JOPS@Standard
Disclaimers: SPEC and the benchmark name SPECjAppServer 2004 are registered trademarks
of the Standard Performance Evaluation Corporation. Competitive benchmark results stated
above reflect results published on www.spec.org as of 11/21/07. The comparison presented is based
on GlassFish v2 UR1 run on 6 Sun SPARC Enterprise T5120 (1 chip, 8 cores/chip, 8 threads/core)
1.4GHz 8,439.36 SPECjAppServer2004 JOPS@Standard.
For the latest SPECjAppServer 2004 benchmark results, visit http://www.spec.org/.
19
GlassFish – Features for Admins
Administration, Configuration, Monitoring
• GlassFish provides a professional Administration
Console
> Used for Monitoring, Configuration, Deployment
• Commandline Interface “asadmin” provides the
same power
> Usefull for automation & scripting
• In Cluster / Enterprise Usage
Profile Administration app is
deployed on a separate Node
> Domain Administration Server
20
GlassFish – Features for Admins
Domain Concept supporting large topologies
• A domain is an administrative grouping of instances
and clusters
> Centrally managed through Domain Administration Server who
owns a domain wide repository of applications and configurations
> Instances are controlled by Node Agents
> Instances have a locally cached repository
Node Agent
DAS
Applications
asadmin>
asadmin> Resources
Node Agent
Configuration
JMX Server Instances
21
GlassFish – Features for Admins
Troubleshooting & Diagnostics
• GlassFish Call Flow Monitoring allows tracing of
requests
> Where is time being spent? - Can be dynamically turned on/off
> Call Flow also triggers JMX Notifications for Self Management
• Self Management
> JMX Notification
Listeners for certain events
– Log Events, Monitor Events
– Timer Events, MBean Notifications
– Trace Events,Lifecycle Events
• Per Service Log Levels
• Resource Management
22
Call Flow Monitoring
Where is time being spent?
23
Agenda
Themen
• Java Enterprise Edition 5
• Sun Project GlassFish
> Overview, Architecture & Adoption
> GlassFish for Developers
> GlassFish for Administrators
• Advanced GlassFish Topics
> Clustering & High Availability
> Projects around GlassFish: OpenSSO, Portal & Open ESB
• Java EE.next
24
GlassFish – Features for Admins
High Availability, Clustering and Loadbalancing
• High Availability concepts include
> Load Balancing
> Failover
> State Maintainance
• GlassFish provides full HA capabilities
> Load balancing and failover for HTTP(s), IIOP(s) and JMS
> HTTP load balancing achieved through web server plugins for
Apache, Sun WS, MS IIS or using Apache mod_jk
> IIOP load balancing achieved by client ORB
> Session data replication for HTTP Sessions and Statefull Session
Beans
25
GlassFish HTTP LB Architecture
Cluster
Web Server GlassFish
LB Plugin HTTP Lstnr
http://host:80 Load
Balancer Web Server GlassFish
Admin,
LB Plugin HTTP Lstnr Deployments
Cisco, BigIP,
Alteon loadbalancer.xml
Domain
Admin Svr
Web Server Load Balancing Plugin provides
- SSL Termination - Failover/Re-Enlist
- Healthchecks - Quiesing/Rolling Upgrades
- Multi-Cluster Config - Automatic Retry (idempotente URLS)
26
GlassFish Clustering
• Group Membership Service with Project Shoal
> http://shoal.dev.java.net
> Dynamic clusters implemented with JXTA by default
> Extreme ease of use in cluster setup
• In Memory Replication
> HTTP session state
> Stateful EJB session state
> Single Sign-On state
> Container state (timers, ...)
> Default is In-Memory replication with JXTA
27
GlassFish Extensions: OpenPortal
http://portal.dev.java.net
• Enterprise-class Portal Server
> Basis for the commercial product from Sun
• Sub-projects
> portlet-container.dev.java.net
> portlet-repository.dev.java.net
> wsrp.dev.java.net (WSRP ½)
> portalpack.netbeans.org
> eclipse-portalpack.dev.java.net
> saw.dev.java.net (Workflow)
> mirage.dev.java.net (CMS)
> jsfportletbridge.dev.java.net
28
GlassFish & Identity Management
https://opensso.dev.java.net
• Projekt OpenSSO
> Access Management and Single Sign On for Web Applications,
Web Services and Java Applikationen
– Sun Access Manager is based on OpenSSO
– Provides centralized Authentification, Authorisation of users against LDAP or other
Datastores
– Standards: Java EE, Liberty, SAML, WS-*
> Single Sign with 3rd Party Systems using agents
– GlassFish, WebLogic, WebSphere, Tomcat, Apache, SAP,IIS, Jboss
– https://opensso.dev.java.net/public/agents.html
29
OpenSSO Architecture
https://opensso.dev.java.net
3. Redirect back
OpenSSO with SSO Token TomCat
Policy Service
Session Service 2. Redirect to App1
Session/Auth Service 1. Client Request
Auth Service for Secure. App
LoggingService Policy/J2EE Agent
5. SSO Token
Check
GlassFish GlassFish
App2 4. Request
6. Grant/Deny for Sec. App2
LDAP + Redirect
DB Policy/J2EE Agent
30
GlassFish & Open-ESB
• Based on JBI (Java Business Integration) Standard
> Already Released
> JBI Implementation
> Service Engines: BPEL 2.0, SQL, Java EE
> Binding components for MQ, JMS, SOAP, File, CORBA, CICS,...
> More Components to be Released
• Integrated within GlassFish V2
• Distributed in NetBeans 6.0 SOA Pack
• Future of Sun Composite Application Platform Suite
(CAPS)
31
rd
3 Party Frameworks for GlassFish
OSWorkFlow
OSCache
Integration ORB Project Tango
Apache Httpd CJUG-Classifieds
Open ESB BIRT jBPM
DOJO
Facelets OpenSSO
MyFaces ADF
Shale SiteMeshWebDAV
JSPwiki AJAX
Tapestry
Dalma MC4J
StringBeans Portal
BlogTraderWebSphere MQ Wicket Equinox
Java WSDP
32
Agenda
Themen
• Java Enterprise Edition 5
• Sun Project GlassFish
> Overview, Architecture & Adoption
> GlassFish for Developers
> GlassFish for Administrators
• Advanced GlassFish Topics
> Clustering & High Availability
> Projects around GlassFish: OpenSSO, Portal & Open ESB
• Java EE.next
33
GlassFish.next – Java EE 6 JSR 316
• Extensibility
> Embrace and support popular frameworks and technologies
developed in external communities
> Layer these technologies cleanly on top of Java EE platform
• Profiles
> Rules for referencing Java EE platform technologies in Java EE
Profiles
> A profile may include a subset of Java EE platform technologies,
additional JCP technologies, or both
• Pruning
> Define process of removing technologies from platform
• Goal is to deliver a final version by the end of 2008
34
Java EE 6 – Proposed New JSRs
• JSF 2.0 (JSR 314)
• JAX-RS (JSR 311)
> RESTful web services
• WebBeans 1.0 (JSR 299)
• Servlets 3.0 (JSR 315)
• Enterprise Java Beans 3.1
> Singletons, Asynchrony, Concurrency options, ...
> JavaBeans Validation framework (JSR 303)?
• Java Persistence API 2.0
• Java EE Connector 1.6
35
GlassFish v3
• Small & Fast
> Less than 1.0 sec startup Give us your Input!
> Totally Modular, kernel is <100K
> Based on a module sub-system: HK2
• An ideal Container for Web 2.0
> Java and Scripting applications like PHP, JRuby or pure Java Web
Container
> Support for upcoming Java EE 6 profiles
• A container that can do Java EE and more
> A good fit for SOA/ESB solutions
• Code and documentation available today
36
Summary
• Java Enterprise Edition 5 really eases enterprise
development
• GlassFish is a leading edge open source
application server
> Cutting edge performance and scalability
> 100% Java EE 5 compliance
• GlassFish v3 and Java EE 6 will make life even
more productive
• More Infos? Stop at our booth in the exhibition area
37
More Information
• Download: http://glassfish.dev.java.net
• Wiki: http://wiki.glassfish.java.net/
• Aquarium: http://blogs.sun.com/theaquarium
• OpenSSO: http://opensso.dev.java.net
• Portal Projekt: https://portal.dev.java.net/
• WSIT: http://wsit.dev.java.net
• Open-ESB: http://open-esb.dev.java.net
• Blog: http://blogs.sun.com/dadelhardt
38
GlassFish v2, Java EE
and their Future
Daniel Adelhardt
Software & Java Ambassador
Sun Microsystems GmbH
39
Related docs
Get documents about "