The next day, the Javaone meeting gradually entered better. Marc Fleury's speech, JBoss AOP display, Rave (Sun's new Java development tool) Demo, "agile method vs. mda", "design mode of heavy load website", J2SE 1.5 new security features ... I have already coveted Three feet. If you can participate in this day, you will be happy with Marc Fleury, Joshua Bloch, Richard Oberg, and more happiness.
------------------
THSERVERSIDE @ Javaone 2003
By Dion Almaer, Nitin Bharti, Stuart Charlton, Doug Bateman, Frank Cohen Day 1 | Day 2 | June 2003
Discuss this article
The Wednesday morning keynote looked at the new Java.net portal, stirred some controversy amongst Jython supporters, and gave a demo of Project Rave. Throughout the day and into the evening there were several key, forward-looking talks and discussions on EJB 3.0 by Linda DeMichiel. JBossTwo featured 'The Marc Fleury Show' and a fascinating AOP Panel. Other sessions covered at JavaOne were 'Agile Methods vs. MDA', 'Design Patterns for Heavy Load Websites', Web Services EAI using JCA, and New Security Features IN J2SE 1.5.
Wednesday Morning General Session: java.net, Jython Slighted, What's all the rave?
At the general session on Wednesday morning more was talked about the new developer portal http://www.java.net. The site is edited by Tim O'Reilly and the chief web dog is James. Tim describes himself as the Colonel Sanders of the site; he jokes that it's really a group of O'Reilly Associates editors that will be editing the site Rumour has it that java.net is a private-labeled version of SourceForge with a bunch of new bells and whistles added (blogs,. Wikis, forums.) SO it is open for anyone to Host a public project, Open-source projects include.
There seems to be lack of support for Jython at Sun. To thier credit Sun did mention Jython when talking about JSR-223 (Java support for Scripting Languages) and scheduled a birds-of-a-feather session. However, Jython was slighted too : The Bof Would Would Start At 11:20 PM, And Tim O'Reilly Messed Up and Said "Jython IS A Good Combination of Pearl and Java." He Meant To Say Python and Java. Sun Seems To Be missing-the-boat on what Jython really brings to Java: "! It's the byte-Codes Stupid". Jython compiles into Java byte-codes and runs natively on the Java VM to a Java developer that means full access to all of Python's objects and also to all of Java's objects. Sun should throw away JSR-223 and start again. They should start by writing a specification that lets all scripting languages compile to Java byte-codes. that would be progress.Project Rave looks just like Visual Studio.NET but everything is real Java. Sun Showed Building a Web Application Using JavaServer Faces. Rave Features A SIMP le graphical layout tool and provides standard JDBC rowset support. Rave style sheets control default colors, type, sizes, and styles. The query editor provides mapping to define SQL schemas. Datasources use standard JAX-RPC calls to make Web Service calls. To make IT a Perfect Demonstration, The Example Code CraShed During The demo. NOT to be outdone by a crash
JBosstwo
THE DOORS WERE Meant To Open at 9:30. The people here mussed the Morning Javaone Keynote, And Wern't Let In. The Security Guard Wouldn't Answer Anyones Questions :)
The operation was not slick like JavaOne, but it felt kinda nice. This was a small, cozy area for people to talk about things. The music that was playing in the theatre was from Windows Media Player on Marc's laptop. As he closed down His Apps, One Were Several Emails Showing, One with "Core Dev Network" in the title "split" Outside of the conference, and most of the control ... and most One That Didn't Have to Hurt Jboss At All. Would Marc Mention It? Not Directly, But There Were Some Subtly Comments. "... All of the developers here understand ...", "We Are Staffed As We Want To BE Right now, ETC.
Marc took the stage, letting us know that "Today is the Marc Fleury Show". It certainly was, he was presenting and moderating all day. You know who is at the wheel of the Jboss bus. He started the morning with an introduction, That Was on The Lines of The Blue Whitepaper. A Core Message WAS "Open Source Is Safe".
He delved into the AOP framework, and what he thinks it means. He thinks that for users, "AOP is trivial". Writing the aspect framework, and aspects are complex, but using them is very easy. "Microsoft got it right wrt ease of use ". Sound familiar? (there's a whole lot of ease of use talk going on). The holy grail is complete non-invansive system code. An application developer should not have to care about system fluff, they should be building business applications .
.
Can We Leave the app guys in j2se? Marc think we can, and we shop.
Some Questions That Came Up: Q. "ISN '' t" "marc:" You don't have to. Jboss haas already debugged the assects for you. They area "[Can you EVER JUST TRUST SERVICES LIKE THESE?]
Q. "IF WE JUMP INTO THE New JBOSS WAS OF DOING Things with Pojo's And Aspects, Haven't WE LOST Interopobility?" Marc: "Do You Mind BEING Stuck In A Free World?"
Q. "How do you roll back a call chain?" MARC: "This Requires a Versioning System with a state change". There is already some support for this "
Q. "Can We Be Assured That JBoss WILL Continue To Support The Full J2EE SPEC?" Marc: "REST Assured."
* * *
The JBoss core developers were brought on stage and introduced next, and then a customer panel was introduced. The panelists were all proponents of JBoss, and Marc probed them to get info of their successes, and to show that JBoss is a solid production product, AND That the jboss group is a good organization.
* * *
The part of the show that people were waiting for was the AOP panel The panel consisted of Dean Wampler of Rational. (Now IBM:! Or "I've Been Moved" as he called it), Professor Shigeru Chiba (javassist, bytecode level Library, Creat), and Bill Burke (JBoss Chief Architect). Marc Moderated of Course. Each of the Participants Went Through Some Slides On What They Thought AOP WAS About.
Dean:
We modularized the problem domain with OOP- He thought the push behind OOP was GUI development We modularize the cross cutting concerns with AOP- He thinks that the widespread development of distributed apps will spur AOP
The Rational side of him only came out when he talked about the idea that Use Cases can be mapped as aspects themselves I think this slide existed to fulfill the prophecy that all Rational slides have to have some use cases on them.The Prof.:
Shigeru had slides that were trying to progressively make a point. However Marc kept butting in, and not letting him just go through the motions. This led to funny moments of "er, just let me go to the next slide ... and voila ! ". He answered the" is debugging aspects hard? "question by saying that tools need to help out, and reminding everyone that people used to say that polymorphism is bad, as it makes debugging hard. When an example was shown, that had A Tracer, Marc Groaned "Not a logging example". When you see anything to do with aop, logging is always the example .... So One Can Feel Marc's Pain with That One. With OOP We Have "IS A", "HAS A", "IS Part of", etc. AOP Now Gives US A Way to Express "Needs".
Bill:
Instead of saying "AOP compliments OOP", Bill made a great slip of the tongue and said "AOP complicated OOP". That got a good laugh. Bill showed some demos of the JBoss AOP framework It was interesting to see that you can even weave The setting of fields, eg
tx.begin ();
Some.field = 2;
Some.Otherfield = "whee";
...
TX.comMit ();
IF The Transaction Failed, The Aspect Could Roll Back The Field Values To What They Were Before The TX Began. Compare That To What We Have in J2EE NOW.
THIS CAN't Even Be Done In Most Areas. Stateful Session Beans Can Let Us Do THINGS LIKE THIS, But Not WITHOUT A LOT OF WORK. WILL THIS mean the end @ () get * () Methods?
Agile Methods vs Model Driven DevelopmentBorland chief scientist Blake Stone's session "Model vs Code, Practical Strategies for Agile Developers" drew quite a crowd. During his session, Blake described the many synergies that can exist between Agile Methods and Model Driven Development, guiding developers on how to strike a balance between the two extremes. Lashing out at the misconception that software may one day be written strictly using modeling tools, Blake argued "Code is not going away. Modeling will not replace traditional coding any more than the written word Will Be Replaced by Picture Books. "On The Flip Side, He POINTED OUT, A Picture Can Be Worth A THOUSAND WORDS. It's a tradeoff Between Precision of Code and Information Density of Diagrams.
For any given problem, "you're going to look at the densest, most accurate way of communicating." Sometimes the formal grammars of code will most effectively communicate the system to future programmers. Other times, we want the distillation provided by pictures. "Why choose just one? Use diagrams to clarify code," explained Blake, as he demoed TogetherJ's ability to keep system diagrams in sync with application code, providing highly agile, model driven, development. The fundamental realization "models and code are" two SIDES of the Same Coin, You Simply Can't Separate Them. "
EJB 2.1 Architecture and A Preview of EJB 3.0
Linda DeMichiel, spec lead for JSR 153 (EJB 2.1) and JSR 220 (EJB 3.0), spoke Wednesday afternoon to a near capacity crowd on the new features of EJB 2.1 The discussion on EJB 2.1 outlined familiar new features:. Improved Web services support , the Timer Service, extension of MDB's beyond JMS, and support for the ORDER BY clause in EJB-QL.She did a walk-through of how to implement a Web service in EJB using a JAX-RPC interface, which enables the sending and receiving of messages to look like regular RPC calls to a client. She showed the code for a Web service endpoint interface and the client view of the Web service. Mildly amusing, but it seemed the crowed was really waiting to hear more about EJB 3.0.
If the focus of EJB 2.1 is Web services, then the main theme of EJB 3.0 will be ease of development. JSR 175 on metadata annotations, aims to get deployment descriptors out of the developer's way. At the same time, she emphasized that we should be careful how we use metadata. "We do not want to shovel a deployment descriptor into an EJB class file." The spec will also 'leverage defaulting' (using stateless session beans as a default since stateful beans are rarely used). Another ease-of-use item will be the use of factory patterns (or something more user friendly) in place of cumbersome JNDI lookups. And of course, when she said "deployment descriptors must die!", the crowd broke out into applause.
To prove her point about ease-of-development, she compared the way we write EJBs today to the way we WILL write EJBs tomorrow. She showed code for a 'simple' HelloWorld Stateless Session bean, with all the required methods, the implementation of home and remote interfaces, the deployment descriptor, etc. This was all replaced with 5 lines of EJB 3.0 code. An @session annotation in front of the class name and an @remote in front of the getter and voila, all the complexity of lifecyle methods and interfaces has been avoided Cheers and applause ensued when the slide for the deployment descriptor was shown for this ejb:! it was blank.Birds of a Feather Sessions - Future of EJB spec, JMX Demo
Linda continued her EJB crusade in the evening with a 2 hour marathon session with hard core EJB developers, holding a "town hall" style discussion where EJB developers could give feedback to which features and simplifications to prioritize for the upcoming EJB 2.1 and EJB 3.0 specs . Judging by the issues raised, it was clear this crowd wanted to see new features and capabilities in the EJB more than improvements in "Ease of Development" as Sun has prioritized. As one developer put it "I think ease of development is very oversold "Quietly Admitting" I really don't want to see the army of vb developers coming inten the hard-core ejb developers Had Been Attracted to this session.
Topics discussed for potential inclusion in future releases of EJB included standardized hooks in Message Driven Beans for handling poison messages, instance level security checks for entity beans, more flexible security group mappings and rules, support for adding arbitrary interceptors (a favorite feature of those familiar with JBoss's design), and portable descriptors for mapping entity beans to databases. The subject of deprecating EJB entirely in favor of Aspect Oriented Programming also briefly came up, but it was clear Linda and a significant portion of the crowd felt AOP needed to mature in Terms of Best Practices and Design Patterns Before EJB Could Be Effectively Replace by Aop.Features People Asked
Instance based security: Basically, the security model does not work for a LOT of people in the real world The simple declaritive model only works for simple cases, and it needs to be made more flexible There was talk of being able to plugin.. rules engines Interceptors:. People really want to see these Even the future (AOP) was mentioned Deployment descriptor defaults:.. People would like to put in default values for the items that we always have to put into vendor specific files for example,. let us just put in the damn JNDI name, and <* - ref> end points etc etc. Mapping standard: If you use CMP, and use multiple app servers, the mapping is totally different some people want to try to have some kind. of base standard that would work as a default, and minimal information Clustering:.. Quality of service items like clustering have always been kept out of the spec, but people would like some guidelines standardized There * is * always a difference between writing code to A Single Server, or to a cluster of servers (programatically you may want to retry methods on a stub if something went wrong on an idempotent operation) Threads:. This is enterprise computing, and sometimes you want to be able to spawn threads to do parallel work, and do not want to use JMS to get this affect It would be nice to be able to context.getThread () that would give you a safe thread from a pool Transaction Timeout configuration:.. There are some times, when you know a certain operation needs a long tx timeout (as it will take awhile) Instead of having to drop to bean managed transactions, how about being able to use declaritive programming to set a longer timeout that the default for a particular method / bean EJBQL..:
Dynamic EJBQL: There was a hint that this will be in EJB 3.0 Would be nice to be able to run queries that return a data structure which spans multiple tables, without having to go to multiple entities At the moment people use fast reader patterns.. TO BYPASS EJB for this taskthings people Want to change / PEEves:
* NOTE: We Are Too Far Down The Road to make a lot of these change;) *
Stateless Session does not make sense It should be:! Service Bean - what a stateless sb is now Session Bean - what a stateful sb is now Split interfaces and make methods that make sense Instead of having ejbRemove () mean totally different things, don 'T Try to Put As Much in The EnterpriseBean Interface But Do The Right Thing (TM) .service Bean: No need for ejbactivate / passivate etcentity bean: Ejbdelete, EJBINSERT, ETC
Ease of development vs. Enterprise Objects
We all know that EoD is the big thing at J1. Some of these features "do seem to not help with EoD". However, people quickly mentioned that these items are NEEDED FOR ENTERPRISE DEVELOPMENT. These are Enterprise JavaBeans are not they? Sure Cleaning Up EJB WILL BE Really Nice
IT is going to be very intending to see the impact of metadata, and how we may not have don't want / need them.
Following Linda's BOF, BEA JMX architects illustrated how JMX can be used to gather performance monitoring and tuning statistics in "J2EE Performance Monitoring and Tuning Using JMX". Utilizing Petstore as an example, developers were shown how to create "JMX Loggers" to log active thread counts, entity cache hits, leaked connection counts, and other critical performance data to a log file at 2 second intervals during load testing. Then this logged data was shown plotted versus both time and load so that developers could then see a clear picture of THE Potential Performance Bottlenecks as Their Applications Scale.technical Session: Design Patterns for Heavy Load Websites
The developers from the Wall Street (WSJ.com) website presented their strategies for designing heavy load websites. WSJ.com, originally on Vignette / TCL, now runs on J2EE 1.3 using a combination of Struts, JSTL, and Web Services Journal. It uses Web services to provide flexible licensing of its content and services to provide WSJ content in various venues, and to slice its content in a variety of ways, and has heavy reliance on authentication and authorization mechanisms with its Web services and web applications.
The MVC paradigm is pervasive in WSJ's architecture, and they spoke at length about the various design tradeoffs possible with Struts, and how Struts definitely stood up to the challenge of delivering a large scale, high volume website, that serves over 700,000 subscribers.
Technical session: Designing Scalable Servers
.......................... ..
In this advanced session, the speaker proposed a set of six different architectures for servers, micro-benchmarking them against Apache 2.0.42 for small file (1 KB) operations and thttpd 2.20c for large file (1 MB throttled to 56kb / sec) operations. httperf from HP Labs measured the small file operations benchmark, and http_load (from the same author as thttpd) measured the large file operations. The test server was a 4x480 MHZ Sun Enterprise 450, as were the two client machines in the load test , all connected with point-to-point Gigabit Ethernet.The six proposed architectures for the servers were: 3 Blocking I / O Servers: Single Threaded, Multi-Dedicated Thread, Multi-Thread Pool 3 Non-Blocking I / O Servers: Single Threaded, 2 threads, and 4 threads
Both approaches used the java.nio. * APIs, except that the last 3 architectures took advantage of the new java.nio.Selector approach to multiplex many concurrent socket channels. The blocking I / O servers would be the only way that old-style Java.io based servers could be written.
The speaker took us through the source code to each of the first three blocking I / O architectures, beginning with a server that was designed in the prior session on "Building a Simple Server". The Multi-Dedicated Thread server was nearly on par with THTTPD for large file operations, and the multi-thread pool server WAS NEARLY ON PAR with BOTH APACHE for Small Files, And THTTPD for Large Files.
Unfortunately, both approaches were scarred by having a linear increase of memory requirements as the server load increased, getting so bad that for large file operations, the Java server required over 600 MB of resident set size (RSS), whereas thttpd only required 8 MB !
The speaker then digressed to explain the java.nio.Selector model to the audience, showing gradually more complex examples, up to the actual single-threaded non-blocking web server. The single-treaded server exhibited somewhat chaotic behavior, and generally poor performance . The two-thread server dedicated one thread to accepting incoming connections, and one to dispatch data to all other connections. The four-thread server dedicated two threads to accepting and two threads to dispatching.The four-thread server surprisingly showed near-on -par Performance With Both That THTTPD AND APACHE, WITH INLY MEMORY Consumption Being The Major Difference (200 MB of RSS AT PEAK, Though The Growth Was Not Linear).
! Many of the performance results in this demo were the result of changes in J2SE 1.4.2, so be sure to grab it It's clear that the Java NIO API works quite well for what it was designed to do: provide the Java language with the Ability to Write Servers That Can Be Potentially As Scalable As Native-OS Servers.
Complementing Web-Services-Ready Eai with the J2ee Connector Architecture and Federated Authentication
THIS TECHNICAL SESSION SPOKE TO The SYNERGIES BETWEEN THE J2EE Connector Architecture (JCA), Web Services, and Federated Identity Management With Project Liberty.
Enterprise Application Integration (EAI) is a large marketplace for tools to increase the productivity of integrating disparate legacy applications both within and outside of companies. In large part, the biggest hype in EAI today is the impact of Web services on integration technologies.
The tradeoff with Web services is that they tend to be somewhat intrusive on the legacy: one would need to wrap the legacy service in the legacy development environment and generate XML out of that, something that might not be very productive if the environment is very old , brittle, or lacking XML tools.The J2EE Connector Architecture (JCA), on the other hand, provides a non-intrusive way of integrating with legacy systems, because it relies on a connector, which is effectively a "device driver" to talk To the legacy system.
The final challenge in cross-systems integration is about federating identity among the servers collaborating together, and facilitating single sign-on. Project LIberty is a Web services enabled approach to asserting credentials and mutually authenticating servers.
Put together, the J2EE application server serves as the perfect hub for integration, by providing for JCA access to legacy systems, wrapping this JCA access with a Web service, and then enabling this Web service to be part of a federation of servers that share identities .
The productivity of the J2EE environment allows you to leverage your legacy investments and add to them using the emerging Web services technologies for integration and security. The talk showed code and diagram examples of using the JCA, Project Liberty, and JAX-RPC toolkits, and Screenshots of an end-to-end demo That Was Developed Offsite.
J2se Security Looks Ahead: New Features from Cryptography TO XML Security
THIS Security Session, Hosted by Two Members of Sun's J2se Security Team, Gave A Detailed Overview of Wheree The Security API'S Area Today, in J2SE 1.4.2, and where they're headed to in j2se 1.5.
J2SE 1.5 Will include Major Enhancements to Cryptography, XML Securitiy, Public Key Infrastructure (PKI), Kerberos, And Ease of Maintenance.in Particular, J2SE 1.5 Will:
Make the cryptography API ready for Elliptic Curve Cryptography (ECC), an emerging approach to cryptography algorithms. An ECC provider may be provided after 1.5, depending on demand. Allows you to encrypt and decrypt to java.nio.ByteBuffers Provide support for PKCS 11 , the de facto, standard cryptographic token interface. This will enable JCE to leverage external cryptographic providers such as smart cards, hardware cryptography accelerators, and optimized native-platform crypto implementations. XML security will support both XML Digital Signatures and Encryption / Decryption. These efforts are supported by JSR's 105 and 106, with JSR 105 still in public review until June 29th. These JSRs Java-enable several W3C recommendations including XML Signature Syntax and Processing, Exclusive XML Canonicalization Algorithm, XPath Filter-2 Transform Algorithm, and the XML ENCRYPTION SYNTAX AND Processing. Allow Certificate Revocation Checking Via The Online Certificate Status Protocol (OCSP), ALL owing the Java platform to validate certificates without having to carry around cumbersome CRLs. Include a helper class known as SSLEngine that will enable any java.io stream or java.nio channel to leverage SSL. US export restrictions have been relaxed, and now Sun will Allow for Full Pluggability of the underlying ssl usteation.