Software Development, Agile Practices, Lean Thinking, Music
[ start | index | login or register ]
start > snipsnap-index > JavaOne 2007 Notes

JavaOne 2007 Notes

Created by brandon. Last edited by brandon, 4 years and 270 days ago. Viewed 183 times. #20
[diff] [history] [edit] [rdf]
labels
attachments

JavaOne 2007, May 8-11, approximately 260 sessions

Tue. May 8

Get in the Driver's Seat With Java Technology

  • John Gage - Sun Chief Researcher
    • The Solio - enables "off the grid on the next"
    • Challenge to measure for being carbon neutral
    • Small devices are the "vector" of change for human interaction
  • Rich Green - Sun EVP - Software
    • Mobile phones outship PCs 20:1
    • GlassFish now being shipped by 7 companies
    • GlassFish transitioning from Enterprise to Media
    • Martin Harriman - Ericsson VP Marketing & Business Development
    • Sun Java System Communications Application Server
    • Ericsson open sourcing IMS
    • JSR - Java RTS 2
    • RT GC
    • Useful in finance, telecom, aviation, industrial controls, etc
    • javax.realtime.RealtimeThread
    • Anna Ewing - NASDAQ CIO
    • Trading system runs on Java
    • 150,378 TPS
    • Java -> RT Java will be a easy migration
    • 70% of HD discs are BluRay
    • Tom Hallman - Sony Pictures, VP of Operations, Digital Authoring Center
    • BDJ allows more dynamic menus than standard definition TV
    • NetBeans - +92% YoY
    • Whole new modular design editor
    • OpenJDK - truly buildable JDK
    • New interim governing board, will create constitution
    • TCK will be created for compatibility certification
    • GPLv2
    • Ubuntu packaging Java 6 and NetBeans
    • Java SE 6 focusing on faster download and RT
    • Java FX family focusing on tools and component for consumer facing apps
    • Java FX Script for RIA, aimed at content professionals
  • James Gosling - Sun Presented
    • Chris Oliver credited with creation from Function over Form (F3) idea
    • Runs on every JSE unmodified
    • Java FX Mobile - Power of Java SE
    • "complete desktop scale environment to mobile"
    • Splitting the software/OS from mobile hardware
    • Nandini Ramani - Sun FX Core Team - Demonstration
    • Runs all SE, ME, and FX Script
    • Marco Boerries - Yahoo! SVP
    • Demonstrates Yahoo GO! - 200 Million phones
    • Open platform for developing (Java FX and ME)
  • Jonathan Shwartz - Sun CEO and President
    • blah blah blah
    • Dr. Djibril Diallo - UN
    • "Engineers without Borders"
    • "create an international device to change the world"
    • Scott McNealy - Chairman Co-Founder
    • Curriki.org - Free open K-12 education wiki

Implementing Java EE Applications, Using Enterprise JavaBeans (EJB) 3 Technology: Real-World Tips, Tricks, and New Design Patterns

  • Speaker(s): Fabiane Nardon; Edgar A Silva
  • Session Bean Pitfalls
    • Transaction defaults to REQUIRED, must override otherwise
  • Exceptions don't auto rollback, only system exceptions, must annotate rollback exceptions
  • Entity Bean Pitfalls
    • Must use @Transient for non persistent fields, otherwise all fields are persistent
    • Fetch types, Lazy, Eager, etc, Lazy is default and usually satisfies
    • Consider eager loading for view layer
  • MDB Pitfalls
    • Spec says don't throw runtime exception
    • So annotate with rollback=true or use programmatic transaction rollback
    • PreDestroy callback may not always be invoked
  • Dependency Injection with @Resource includes env-entry properties from deployment descriptors
  • Interceptors
    • Business validations
    • Audit
    • Security
    • Can use context information
    • The deployer can turn on/off and define execution order
  • Processing Annotation at Runtime
    • Example: Build a dynamic eager fetch query
    • Detect domain/DB schema deltas and auto evolve the DB
  • Old Design Patterns to Recycle
    • Session Facade
      • Still needed to hide the EntityManager details
    • Value Object/Data Transfer Object
      • Still needed sometimes
      • Can reduce lazy loading detached objects
    • Fast Lane Reader
      • No longer necessary
    • Delegate
      • Value Diminished
    • Value List Handler
      • Still useful as there are no inherent paging capabilities with EJB 3.0
  • New Design Patterns
    • Business Rule Interceptor
      • Add interceptor(s) to execute business rules to keep rule logic out of persistence method
      • Interceptor can delegate to any rules engine i.e. Drools (JBoss Rules)
    • Entity View (New variation of Value Object)
      • Create a query that retrieves fewer fields than a complete entity
    • Eager Loading Parameter
      • Add eager loading alternative methods
    • Data Change Observer
      • Use lifecycle callback methods on entity beans to notify observers
      • Uses @EntityListeners
    • Exportable Method
      • Relevant to SOA
      • Use the @WebMethod annotation on a method that exports an XML marshaler method
    • Exportable Service Broker
      • Relevant to SOA
      • Exporting app to web services, a single view of exported app services
      • Proviles a simple signature, ease of dependency injection for EJB implementations, etc.

Evolutionary Java Technology: A Look Forward at the Future of the Platform

  • Bob Brewin - Sun CTO, Distinguished Engineer
  • Talked about history of UI and the motivations for JavaFX
  • Gave analogy of "Positive Stability" with aeronautics
  • Historical created code and rich interactivity are the two dynamic forces that keep the evolution of UI work oscillating.
  • Danny Coward - Java SE Platform Lead
  • Java SE 6 Additions
    • WS Stack
    • Scripting
    • GUI Enhancements
    • Tools API
      • Compiler Access
      • Annotation Access
  • Java SE 6 JDK Additions
    • Diagnostic Tools to attach on demand
    • Heap Analysis Tool
    • Co-bundled JDBC DB (Apache Derby)
    • Improved Swing Fidelity (More Pixel Perfect, More native feel on Windows)
  • Java SE 6 is faster on both Server and Client
  • Java SE 7
    • Modularization
      • Development related, the concept of a Super Package
      • Deployment related, the concept of a Super Jar
      • Focus on interoperability with existing formats (i.e. OSGi)
    • Multiple Language Support
      • First class support for other languages
      • scripting.dev.java.net
      • new bytecode
      • Charlie Nutter and Tor Norbye
      • JRuby demo on Mephisto blogging application
      • JRuby NetBeans 6 demo
    • Working on a "Consumer" JRE to reduce download size
      • Modularization of JRE, a core with parallel download of extra modules
  • Arun Gupta
    • jMaki, Wrapper for AJAX components
    • Phobos, Serverside AJAX components
    • JSON data format and jMaki/Phobos support in NetBeans
    • NetBeans seamless debug support for both JavaScript and Java
  • Jerome Dochez
    • GlassFish v3
      • 100k Kernel (HK2)
      • 463ms startup - lazily loads modules (demo started in 1.3s with a web app)
      • One classloader per module
      • GlassFish can be embedded to support the concept of the "synchronized web"
      • David van Couvering blogged about this concept in relation to Derby
      • Patrick Hogan - NASA Program Manager for the Planetary Visualizer
      • Geospatial Browser - OSS Java based, Ken Russell - Sun Principal Investigator
      • I3 Donated the image data - $250k just for internal use license
      • There is a NetBeans matisse builder for WorldWind components
      • F-16 Flight Simulator - GL Studio, DSTI Corp
      • >>http://worldwind.arc.nasa.gov
    • IRIS Project
    • Java FX Pad, lightweight development tools is freely bundled

Java Puzzlers, Episode VI: The Phantom-Reference Menace/Attack of the Clone/Revenge of the Shift

  • Speaker(s): Joshua Bloch; William Pugh
  • URL equals() and hashcode() are broken use URI instead
  • Don't use URL as a Set or Map key
  • Testing threads with JUnit is a false sense of security
  • Class initialization is always in textual order
  • The only "compile-time" constants are primitives and Strings
  • Never use Boolean (Wrapper) as a return for ternary operations
  • InputStream.skip() doesn't guarantee skip, wrap it
  • Math.abs doesn't guarantee nonnegative result
  • ? : operation doesn't deal nicely with different wrapper types
  • widening behavior in primitive types can be dangerous

Closures for the Java Programming Language

  • Speaker(s): Neil Gafter
  • Goals
    • Concise "function" literals without the pain of anonymous inner classes
    • Interoperability with existing APIs
    • Enable control APIs
    • Functional and aggregate operations
    • Simple but powerful
  • Syntax and Semantics
    • Closure expressions - "ordinary" interface types
    • Function types - Signature/Result definition with Exceptions
    • Control statements
    • Closure conversion turns a closure into an instance of same interface
      • This provides interoperability to existing APIs

JSR 311: The Java API for RESTful Web Services

  • Speaker(s): Marc Hadley; Paul Sandoz; Roderico Cruz
  • "You cannot make an API or protocol RESTful"
  • It is a style of architecture
  • RPC, few nouns many verbs
  • REST, many nouns view verbs
  • Automated content negotiation
    • @ProduceMime("application/xml")
    • URI Templates to solve repetitive parsing
      • @UriTemplate("/artists/{id}")
    • POJO implementation
      • @HttpMethod
      • @UriParam("id")
    • HttpResponse Subclasses for standard HTTP response types
    • Jerome Duvell is on the expert group, creator of Restlet API
    • NetBeans 5.5 will generate JPA entity beans off DB schema
      • Generate REST resource classes from these entities

Modularity in the Next-Generation Java Platform, Standard Edition (Java SE): JSR 277 and JSR 294

  • BOF Speaker(s): Kumar Srinivasan, Dave Bristor, Alex Buckley, Stanley Ho
  • JSR 294 - Super-package language construct (super-package.java)
    • Virtual Machine support for access control
  • JSR 297 - Java Module Distribution Format
    • Versioning
    • Tooling
    • Repositories
    • Issues
    • Versioning
    • Reference to other JARS
    • Native Libraries, multiple JARS bundle
    • Dual roles: distribution format, and execution format
    • Three problems to eliminate, classpath, JAR, extension
    • APIs to represent the module system

Wed. May 9

General Session - Oracle

  • John Gage - Sun, Chief Researcher, Director of Science Office
  • Thomas Kurian - Oracle, SVP - Oracle Server Technologies, Development
    • Jave EE 5, SOA and EDA, Web 2.0, Grid Computing - 4 Trends that will Fundamentally change opps and solutions
    • Java EE 5
      • View - JSF, AJAX
      • Controller - JSF
      • Component Model for UI, Supports rendering Flash, XHTML, WML, SMS
      • Model - EJB 3, JPA
    • Persistence Platform for Java os'ed as "EclipseLink" project, JSR 227 Data Binding
    • Demonstration of Oracle UI components rendering as both Flash and AJAX application
    • Declarative Drag and Drop functionality is cool.
    • Rich Component Framework donated to Apache (in addition to existing Trinidad)
    • Demonstration of Enterprise Mashup functionality for Web 2.0 Development
SIP communications with VoIP is pretty slick
    • "Web Center Composer" to create mashups on the fly at the client side.
    • SCA built on Spring framework, to enable composite applications
    • Service Mediator - is an ESB
    • Service Orchestration - BPEL, worflow, process manager
    • Service Governance - Policy, Failover, SLA, Security, Monitoring, etc
    • Demonstration of SOA and SCA development
    • Oracle's JEE container is now JEE 5 certified
    • Based on Spring and OSGi
    • Grid Computing benchmarking world records
    • Oracle has now aquired Tangosol Coherence for grid architecture, clustering/availability/scalability
    • Automated Management
    • Demonstration of Grid Computing
    • Cameron Purdy - Tangosol Leading Oracle unit

Java Technology Generics and Collections: Tools for Productivity

  • Speakers: Maurice Naftalin; Philip Wadler
  • Implemented by erasure
  • Benefits of erasure impl
  • Design Constraint: Binary for legacy client must link to generified library
    • Binaries are the SAME for legacy and generified
  • Erasure eases evolution
  • The compiler issues an "unchecked warning" if not using a generified method
  • Erasure allows legacy and generic clients to co-exist, as binaries interop
  • Compile time however requires a little more work
  • Generic client won't compile against the legacy library
    • Three options
      • Minimal changes (surface generification)
      • Stubs (Puts the boundary at the client layer)
      • - Compile time only, runtime doesn't use stubs
      • Wrappers - not recommended (introduces another layer, above the client)
      • - Creates parallel class hierarchies (duplication)
      • - Nesting leads to multiple wrapper layers
      • - End up with two version
  • Problems of Erasure
    • Parameter types are not reified (thingify, make something concrete), not represented at run-time
    • Constructs requiring run-time type information don't work well (or at all)
      • Casts and instanceof
      • Parametric exceptions don't work because generic type isn't present at runtime
      • Problems with arrays
      • - Typing system for arrays at run-time doesn't mesh well with erasure
      • - No Arrays of Generic Types
  • The principle of Truth in Advertising
  • The principle of Indecent Exposure (will be published in the slides)
  • Reification
  • Java 7 may or may not still use erasures
  • Gafter has suggested another language change mechanism
  • Collections
    • Trends in concurrency policy
    • JDK 1.0 Synched collection methods
    • JDK 1.2 optional java.util synch methods, default unsynched
    • J2SE 5 java.util.concurrent (JSR 166) Thread-safe classes designed for concurrent access
    • Fail Fast iterators are a stop-gap to aid thread-safety but don't provide it proactively
    • Throws ConcurrentModificationException

Effective Java Reloaded

  • Speaker(s): Joshua Bloch
  • Static Factories - New Advantage, Type inference
  • Static Factories Drawbacks, lots of parameters
  • Solution - Use the Builder pattern as a static constructor
public class NutritionFacts {
 public static class Builder {
  public Builder() { this.x = ..; this.y = ..;}
  public Builder calories(int calories) { this.calories = calories; return ..;}
 }
 private NutritionFacts(Builder builder) {
  <copy data from Builder to NutritionFacts>
 }
}
  • Generics...
    • Avoid Raw Types in New Code
// Good
Collection<Coin> cc = new ArrayList<Coin>();
// Bad
Collection cc = new ArrayList();
    • Don't ignore Compiler Warnings
    • Understand each warning
    • Eliminate it if possible
    • If cannot eliminate only then suppress via @SuppressWarnings("unchecked")
    • Limit them as much as possible, declare extra variable if necessary
  • Use bounded wildcards to increase applicability of APIs
void buy(int numToBuy, Collection<? super T> myCollection);
void sell(Collection<? extends T> myLot);
    • Use <? extends T> when parameterized instance is a T producer ("for read/input")
    • Use <? super T> when parameteried instance is a T consumer ("for write/output")
    • Use <? T> when reading and writing
  • Don't confuse bounded wildcards with bounded type variables
    • Bounded wildcard - void sell(Collection<? extends T> myLot);
  • Restrict input parameters, can use super
    • Bounded type variables - <T extends Number> T sum(List<T> x) {...}
  • Restricts action type parameter, can't use super
  • If a type variable appears only once in a signature, use a wildcard instead
  • Avoid bounded wildcards in Return Types… don't force it on the client directly
  • Only library designers should have to think about wildcards
  • Rarely, you do need to return wildcard types
    • List<? extends Number> operands(); // a read-only list of Numbers
  • Don't overuse wildcards
// good
public static <T> List<T> longer(List<T> c1, List<T> c2)
// bad
public static List<?> longer(List<?> c1, List<?> c2)
  • Use <Void> to clarify intent (non-instantiable)
  • Generics and Arrays don't Mix; Prefer Generics
  • Generic array creation error caused by
    • new TSIZE, Set<T>SIZE, List<String>SIZE
  • Affects varargs(warning rather than error)
    • void foo(Class<? extends Thing>… things);
  • Avoid generic arrays; use List instead
    • List<T>, List<Set<T>>, List<List<String>>
  • Some even say; Avoid arrays altogether
  • Cool (Mind Expanding) Pattern - THC - Typesafe Heterogeneous Container
  • Typically, containers are parameterized
    • Limits you to a fixed number of type parameters
  • Sometimes you need more flexibility
    • Database rows
  • You can parameterize selector instead
    • Present selector to..
private Map<Class<?>, Object> favorites = new Hashmap<TypeRef<?>, Object>();
 public <T> void setFavorite(Class<T> klass, T thing) {}
 public <T> T getFavorite(Class<T> klass) { return klass.cast(favorites.get(klass));
    • The Solution: Super Type Tokens - Sublass the abstract class TypeRef<T>, then use reflection
  • Generics are tricky, but they make your code safer and cleaner
  • Use @Override annotation every time you want to override, makes sure you don't accidentally overload
  • final is the new private
  • minimizes mutability, clearly threadsafe
  • blank finals are fine (i.e. fill in when constructor executes)
  • watch out for readObject and clone (these can't work with final variables)

Improving Software Quality with Static Analysis

  • Speaker(s): William Pugh
  • All about Findbugs and bug patterns

Three Approaches to Securing Your JavaServer Faces Technology/Spring/Hibernate Applications

  • Speaker(s): Ray Lai, Jaya Doraiswamy
  • JSF pure security implementation can take advantage of the <f:verbatim/> tag
  • JSF-Security project on sourceforge
  • Acegi (Spring-Security)
    • Use FilterChainProxy ability to delegate to many filters
    • SecurityContextHolderAwareFilter
    • FilterSecurityInterceptor uses AOP internally
  • Securing business methods via MethodSecurityInterceptor
  • Acegi XML configuration is very heavy, this will decrease in future release
  • Acegi only supports SSO through CAS

Thu. May 10

GlassFish v2 Technical Overview

  • Speaker(s): Pandey and White
  • Free for development, deployment, redist
  • OSI approved CDDL and GPLv2
  • V1 included...
    • Annotations and POJO based development
    • Web Services Management, a unified view
    • Self Management and Healing
    • Single Instance Offfering to make it easy for developer adoption
  • V2 includes...
    • More "enterprise" ready
    • Support for clustering and light-weight session failover
    • WSIT - Web Services Interop Technology
    • Support for JBI
  • More ASP, Hosting, Startup adoption
  • Clustering
    • asadmin/admin console uses JMX to talk to DAS
    • DAS - Domain Administration Server - considered an administration node
    • DAS includes apps, resources, config
    • DAS talks JMX to Nodes via a nodeagent
    • HA Application State Repository (HttpSession, SSO, SFSB, etc)
    • Memory replication or RDBMS
    • HADB needed and open-source lighter-weight alternative
    • HADB still solid (5 9s) but not OSS and more complex to admin
    • Memory replication was chosen for GFv2 instead of HADB
    • Feature compatible with HADB
    • Each Instance (JVM) replicates to only one other instance
    • {1,3}{2,4}
    • 1-2, 3-4 across physical server boundaries
    • 2 Cases for failover
      • Case 1. A Servlet Container would replicate (HTTP Session) to a "replica" cache down the chain of instances using "version control" to identify if load-balancer can trust the data in the replica cache
      • Case 2: Instance doesn't have replica data then broadcast (somebody is asking for session 123 who has it?) uses a SASE (self addressed stamped envelope). Broadcast isn't standard multicast UDP, constrained custom protocol.
    • Load Balancer is self-monitoring, via IO exceptions, JXTA, etc. Will re-establish when new instances join also.
    • Memory Replication out of the Box
    • Create a domain (DAS)
      • Use the 'cluster' admin profile - defaults for replication are handled
      • Enables GMS - heartbeat enabled
      • persistence-type = "replicated"
    • Create a cluster and instances
    • Deploy your app with availability-enabled=true
    • That's it
    • Increase heap size
    • Default is 512MB for cluster admin profile
      • To accommodate cluster demos on laptops
      • Realistically too small for serious replication
    • Add the <distributable/> element
      • Required in web.xml
      • Indicates you believe your app is ready to run in a cluster
      • Makes you think about serialization objects for session state, SFSB state etc.
    • Performance
      • Cost of Replication
      • Hits/Sec ~17-25% throughput degradation, 2k, 4k, 8k session significantly better than HADB
    • Based on JXTA and project Shoal/GMS
      • JXTA is a peer to peer tech
      • Streamlined to handle the high-volume and throughput reqs of memory replicaiton
      • Benefited from collaboration with Grizzly project
      • JXTA tech group and member abstractions
      • Simplified APIs made near zero-config (Cluster>Group, Member>Peers) in JXTA terms
    • GMS Group Mgmt Service
      • Provides dynamic membership, health monitoring, lightweight messaging etc
      • GMS is itself based on JXTA
      • shoal.dev.java.net - Pluggable Runtime Clustering Framework
      • Membership change notifications and cluster state
      • Cluster-wide, member to member messaging
      • Recovery oriented
      • Distributed Cache
      • Provides SPI for alternative providers for Group communication
      • Used for automatic transaction recovery
      • Timer migrations
      • Cluster health
      • In-mem repl
      • IIOP failover load-balancer
  • WSIT (Project Tango)
    • Interop between Java and .NET 3.0/WCF aka Indigo
    • JAX-WS RI of WS-* specs from Microsoft
    • Optimizing communication
    • Reliable messaging
    • WS-Security, WS-Trust
  • JBI (JSR 208)
    • Admin through admin console (OpenESB is the JBI runtime)
  • Others
    • Usage Profiles
      • Improving user-experience (WAS Profiles, developer versus production etc)
      • Canned Dev, Cluster, Enterprise profiles
      • V3 will allow custom profiles
    • Update Centers
      • Runtime or non-runtime additional component installation (GUI based)
      • Implemented across two tiers (server for content/catalog, and then GUI)
    • Security (JSR 196 Java Auth SPI for Containers)
      • ECC (Elliptice Curve Crypto)
      • Support for JKS format
      • Support for assign-groups in Security-Realm
      • JDBC Realm
    • Web Container enhancements
      • Grizzly based (Async Req Processing -ARP and Comet framework
      • Non-blocking SSL
      • Apache AJP
      • In-memory JSR 199 - style JSP compilations
      • All webcontainer aspects are now dynamically reconfigurable (No server restart)
      • Alternate docroots for virtual servers and web apps
      • Numerous web container startup and req processing optimizations
    • New Admin Console
      • Using JSF Templating
      • jMaki charting
      • Ajax, breadcrumbs, trees, etc
      • Support for cluster mgmt
      • One-step deployment with Server-side browsing
      • Integrated JBI admin
    • Perf Improvements
      • Startups -lazy loading of modules etc
      • Asynch web services impl
      • EJB container
      • ORB
      • JMS provider
      • Web Container (Grizzly)
    • Spec Updates
      • JSR 196 (Auth SPI)
      • 208 - JBI
      • JSF 1.2 MR
      • JAX-WS

Advanced Spring Framework

  • Speaker(s): Rod Johnson
  • Announcement Spring just raised 10million in series A VC
  • Spring Fundamentals
    • Core component model
    • Services
    • Patterns (Recipes) i.e. JdbcTemplate, LdapTemplate, etc
    • Integration (Ecosystem)
    • Portable (Runs Everywhere)
    • Promotes a Universal POJO programming model
  • Key Enabling Techs make up the Spring Triangle
    • DI - Inject Collaborators (pojo business objects)
    • AOP - Inject Behavior (Security, Logging, etc.)
    • PSA - Portable Service Abstractions (i.e. Transaction Mgmt, etc)
  • Value-Add: Exporting a remote endpoint
  • Once spring knows about a component can provide many server side "Exporters"
  • Value-Add: JMX API Export
  • Can expose any bean as a JMX API MBean
  • Aspects can use @Aspect class annotation and @After method annotation etc.
  • Spring 2.0 uses AspectJ 5 libraries so it is typesafe, uses argument binding
  • Aspects are extension points for the container
    • <aop:aspectj-autoproxy/> will auto apply aspectj annotations
  • FactoryBean - introduces a level of indirection
  • BeanPostProcessor - Called on every bean instantiation, a listener to the instantiation of objects
  • BeanFactoryPostProcessor - Can modify/add bean definitions, new/modify properties etc
    • Example: decrypt passwords stored in property files
  • BeanDefinition - One for every bean definition in the config.xml
  • Activating a BeanPostProcessor is as easy as declaring a bean for that post-processor
  • New to 2.0 - custom bean definitions, that is define new XML tags to produce zero or more Spring bean defs
    • Example: when multiple beans must always use each other, or always require multiple properties
  • Acegi will release in 3 weeks a new version that provides custom namespace to reduce the bulky config
  • The JAX-WS RI now uses Spring as an extension point.
  • New:
    • <jee:jndi-lookup id="dataSource" jndiName="jdbc/StockData"/>
    • <util: namespace, etc.
  • Multiple beans to one custom structure...
  • Example: <tx:annotation-driven/>
  • Steps for Authoring Custom Extensions
    • Write an XSD to define the element content
    • Implement a NamespaceHandler interface, Spring will generate of this marker
    • Register in META-INF/spring.handlers
    • Import using standard XSD conventions in Spring config.xml
  • Only use custom namespaces for things you do ALL the time, as it does introduce non-standard complexity for team
  • Spring 2.1 Stuff
    • Released this week (JavaOne) Final in early July
    • Allows annotations for config as well as xml @Component class level, @Autowired on instance variables
    • @Aspect, @Pointcut, @After, @Before, etc.
    • JCA 1.5 support
    • Further JPA support
    • <context:annotation-scan base-package="demo" /> to filter annotation scanning
    • Key difference, annotation configuration is per class whereas xml can also be per instance
  • Scaling out Spring
  • Consume objects written in dynamic languages
  • Scale out through integrations with 3rd party products
    • i.e. Grid products, OSGi, etc
  • Avoids assumptions about environment in API so easily applicable in Grid (Tangosol/Oracle example)
  • SCA enabled by Spring
  • Interface21 is member of Open SOA
  • OSGi
    • Doesn't currently support injection
    • Complementary Technologies
    • Injection/AOP component model
    • Dynamic runtime model
    • Spring OSGi Goals:
      • Use spring to configure bundles
      • Easier to publish and consume services accross multiple bundles
      • Enable apps to be coded without dependency on OSGi APIS (easier unit and integration testing)
      • Provide the needed bundles and infrastructure to deploy OSGi based apps to app servers
      • Led by Interface21 supported by OSGi and others vendors
      • Spring modules will be packageable as OSGi bundles
      • Export and Import OSGi services from Spring context
      • Example: <osgi:reference … <osgi:service
      • OSGi is a rigorous approach to visibility (bundle classloading)
      • Versioning is also inherent to OSGi bundles
  • Spring Security will be the new name for Acegi
  • Will be bundling for purpose-driven downloads (i.e. Web Flow with Security, etc.)

Unleashing the Power of JAX-WS RI: Spring, Stateful Web Services, SMTP, and More

  • Speaker(s): Kohsuke Kawaguchi, Jitendra Kotamraju
  • Using spring for deployment
  • Create a handler bean and a service bean, inject the handler to the service
  • Can also export over JSON for JavaScript clients
    • @BindingType(JSONBindingID.JSON_BINDING
    • Any JAXB bindings are supported for JSON format
  • SFSB
    • @com.sun.xml.ws.developer.Stateful
  • public static endpoint declaration
  • EndpointReference return type via manager.export();
  • SFSB using proprietary API but standard on the wire for WS-Addressing
  • Transports
    • In-VM Testing, developing, very fast, why use a true transport layer
    • Example: <in-vm:bindings id="books"><in-vm:endpoints><ws:service...
    • JMS
    • One queue for req and a temp queue for response
    • SMTP - Nice for asynchronous, and firewall friendly
    • Example:
    • <wsm:smtp service=#gretting..." incoming= outgoing= />
    • <wsm:sender id= host= from= />
    • <wsm:pop3 ...
    • SOAP/TCP
  • Part of WSIT in GlassFish v2, configurable in NetBeans
  • Additional Headers...
  • Type cast proxy to WSBindingProvider
HelloPort proxy = ...;
WSBindingProvider bp = (WSBindingProvider) proxy;
Header h = Headers.create(new QName("hdr1"), "mystr1");
bp.addOutboundHeaders(h);
  • Multiple Services Instances
  • To handle concurrency issues with @WebService pojos
  • WebServiceContext can be used to get HttpSession
  • Use @HttpSessionScope to declare one service instance per HttpSession
  • No need to store your state to HttpSession, instance variables are fine
  • Use @ThreadScope to not have to write ThreadLocal type boilerplate for threadsafe resources
  • Scope by session, thread, request, etc
  • Can create instances using a custom policy
  • Monitoring and Logging...
  • enable client and server transport logging (system properties)
  • com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true
  • com.sun.xml.ws.transport.http.HttpAdapert.dump=true
  • Server Side Asynchrony...
  • The AsyncProvider doesn't immediately turn a response to avoid blocking, use a callback to receive response
    • AsyncProviderCallback
  • RI is used in GlassFish, BEA 10, TmaxSoft JEUS6,JDK 6

Gosling's Toy Show

  • Project Dlight (cool diagnostic tool)
  • Sun Compute Grid available on network.com, provides web services, takes spreadsheets, etc, 200 CPU hours for free
  • Tor's Demo of NetBeans Rails support, bottom up JPA generation, etc
no comments | post comment
Describe here what your SnipSnap is about!

Configure this box!

  1. Login in
  2. Click here: snipsnap-portlet-2
  3. Edit this box
www.brandonburk.com | Copyright 2008 Brandon N. Burk