Operations and Monitoring with Spring



Similar documents
Developing modular Java applications

Converting Java EE Applications into OSGi Applications

This training is targeted at System Administrators and developers wanting to understand more about administering a WebLogic instance.

FUSE-ESB4 An open-source OSGi based platform for EAI and SOA

GlassFish v3. Building an ex tensible modular Java EE application server. Jerome Dochez and Ludovic Champenois Sun Microsystems, Inc.

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

IBM WebSphere Server Administration

JBS-102: Jboss Application Server Administration. Course Length: 4 days

WebSphere Server Administration Course

CHAPTER 1 - JAVA EE OVERVIEW FOR ADMINISTRATORS

MagDiSoft Web Solutions Office No. 102, Bramha Majestic, NIBM Road Kondhwa, Pune Tel: /

Learning GlassFish for Tomcat Users

WEBLOGIC ADMINISTRATION

Building a Modular Server Platform with OSGi. Dileepa Jayakody Software Engineer SSWSO2 Inc.

Oracle WebLogic Server 11g Administration

Creating an application with the Virgo Web Server

Oracle Exam 1z0-599 Oracle WebLogic Server 12c Essentials Version: 6.4 [ Total Questions: 91 ]

Install guide for Websphere 7.0

InfoSphere Master Data Management operational server v11.x OSGi best practices and troubleshooting guide

Course Description. Course Audience. Course Outline. Course Page - Page 1 of 5

Introduction to OSGi and Modularity. InfoSphere MDM, Version 11.x Dany Drouin, Senior Software Engineer MDM

ITG Software Engineering

Glassfish Architecture.

WebSphere Application Server - Introduction, Monitoring Tools, & Administration

Server-side OSGi with Apache Sling. Felix Meschberger Day Management AG 124

Oracle WebLogic Server 11g: Administration Essentials

<Insert Picture Here> GlassFish v3 - A Taste of a Next Generation Application Server

WebLogic Server 11g Administration Handbook

Understanding class paths in Java EE projects with Rational Application Developer Version 8.0

WebSphere Training Outline

APAC WebLogic Suite Workshop Oracle Parcel Service Overview. Jeffrey West Application Grid Product Management

Migrating Applications From IBM WebSphere to Apache Tomcat

Introduction to Sun ONE Application Server 7

NetBeans IDE Field Guide

Cost Savings with Tcat

A Beginners Guide to Fusion Middleware

BIRT Application and BIRT Report Deployment Functional Specification

SW5706 Application deployment problems

Code:1Z Titre: Oracle WebLogic. Version: Demo. Server 12c Essentials.

Basic TCP/IP networking knowledge of client/server concepts Basic Linux commands and desktop navigation (if don't know we will cover it )

EVALUATION ONLY. WA2088 WebSphere Application Server 8.5 Administration on Windows. Student Labs. Web Age Solutions Inc.

Framework Adoption for Java Enterprise Application Development

enterprise^ IBM WebSphere Application Server v7.0 Security "publishing Secure your WebSphere applications with Java EE and JAAS security standards

Working with WebSphere 4.0

Enterprise Application Management with Spring

Securing SAS Web Applications with SiteMinder

JBoss AS Administration Console User Guide. by Shelly McGowan and Ian Springer

Introducing IBM WebSphere Application Server v8.5 The Future Is Now

As you learned about in Chapter 1, WebSphere Application Server V6 supports the

Put a Firewall in Your JVM Securing Java Applications!

How to Build an E-Commerce Application using J2EE. Carol McDonald Code Camp Engineer

Oracle im Open Source Kontext Abgrenzung GlassFish vs. JBoss und wozu noch WebLogic?

Monitoring applications in multitier environment. Uroš Majcen A New View on Application Management.

JBOSS ENTERPRISE APPLICATION PLATFORM MIGRATION GUIDELINES

This presentation will provide a brief introduction to Rational Application Developer V7.5.

Aspect Weaving for OSGi. Martin Lippert (akquinet it-agile GmbH)

Robert Honeyman

Getting Started with vfabric tc Server

Top Weblogic Tasks You can Automate Now

An Oracle White Paper May Ready for Business: Oracle GlassFish Server

Enterprise Applications

Enterprise Manager 12c for Middleware

Pivotal tc Server BUILDING AND RUNNING SPRING APPLICATIONS

1z0-102 Q&A. DEMO Version

Oracle EXAM - 1Z Oracle Weblogic Server 11g: System Administration I. Buy Full Product.

Deploying to WebSphere Process Server and WebSphere Enterprise Service Bus

Monitoring Experience Redefined

WELCOME TO Open Source Enterprise Architecture

KillTest. 半 年 免 费 更 新 服 务

OSGi Application Development using GlassFish Server. Version 1.5. By: Sanjeeb Sahoo

Learn Oracle WebLogic Server 12c Administration For Middleware Administrators

JBOSS OPERATIONS NETWORK (JBOSS ON) MONITORING

EclipseLink. Solutions Guide for EclipseLink Release 2.5

Deploying Rule Applications

Sample copy. Introduction To WebLogic Server Property of Web 10.3 Age Solutions Inc.

Installation Guide of the Change Management API Reference Implementation

Client-Server Architecture & J2EE Platform Technologies Overview Ahmed K. Ezzat

A Guide to Migrating Enterprise Applications to Spring

Oracle WebLogic Server

applications. JBoss Enterprise Application Platform

Migrating JEE Applications from WLS/WAS to SpringSource tc Server. A Technical Perspective

Chapter 1 - Web Server Management and Cluster Topology

IBM WebSphere Process Server V7.0 Deployment Exam.

Glassfish, JAVA EE, Servlets, JSP, EJB

Using Tomcat with CA Clarity PPM

Talend Open Studio for ESB. Release Notes 5.2.1

HOW TO DEPLOY AN EJB APLICATION IN WEBLOGIC SERVER 11GR1

WebLogic Server: Installation and Configuration

Maximum Availability Architecture. Oracle Best Practices For High Availability. Backup and Recovery Scenarios for Oracle WebLogic Server: 10.

TIBCO Silver Fabric Continuity User s Guide

JBoss Enterprise Middleware

Weblogic 12c: Mastering The Cloud Foundation. Patrick Dewael & Kristof Satory

White Paper: 1) Architecture Objectives: The primary objective of this architecture is to meet the. 2) Architecture Explanation

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Transcription:

Operations and Monitoring with Spring Eberhard Wolff Regional Director and Principal Consultant SpringSource Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited.

A Short History of Spring Spring is a platform independent framework for the development of (Enterprise) Java Applications Originally started as an easier to use alternative for Java EE development In particular compared to EJB See "J2EE Development Without EJB" But actually there is more to it Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 2

Programming Model vs. Infrastructure Programming Model: A set of APIs to use as a developer Infrastructure: Something to run your software on Spring defines a Programming Model but no Infrastructure you can use Java EE, a simple Servlet container Java EE defines a Programming Model and an Infrastructure Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 3

Bundling Programming Model and Infrastructure Bundling leads to some problems To upgrade the programming model you need to upgrade the infrastructure Operations will not like that idea You are limited to a certain infrastructure what do you do concerning OSGi? You only get the benefit from OSGi if you use its non OSGi deployment model Users realize how flexible they are using Spring Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 4

Spring s Impact on Java EE Production Environment Production Environment Production Environment EAR WAR EJB WAR Spring Powered Application WAR Spring Powered Application Jaav EE Application Server Spring Spring Servlet Container EJB Container Java EE Application Server Servlet Container Tomcat Servlet Container Connection mgmt. Clustering Deployment management Connection mgmt. Clustering Deployment management Connection mgmt. Clustering Deployment management Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 5

So: What is the advantage of Spring over Java EE 6? Type error: Cannot compare infrastructure + programming model to programming model But seriously Spring actually exists Java EE 6 is still being standardized You don't need to upgrade your server (many are still on Java EE 5) Actually this question is not important to many: They don't run on Java EE anyway Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 6

Today s De Facto Standards Spring and Tomcat WebLogic 26% Spring Applications JBoss 38% WebSphere 43% Apache Tomcat 68% 0% 10% 20% 30% 40% 50% 60% 70% Java Application Server Usage, Source: 2008 Evans Data Survey Obviously the Java EE platform is often not needed A Servlet container is enough and too complex Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 7

Is Spring + Servlet container as powerful as Java EE? "Classic" features of a Java EE server Feature Transactions Security Spring Solution No real 2PC but smart solutions for many scenarios Spring Security is much better Distribution Not too important any more Spring Remoting offers even more features Persistence Java EE's persistence (JPA) can be used and several other Naming Supported by Dependency Injection Connection / Resource Pooling Supported by Servlet Containers and DataSource implementations Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 8

So Let's add transaction support (JTA) to Tomcat Then we have a full blown Application Server But Tomcat is very successful already and Spring offers solutions for O/R mappers for JMS + a DataSource JTA seems to be a not too important Is there anything else we need to think about? Infrastructure is not just for developers! Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 9

Operations Operations cares about monitoring administration They should be able to look into application Usually there is more than one Application Server how can you handle larger installations? Individual updates of parts of an application are important Virtualization / Cloud Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 10

Spring Enterprise - Looking into Applications Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited.

Spring Enterprise - Looking into Applications Certified Spring Instrumented Spring Monitor Spring apps across infrastructure JMX flows into Management Application Track app performance Just different JARs No code changes Your Application Enterprise JMX Management Application Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 12

Demo: Spring Enterprise Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited.

Handling large clusters Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited.

Cluster Usually there is more than one Tomcat server in an installation How can you manage them? Ideally centralized Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 15

SpringSource tc Server Tomcat you know. Enterprise capabilities you need. tc Server Tomcat Enterprise Capabilities Enterprise support Distributed Operations Diagnostics Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 16

Product Architecture tc Server machine 1 tc Server Hyperic Agent Configs tc Server machine n Mgmt Server Hyperic Server Inventory, Metric, Audit, Hyperic Web Console Scripts tc Server Hyperic Agent Configs Other Manageable Items Apache http Server Apache Tomcat ActiveMQ JVM Operating Systems Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 17

tc Server Binaries almost unchanged no lock in Centralized monitoring and administration Groups of server allow to deal with a group of servers not just one Start / stop / restart Deployment Configuration including JVM options Easy operations of large Tomcat installations Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 18

Demo: tc Server Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited.

Demo WhiteRabbit Ubuntu1 tc Server Hyperic Agent Hyperic Server Hyperic Web Console Inventory, Metric, Audit, Ubuntu1 tc Server Hyperic Agent Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 20

Updating parts of an application Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited.

dm Server Modularization is key to maintainable software Modularization at runtime gives more power to Operations Updates of parts of the application Determining the source of an error etc On the client and in the embedded world OSGi has succeeded as a standard for modularization OSGi enters the server market Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 22

OSGi Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited.

It's a module system Partition a system into a number of modules "bundles" Dynamic: Bundles can be installed, started, stopped, uninstalled and updated...at runtime better operations Strict visibility rules Resolution process satisfies dependencies of a module Understands versioning Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 24

It's even service-oriented Bundles can publish services dynamically! Service Registry allows other bundles to consume services Services come and go at runtime transparently when using Spring-DM Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 25

OSGi Bundle The fundamental unit of deployment and modularity in OSGi Just a JAR file with additional entries in META-INF/MANIFEST.MF Common manifest headers: Bundle-SymbolicName Bundle-Version Bundle-Name Bundle-ManifestVersion Bundle-Vendor Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 26

Import / Export -Package Declares package-level dependencies of your bundle. Import-Package: com.xyz.foo; Import-Package: com.xyz.foo;version="1.0.3" Import-Package: >= 1.0.3; e.g., 1.0.3.GA, 1.0.4, etc. com.xyz.foo;version="[1.0.3,1.0.3]" Import-Package: com.xyz.foo;version="[1.0.3,1.1.0)", com.xyz.bar;version="[1.0.3,2.0.0)" Export-Package: com.xyz.foo Export-Package: com.xyz.foo;version="1.0.5" Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 27

Spring Dynamic Modules & SpringSource dm Server Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited.

Spring-DM: ApplicationContext Configuration files in /META-INF/spring Automatically merged..and ApplicationContext is created Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 29

Service export and import <beans...> <osgi:service ref="customerdao" interface="dao.icustomerdao" /> <osgi:reference id="datasource" interface="javax.sql.datasource" /> </beans> Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 30

Service export and import Dynamic services automatically dealt with i.e. method calls are buffered Purely declarative No dependencies on OSGi in the code No resource leaks Not solved in Spring Dynamic Modules: Easy import of libraries Using JPA or Hibernate in OSGi Seamless Web Support Notion of an application Enter dm Server Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 31

dm Server Platform Modular profiles Bundle repository Library provisioning Serviceability FFDC Logging / Tracing Built on Equinox Modular architecture Subsystems Bundles Small footprint WAR Personality Web Module Personality Bundle Personality Tomcat Deployer Management Dynamic Modules Kernel Equinox JVM Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 32

Bundles for the example Web Service API: only interfaces and domain classes Implementation can be exchanged Web API Could add infrastructure: DataSource / PlatformTransactionManager Service Package Import Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 33

Bundles & Types Only dependencies to the API Therefore: implementation can be exchanged even at runtime No direct dependencies to any implementation Not shown: dependencies to external bundles can be installed in dm Server modular middleware! Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 34

Bundles & Services web Service Registry Services: Publish / Consume api service Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 35

Bundles & Services Infrastructure can use the same principle as application services i.e. DataSource and PlatformTransactionManager are just another service Can I still run on plain Java EE? Yes: instead of OSGi Service directly inject Spring Beans no more more dynamic services / modularization No code change needed Application can run on Java EE or OSGi Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 36

PAR Packaging format for all modules in an application Taglibs Web JAR with Application-* manifest headers Single unit: deploy, refresh, undeploy Application boundaries Scoping of types and services DataSource does not leak out of the application Hibernate can change domain objects Spring Application API Service Package Import Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 37

Web Migration: From WAR to PAR Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited.

Web Application Deployment Options Standard Java EE WAR supported on dm Server as is converted into an OSGi bundle Shared Libraries WAR WAR + OSGi package imports Eradicate library bloat of monolithic Java EE WARs Shared Services WAR Uses OSGi services with Spring's <osgi:reference> Web Module OSGi Service Registry services Standard WAR libs services Shared Libraries WAR Shared Services WAR Bundle Repository Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 39

Roadmap Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited.

dm Server 2.0 Roadmap SpringSource dm Server 2.0: 2009 Cloning bundles solves problems around static variables and more Shared Repository make a repository available to other servers Plan Files Define an application as a collection of bundles Does not contain the bundles, more flexible Distributed and improved Management operation on a group of servers like tc Server for Tomcat Modular Web Applications Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 41

Support for Enterprise OSGi Standards RFC 66: Web Container for OSGi (RI based on dm Server) RFC 119: Distributed OSGi RFC 124: Blueprint Service (RI based on Spring- DM) RFC 139: JMX interface for OSGi RFC 142: JNDI and OSGi integration Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 42

Note: OSGi has an impact on operations New deployment model Updates of bundles possible How much less regression testing do you actually do? Is redeploying just a part of an application OK for operations? Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 43

Virtualization / Cloud Deployment blueprints define machines and their characteristics vapp define a deployment format based on such blueprints dm Server, tc Server etc will be configurable using vapp properties (e.g. ports) vapps can be pre defined just add your application vapps can optimize for network traffic or availability Deployment and set up of the VMs is trivial in your private or a public cloud Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 44

Summary Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited.

Summary Spring is a portable programming model This help the move from full blown Java EE to Servlet containers An important part of infrastructures is support for operations Issues: Monitoring e.g. Spring Enterprise Cluster e.g. tc Server Modularization at runtime e.g. OSGi / dm Server Virtualization / Cloud Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited. 46

Questions? Eberhard Wolff eberhard.wolff@springsource.com http://springsource.com Build Run Manage Copyright 2009 SpringSource. Copying, publishing or distributing without express written permission is prohibited.