Professional Documents
Culture Documents
PAGE 16
No. 1 i-Technology Magazine in the World
Software Giveaway
T H E W O R L D ’ S L E A D I N G i -T E C H N O L O G Y M A G A Z I N E W W W. S Y S - C O N . C O M / J D J
From the Group Publisher
A
Contributing Editor: Michael Yuan s Sun open-sources Solaris, out of the room and letting the techni-
Founding Editor: Sean Rhody
and another software develop- cal people do their thing.” A noble aim,
ment “community” is tugged as any developer would agree; though
Production
Production Consultant: Jim Morgan into being around it, critics are it’s by no means clear that managers
Associate Art Director: Tami Lima saying – Red Hat’s general counsel Mark are without a role to play, and many are
Executive Editor: Nancy Valentine
Associate Editors: Jamie Matusow Webbink in particular – that the strategy indeed active in the JCP.
Gail Schultz will fail. In last month’s JDJ David Parsons, Ilan
Assistant Editors: Natalie Charters “It is much harder to build a commu- Kirsh, and Mark Cranshaw looked at the
Seta Papazian
Online Editor: Martin Wezdecki nity around pre-existing software than Java Technology for the Wireless Industry
Research Editor: Bahadir Karuv, PhD one might believe,” Webbink declared, specification, a recent example of the JCP
in a statement to the press. (Red Hat seeking to help establish a set of industry-
Writers in This Issue and Sun are particularly fierce rivals just wide goals and expectations for Java-
Calvin Austin, Paulo Caroli, Bruno Collet,
Jeremy Geelan, Eric Giguère, Michael Havey, now, as anyone knows who has not been based applications and services through
Alexander Krapf, Bahar Limaye, Warren MacEvoy, asleep in a cave for the past 12 months.) the JSR-185 Java Technology for the
Peter V. Mikhalenko, Dave Parsons, Ken Sipe,
Susan Vickers, Joe Winchester, Michael Juntao Yuan Sun on the other hand is adamant Wireless Industry (JTWI). And in this issue
To submit a proposal for an article, go to about the importance of such a commu- we have a full-fledged feature looking at
http://grids.sys-con.com/proposal
nity. “The opensolaris.org Web site will the JCP from various perspectives, not
be the center for OpenSolaris least that of its current
Subscriptions
For subscriptions and requests for bulk orders, please send your
activity,” it writes on the site’s chairman and longtime
letters to Subscription Department: main page, adding: “Commu- JDJ contributor and
888 303-5282 nity involvement and input is advisor, Onno Kluyt.
201 802-3012
subscribe@sys-con.com critical to the success of the Java architect and
Cover Price: $5.99/issue. Domestic: $69.99/yr. (12 Issues) OpenSolaris program. If you instructor Allen Holub
Canada/Mexico: $99.99/yr. Overseas: $99.99/yr. (U.S. Banks or want us to update you on major recently wrote “bad
Money Orders) Back Issues: $10/ea. International $15/ea.
events such as the availability of standards are destruc-
Editorial Offices buildable Solaris source code, tive. Just look at creat-
SYS-CON Media, 135 Chestnut Ridge Rd., Montvale, NJ 07645 please provide us with your e- ed-by-committee junk
Telephone: 201 802-3000 Fax: 201 782-9638
mail address in the text box on like EJB and JSF” – and
Java Developer’s Journal (ISSN#1087-6944) is published monthly
(12 times a year) for $69.99 by SYS-CON Publications, Inc., 135 the right.” in the same opinion piece declared: “My
Chestnut Ridge Road, Montvale, NJ 07645. Periodicals postage It set me thinking whether “communi- outsider view of the Java Community
rates are paid at Montvale, NJ 07645 and additional mailing
offices. Postmaster: Send address changes to: Java Developer’s ty involvement” is actually the philoso- Process is that it doesn’t work.”
Journal, SYS-CON Publications, Inc., 135 Chestnut Ridge Road, pher’s stone that everyone seems to think But the JCP community is an impor-
Montvale, NJ 07645.
it is. Sometimes I find myself wondering, tant place for developers to be involved
©Copyright for example, what those who had the idea in. With the JCP version 2.6 in place now,
Copyright © 2005 by SYS-CON Publications, Inc. All rights reserved. No of naming the “Java Community Process” the community gets even more opportu-
part of this publication may be reproduced or transmitted in
any form or by any means, electronic or mechanical, including
(JCP) were smoking. How much better nity to influence and contribute to stan-
photocopy or any information storage and retrieval system, without it might have been, in hindsight, to have dards while they are being developed.
written permission. For promotional reprints, contact reprint
coordinator Kristin Kuhnle, kristin@sys-con.com. SYS-CON Media and called the JCP just the JC, the Java Coun- Probably Churchill’s observations Jeremy Geelan is
SYS-CON Publications, Inc., reserve the right to revise, republish and cil – or some such name that allowed it about democracy apply. “Democracy is group publisher of
authorize its readers to use the articles submitted for publication.
to achieve its aim of cultivating a wider the worst form of government,” he fa- SYS-CON Media and
Worldwide Newsstand Distribution participation in the specification of new mously said, adding “except for all those is responsible for the
Curtis Circulation Company, New Milford, NJ
For List Rental Information:
and existing Java APIs, the “process” part, others that have been tried.” As with development of new
Kevin Collopy: 845 731-2684, kevin.collopy@edithroman.com without burdening it with the additional democracy, so with the JCP. And so, too, titles and technology
Frank Cipolla: 845 731-3832, frank.cipolla@epostdirect.com
notion of “community” which to this day with OpenSolaris.org. While everything portals for the
Newsstand Distribution Consultant
Brian J. Gregory/Gregory Associates/W.R.D.S. seems to be as much a bane as a boon. could always be better, things could be firm. He regularly
732 607-9941, BJGAssociates@cs.com Unlike that other JCP, the Japanese an awful lot worse. represents SYS-CON at
Communist Party, which was founded in So if a community – whether it is the conferences and trade
Java and Java-based marks are trademarks or registered
trademarks of Sun Microsystems, Inc., in the United States and 1922, the Java Community Process was JCP, OpenSolaris.org, or anything else shows, speaking to tech-
other countries. SYS-CON Publications, Inc., is independent of founded only in 1998 and has guided the – isn’t the way you’d like it to be, first nology audiences both
Sun Microsystems, Inc. All brand and product names used on
these pages are trade names, service marks or trademarks of development and approval of Java tech- join it; then change it. As the playwright in North America
their respective companies. nical specifications since then. James Henrik Ibsen once wrote: “A commu- and overseas.
Gosling was quoted in 1999 as saying the nity is like a ship, everyone ought to be
JCP was all about “getting the managers prepared to take the helm.” jeremy@sys-con.com
42 Hosting
...the direct way
36
Features
ActiveX/.NET
Controls
in a Java Application... Web Services and XML Special
by Stanley Wang by Onno Kluyt
Open Source, Open Sesame? Why Use Extreme Programming? Software Testing Shouldn’t Be
by Jeremy Geelan Not just another development methodology Rocket Science
.................................3 by Troy Holmes
.................................16 by.................................40
Joe Winchester
24
Reviewed by Mark Euler
.................................28 .................................48
by Calvin Austin
TECHNOLOGY
ENTERPRISE
Opening Java Projects up to JSR WATCH Migrating Enterprise Applications
Design a Reference Data Service Open Source From Within the Java Community Between J2EE Application Servers
in J2EE Application Server Clusters The open source community has Process Program by Ajit Sagar
Improve the overall system performance room enough for all Java technology interfaces for Web services
by Di Li by Timothy Fisher by Onno Kluyt
.................................8 .................................30 .................................62 JDJ (ISSN#1087-6944) is published monthly (12 times a year) for $69.99 by
SYS-CON Publications, Inc., 135 Chestnut Ridge Road, Montvale, NJ 07645.
Periodicals postage rates are paid at Montvale, NJ 07645 and additional
mailing offices. Postmaster: Send address changes to: JDJ, SYS-CON
Publications, Inc., 135 Chestnut Ridge Road, Montvale, NJ 07645.
Students
Vice President, Business Development:
Yakov Fain Grisha Davida grisha@sys-con.com
Group Publisher:
Contributing Editor Jeremy Geelan jeremy@sys-con.com
Advertising
O
Senior Vice President, Sales and Marketing:
ne of my resolutions this year is • Colleges form teams of programmers Carmen Gonzalez carmen@sys-con.com
Vice President, Sales and Marketing:
to start teaching part-time Java- starting from the students’ junior year. Miles Silverman miles@sys-con.com
related classes in some college. Faculty members lead these teams. Advertising Sales Director:
That’s why I started browsing the Information about these teams (résu- Robyn Forma robyn@sys-con.com
National Sales and Marketing Manager:
computer science course lists that are be- més, previous projects, GPAs) has to Dennis Leavey dennis@sys-con.com
ing offered this year. While graduate-level be published on the Internet and be Advertising Sales Managers:
Megan Mussa megan@sys-con.com
programs offer many interesting courses, publicly available, and businesses need Kristin Kuhnle kristin@sys-con.com
the situation is different in the undergrad to publish their project descriptions so Associate Sales Managers:
world. student teams can bid on these projects. Dorothy Gil dorothy@sys-con.com
Kim Hughes kim@sys-con.com
Some schools keep teaching how to • Colleges make their labs, networks,
multiply matrices in Ada or work with and support personnel available for
Editorial
algebraic expressions in Prolog. Half the teams. If needed, businesses can Executive Editor:
of the courses are preparing profession- lease additional hardware to the col- Nancy Valentine nancy@sys-con.com
Associate Editors:
als who will be operating on another lege for the duration of the project. Jamie Matusow jamie@sys-con.com
planet. Information systems programs • Most of the students study Java pro- Gail Schultz gail@sys-con.com
look a little more down to earth. Mean- gramming during their freshman and Assistant Editors:
Natalie Charters natalie@sys-con.com
while, many college graduates are hav- sophomore years. Many Java compo- Seta Papazian seta@sys-con.com
ing a hard time finding their first jobs nents are available for free or through Online Editor:
Martin Wezdecki martin@sys-con.com
because many entry-level programmers open source licenses: IDE, version
jobs are being outsourced overseas, and control systems, project build tools,
Production
it’ll stay this way as long as it makes bug reporting systems, application Production Consultant:
financial sense for businesses. Unfor- servers, etc. Businesses will purchase Jim Morgan jim@sys-con.com
Lead Designer:
tunately, student loans have not been any additional required software for a Tami Lima tami@sys-con.com
outsourced… fraction of the cost using heavily dis- Art Director:
A catch-22 situation with experience counted academic prices. Alex Botero alex@sys-con.com
Associate Art Directors:
makes things even worse: we can’t hire • Business managers pick and interview Abraham Addo abraham@sys-con.com
you because you don’t have the industry teams for their projects based on the Louis F. Cuffari louis@sys-con.com
Richard Silverberg richards@sys-con.com
experience. How can I get this experi- college reputation, available skill sets,
Assistant Art Director:
ence if no one hires me? Some people location, and other criteria. Andrea Boden andrea@sys-con.com
try to find volunteer programming work • Business lawyers prepare a contract
to get a foot in the IT door. Some gradu- with a selected team that defines the Web Services
ates join open source projects, and some obligations of each party, deliverables, Information Systems Consultant:
Robert Diamond robert@sys-con.com
job applicants just lie on their résumés. cost of development, and potential Web Designers:
I have a plan: instead of outsourcing penalties. Stephen Kilmurray stephen@sys-con.com
Matthew Pollotta matthew@sys-con.com
projects to developing countries, busi- • The turnover rate is usually high on
Yakov Fain works as a Java nesses should offer them to the local col- the projects that are outsourced to
Accounting
architect for a major bank leges. I’m not talking about simple pilot developing countries, which won’t be Financial Analyst:
in New York City. He wrote or proof-of-concept projects; I mean the the case with student teams. On the Joan LaRose joan@sys-con.com
Accounts Payable:
the book The Java Tutorial real ones. This plan requires commit- other hand, there is a risk of not having Betty White betty@sys-con.com
for the Real World; an ment and the cooperation of academia developers during midterms and final Accounts Receivable:
e-book Java Programming and businesses. These are some thoughts exams. However, since the exam sched- Steve Michelin smichelin@sys-con.com
for Kids, Parents and that come to mind: ules are known in advance, the “freeze
SYS-CON Events
Grandparents; and several • Colleges have to include more classes time” can be planned accordingly. President, SYS-CON Events:
chapters for the book Java 2 on software engineering and modern • Most of the business managers dealing Grisha Davida grisha@sys-con.com
Enterprise Edition 1.4 Bible. technologies in the undergraduate with developers from other countries National Sales Manager:
Jim Hanchrow jimh@sys-con.com
Yakov holds a masters degree programs. Here are some of the can- complain that cultural differences are a
in applied mathematics. didates: Application Servers, Service- huge problem. Guess what? This won’t Customer Relations
For more information please Oriented Architecture, Design and be a problem if you outsource the proj- Circulation Service Coordinators:
Edna Earle Russell edna@sys-con.com
visit www.smartdata- Development of J2EE Applications, ect to students who live in the same Linda Lipton linda@sys-con.com
processing.com. Applying Design Patterns, Data country and speak your language. Monique Floyd monique@sys-con.com
Modeling, Business Intelligence, and JDJ Store Manager:
Brunilda Staropoli bruni@sys-con.com
yakovfain@sys-con.com UML. –continued on page 28
A
multitiered J2EE-based en- We can categorize business entities 2. Automated horizontal sync – the
terprise application is usually in a business domain into two groups: states of each object in different
deployed on multiple J2EE the static group that includes the enti- object repositories are kept in sync.
application servers running ties whose states can only be changed 3. Data access service – provides coarse-
on geographically separated machines. by end users, and the dynamic group grained interfaces to retrieve objects
It may also integrate the services dis- that includes the entities whose states and their relationships from the
tributed in heterogeneous applications may be updated through the business object repository. Shields the com-
within an enterprise (such as an ERP process. A sample of the static group plexity of location, access, transport,
application or a mainframe legacy ap- is a profile of a customer in a Web- and conversion.
plication). The Java application servers based banking system: the address of 4. When the state of an object in the
may also be grouped in clusters for scal- a customer can be updated by a bank legacy system is changed by an end
ability and high availability. Improving teller. A sample of the dynamic group is user, the change is immediately rep-
overall system performance is becom- an account of a customer: the balance resented at each object repository.
ing a challenging task. of an account may be changed through 5. Improving overall system perfor-
To build a high-performance J2EE the deposit, transfer, payment, or with- mance by reducing the remote
application, we will create a reference drawal process. method invocations between the
data service by downloading fre- A reference data service is a façade Web components and the EJB com-
quently used data from a mainframe that internally calls a mainframe ponents, and the communications
legacy system to each J2EE application legacy system that handles data for between the connector components
server, and design an efficient object all applications in an enterprise. This and mainframe legacy system.
repository to control object access article discusses an intelligent solution
and data synchronization with com- for a reference data service: create a Related Techniques
ponent-based analysis and design, cluster-wide object repository to store Publish/Subscribe Messaging Model
the publish/subscribe messaging the data changed only by end users The Publish/Subscribe messaging
model, the Java event model, the (usually saved in a mainframe legacy model (see Figure 2) enables an applica-
Immutable Object pattern, and the system) in the memory of each J2EE tion to send messages to a topic, and
Strategy pattern. application server. The following is a multiple subscribers to that topic receive
Before we discuss any performance summary of the benefits offered by this all the messages sent to that topic.
tuning strategies, let’s take a closer solution: In the reference data service solu-
look at J2EE-based applications. A 1. Automated vertical sync – the states tion, the in-memory object repository
typical J2EE application consists of of each object in any object reposito- distributes to multiple J2EE servers.
Di Li, a Sun Certified Web modules deployed on the presen- ry are synchronized with the underly- These servers are grouped into differ-
Enterprise Architect, is an tation tier, EJB modules deployed on ing mainframe legacy system. ent clusters. Some servers may be out
expert in the area of business the business logic tier, and connector
process modeling, enterprise modules deployed on an integration
architecture design, and tier and EIS tier. Figure 1 portrays a
software architecting. He has sample collaboration of components
over 10 years of experience in a typical J2EE application.
in software engineering The most time-consuming processes
and technical architecture. of the collaborations are the communi-
He worked in providing cations between the connector compo-
the end-to-end solution of nents and mainframe legacy applica-
financial services, e-business, tion, the JDBC accesses between the
and enterprise application data access components and database,
integration. and the remote method invocations
between the Web components and the
victor1998@hotmail.com EJB components. Figure 1 A sample collaboration of components in a typical J2EE application
of service and leave the clusters. Other mainframe system works as the event ensures that the state of the objects in a
servers may join the clusters and provide source, and the in-memory repository repository is synchronized with the un-
services. To keep data in sync among is the event listener. The event-based derlying mainframe legacy system, and
the servers, we use MQ JMS Pub/Sub refresh solution updates the reposi- the feature of the horizontal sync, which
messaging as the delivery infrastructure tory only when the state of an object is ensures that the objects are safely kept
of the event. It decouples the destination changed in the mainframe system. in sync in each J2EE application server.
of an event from the sender. The number
of message producers and consumers Strategy Design Pattern The Use Case:
can be dynamically changed. So the The Strategy Design pattern defines Employee Relationship Management (ERM)
repository in one server is not aware of a family of algorithms, encapsulates Our example is based on a Web-based
the existence of the repository in another each one, and makes them interchange- ERM System. There are two typical
server. The startup or the shutdown of able. Strategy lets the algorithm vary business entities in this domain: Project
one server will not impact the service of independently among clients that use it. and Employee. These two entities have
the whole object repository. In my solution for reference data many-to-many relationships: a project
service, the Strategy pattern is used to is developed by many employees, and
Java Event Model fulfill the task of initializing the object an employee may join one or many
The traditional solution of a refresh repository in each J2EE server. As shown projects. Only the end users can change
mechanism is based on a timer: the in Figure 4, the RepositoryController the states or relationships of these two
data in the memory is reloaded from component in the business-logic tier entities. This article illustrates that by
a legacy system only when the timer delegates that task to the MQConnec- storing the states and relationships of
expires. Any change that occurs before tor component in the integration tier. the Project and Employee entities in
the timer expires is not represented in The MQConnector fetches data from the in-memory object repository, the
the memory. The timer-based solution a legacy application and returns the reference data service solution not only
may also cause system overhead when result to the RepositoryController, which handles the state change of the busi-
the timer expires but the data is never completes the task of loading data from ness entities, but also their relationship
actually updated. a mainframe application to its in- change.
My refresh mechanism solution uses memory repository by calling its strategy Since the in-memory copy of the
the Java event model (see Figure 3), (MQConnector). Project entity and the Employee entity
which is based on the concepts of the However, the RepositoryController exist on each J2EE application server
event, event source, and event listener. component in the presentation tier (usually saved in the mainframe legacy
The event source object maintains a list sends that task to the ModelProxy system), any component deployed in the
of listeners that are interested in receiv- component. The ModelProxy calls J2EE application server cluster (such as
ing events that the source produces. the remote RepositoryController in a servlet component in a Web module)
When the Event Source object generates the business-logic tier to retrieve the can retrieve the states or relationships of
an event, it notifies all listeners that objects from its repository, and then the Project and Employee from the local
an event has occurred. The underlying returns the result to the RepositoryCon- in-memory repository rather than from
troller in the presentation tier. So the the remote mainframe legacy system.
RepositoryController in the presenta- For demonstration purposes, in
tion tier uses its strategy (ModelProxy) this article the solution for the refer-
to initialize its repository by getting the ence data service is built on an IBM
data from the RepositoryController in WebSphere Application Server and
the business tier rather than from the WebSphere MQ. But it could be any
mainframe application. J2EE application server and message-
oriented middleware that support the
Immutable Object Pattern Java Message Service.
The Immutable Object pattern
increases the robustness of objects Architectural Model Design
that share references to the object and The architecture of the reference
Figure 2 Publish/Subscribe Messaging model reduces the overhead of concurrence data service solution consists of three
access to the object. It accomplishes this components: the repository controller,
by not allowing an object’s state infor- the event handler, and the MQ Com-
mation to change after it’s constructed. munication Controller.
We use the Immutable Object pattern
to achieve the data integrity of objects MQ Communication Controller
stored in repositories. One object can The MQ Communication Controller
be read by any component, but can is designed for delivering the event of
only be updated or deleted by the Re- updating an object state to or from the
positoryController class. The Reposi- Repository Refresh Topic. It’s built on
toryController class implements both the JMS Publish/Subscribe messaging
Figure 3 Java event model the feature of the vertical sync, which model.
Event Handler the event handler of the event. The When an end user sends a request to
The event handler is designed for event handler first identifies whether update an object state (such as a Project
implementing the horizontal sync fea- the event is published by itself. If not, object) to a J2EE Web server, the servlet
ture among J2EE application servers. the event handler retrieves the object component calls the local repository
As shown in Figure 5, when a reposi- wrapped in the event (for example, controller in the same Web server. The
tory controller updates, adds, or deletes an Employee object), then sends the local repository controller invokes a
an Employee object (it could be a Project object to the repository controller. The remote repository controller in one of
object) from the repository it contains, it repository controller replaces the ob- the J2EE EJB servers by sending a project
generates an event of updating an object ject in the repository with the received object. The repository controller in the
state that wraps the Employee object. object. J2EE EJB server updates the related
The event handler is notified of this record in the legacy application, updates
event, and then it calls the MQ Commu- Repository Controller its repository with that project object,
nication Controller to publish this event The repository controller is designed and then creates an event of updating
to the Repository Refresh Topic. to provide data access service and an object state that wraps the project
When the MQ Communication implement vertical synchronization object. The event handler in the same
Controller receives an event from the between the in-memory object reposi- J2EE EJB server is notified of this event.
Repository Refresh Topic, it notifies tory and mainframe legacy system. Finally the repository controller in the
Web server updates its object repository
with the project object.
After an event handler receives an
event of updating an object state, it
retrieves the object (for example, a
Project object) wrapped in the event,
and then sends that object to the re-
pository controller. The repository con-
troller compares the timestamp of the
object it receives with the timestamp of
the object it contains to identify which
is the latest version of the object. (The
timestamp of an object is set when
that object is created and will never be
changed, so each object owns a unique
timestamp.) If it’s the latest version,
the repository controller updates the
object stored in the repository.
Figure 4 Loading data from a mainframe application to an in-memory repository Solution Model Design
Figure 6 shows the solution model of
a reference data service.
Summary
This article described a reference
“projects” and “employees,” for storing data service solution that can improve
all objects of Project and Employee in the overall system performance of
memory. It provides coarse-grained a multitiered J2EE-based enterprise
interfaces to access or maintain system. The core of the solution is that
these objects. It delegates the task of any components running in the J2EE
initializing the object repository to application server clusters can retrieve
the MQConnector or ModelProxy. The the state of the entities from the local
RepositoryController class also works object repository rather than from a
as the event source, which broadcasts remote mainframe legacy system. As a
the event of updating an object state result, the overall system performance
to its listener, the EventHandler class. is improved by reducing the remote
Listing 3 illustrates how to broadcast method invocations between Web
the event. components and EJB components, or
by reducing communication between
EventHandler Class the connector components and the
The EventHandler component in the mainframe legacy system. The solution
architectural model is implemented by is designed and implemented by com-
the EventHandler class, the UpdateOb- bining the following techniques and
jectEvent class, and the UpdateOb- technologies:
jectEventListener class in the solution • Design a refresh mechanism with
model. the Java event model.
Figure 6 The solution model of the reference data service The EventHandler class works as • Create a mechanism for maintaining
the event listener of the Repository- data integrity with the Immutable
cord the relationship between the Project Controller class and the MQEventSub- Object pattern.
business entity and the Employee busi- scriber class. If the event source is the • Implement a mechanism for initial-
ness entity. The “employeeIds” attribute RepositoryController, the Event-Han- izing the object repository with the
saves the IDs of all employees involved dler calls the MQEventPublisher to Strategy pattern.
in a specific project. On the other side, publish an event to the Repository • Build an event delivery mechanism
the “projectIds” attribute records the Refresh Topic. If the event source is with the Publish/Subscribe messag-
IDs of all projects that one employee has the MQEventSubscriber, the Even- ing model.
joined. Listing 2 shows how to retrieve all tHandler invokes the RepositoryCon-
projects for a specified employee. troller to update the states of an object Resources
in memory. Listing 4 demonstrates • Java Messaging Service Specification
Repository Controller Class how the EventHandler class processes 1.1: www.java.sun.com/products/
The Repository Controller com- a received event. jms
ponent in the architectural model is • Yusuf, K. (2003). Enterprise
implemented by a group of classes in MQEventPublisher Class and Messaging Using JMS and IBM
the solution model: the Repository- MQEventSubscriber Class WebSphere. Prentice Hall PTR.
Controller class, the Operator class, the The MQEventPublisher class and • Gamma, E.; Helm, R.; Johnson,
MQConnector class, and the Model- MQEventSubscriber class in the solu- R.; and Vlissides, J. (1995). Design
Proxy class. tion model implement the MQ Commu- Patterns: Elements of Reusable
The RepositoryController contains nication component in the architectural Object-Oriented Software. Addison-
two collection types of attributes, model. Wesley.
Why Use
Extreme Programming?
by Troy Holmes
E
xtreme Programming (XP) enables and requires modular design. simple requirements that must be met
has been an accepted form of This process can transform a large de- by the software. It is important to note
software development for about velopment effort into a smaller, task- that user stories captured during the
eight years now. Many of the oriented endeavor. This can be crucial planning phase should be high level
concepts found in this lightweight when dealing with a project that must and should not include any techni-
method of development have been support changing customer require- cal jargon. In addition, stories should
implemented into the software shops ments. The waterfall method typically be small enough to implement in no
without even the awareness that they requires too much time and results in more than three weeks. These stories
were XP techniques. XP takes many of a completed development project that should not be longer than a few sen-
its fundamentals from other iterative is outdated by the time it is released. tences and should provide enough de-
development methodologies, includ- XP was created to give the customer tail for the developer to estimate the
ing RAD and JAD. However, unlike a method by which to prioritize the time required to implement. During
those methodologies, which are more requirements for software, thereby development, the programmer should
of a rapid prototyping approach, XP enabling the best bang-for-the-buck ensure the understanding of the user
creates individual components that approach. story by communicating his or her
can be quickly developed and inte- version of the implementation with
grated into a larger software system. Key Concepts of XP the customer. This information will
This article is written with the intent This methodology is designed be used to generate acceptance test
to help software developers under- around the typical common sense code, thus making sure that customer
stand the key concepts of this meth- approach to development; however, requirements are met.
odology and to provide a framework these fundamentals are outlined in
for implementing these processes into detail to ensure your Designing
a business. understanding and The design phase should be
to highlight their a time to validate overall func-
History importance. tionality while also focusing on
XP was created by Kent Beck and the details of the individual user
Ward Cunningham back in 1996, dur- Planning stories. One of the key
ing a development project at Daimler Planning is the concepts to keep in mind
Chrysler. Beck and Cunningham cornerstone of any during the design phase
felt it was time for a better develop- project’s success. is to keep it simple. It is
ment process because the standard During the planning extremely important that
Troy Holmes works as a waterfall method left too many gaps cycle, it is important developers do not add
senior architect for Prizum and resulted in far too few successful to communicate unnecessary complexity
Inc. in Reston, VA. He has implementations. The fundamental with the customer to during the initial design.
been working in the IT goals of XP were to increase commu- determine the scope and the XP promotes the idea of
industry for more then 15 nication, simplify the development schedule of the project. These refactoring code; refac-
years, with six years process, and obtain feedback from the two factors are used in your typical toring should be an integral process,
primarily focused on the customer to ensure that requirements triangle approach (scope, schedule, shared by all developers during devel-
J2EE area. During that time, were met. XP was one of the first resources) and will help to determine opment of the software. Therefore, a
he has implemented several development processes that fell into which elements have a higher priority. simple approach is the best approach
large-scale enterprise the realm of iterative programming. This information will then be used in for initial design. It is also important to
applications. His expertise This form of development changed laying out the release planning. One outline naming standards during the
encompasses all realms the way developers think about the of the fundamental differences in the design phase. At this stage, it will be
of the system development software life cycle because it provided planning phase used in XP is the im- easier for developers to agree upon and
life cycle. a means to quickly demonstrate plementation of user stories as a way understand the naming conventions.
requirements with a functional ap- of capturing use cases. User stories It is important to select names that all
troy.holmes@prizum.com plication. Iterative programming both are written by the customer and are team members can relate to without
http://www.reportingengines.com/download/21ways.jsp
LS,
TRIA
FREEMOS, &
DE PLE
SAM E!
COD
888-884-8665 • www.reportingengines.com
sales@reportingengines.com
Build reports against JDBC, XML, Java objects, BEA Portal Server logs, BEA
Liquid Data, and other sources visually or with Java code. It’s embedded!
No external report server to set up. Unlimited users and CPUs per license.
http://www.reportingengines.com/download/f1ere.jsp
Copyright © 2004 ReportingEngines (a division of Actuate Corporation). All rights reserved. Formula One is a registered trademark of Actuate Corporation.
Java and Java-based trademarks and logos are the trademarks or registered trademarks of Sun Microsystems Inc., in the United States and other countries. All other trademarks are property of their respective owners. All specifications subject to change without notice.
Methodologies
learning detailed business rules. This strange ownership issue when it comes system date approaches, manual tests
will ensure a quicker understanding of to code, and XP tries to break that trend. will be cut short. By implementing
the overall system. Remember, the code is written to be testing automation, all tests can be
One of the pillars of the XP design rewritten, especially if the refactoring replicated and regression testing can
process is collaboration. It is critical that rule is upheld. Therefore, it should be be completed quickly and easily in the
collaboration meetings are held. This is natural for two people to work on the maintenance phase of the system. By
referred to as Use Class, Responsibilities, same module. Also, having two people requiring that all code pass all tests
and Collaboration (CRC) sessions in XP per module will make the system better, before it is implemented, the develop-
speak. During this time, the developer because it is built using collaboration. ment team is ensuring a higher-qual-
of an individual component will explain Obviously, only one person can type at ity product. Any bugs found during
how his or her object will communicate a single moment, but more thinking is testing should become additional unit
with other objects in the system. This involved during coding than in actual tests. Another key difference in test-
will provide a means to quickly uncover typing. When developers are having is- ing is that acceptance testing scores
problematic issues and shortcomings in sues with a particular implementation, should be published. This enables
the design. The CRC sessions are written they have an extra brain to utilize. In a higher level of quality assurance.
on cards that can quickly be converted addition, two developers are more likely The customer will have the ability to
into collaboration diagrams if a more to capture issues and voice concerns to review the test results and prioritize
permanent record is required. each other, whereas single developers the issues found during testing.
tend to make an educated guess and
Coding move forward. Why Use Extreme Programming?
The key difference in coding with the The final component during the Why should a development team
XP methodology is communication with coding phase of XP is ensuring no go through the effort of learning yet
the customer. During the coding effort, overtime. Several articles have been another development methodology?
developers should never try to guess or written about the effects of overtime on To answer this question, the benefits
implement solutions they think meet a project. Using overtime to complete of XP should be outlined.
the requirements of the user story. In- a project’s task tends to tire the team XP is one of the few methodologies
stead, they should talk to the customer. and leave them more prone to making that actually strives to deliver high
This is why XP works. If the developer mistakes. Overtime brings down overall quality code that meets the customer’s
does not fully understand an implemen- moral and provides little if any ben- expectations. Because XP relies heavily
tation, he or she should feel confident efit to the final release. XP provides a on customer interaction throughout
in explaining and validating his or her mechanism by which to communicate the development process, all parties in-
understanding with the customer. with the customer. Instead of forcing volved take a greater sense of ownership
Another key difference is the priority overtime on the team, the release plan in the final product. This methodology
placed on testing. During the coding should be modified or the scope should typically converts a group of individuals
phase, the developer should always be reduced for the current iteration. into a cohesive, high-performance team.
build the test case first, even if the test It is amazing to watch an XP team
case is only a written process that can Testing evolve. Since daily meetings are held
be implemented into a testing tool. Cre- Testing in the XP methodology is for 5–10 minutes to outline the goals
ating the test case first makes it easier one of the main things that sets it for the day, all developers are aware
to write the code to pass the test case. apart from other methodologies. Of of the end goal. These meetings also
In addition, because several of the test course, all methodologies require mean that each development pair is
cases are captured in the user stories, the testing phase. In XP, however, the aware of the day’s tasks and knows
the individual module should be very team thinks about testing from the exactly where the project stands.
close to the customer requirements. beginning straight through to the end Planning in this way stimulates teams
Another benefit of creating test cases of the system life cycle. Tests should to become more efficient and to
is that it provides an understanding of be automated and included with the perform at a higher level. This strategy
how the code works. This also means actual code. Testing should be com- is similar to that of sales organizations
that other developers can ascertain how pleted before the code is integrated that put sales goals on a board for
the code works by reading the test cases. and test suites should be created that all to see. When a team understands
One of the problems people have test all classes and methods within where it’s going and how it’s going to
with XP is pair programming. This is be- the entire system. The automation get there it has a higher probability of
cause it is different. Developers have a of testing is critical because as the accomplishing its goal.
XP is also one of the best meth- Customer all automation scripts for testing,
odologies for quality control. This is The customer plays a vital role in the however, this does not take into ac-
primarily because testing is put at the successful implementation of an XP count other automation tools. I felt it
forefront of the life cycle. Test scripts project. In the initial stages of a project, was necessary to break out this group
are coded before the modules are cod- the customer should be educated on with the understanding that automa-
ed and acceptance testing is required the requirements and time commit- tion scripts will be sent to the testing
to be error-proof before any code is ments necessary during the system group, who will use this information to
implemented. XP’s strong bias toward development life cycle. The customer provide statistics for user acceptance
testing provides a platform that will will be required to provide user stories, testing. The testing group will interact
allow the development team to build prioritize tasks, assist with release with the developers and the customer
a suite of tests that can be used in the planning sessions, validate business on a frequent basis. This team will be
future. This technique removes the rules, and assist in acceptance testing responsible for reporting new bugs to
fear factor that accompanies code validation. This is a large commit- the development team and providing
changes in typical organizations. ment on the customer’s part; however, information to the customer on issues
Because the system is designed us- the end product will be much better found during regression testing. All
ing tests in this way, new developers because of it. One of the biggest ben- tests should be published. This has
can confidently change code within efits of XP, which customers typically a two-prong effect. First, it enables
modules without the fear of breaking appreciate, is the ability to change the the customer to see and prioritize the
existing business logic. product at any time, with minimal cost issues found during testing. Second,
A final benefit of XP is customer and little complaint from the develop- it helps the developer to quickly fix
satisfaction. This methodology ment staff. This enables the product to known issues that can be implemented
enables a customer to see working be molded into a system that best fits into regression tests.
applications faster than with other the business requirements at the par-
techniques. When provided with an ticular time of module development. Framework
evolving system, the customer has the 1. Start the implementation by
ability to change the prioritization Developers educating the core teams on
and functionality as business needs The developer plays a somewhat the techniques used in XP. There
change. This enables the software to atypical role in an XP organization. The are many free resources available on
be implemented in a state where it primary difference is that XP does not the Internet. I have included some
can provide the biggest benefit to the allow solo programming. Therefore, the links to Web sites at the end of this
business. Other methodologies take “cowboy” programmers who save the article. Allow the team a few days to
longer to implement and therefore day will not be necessary. Developers read and comprehend the forthcom-
have an increased potential to miss should be told prior to implementation ing changes. It is also advisable to
strategic business opportunities. that the team is going to change into a have a team member who can be
more collaborative environment. the coach for XP. This team member
Implementing XP into a Developers will also need to under- will be the XP expert and will advise
Development Department stand that all code is community code the team on any issues that arise. XP
XP implementation is a fairly and that they should feel confident in is mainly common sense; however,
straightforward task. The three core making changes to existing code. The it may take time before some of the
teams involved are the customer, de- main rules for developers to follow are techniques become natural.
veloper, and testers. Each team plays to keep it simple, collaborate often, 2. Next, meet with the customer and
a vital role in the successful imple- work in pairs, refactor judicially, and explain the approach the devel-
mentation of this methodology. This work no overtime. Additionally, some opment team will be taking to
section will outline the requirements developers who are new to iterative implement the proposed software.
for each team and define a framework programming will need to become Customers do not need to under-
to successfully implement this solu- accustomed to writing test cases first. stand all of the details of XP, how-
tion. Figure 1 represents the collabo- This is a culture shift for many develop- ever, they will need to understand
ration efforts among the teams. ers, but after they try it they will find the time commitments that will be
that the code becomes easier to write requested of them.
Tester and has a higher probability of working 3. Now that the team has had time
the first time. Finally, developers will to digest the information and the
interact with the customer and the customer understands the require-
testing team frequently. ments, have a kick-off meeting and
start writing user stories. The cus-
Testers tomer will write the user stories with
Testers are defined in this example the development team. As outlined
with the understanding that there is in the prior pages, detail specs are
Customer Developer an automation department within an not required in initial user stories.
organization. Many XP implementa- Try to keep away from technical
Figure 1 Collaboration efforts among teams tions enable the developer to write information and stay with functional
�����������������������������������������������������������������������������������������������������������������������������
���������������������������������������������������������������������������������������������������������������������������
�������������� ������������������������������������������������������������������������������������������������������������
�����������������������������������������������������������������������������������������
�� ����������������������
� ����������������������������������������������������������������������������������������������������������������������������
Methodologies
Books:
• Auer, K. and Miller, R. (2001).
Coding Testing Extreme Programming Applied:
Playing to Win. Addison-Wesley.
Test Cases First Keep It Simple Validate with User Create Test Suite Display Results User Acceptance
• Beck, K. (1999). Extreme
Programming Explained: Embrace
Change. Addison-Wesley.
• Fowler, M. et al. (1999). Refactoring:
Improving the Design of Existing
Figure 2 The XP approach to life cycle Code. Addison-Wesley.
If you do a search for “migrating J2EE application servers” they are spread across a number of business portfolios.
When we’re considering applications in the J2EE con-
on the de facto “re”search engine – Google – here are some of text, enterprise applications typically pose the following
challenges:
the results you’ll get from your query: • The applications are distributed across different tiers
– client, business, and database – and they use a differ-
• Migrating J2EE applications from Borland JBuilder to IBM ent mix of J2EE technologies, including JSPs, servlets,
WebSphere EJBs, JDBC, etc. The versions of the APIs used across the
• Migrating J2EE applications from WebLogic to WebSphere applications are usually not uniform, since they may
application server have been developed at different times.
• Migrating J2EE applications from earlier versions of the • The integration requirements of each application may
application server and from other application server be unique. For example, some applications may require
platforms to Sun ONE application servers integration with an existing security framework that
• Migrating your J2EE applications to JBoss provides single sign-on. Others may require integration
• BEA WebLogic to JBoss migration program with third-party packaged products.
• Besides the Java platform APIs, the applications prob-
When I first got involved in the planning for a project that ably use other technology components or frameworks
involved the migration of applications between versions of that were developed in your organization for Java
IBM’s WebSphere product, I naively thought – “This can’t be applications. These may include messaging frame-
that big a deal. After all it’s just different versions of the appli- works, utilities for logging, exception handling, etc. The
Ajit Sagar is a senior cation server. And the changes in the Java platforms between dependency of applications on such components adds
technical architect with WebSphere versions is well documented. In fact, IBM even another level of complexity to the migration effort.
Infosys Technologies, Ltd., provides a Redbook to do the migration…” • Applications have varying levels of complexity, and it’s
a global consulting and I couldn’t have been more mistaken. The migration was a hard to apply the same methodology for migration to
IT services company. He has big deal. After working on a few of these projects, I can verify each of them.
been working with Java that the amount of moving parts in a machine composed of • Application teams have differing levels of expertise, so
since 1997, and has more various portfolios, frameworks, third-party vendors, and a where the benefits of a structured migration are seen by
than 15 years’ experience variety of stakeholders made the planning for such an initia- some, the same is not true for others.
in the IT industry. During tive a formidable undertaking.
this tenure, he has been This article covers the aspects of enterprise application Why Migrate?
a programmer, lead architect, migration that involve J2EE application servers, including the Chances are that all your enterprise applications have
director of engineering, motivation, methodology, challenges, and the way to suc- already been in place for a while and have been working
and product manager for com- cessfully undertake such an initiative. The focus is primar- satisfactorily. If such is the case, why migrate? After all, you
panies from 15 to 25,000 people ily on the migration of a large portfolio of applications, not could continue to support your applications on existing
in size. Ajit has individual applications. This article doesn’t get into the basics versions of the application server.
served as JDJ’s J2EE editor, of application server technologies, Java technologies, etc.; I
was the founding editor of feel it will be of most interest to architects, team leads, and Web Services Edge
XML-Journal, and has been a technical project managers.
frequent speaker at SYS-CON’s By the time you get this issue, SYS-CON’s Web Services Edge should be in
Web Services Edge series of What’s the Big Deal About Enterprise Applications? the offing. In fact, that may be where you picked up the copy you are holding
conferences. He has published Many of you have probably migrated applications in your hands just now. At the conference, we have an App Server shootout
more than 75 articles. between versions, hardware and software platforms, event and also a session that I’m hosting on application server migration. If
etc. The magnitude of the problem increases logarithmi- this is of interest to you, be sure to stop by.
ajitsagar@sys-con.com cally with the number of applications, especially when
test the application after the migration. The infrastructure identified the need to migrate your applications, is to obtain
planning track deals with the planning of the different run- the sources of information readily available from the vendors
time environments such as testing, staging, and production. and other parties. Read the literature and become familiar
The training plan track addresses the training needs of the with the tools and the quirks of migration that are particular
development and support teams in order to migrate to the to your product and the J2EE environment platform.
new app server version/vendor.
3. Invest in a Planning Phase
Best Practices for Enterprise Application Migration If you are migrating a few applications with few inter-
Migrating enterprise applications is a formidable dependencies, a planning phase may be overkill. However,
undertaking. However, if planned properly, the migration in this article the focus is on migrating a large portfolio of
can proceed smoothly. Some best practices, if followed, applications. To minimize risk and alleviate the impact to
can make all the difference between a successful on-time, the business, make sure you invest in a planning phase.
within-budget migration as opposed to one that can end up The planning phase should define the characteristics of
being a maintenance nightmare for years to come. each application that is being migrated; document the
dependencies between applications; estimate the effort in
1. Program Manage the Migration terms of time, money, and resources; produce a roadmap
The best possible approach to managing a large-scale for migration; and produce a step-by-step migration guide
migration is to manage it as a separate program rather than for each application that covers all phases of the migration
treating it as the migration of individual applications. To from the migration of code to the deployment of each ap-
do this, a core migration team should be created during the plication in the production environment.
planning phase. This migration team should be respon-
sible for coordinating the migration of all the applications. 4. Get Everyone Working Toward the Same Goal
Although the actual migration is best done by the team that An enterprise-level migration involves several parties with
owns the application, the core migration team can under- different interests and motivations for the migration. A key
take tasks such as coordination, and training. to success is to get everyone together and working toward
the same objective. Ensure that all the concerned parties
2. Prepare Your Arsenal understand the priorities and rationale behind the migration
The good news is that application migration between ap- and understand their role in the initiative.
plication servers is a well-defined and understood problem.
To that effect, J2EE app server vendors have documented 5. Take the Least Common Denominator
the steps to migrate the code and to deploy the applica- To define a structured path for the migration of multiple
tions on the target environment quite well. In addition, enterprise applications, you frequently have to take the
IBM, Sun, BEA, and others have also invested in creating least common denominator for defining the move. In other
tools that automate some of the effort involved in migrating words, all the applications may not see the same benefit in
and deploying the code. This is partly to entice application the migration. Some may be in a better position to leverage
developers to migrate from a competing vendor and partly the target platform’s capabilities than others.
to facilitate the phasing out of app server versions that will
not be supported in the future. The first step, once you have 6. Invest in Directed Training
When the app server migration is being handled on a large
scale, the best way to bring everyone up to speed is to con-
Information Review & duct training that is focused purely on the migration. This
Project Inception Analysis
Gathering Publication training can be conducted in-house, or may be provided by
the app server vendors themselves. Several training firms
Architecture Planning & Strategy have migration tracks that specialize in different types of app
server migration.
Code Migration Planning & Estimation 7. Wade the Waters Before Jumping In
As with all other large-scale projects, your migration road-
map should include a pilot phase. A few applications should
Test Planning & Estimation be chosen to test the assumptions made in the planning
phase such as the code migration effort and performance
benchmarks. Once the pilot applications are successfully
Infrastructure Planning launched, the plan should be revisited, tuned, and then
finally executed.
Web Services:
Calvin Austin
Core and Internals Editor Why Can’t We Just Talk?
T
his month’s Web Services Edge interoperability. The issue in this case was same parties will often have to make com-
conference marks four years since that the order of mapping XML back to Java promises, especially when it comes to the
the first detailed W3C note on the for static stub and dynamic proxy–based behavior of the API or other places where
Web Services Definition Language JAX-RPC calls was not made a requirement the specification is unclear.
(WSDL) and nearly five years since the first in the specification, and implementers of To be fair to the specification writers,
public specification of SOAP. the specification already had products that it’s hard just to get an agreement on a well-
You may be wondering, why hasn’t didn’t match the reference implementation. designed, clean API. What happens inside
the uptake of Web services matched the By its very nature, the Dynamic Invocation those APIs, the behavior of the implementa-
bold predictions made when it was first Interface (DII) method of calling JAX-RPC tion, or what should occur if an API is called
launched? There are certainly more devel- was unaffected by this change. The result in one of the myriad possible sequences is
opers thinking about Web services with the was that you compiled a Web service with beyond the scope of most specifications.
advent of service-oriented architectures one client runtime, but it may not neces- With that in mind, applying that speci-
(SOA). However, the number of successful sarily work with another JAX-RPC engine. fication methodology to Web services that
public Web services projects seems to be In the case of J2SE, to prevent shipping an are designed for a language- and OS-neu-
limited to a few high-profile companies like incompatible technology, the expert group tral platform and yet deliver flexibility was
eBay and Amazon that have published APIs reluctantly agreed to pull the JAX-RPC never going to be easy. To address some
and end points, or developers who have specification from the platform. of these pressing issues, the Web Services
been able to implement services internally One of the business problems that Web Interoperability Organization (WS-I) was
but with a narrow and well-defined set of services was to address was interoperability. formed. The first fruit from that collabora-
services – still a long way from the smart Why did the W3C have to create a further tion was the Basic Profile 1.0. Last year saw
application that could self-select services at Web Services Interoperability profile, and is the introduction of an updated Basic Pro-
runtime. this going to be the final answer to building file 1.1. Yet if you want to use SOAP binding
There are many factors that can slow the a full SOA-based application? or SOAP with attachments, you need to
adoption of a new technology. Sometimes The recent history of computing has follow the additional WS-I profiles. The WS-
it’s a technical barrier, competition from an been one with specifications drawn up I profiles by their very nature try to define
alternative technology, or simply customer by one or more companies or organiza- a minimal set of functionality that should
reluctance to move to something new. To tions. Companies and organizations then work, and as a consequence consign many
A coeditor of JDJ since shine a light on some of the issues that compete on implementations of those early Web services technologies, like styles
June 2004, Calvin Austin developers experience with early Web specifications, which then become the of WSDL encoding, to the trash bin. Even
is the J2SE 5.0 Specification services, I can share some of my own expe- resulting standard. Although this has now with a restricted set of supported func-
Lead at Sun Microsystems. riences with adopting Web services into the become accepted practice, this process is tionality, code examples, and guidelines,
He has been with Java J2SE platform. not without its flaws. the WS-I still makes no guarantees about
Software since 1996 and One common request for J2SE 5.0 was First, most of the parties that contribute interoperability. It begs the question: Can
is the Specification Lead to add Web services, however, even back in to those specifications have already built or Web services fulfill its original promise of
for JSR-176, which defines 2001 there was some concern over whether are currently building their own imple- dynamic configuration and discovery, or is
the J2SE 5.0 (“Tiger”) Web services was really ready. Unfortu- mentations and will often simply modify it yet another useful distributed service
release contents. nately, we later discovered an issue that their own implementation to match the that needs to be deployed by architects like
would continually dog many other early specification. Then, in an effort to be the the other distributed services that came
calvin.austin@sys-con.com Web services implementations, namely first to support the new specification, those before it?
Outsourcing to Students the developing countries like India or Russia would be interested in these
–continued from page 6 jobs. Academic outsourcing may be even more damaging than the industrial
outsourcing, because rich students can improve their grades and earn their
• Even though students will get a minimum salary for this work, they should degrees without having a good knowledge of the required subjects. Spending
also earn academic credits and get graded while working on such projects. more time working as teams in the labs under the supervision of a faculty
member or business manager will help minimize academic cheating.
The funny (or sad) part is that the students themselves are already out- There is one more secret key to the success of commercial projects de-
sourcing their college assignments. There are Web sites where you can hire a veloped by students: pizza! Each day the client company can send a couple
coder for any assignment in various programming languages. No job is too of pies (half plain and half pepperoni) to the labs where the students work.
small. People from around the world can bid on these projects, and since the They are going to work for food…and experience. It’s a win-win situation for
offered prices go as low as $20 USD, it’s clear that only programmers from everybody.
A
s open source technology is part of its build process today should top of many other open source projects.
gaining more popularity in the be doing so. Apache is also the home of Rather than build from the ground up,
press and among the general the most widely used Java XML libraries, the Geronimo team is wisely making use
population, there still seems Xerces and Xalen. It’s hard to find a Java of many open source projects already
to be a lack of knowledge of what is project using XML that doesn’t make use in existence. This allows the Geronimo
available via open source amid many of these libraries. team to rapidly build an enterprise-class
software development projects. While Another popular open source project application server in a time frame that
the mainstream media and the average from the Apache group is the Tomcat would be daunting to any commercial
computer user thinks of Linux whenever server. Tomcat is the official reference development team.
the term open source is brought up, this implementation of the Java servlet and
article looks at the amazing wealth of JSP specifications. Tomcat is a capable JUnit
technology available to Java software de- server and has widespread usage, par- One of the hottest trends in applica-
velopment teams. For years there have ticularly as a development test server. tion development today is the con-
been promises of code reuse resulting The most significant piece of J2EE not cept of test-driven development. This
from the use of object-oriented pro- supported by Tomcat is the EJB specifi- philosophy places a new emphasis on
gramming. The open source community cation. Many projects that don’t use EJB creating unit tests for all of your methods
is delivering on that promise today. technology will use Tomcat as a testing as you write them. Here’s another area
If you’re a Java developer, there is a environment on local developer work- where open source shines. The de facto
gold mine of good open source tech- stations, even if the production server standard unit-testing framework for
nologies available now to assist you with will ultimately be a commercial J2EE Java development is JUnit. JUnit greatly
your projects. There is an open source product such as WebSphere or WebLogic. simplifies the creation and execution
project covering nearly every category Tomcat is also used in many production of unit-level tests for your code. As I’ve
of technology, component, or frame- environments. stated about Ant, if your project is not us-
work that you can envisage. ing JUnit, it should be.
JBoss, Inc.
The Communities and Projects If you want a full J2EE application SourceForge
Apache Software Foundation server that does give you access to EJB While Apache is probably the most
The Apache Software Foundation, technology, the open source community well-known place for open source Java
best known for its Apache Web server, is has a powerful offering that meets your technology, the biggest resource for
probably the most well-known source for needs as well. The JBoss server, created developers is the SourceForge commu-
open source projects. Apache products and supported by the JBoss group, is a nity Web site. SourceForge is the home
Timothy Fisher has are widely considered to be best-of- standards-compliant J2EE application of thousands of open source projects.
recognized expertise in the breed in their categories. Apache’s server. The JBoss group is proving that At the time of this writing, they had over
areas of Java, XML, and security Jakarta project is home to some of the open source can also be adapted to a 12,000 Java projects listed on their site.
technologies. He has served in best Java development technologies successful commercial business model Not that these are all active and useful
technical leadership and available. In the Java community, one of with its recent announcement of 10 mil- projects. Many of them are lying stagnant
senior architecture roles with the most well-known open source proj- lion dollars of venture funding led by the with outdated code, or no files have been
companies such as Motorola, ects is the Struts project, which is part venture capital firm, Matrix Partners. produced. Because of this, when you do
Cyclone Commerce, and of this Jakarta family. It can be arguably The Apache group has a competi- a search on the SourceForge site, don’t
PricewaterhouseCoopers. stated that Struts has become a de facto tor in the works as well. The Apache get too excited about all the results until
Currently, he is employed as a standard framework for implementing Geronimo project will be the J2EE ap- you’ve had the chance to actually browse
senior Java technologist with Java Web applications. plication server from the Apache group. the details of the projects to make sure
LogicaCMG in Southfield, One of the few open source develop- Many of the Geronimo developers are they contain useful technology. For those
Michigan. Timothy is also ment projects in wider use is the Ant former JBoss developers. As of this writ- developing open source projects, Source-
a frequent writer and build system, which is another project ing, Geronimo had not yet released a Forge provides free hosting services for
speaker on Java and from the Apache team. Ant is a robust, J2EE-compatible server, but rather what your projects. SourceForge is usually the
security technologies. enterprise-ready tool for building and they call “technology demonstrations.” first place to check if you are looking for
deploying your Java applications. Any Geronimo is a great example of what an open source component covering a
trfishermi@yahoo.com Java project that is not using Ant as a will be an enterprise application built on particular technology.
The SourceForge site is divided into news, and blogs related to Java technolo- Codehaus
subcommunities called foundries. Each gy. This is a great educational site for those Another open source community site
foundry is a community focused on a new to the Java platform and those who hosting Java projects is the Codehaus
specific technology. Our primary inter- wish to expand their knowledge of the site. Codehaus is an open source project
est here is in the Java foundry. The Java platform and technologies available. With repository with a strong emphasis on Java
foundry is a central location where you all of its offerings, this is a well-rounded projects. On its home page, Codehaus
can find news, announcements, discus- collaborative community site where specifically states that all of its projects
sions, and articles about the Java projects projects, discussions, and other offerings are business friendly in terms of licens-
hosted by SourceForge. are divided into communities of interest ing. Codehaus also has some major
related to specific technologies under the corporate sponsors, including BEA.
Tigris.org Java umbrella. This is a nice distinction Codehaus focuses purely on providing
A lesser-known site that provides good that this site offers. If you’re looking for a projects. You won’t find the community
open source projects is the Tigris.org project in a specific technology, say a Java features here that you find on similar
site. Tigris.org is an open source com- networking project, you can search within sites. One of the most popular projects on
munity focused on building better tools that specific community. For an experi- Codehaus is the OpenEJB container. This
for collaborative software development. enced Java developer, a periodic review is an open source implementation of the
While not nearly as large as the Source- of this site will help you keep current on EJB specification. The Apache Geronimo
Forge community, a nice thing about emerging Java technologies. project has announced it will use the
the Tigris site is that all of its projects OpenEJB container as its EJB container,
are active and ongoing. Thus, you won’t Open Symphony giving this project significant visibility
come across any dead or barely started Open source J2EE enterprise class as well as a chance to gain Sun certifica-
projects with no usable code as you often components can be found at the Open tion. Other popular projects hosted by
do on SourceForge. The Tigris projects Symphony project. This is a project that Codehaus include AspectWerkz, an AOP
don’t have a complete Java focus, but emphasizes quality over quantity. You framework for Java; Drools, a business
rather tend to be focused on more of the won’t find nearly as many components rules engine; and PicoContainer, a light-
noncoding-related tasks that are part of and technologies available here as on weight component container.
finance. These types of broad anti-open There is also an increasing number of actually help make their products more
source guidelines are created by manag- consulting companies offering support secure and more trustworthy.
ers or technologists who are uneducated for open source products. The security world is way ahead of
with regard to the real benefits and risks Regarding the issue of trusting the the rest of us. In the realm of security,
of open source, particularly in terms of source code of open source projects, it has been a long-standing belief that
open source technology for developers. don’t overlook the fact that an advan- cryptographic algorithms and security
Those who create restrictive open source tage of open source projects is that you protocols that are published and open
policies need to stop equating the issues have access to the source code, and if to inspection are much more secure and
of the usage of open source end-user there are areas that you don’t trust, you trustworthy than proprietary algorithms
applications with open source develop- can review those areas to gain whatever and protocols. We need to start believing
ment components and frameworks. trust you feel is necessary. The same can that with regard to nonsecurity software
Unlike the case of end-user applications, rarely be said about commercial, closed components as well. Openness is a good
when comparing open source developer source projects. thing.
technologies to commercially available The fact that open source projects, Many large corporations will allow
developer technologies, in most cases especially the more popular ones, have a small development team, often
with open source you have more, not been subjected to review by many de- composed of temporary contractors,
less, support available; greater, not less, velopment teams and individuals using to develop core functionality, and
ability to establish trust in the compo- them backs up the argument that these they will trust that more than they are
nents; and greater, not less, ability to get projects are often more secure, more willing to trust an open source project.
timely turn-around on bugs and feature bug-free, and thus more trustworthy This occurs despite the fact that the
requests. Any corporation that has a than their commercial counterparts. open source project in almost all cases
policy concerning open source that does In the case of a commercial project, has had much more time to mature,
not distinguish between end-user appli- you must place your trust not in the and is often reviewed by thousands of
cations and developer technologies will source code, which cannot be verified by developers and development teams.
end up with these overly restrictive poli- your team, but in the commercial ven- This is simply an illogical policy based
cies that are strategically and financially dor of the product. While on a commer- on uneducated decision making. These
harmful to the corporation. cial project the source code may have companies spend countless hours
When a company adopts overly been reviewed by a relatively small team developing functionality that is rarely as
restrictive policies regarding the use of of developers, an open source project good as what could be obtained in the
open source technology components, is open to review by thousands of very open source community.
the reasons for adopting those policies capable developers. If there is a particu- The Linux lawsuits brought by SCO
are typically variations of the following: larly sensitive piece of functionality that and the media attention surrounding
1. We don’t trust the source code, i.e., it you want to review more closely, with an them are instilling fear in many lawyers,
could be full of bugs or security holes. open source project you or your team causing them to issue blanket policies
2. There is no commercial support for it can thoroughly review the source code regarding the use of open source in their
and, if we encounter a problem with line by line. With a commercial product, organizations. Based on legal depart-
it, we have no one to turn to. unless they are willing to show you that ment opinions, some organizations are
3. We have a legal policy prohibiting us piece of source code, you again must dictating policies that disallow develop-
from using open source due to license rely on the reputation of the vendor and ers from using any open source projects
issues with open source. not the code itself. You’ll often hear that because of potential legal problems and
relying on the reputation of the vendor is license issues. This is equivalent to hav-
Let’s address each of these reasons. an adequate assurance of trust because, ing your legal department say that you
The available technical support on unlike with open source, the vendor can’t use any Microsoft software because
many of the open source projects is far may be financially liable for problems of security problems with Internet
superior to the support you get with in its code. My first response to this is to Explorer. The legal departments making
many commercial products. With open ask yourself this question: Are you sure these policies don’t really understand
source projects, typically you’re able that the vendor is liable? In most cases open source and the variety of licenses
to directly contact the developers, and the licenses of the commercial products commonly used in open source projects.
many of them also have very active specifically remove liability from the Rather than take the time to understand
message boards and mailing lists that vendor for bugs and security flaws. Also, the licenses and treat these projects in-
provide great technical support. Even if to counter this argument, we have only dependently, they issue these restrictive
you assumed that absolutely no support to look at Microsoft. Here is a company policies that are ultimately bad for the
is available (though I haven’t found a that, based on the commercial liability business.
useful open source project for which this argument, should have been producing Another way open source projects
is true), I’d still argue that having your very bug-free and secure code. Yet we all can benefit your development team in
team learn and understand the source know that Microsoft products have be- environments that face these restrictive
code of the open source project well come notorious for their security flaws. open source policies is to not necessarily
enough to support it will still save you a Even Microsoft is finally beginning to adopt complete open source projects,
great deal of time compared to rewrit- understand that opening its source code, but to reuse parts of the open source
ing the equivalent technology yourself. as it is doing with parts of Windows, may projects. You’ll find the licensing of
by Onno Kluyt
If you’re reading this at the Web Services Edge 2005 JSR 173
The Streaming API for XML is a new method for
East Conference, you’re probably having a great time. pull-parsing XML; it allows the programmer to ask for
(or pull) the next event. “It’s bidirectional, supporting
If, on the other hand, it’s before February 15th, you might reading and writing, and is designed to integrate with
JAX-RPC,” says Chris Fry, spec lead from BEA Systems.
still have time to get to Boston and attend. For anyone “Parsing XML for high-performance streaming and the
associated API grew out of BEA’s XML and Web services
interested in Web services or XML, this conference will team.” The reference implementation is open source,
and is available at codehaus.com: http://stax.codehaus.
be big. org/. There’s also a mailing list for anyone interested,
W
StAX Builders at Yahoo! Groups: http://groups.yahoo.
hether you’re at the conference or not, I com/group/stax_builders/.
want to highlight several of the newest
JCP Program Java Specification Requests JSR 181
(JSRs) that promise to improve Web ser- Web Services Metadata for the Java Platform makes
vices development and deployment. Of the Web services development easier to learn and do. “It’s
20 or so JSRs that offer benefits for Web services, I’ve de- a spec for creating Web services using the new JSR 175
scribed what’s happening on several that might be of inter- annotations, and it’s setting a precedent among other
est to you. I apologize in advance if I missed your favorite. JSRs for using annotations in a declarative program-
ming model,” says Brian Zotter, spec lead from BEA
Steady As It Goes Systems. “We really think this is going to be the develop-
The Java platform will celebrate its 10th birthday later ment model of the future.” JSR 181 is in the final stages
this year, and it has evolved as an undeniable foundation of the spec headed for final approval in a matter of
for secure, compatible Web and networked services. In months. Catch the JSR 181 messages at Yahoo! Groups:
fact, I believe the Java platform is the most secure, reli- http://groups.yahoo.com/group/jsr181/.
able, and supported architecture for Web services and a
service-oriented architecture (SOA). JSR 262
The JCP program joint community effort is the key to Web Services Connector for Java Management Exten-
what’s been achieved in maintaining the platform’s com- sions ( JMX) Agents is now open and inviting nomina-
patibility, interoperability, and flexibility for Java technol- tions for Expert Group membership at http://jcp.org/
ogy and Web service developers. There are challenges, en/jsr/egnom?id=262. Eamonn McManus, spec lead,
obstacles, and hurdles ahead, but it’s great fun to take a says this JSR will define a connector for the JMX Remote
look at the work being accomplished by the JCP program API that uses Web services to make JMX instrumentation
membership. available remotely. Clients don’t have to be Java applica-
Let’s check out a dozen or so perfect examples now. tions, but they can be.
onno@jcp.org
“ The Java platform will celebrate its 10th birthday later this year,
and it has evolved as an undeniable foundation for secure,
compatible Web and networked service”
JSR 267
Take a look at the JavaServer Pages (JSP) Tag Library for
Web Services. A standard JSP tag library for accessing Web
services would be quite helpful, and this should be finished
for final release near the end 2005. It will help JSP authors
integrate Web services into Web applications with much less
effort and quicker turnaround times. The benefits are strong,
and it’s a compelling assignment, well worth the effort, sup-
ported by JBoss, Oracle, and Sun Microsystems. Stay tuned The JCP program is part of the overall Java ecosystem, responsible for maintaining the standards and compatibility
for the public review scheduled for July 2005. of the Java platform . Those core promises – standards and compatibility – help grow the developer community and
the marketplace.
JSR 206
Java API for XML Processing (JAXP) 1.3 is a dot-release
update to JSR 63, JAXP 1.2, both of which enable applica-
tions to parse, validate, and transform XML documents.
This version accommodates the newest revisions to several
core XML standards, including XML 1.1, Namespaces in
XML 1.1, Document Object Model (DOM) Level 3, and
Simple API for XML (SAX) 2.0.1. It’s included in J2SE 5.0.
The JAXP 1.3 design centers are standards compliance, per-
formance, and ease of development. It introduces an object
model agnostic XPath 1.0 API and a validation API that sup-
ports the reuse and caching of schemas.
JCP program members and the public are encouraged to review and comment on the Expert Group’s
JSR 222 specification draft during the Java Specification Request (JSR) process.
Java Architecture for XML Binding ( JAXB) 2.0 is a follow- The average JSR is finalized for release after collecting JCP program member and public comments dur-
up to JSR 31, JAXB 1.0. It simplifies development by bind- ing the Early Draft Review and the Public Review. Every step is consistently documented and available to
ing XML documents to Java objects based on a document’s members.
The JCP Program Today schema. The binding enables the manipulation of XML
content at the object rather than at the parser level.
JCP program members collaborate to define Java technology as a trusted JAXB 2.0 has significant new functionality, including
binary standard and the foundation for compatible implementations. support for all XML schema, the binding of existing
classes to XML schema, and data binding support for
The current version of the JCP program, JCP 2.6, initiated in March 2004, JAX-RPC 2.0 for Web services development.
greatly expanded community participation in an open, inclusive process:
JSR 109
Implementing Enterprise Web Services is an IBM-led
spec that’s part of the umbrella J2EE 1.4 JSR and defines
a programming model and architecture for implement-
ing Web services in Java, building on J2EE, EJBs, serv-
lets, and JSPs. The expert group work included some
deep questions about Web services, such as whether
Web services have homes, and what is the life-cycle
model for a Web services implementation.
JSR 261
Java API for XML-based Web Services Addressing (JAX-
WSA) defines an API and framework that supports ad-
dressing of Web services and messages across disparate
hardware and operating systems in a transport-neutral
manner.
The work in this JSR will aim to support the work
done under the WS-Addressing Working Group at the
W3C, http://www.w3.org/2002/ws/addr/. The starting
To explore the clickable Java Technology Concept Map, go to http://java.sun.com/developer/onlineTraining/ point for this W3C working group was a member sub-
new2java/javamap/intro.html or download a PDF of the Java Concept Map: http://java.sun.com/developer/online- mission by Sun, BEA, IBM, Microsoft, and SAP to
Training/new2java/javamap/Java_Technology_Concept_Map.pdf. The map connects the whole Java ecosystem. the W3C in the summer of 2004.
Got Community?
Check out the Java Web Services and XML Community or the JSR Com-
munity at http://community.java.net/java-ws-xml/ or http://community.
java.net/jsr/.
At these sites you’ll find people to converse with and projects such as
blogs, forums, and mailing lists. The world of java.net is 112,000 members
strong. Its 18 developer communities are populated with engineers, enthu-
siasts, evangelists, educators, industry associations, and vendors, and each
visit will offer something new.
Software Testing
Joe Winchester
Desktop Java Editor Shouldn’t Be Rocket Science
E
arthdate: October 15, 1997, conditions. The story is described in The cost of the two Cassini bugs is
and the Cassini spacecraft is detail at www.spectrum.ieee.org/WE- huge. Coming down to earth it pro-
launched. Mission: to boldly go BONLY/publicfeature/oct04/1004titan. vokes questions about testing in gen-
and explore the planet Saturn. html and provides a sobering lesson eral. A trait I’ve encountered at times
Saturn is about 10 times farther away in the importance of testing. This in my career is for a program to be
from the Sun than the Earth, and to get employee worked hard to convince released knowing it is flawed because
there required two orbits of the inner colleagues and superiors of the the programmer hopes to release
solar system, receiving gravitational importance of testing the link in real the working version in a subsequent
kicks from Venus and Earth before do- conditions, so a simulation was done fixpack, hopefully before the user has
ing a flyby of Jupiter to get a final assist by sending data from earth to Cassini encountered the errant feature. Up-
toward Saturn. mid-mission while it hurtled toward grading releases is easy for developers,
Piggy-backed to Cassini was the Saturn. This mimicked the separation but for a user who has to migrate data
Huygens probe that would be dropped conditions that would be encountered and schedule business downtime it’s
onto Saturn’s moon, Titan. Unlike most between the craft and Titan and the frustrating and must contribute to
other moons in the solar system that are raw data sent was echoed back to earth the perception that the latest release
barren, cratered rocky places, Titan has by Cassini and analyzed. It showed a is not a set of fully baked features
an atmosphere covering it. The purpose fundamental flaw. but a rollup of the previous version’s
of the probe was to parachute through Because of the difference in the fixes bundled with new features that
this, capturing data as it descended relative speeds at which Cassini was perpetually introduce their own set
onto the planet’s surface. The data traveling in space relative to Huygens, of bugs.
would be transmitted from the probe there was a Doppler shift. A Doppler Good testing is about attitude,
up to the Cassini craft, which would act shift is when waves are effectively where a developer takes pride not
as a relay and transmit back to earth compressed if the receiver and source just in the elegance or volume of his
where the experiments’ results would be are moving toward each other and or her code, but in whether it meets
analyzed. expanded if moving apart. As the the user’s requirements and performs
On January 14, 2005, Huygens suc- wavelength decreases, the frequency reliably in its first incarnation. I once
cessfully landed on Titan’s surface and increases, meaning that Cassini would heard a developer say that releasing
provided some fantastic pictures of have to adjust its listening frequencies buggy code was part of agile program-
the moon (www.esa.int/SPECIALS/ to account for its velocity relative to ming to allow you to have more cycles
Cassini-Huygens/index.html). Despite the Huygens transmitter. In addi- of code/release//fix/code. Apart from
this, there were two major problems on tion, the decoding would be affected. not grasping the methodology ma-
the mission. Digital data is split into ones and zeros turely, it showed a basic lack of pride
The first is that one of the radio chan- and compared against a base signal in their work that they were trying to
nels that the Huygens craft was going to decipher; however, the Doppler justify. The same excuses can also
to use to transmit data to Cassini failed. shift would stretch and compress the lead to bloatware, where code is
The remaining channel was used suc- lengths of the payload actual bits in thrown upon code without any tight
cessfully, although due to this problem the wave, meaning the digital signal design or following the basic prin-
only half of Huygen’s pictures have couldn’t be analyzed correctly. A fix ciples of software engineering. Is
come back and some experiments have was required to rescue the $3.26 billion the problem that some developers
had all their data lost. The reason for project. are incapable of taking pride in the
the problem is described as a “software Despite the fact that Cassini’s complete quality of their work, or
commanding error.” The reality is the hardware allows its receiver to receive that education and teaching, or
receiver on Cassini was never pro- over a range of shifted frequencies, the marketing pressures in a commercial
grammed to switch on. firmware program was unable to be environment still mean that buggy
The second problem is related to modified after launch, even though a software is released. Next time you
Joe Winchester is a the premise that Huygens transmits its small fix would have sufficed. The solu- release code without proper testing,
software developer collected data to the Cassini orbiter, tion they used was to alter the trajec- keep in mind the Cassini program-
working on WebSphere which then relays it back to earth. tory of Cassini’s orbits of Titan so that mers who had to physically alter their
development tools for Three years after the launch one of the craft’s approach allowed the radio craft’s passage to find a solution.
IBM in Hursley, UK. the space agency’s employees became transmissions to travel perpendicular to While we might have the next fixpack
uneasy about the fact that this feature its direction of motion, thereby reducing or release available to us, in space no
joewinchester@sys-con.com hadn’t been tested enough in realistic the Doppler shift. one can hear your excuses.
������������������������������������������������������������������������������������
����������������������������������������������������������������������������������
������������������������������������������� �����
���������������������������������������������������������������������������������
����������������������������������� ����� �����
������������������ ������������������������������������������������������������� ����
������������������������������������������������������
������������������������������������������������������������������������������
����������������������������������������������������������������������������������������
�������������������������������������������������������������������
������������������������������������������
�������������������������������������������������� ������������������
������������������
�����������������������������������������
�����������������
Feature
This article describes how to host an ActiveX/.NET control in ActiveX Control Java Wrapper, Hooking an ActiveX Control
to an AWT Native Interface
a Java application that is targeted for the Microsoft Windows Adding an ActiveX control to any AWT/Swing container
should be as easy as adding a button or other standard
Platform. I’ll assume you know the fundamentals of Java, C++, widget. To achieve this convenience, a Java wrapper, say the
JAxControl, is needed. It will work as the proxy of the ActiveX
JNI (Java Native Interface), Win32, COM (Component Object control on the Java side. Naturally the JAxControl should ex-
tend from an AWT/Swing component and in one of its native
Model), and ATL (Active Template Library). methods Listing 1 will be called.
B
However, in Listing 1 there is a HWND typed parameter
ecause a .NET control can be exposed as a COM parentWnd, which is the parent window of the control con-
component by using the COM interoperability tainer. Where does this native window handle come from?
services provided by the .NET Framework, I’ll start Remember that for any AWT/Swing heavyweight compo-
by hosting the ActiveX control. I’ll be using the con- nent, there is a native peer associated with it. So the afore-
trol, the ActiveX control, and the COM component mentioned native window handle could be an AWT/Swing
interchangeably. heavyweight component’s native window and it is. How to
obtain it? Until Java 1.5 the only documented way to get a
The ActiveX Control and Its Container Review native window handle was through the java.awt.Canvas class
In short, ActiveX controls are COM controls that imple- (please refer to jawt.h file, which is under the %jdkhome%\
ment a set of standard COM interfaces. An ActiveX control include directory). Listing 3 shows the relevant code.
is hosted by a container, which must provide a window to This means that the JAxControl has to be a derived class of
act as the parent for the child control and implement a set of java.awt.Canvas and Listing 1 will be modified as shown in
COM interfaces for communication between the control and Listing 4.
the container. Figure 1 shows the major interfaces imple- Though the native handle can be obtained anytime after
mented by the container and the control. (Please refer to the the Canvas is realized, a reasonable place is the addNotify
Microsoft Platform SDK for more information about ActiveX method in which the native peer will be created. Then the
control.) JAxControl could be something like Listing 5.
Unfortunately Listing 5 won’t work. The addNotify method
Creating the ActiveX Control and Its Container in C++ is executed in the Main-Method thread while the Canvas
As shown in Figure 1, an ActiveX control container needs native window is created in the Toolkit thread in which the
to implement a lot of interfaces. Creating such a container
Stanley Wang is a software could be very complex. Luckily ATL provides a CAxWindowT IUnknown
development engineer at class template that simplifies this process. (For more infor-
Amazon.com. Before he mation about ATL, please refer to the book, ATL Internals.)
IUnknown
joined Amazon, he was a Listing 1 shows how easy it is to create a control and its con-
Frame IOIeInPlaceUIWindow
lead software developer at tainer by using ATL (all the error-checking code in this article
IUnknown IUnknown
Vcom3D, Inc. He has an MS is omitted for clarity). IOIeInPlaceUIWindow
Document
degree in computer science CJavaCOMBridge is a class derived from an ATL CWin-
from the University of Florida. dowImpl class template, which provides its derived classes IDispatch
IViewObjects
He is interested in system with Windowing functionality. CJavaCOMBridge is defined Site IAdviseSink
IOIeObjects
Site
IOIeClientSite
programming, database in Listing 2. IOIeControlSite
IOIeControl
systems, and networking. All the dirty work of creating the container and control is Control Interfaces
Container Interfaces
done by axwnd_, whose type is CAxWindow, which is one of
stanleyycwang@yahoo.com the greatest classes from ATL. Figure 1 Interfaces implemented by the container and the control
not support IBar and only supports IFoo partially. This is very common set of concurrency and reentrancy constraints. For
useful, especially since the ActiveX control has fat interfaces. more information about the COM Apartment, please refer to
ActiveX controls always provide access to their methods Essential COM.) Figure 3 shows the cross-apartment access
via a dispinterface and IDispatch. This is the only way for mechanics.
scripting languages such as JavaScript to access the control’s The question is how to get the control interface pointer in
functionality. The procedure to invoke control methods the JNI thread, i.e., how to implement the CJavaCOMBridge::
through IDispatch for C++ client is boilerplate. Listing 9 shows QueryControl method shown in Figure 3. A common mistake
this procedure. is to cache an interface pointer in a static or global variable
As shown in Listing 9, working with IDispatch is not effi- and use it in any context.
cient because each time a method ID (termed DISPID) has to One technique for passing the interface pointer across the
be obtained first. apartment boundary is to use interface marshaling, which
Fortunately most of the popular ActiveX controls support will transform the interface pointer into a transmissible
a dual interface, which means smart clients like C/C++ can byte stream. An interface pointer can be marshaled by using
access the control’s custom interface directly. This is another low-level COM APIs such as the CoMarshalInterface/CoUn-
advantage to hosting the control directly because most avail- marshalInterface, or by using the GIT (Global Interface Table).
able commercial products only work with IDispatch. The GIT is a process-wise singleton that contains the marshaled
following one line of code shows how neat, clear, and natural interface pointer that can be efficiently unmarshaled multiple
it is to work with a dual interface: times within the same process.
By using GIT, the CJavaCOMBridge class can be modified as
itf->foo(param); shown in Listing 10.
There is still one thing left though. Prior to invocating any
Data Type Mapping control method in a native thread, the native thread has to
An important restriction to working with dispinterfaces and have an associated COM apartment. To enter a COM apart-
dual interfaces is that every single parameter of every single ment, one of the CoInitialize/CoInitializeEx/OleInitialize
method must be variant compliant. A variant is a discriminated family functions in the native thread can be called, depending
union and Java had no such concept until Java 1.5. Table 1 on the apartment model and drag/drop support. Call CoUnini-
shows the core variant-compliant IDL types that map to Java. tialize/OleUninitialize to exit the apartment before the native
For the primitive types there could be a direct mapping. thread terminates. Failing to do this may delay the resources
However, some types, which have question mark entries in reclamation.
Table 1, have no such luck.
There are several ways to solve this problem, such as creat- Sun Hotspot Java Threads Under the Hood
ing Java types that contain an opaque pointer to a native Vari- Because JNI functions can be called from an arbitrary
ant type. However, this discussion is a topic for another day. thread, it’s difficult to enter and exit a COM apartment from
a JNI function directly. A practical approach is to do this in
Cross-Apartment Access Java code. Before talking about this approach, let’s review Sun
In Listing 9 and the previous snippet, the interface pointer Hotspot Java threads.
(disp and itf) was used directly. However, in most cases this is Sun Hotspot Java threads use native threads. When a Java
wrong. Generally, a windowed ActiveX control is living in an GUI application starts, in addition to the Main-Method thread
STA (single thread apartment); its interface pointer will have that executes the main method, there are several other threads
no meaning in another apartment. (Apartment is an execution running behind the scene (see Table 2).
context that defines a logical grouping of objects that share a In Table 2, the Reference Handler Thread and Finalizer
Thread are used for garbage collection. They don’t need to live
in a COM apartment. The same applies to the other AWT/
JNI Call Thread IUnknown S/MTA STA
Subclassed SunAwtCanvas Daemon helper threads. However, for the rest of the threads,
RPC Channel PostMessage
IUnknown they need to have COM apartments associated with them if
Proxy for MSG Queue
IFoo
Control IDispatch
they want to use COM.
IUnknown
Control A common strategy is to wrap COM initialize and termina-
IFoo
JNI Call pFoo foo() Call IFoo :: foo tion functions into a Java utility class and each thread finds
// CJavaCOMBridge bridge;
// defined elsewhere GetMessage Toolkit Thread IFoo Stub a way to call these functions. Listing 11 shows such a COM
IFoo pFoo = NULL; wrapper.
bridge.QueryControl (..., &pFoo);
pFoo foo (); Please note that there is a ThreadLocal singleton, thrdlocal,
in the JCOM class. It’s used to guarantee that calls to initialize/
Figure 3 COM cross-apartment access mechanics uninitialize in the same thread will be idempotent.
Variant IDL Type Java Mapping Variant IDL Type Java Mapping Variant IDL Type Java Mapping
VARIANT_BOOL boolean float float IDispatch* ?
short short double double IUnknown* ?
int int BSTR java.lang.String VARIANT ?
long long DATE ? SAFEARRAY ?
Table 1 Data type mapping between core variant compliant IDL types and Java types
Sink ActiveX Control Events LinuxWorld Conference & Expo www.linuxworldexpo.com 508-424-4810 41
The ActiveX control uses an event-driven model similar to what Java
M7 www.m7.com/d7.do 866-770-9770 19
does. It’s using the Observer (Publisher-Subscriber) design pattern that
observers can subscribe to a publisher (the control), which will call back to
Microsoft msdn.microsoft.com/visual 11
the observer when a state has changed (event fired).
To sink a control event in C++, you can create a regular COM object that
Nexaweb www.nexaweb.com Cover IV
will implement the callback interface. (This object is traditionally called a
sink object and the callback interface is also called outbound interface.) The
Northwoods Software Corp. www.nwoods.com/go 800-434-9820 43
sink object doesn’t need to be exportable from a DLL. Listing 13 shows the
relative code. Parasoft Corporation www.parasoft.com/jtest_jdj 888-305-0041 13
To catch control events in Java, a common procedure can consist of the
following: Promind www.xslmaker.com 415-359-9117 23
• Define a Java event interface that is the mirror of the control callback
interface. The Java interface does not need to contain all the methods ReportingEngines www.reportingengines.com/download/f1ere.jsp 888-884-8665 17
in the control callback interface.
• Create a concrete class, say JCallbackHandler, that implements the SAP sdn.sap.com 21
event interface.
• Add native methods to the Control Java Wrapper, i.e., JAxControl, that Software FX www.softwarefx.com 800-392-4278 Cover III
will hook and unhook the C++ sink object to the concrete class instance
and to the control. WebApp Cabaret www.webappcabaret.com/jdj.jsp 866-256-7973 31
• Register the concrete class instance as a listener to the Control Java
Wrapper. WebRenderer www.webrenderer.com +61 3 6226 6274 7
• When control fires an event, it will call the C++ sink object, which will
Web Services Edge 2005 East www.sys-con.com/edge 201-802-3066 51-60
in turn call back the Java concrete class instance method.
native methods.
This index is provided as an additional service to our readers. The publisher does not assume any liability for errors or omissions.
1. Return an error code or flag to indicate if the method has been called
successfully.
2. Convert the error code into a Java exception, which will be For Windowless controls, they may live in an MTA (mul-
caught in Java code. tithreaded apartment). If this is the case, it’s better for the
3. Throw a Java runtime exception. hosting thread to enter the MTA for best performance.
Release
#import “jtlnet.dll” raw_interfaces_only named_guid
Acknowledgment
Special thanks to Bino George at the Sun AWT Team, espe-
Figure 5 A .NET control registration information cially for his reviews.
References
• Microsoft Platform SDK: www:microsoft.com
• Rector, B., and Sells, C. (1999). ATL Internals. Addison-Wesley Professional.
1 ��������������
• Rector, B., and Newcomer, J. (1997). Win32 Programming. Addison-Wesley.
• Newcomer, J. (2000). “Message Management”: www.codeproject.com/dialog/messagemgmt.asp
• Bloch, J. (2001). Effective Java Programming Language Guide. “Item 6: Avoid Finalizers.” Addison-
Wesley Professional. ������������������������
• Box, D. (1998). Essential COM. Addison-Wesley Professional.
• Gamma, E., et al (1995). Design Patterns. Addison-Wesley Professional. ������������������
• Troelsen, A. (2002). COM and .Net Interoperability. Apress.
�����������™ is the only ���� custom blog
• Wang, S. (2004). “Embedding the Java Virtual Machine, Once and for All.” JDJ, Vol. 9, issue 8. address you can own that comes with instant
access to the entire i-technology community.
Listing 1 Have your blog read alongside the world’s leading
// cpp file authorities, makers and shakers of the industry,
CJavaCOMBridge bridge
bool createControl(HWND parentWnd) { including well-known and highly respected
... i-technology writers and editors.
bridge.Create(parentWnd, CWindow::rcDefault);
2 �����������
...
}
Listing 2
// cpp file
class CJavaCOMBridge : public CWindowImpl<...> {
�������������������������
private:
CAxWindow axwnd_; �����������™ gives you the most prestigious blog
public: address. There is no other blog community in the
... // Message Map
LRESULT OnCreate(...){ world that offers such a targeted address, and
... comes with an instant targeted readership.
// create container
3 �����������������
axwnd_.Create(m_hWnd, CWindow::rcDefault);
// create ActiveX control
axwnd_.CreateControl(progid);
...
}
}
... // other stuff ���������������
�����������™ is powered by ���������™, the most
Listing 3 feature rich and bleeding-edge blog engine in the
HWND GetNativeWindow(JNIEnv* env, jobject canvas, jint awtversion)
{ world, designed by Alan Williamson, the legendary
// Get the AWT editor of ���� Alan kept the i-technology community
JAWT awt; bloggers’ demanding needs in mind and integrated
awt.version = awtversion;
JAWT_GetAWT(env, &awt); your blog page to your favorite magazine’s Web site.
// Get the drawing surface
JAWT_DrawingSurface* ds = awt.GetDrawingSurface(env, canvas);
// Lock the drawing surface
jint lock = ds->Lock(ds);
// Get the drawing surface info �����������������������
JAWT_DrawingSurfaceInfo* dsi = ds->GetDrawingSurfaceInfo(ds);
// Get the platform specific drawing info ���������������������������
JAWT_Win32DrawingSurfaceInfo* dsi_win =
(JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo;
return dsi_win->hwnd;
����������������������������������
}
������������������� ����������������
������������������������� ������������������������
Listing 4
// jni cpp file ��������� �����������
#include <jniutil.hpp> // defined GetNativeWindow ��������������������� ������������������������
JNIEXPORT jboolean JNICALL Java_JAxControl_createControl(JNIEnv* env, jobject canvas) {
... ������������������ ������������������
HWND parentWnd = GetNativeWindow(env, canvas, awtversion); �������������������� ��������������
bridge.Create(parentWnd, CWindow::rcDefault);
... ����������������� ��������������������������
}
����������
���������������������
�����
Listing 5
������������������
// java file
public class JAxControl extends Canvas {
public JAxControl() {
...
}
public void addNotify() {
super.addNotify();
����������������
createControl();
}
... // other stuff
}
O
racle has impressed most of • JDBC 2.0 Extension Oracle Corporation
us with its database prod- • 2EE Connector Architecture 1.0
ucts and, in my opinion, • Java API for XML Processing 1.1 500 Oracle Parkway
they offer an impressive • Java Naming and Directory Redwood Shores, CA 94065
J2EE infrastructure as well. To select Interface ( JNDI) www.oracle.com
the right technology for migrating Phone: 650 506-7000
the popular Alamo Rent A Car Web J2EE continues to be a key compo- www.oracle.com/technology/products/ias/
site from its generation-old Micro- nent of Oracle’s corporate strategy. index.html
soft platform to a state-of-the-art Early on, we decided to leverage
J2EE stack, we took a close look standard design patterns for this
at Oracle’s latest product, Oracle large-scale Web site. J2EE APIs were and testing process. We experienced
Application Server 10g, in conjunc- to be employed across all layers of some issues in accommodating team
tion with the well-integrated Oracle the application architecture via the development; however, Oracle is
JDeveloper Integrated Developer use of: addressing these issues. We were
Environment. During this review, • Model-View-Controller (MVC) happy to hear that the next release
Oracle’s product established itself as architecture of Oracle JDeveloper implements
a formidable choice for a standards- • Business delegates several enhancements for team
compatible J2EE development and • Session façades development.
runtime platform. It continues to • Service locators
prove its enterprise-grade reliabil- • Data Access Objects Support for Mission-Critical
ity by running the mission-critical J2EE Deployments
Alamo.com Web site almost flaw- How could Oracle JDeveloper, Our second checkbox for selecting
lessly since August. What is equally with its ADF, aid our approach? How a serious J2EE platform was sup-
important to us is that it’s a choice would it fit our standards-based port for high availability. The Alamo
for the future, with industry-lead- development established on MVC? Web site had to be designed for high
ing support for service-oriented We have found that Oracle’s ADF availability, which means minimiz-
architecture (SOA) and the Grid. helps manage the ever-increasing ing unplanned downtime. As you
With its Business Process Execution complexity of J2EE applications. The would expect from an enterprise-
Language (BPEL) support for orches- framework is based on an MVC ar- grade player such as Oracle, Oracle
trating services, Oracle Application chitecture and allows the use of any Application Server 10g did not disap-
Development Framework (ADF), view, model, or controller technolo- point. We successfully tested and
integration capabilities for leverag- gy. The declarative data binding that later deployed the following built-in
ing existing heterogeneous assets Oracle developed with ADF is part capabilities:
Mark Euler works for Perot (for example, Tuxedo services writ- of JSR ( JSR-227). The framework’s • Automatic connection rerouting
Systems and currently serves ten in C), a certificate authority, and visual and declarative capabili- • Load balancing in the instance of
as development manager even Web application service level ties, coupled with guided-coding a failure
for Vanguard Car Rental monitoring, this product delivers a techniques, can increase developer • Clustered session state failover
e-commerce applications, and lot of bang for the buck. productivity. We developed an ap- across a cluster
systems architect for the Odyssey plication with a JSP view layer, Struts • Fast-start fault recovery architec-
application, a large multitier OLTP Standard J2EE Support Controller, and EJB model layer ture where failures or instance
that runs much of Vanguard’s Before talking about the bells and using the framework. The tool is a deaths are automatically discov-
whistles, let’s first stick to the basics.
business. He recently led a team good fit if you follow standard design ered and instances are automati-
Compliance with J2EE standards was
of 15 developers in designing patterns (we used Struts as the ADF cally restarted, reconfigured, and
Vanguard’s future e-commerce a must – we could not compromise. controller), and can significantly reclustered
We extensively tested and later suc-
architecture and redesigning the reduce the amount of infrastructure
Alamo Web site, which includedcessfully deployed on the Alamo.com coding. Furthermore, with Oracle Enter-
Web site all of the following J2EE 1.3
the development of several Oracle JDeveloper is a compre- prise Manager’s all-Web-based con-
applications to support the WebAPIs: hensive, integrated IDE. It also pro- sole (see Figure 1), you can manage
• JavaServer Pages 1.2
site functionality. vides built-in features for standard such a high-availability configura-
• Java Servlet 2.3 tools such as JUnit and CVS, which tion and monitor system resources
mark.euler@ps.net. • Enterprise JavaBeans 2.0 are important for our development such as CPU usage, memory, and
Only
$
69
Subscription Price Includes FREE JDJ Digital Edition!
99
ONE YEAR
12 ISSUES
www.SYS-CON.com/JDJ
or 1-888-303-5282
The World’s Leading
i-Technology Publisher
OFFER SUBJECT TO CHANGE WITHOUT NOTICE
What Sets Oracle Application WebLogic (also part of our evaluation). been impressed with what we’ve seen
Server 10g Apart This functionality includes extensive in our evaluations.
Let’s focus some attention on caching technology, which yielded As for caching, we tested both
functionality details, which, in my unexpected performance benefits. Al- Oracle Application Server Web Cache
opinion, set Oracle Application Server though we have not had the opportu- and Java Object Cache (JOC) caching
10g apart from other J2EE platforms nity to use the native BPEL capabilities technologies. Used at the network
such as IBM WebSphere and BEA of the BPEL Process Manager, we have edge, Web Cache combines caching
and load balancing. It intercepts HTTP
requests and responds with
a cached page if one is available.
If one is not available, it passes the
request back to the least busy ap-
plication server. Our expectations for
performance improvements on our
dynamic e-commerce Web site were
not high, but Web Cache also has the
ability to cache dynamically gener-
ated, next-to-static Web content. The
result: on Alamo.com, Web Cache
serves 80% of all requests, of which
25% are served in compressed form – a
clear performance boost!
We also reviewed JOC, which is
part of the OC4J J2EE container. JOC
provides an API and service for
managing cache objects within J2EE
apps. We truly loved this feature
because it increases performance,
especially in a clustered environment.
Oracle contributed this innovation
Figure 1 Oracle Enterprise Manager 10g: analyzing URL performance to the J2EE community as JSR 107
(JCache API).
Let’s not end this review without
talking about what Oracle sees as
the “crown jewel” of the Applica-
tion Server 10g platform, Oracle’s
next-generation process integration
product, the Oracle BPEL Process
Manager (see Figure 2). Because it’s
a standards-based BPEL engine, it is
a comprehensive offering, not only
for its standards-based Web services
orchestration capabilities, but also
for the built-in WSIF bindings that
enable BPEL to orchestrate nearly
any legacy system as if it were a Web
service – without having to explicitly
wrap or publish it as one.
SOA and Web services are certainly
the future. With a native BPEL imple-
mentation in Oracle BPEL Process
Manager, Oracle is among the first
to offer the crucial service orches-
tration capability needed to build
service-oriented applications easily.
Coupled with a comprehensive and
integrated SOA platform in Oracle
Application Server 10g, Oracle is
a compelling choice for realizing
Figure 2 Oracle BPEL Process Manager – process development enterprise SOA!
Reg
FEBR ister by
WEB
UARY
11, 20
SAV Up 05
E To
Matt Ackley
eBay
$
200
SERVICES
TM
International Web Servic
Web Services Edge
2005East
February 15–17, 2005
John B. Hynes Convention Center
Boston, MA
SPECIAL INSERT: WEB SERVICES EDGE 2005
Ari Bixhorn is the director of Web Services Strategy in the Developer and Platform Division at Microsoft Corp.
He is responsible for product planning and technical evangelism for Microsoft’s Web services offerings,
including “Indigo,” the code name for a component of the next version of the Windows operating system,
code-named Windows “Longhorn.” Bixhorn has spent the past five years at Microsoft, driving product man-
agement efforts for the Visual Basic and Visual Studio development systems.
Mike Milinkovich has held key management positions at Oracle, WebGain, The Object People, and Object
Technology International Inc. (which subsequently became a wholly owned subsidiary of IBM), assuming
responsibility for development, product management, marketing, strategic planning, finance, and busi-
ness development. Mike earned his MS degree in information and systems sciences and a bachelor of
commerce degree from Carleton University in Ottawa, Canada.
8:00 FREE Tutorial – Ashish Larivee, Novell, Using a Web Services Framework to Build SOA Applications
9:00 (J-1) What’s New In JDO 2.0 (.NET-1) Intro to SPOT (WS-1) Ensuring Web Services Interoperability
DAY 2 FEBRUARY 15
(J-2) Using Java Messaging in (.NET-2) An Introduction to SQL Server (WS-2) Web Services Standards:
10:00 Real-Time Trading Systems Reporting Services Going Behind the Mask
11:00 Opening Keynote – Matt Ackley, Senior Director, eBay Developer Program, eBay
3:00 Keynote Panel Presented by JCP – Web Services and Security (WS-2B) Solving Complex Business Problems
Moderator: Onno Kluyt, Sr Director & Chair, JCP Program, Sun Microsystems Though SOA
7:30 Registration
8:00 FREE Tutorial – Thom Robbins, Microsoft – The Next Generation of Visual Studio (free with VIP preregistration)
FEBRUARY 15-17, 2005
WWW.SYS-CON.COM/EDGE
(.NET-5) Web Services Security for Dummies (WS-5) The Role of Policy in Web Services
(J-5) J2ME and Eclipse with WSE2 Integration – It’s More Than Just Security
10:00
11:00 Keynote – Ari Bixhorn, Director, Web Services Stategies, Microsoft Corporation
(J-7) Migrating Enterprise Applications (.NET-7) So You THINK (.NET-7B) Building and
5:00 Between J2EE Application Servers You Know What an Using Advanced (WS-7) Driving SOA Governance
Object Is… ASP.NET Web Controls
6:00 Cabana Night – Hosted by INETA
8:00 FREE Tutorial – Patrick Hynds and Duane Laflotte, Critical Sites – Security, The New Reality (free with VIP preregistration)
(J-9) Using Grid Computing with Web (.NET-9) Smart Client Development with the (WS-9) High Performance (WS-9B) Effective Risk
10:00 Services and J2EE to Create Internet- Offline Application Block Web Services – Tackling Abatement and Success in
based SOAs Scalability and Speed a Service-Oriented World
The program, including topics and times, is subject to change. Please refer to www.sys-con.com for all updates.
WS Security Case Study
FREE Web Services Security
FREE Tutorial –Aaron Williams, JCP, Developing Web Services Using Java Technology
Tutorial Presented by Novell
Using a Web Services Framework
(CS-1) Developing E-Commerce Applications to Build SOA Applications
(WSS-1) Identity in SOA
with Web Services Tuesday, Feb. 15
8:00 A.M. – 11:00 A.M.
(WSS-2) Securing Web Services
(CS-2) Developing Enterprise Class Web Services
with WS-Security
FREE Tutorial Presented by
Java Community Process
Developing Web Services
Using Java Technologies
(CS-3) Service-Oriented Development on NetKernel –
Patterns, processes and product to Tuesday, Feb. 15
reduce the complexity of IT systems 8:00 A.M. – 11:00 A.M.
(WSS-3) Anatomy of a Web Services Attack
on) FREE
(WSS-8) Transitioning Successfully to SOA
and Web Services: Building the Infrastructure
(CS-8) Using SOA and Web Services to Issue Business .NET Tutorial
for SOA Growth
Licenses in the District of Columbia
Presented by
in
d
Visit Web site for update (CS-9) Developing Web Services with Eclipse Critical Sites
Security,
The New Reality
Patrick Hynds
Thursday, Feb. 17
8:00 A.M. – 11:00 A.M.
Free Tutorials with VIP Preregistration ONLY!
The program, including topics and times, is subject to change. Please refer to www.sys-con.com for all updates.
International Web Servic
and discusses the approaches to plug these gaps. It also discusses
JAVA TRACK implementation of a solution for identity propagation from client to Web
service and from Web service to J2EE container.
J-1 What’s New In JDO 2.0 BIO: Sudhir Bhojwani is a senior architect working for BEA
PATRICK LINSKEY, SOLARMETRIC Technical Solutions Group. He has over eight years of industry
Tuesday, February 15, 2005 9:00 A.M. – 9:50 A.M. experience architecting and designing systems based on compo-
In this presentation, SolarMetric’s CTO Patrick Linskey introduces JDO, the nent technologies like CORBA and EJBs, and most recently working on SOA
standards-based object persistence specification, and the new changes principles.
introduced with the release of JDO 2. Developers using JDO are seeing
increased application portability, reduced development cycle time, improved
BIO: Sushil Shukla is a principal architect working for BEA
Technical Solutions Group. He has 19 years of industry experience
code quality, higher performance, and more manageable scalability. The
and 9 years of architecting and designing application server-
session will highlight the problems of persisting data to a database and the
based large systems. He has extensive experience with tools and technolo-
basics of JDO. Patrick will focus on what’s new with JDO 2, including the
gies used in developing mission-critical applications.
improvements and alternatives to the JDO Query Language, detached data-
base operations, and the new metadata for object / relational mapping. BIO: Sudhrity Mondal is a principal architect working for BEA
Technical Solutions Group. He has 14 years of industry experience
BIO: Patrick Linskey has been working with Java Data Objects
and specializes in Java technology, enterprise integration solutions,
for over 3 years and has been involved in object/relational map-
SPECIAL INSERT: WEB SERVICES EDGE 2005
BIO: Coach Wei is founder and CTO of Nexaweb Technologies J-6 The Impact of JBoss and Mono on the
(www.nexaweb.com), which develops the leading software plat- Application Server Market
form for building and deploying Enterprise Internet Applications.
PIERRE FRICKE, D. H. BROWN ASSOCIATES
Coach has his master’s degree from MIT, holds several patents, is the
Wednesday, February 16, 2005 4:00 P.M. – 4:50 P.M.
author of many technology publications, and is an industry advocate for the
proliferation of open standards.
Linux and Apache drove a dramatic change in the server operating system and
Web server marketplaces. These areas, dominated by Microsoft and Sun in the
J-4 Web Services End-to-End Security late 1990s, now see leading open source alternatives challenging these leaders.
on J2EE: Gaps and Proposed Solutions But open source’s impact doesn’t stop there. JBoss, the open source J2EE plat-
form, is becoming the high-volume leader in the J2EE application space. More
SUDHIR BHOJWANI, SUSHIL SHUKLA, & SUDHRITY MONDAL, BEA
recently, Mono, the open source implementation of Microsoft .NET, promises to
Wednesday, February 16, 2005 9:00 A.M. – 9:50 A.M. be a main strategic item for Novell. Mono may extend Microsoft’s hegemony into
Even though WS-* security standards (WS-Security, WS-Trust, WS- Linux and open-source by countering J2EE’s cross-platform strategic advantage.
SecureConversation, WS-Policy, etc.) are sufficiently prescriptive on
specific security subjects like signing, SOAP message encryption, BIO: Pierre Fricke, D.H. Brown’s vice president of Application and
request/receive security tokens, they do not provide end-to-end securi- Integration Infrastructure, extends the company’s unique technical
ty protocol that Web services can depend on to meet their security and strategic analysis into the J2EE, Microsoft .NET, and integration
requirements. The most significant gap is identity propagation from a infrastructure space. After completing his M.B.A., Pierre became one of the
Web service into a J2EE container. Current JAX-RPC specification or leading strategists and marketing leaders in IBM focusing on interoperability,
JSR 109 does not cover this issue. This presentation identifies the gaps integration, WebSphere, Windows NT, UNIX, as well as Linux and open source.
and a senior technical staff member with IBM’s Emerging information. As companies and consumers begin to rely more and more on
Technology Group. He has been actively engaged in open stan- Web services, the need for developing reliable, high-quality Web services is
dards development for XML and Web services since 1999 and is an elected even stronger. This session will explain issues specific to Web services and
member of the OASIS Technical Advisory Board. Chris is also a coauthor will illustrate solid engineering and testing practices required to ensure
and editor of the WS-Reliable Messaging specification. complete Web service functionality, interoperability, and security. Whether
creating Web services from scratch or integrating a legacy back-end server
JOHN B. HYNES CONVENTION CENTER • BOSTON, MA
via Web services, the practices and principles outlined in this session will
WS-2 Web Services Standards: be of great benefit.
Going Behind the Mask
GLEN DANIELS, SONIC SOFTWARE BIO: David McCaw has over eight years of experience in helping
software development teams improve quality throughout the
FEBRUARY 15-17, 2005
development process. Over the last three years, he has led the
Web services and service-oriented architectures (SOAs) are emerging as an
Parasoft Web Services Solutions team, which has developed an industry-
integral part of the enterprise IT strategy. According to a recent IDC study,
leading approach for Web services testing. He has implemented Web ser-
Web services – related revenue is expected to triple from $1.1 billion
vice quality solutions for development groups in organizations such as
worldwide in 2003, to $3.4 billion in 2004, and $16.6 billion by 2008. As
Sabre-Holdings, Yahoo! Overture, and McGraw-Hill. McCaw has an exten-
SOAs proliferate and the number of Web services added to them increases,
sive background in the areas of Java and Web service reliability, perform-
standards will play an increasingly significant role. This session will look at
ance, and security. He is involved with OASIS and WS-I, and is a frequent
the state of key Web services standards such as WS-Choreography, WS-
speaker at industry events.
Reliability and WS-ReliableMessaging, SOAP/MTOM/XOP, WSDL, XPath,
XQuery, and WS-Notification as well as related Java standards and open
source efforts. It will also look at the organizational impact of standards WS-5 The Role of Policy in Web Services
adoption in the industry. Integration – It’s More Than Just Security
TOUFIC BOUBEZ, LAYER 7 TECHNOLOGIES
BIO: Glen Daniels is manager of standards and consortia at Sonic
Software and coauthor of Building Web Services with Java. He has Wedneday, February 16, 2005 10:00 A.M. – 10:50 A.M.
been working with Web services technologies since their inception Too often today the preferences, terms, and conditions describing how a
in the late ’90s, and in addition to developing products and helping to found Web service behaves when discovered and invoked is programmed right into
Apache’s Axis project, he has been an active participant in standards bodies the business logic. Hard-coding this behavior logic however introduces cost,
such as the W3C, and a member of the SOAPBuilders interoperability group. complexity, and rigidity into a Web services architecture. A better approach is
to abstract a Web services usage “policy” out of code where this metadata
can be managed as need be. This session introduces the concept of Web
WS-2B Solving Complex Business Problems Services Policy and describes how the construct can be used to implement a
Though SOA more customized and versatile Web service infrastructure.
JOHN DALY, NETNUMINA
Tuesday, February 15, 2005 3:00 P.M. – 3:50 P.M. BIO: Toufic Boubez is a well-respected and renowned Web servic-
es visionary. Prior to cofounding Layer 7 Technologies, Toufic was
BIO: John Daly is a recognized leader in service oriented archi-
the chief Web services architect for IBM’s Software Group and drove
tecture, enterprise wide integration and business intelligence. As
their early XML and Web services strategies. He is a sought-after presenter
Managing Director of netNumina, a leading firm focused on finan-
and has chaired many XML and Web services conferences. He is an author of
cial service, pharmaceutical and other fortune 100 companies, he is respon-
many publications and his most recent book is the top-selling Building Web
sible for helping companies solve complex business problems by delivering
Services with Java: Making Sense of XML, SOAP, WSDL ,and UDDI.
sophisticated technology solutions that combine proven technologies with
cutting edge thinking. John's ability to deliver technological solutions specifi-
cally designed for the user experience separates his approach from those of WS-6 B2B Policy Enforcement:
netNumina's competitors. The Third Rail of SOA Implementation
ALISTAIR FARQUHARSON, DIGITAL EVOLUTION
WS-3 The XML Data Challenge Wednesday, February 16, 2005 4:00 P.M. – 4:50 P.M.
JONATHAN BRUCE, DATADIRECT TECHNOLOGIES One of the great benefits of a service-oriented architecture is the ability it
Tuesday, February 15, 2005 4:00 P.M. – 4:50 P.M. gives you to extend programmatic, integration capabilities to business part-
Most businesses store and query data with relational databases but need to ners. Going beyond simple sharing of data with partners, SOA enables true
use Extensible Markup Language (XML) to exchange and display data on B2B application integration. At the same time, this capability creates a vex-
the Web and with vendors and partners. As a result, programmers need to ing security policy enforcement dilemma. How can you be sure that a user
deal with both relational and XML data, often at the same time. Emerging from a partner organization is actually authorized to integrate with your
standards such as XQuery, XQJ, and SQL/XML, promise to revolutionize data applications? How can you authenticate that user? Do you even want that
exchange and the ways applications are developed, deployed, and utilized. headache in the first place? This session will discuss the issues that arise
Learn the key facts about these standards, including what they mean, when in B2B security policy enforcement and explore several proven approaches
BIO: Alistair Farquharson is the CTO of Digital Evolution, where BIO: Sameer Tyagi works as a senior Java architect with Sun
he spearheads product development and provides thought leader- Microsystems. He remains focused on architecture, design,
ship to enterprise customers implementing Web services. His and implementation of large-scale enterprise applications with
skills span many industries and include designing and implementing sys- Java technology. His publications include industry periodicals and books
tem architectures, as well as spearheading initiatives such as develop- on Java and J2EE technologies including Java Web Services
ment/team lead. He is an expert in custom-application development, dis- Architecture.
tributed environments, architecting scalable hardware and software appli-
cations and systems, and Web services application development. WS-9B Effective Risk Abatement and Success
in a Service-Oriented World
WS-7 Driving SOA Governance PAUL LIPTON, COMPUTER ASSOCIATES
BRENT CARLSON, LOGICLIBRARY Thursday, February 17, 2005 10:00 A.M. – 10:50 A.M.
Wednesday, February 16, 2005 5:00 P.M. – 5:50 P.M. IT leaders are hoping to leverage the benefits inherent in Web services and
In the past year, Web services and service-oriented architectures (SOAs) Service-Oriented Architectures (SOA) to enable their businesses to be far more
have become mainstream because of their ability to provide business agili- competitive and to find new operational efficiencies. But, can we depend on
q Education q Transportation/Rail/Sea/
q Banking/Insurance/Accounting
City __________________________________________________________________________________________
Air/Ground
State________________________________Zip ____________________Country __________________________ q Government (including Military) q Travel/Hospitality/Entertainment
q Healthcare/Pharmaceuticals/Biotech/ q Utilities
q Wholesale/Trade/Distribution/
Phone ________________________________________________________________________________________
Biomedical
Fax_______________________________E-Mail ______________________________________________________ q Internet/Web/e-Commerce Retail
q Manufacturing and Process q Other (please specify)
2 PAYMENT METHOD: (Payment in full due with registration)
JOHN B. HYNES CONVENTION CENTER • BOSTON, MA
03 q 03 q
WWW.SYS-CON.COM/EDGE
Card #______________________________________________ Exp. Date______________ D. Please indicate the value of software products and
services that you recommend, buy, specify or approve
Signature_____________________________________________________________________ over the course of one year:
q $10 million or more q $10,000 - $99,999
Billing Address (if different from mailing address) q $1 million - $9.9 million q Less than $10,000
q $500,000 - $999,999 q Don't know
q $100,000 - $499,999
_______________________________________________________________________
3 PLEASE INDICATE Total Registration fee $____________
q $10 billion or more q $1 million - $9.9 million
YOUR CONFERENCE CHOICE: q $1 billion - $9.9 billion q Less than $1 million
SYS-CON Events, Inc, and SYS-Con Media make no warranties regarding con-
Registering a group of four or more? Please call Jim Hanchrow at 201-802-3066, tent, speakers or attendance. The opinions of speakers, exhibitors and sponsors
and receive an additional discount. do not reflect the opinion of SYS-CON Events and SYS-CON Media and no
endorsement of speakers, exhibiting companies products, or sponsors is implied.
CANCELLATIONS, 2005, will be honored less a 20% handling Speakers, sessions and schedule are subject to
SUBSTITUTIONS, REFUNDS charge. No requests for refunds will be change without prior notice.
Fax written request to SYS-CON Registration honored after February 4, 2005. Requests for
If you require special assistance covered 201-782-9601. Requests for refunds received substitutions must be made in writing prior to No solicitation by anyone other than
under the Americans with Disabilities Act, prior to January 7, 2005 will be honored, less February 11, 2005. No one under 18 is official exhibitors, sponsors or marketing
please call 201-802-3066 by partners is permitted. Such behavior is
a 10% handling charge; requests received permitted to attend. No warranties are made
cause for expulsion without refund.
February 4, 2005. after January 7, 2005, and before February 4, regarding the content of sessions or materials.
����������
��������
���������������������������������������������������������������
���������������������������������������������������������������������������������������������������������������������������
����������������������������������������������������������������������������������
JSR Watch
W
elcome to the February Faces 1.2 (JSR 252) and JSP 2.1 (JSR 245) for Presence that provides a standard
edition of the JCP program technologies. These two JSRs recently portable and secure interface to control,
column. Each month you completed the Early Draft Review in the manage, and manipulate Presence
can read about the Java JCP program and are part of the J2EE 5.0 information between Presence clients
Community Process program: newly Umbrella JSR. The focus of these JSRs and servers. JSR 187, JAIN Instant
submitted JSRs, new draft specs, Java is to improve the alignment of the J2EE Messaging, a protocol-agnostic API for
APIs that were finalized, and other news Web tier and to further enhance ease of Instant Messaging, provides a standard
from the JCP. JCP members have been development. A cornerstone of this is portable and secure interface to control,
busy since my last column, submitting a new, unified expression language API manage, and manipulate instant mes-
over six new JSRs! This time around I’ll that both technologies share. sages between clients through the use of
cover some new JSRs recently submitted You can find out more about Java Presence servers.
in the Web services area, and some JSRs technologies being developed for Web The expert group for JSR 79, JAIN
from the telecommunications commu- services at the Web Services Edge 2005 MEGACO API, has completed its work
nity and from the Micro Edition folks. East Conference. The JCP is an as- and published the Final Release of the
sociation and corporate sponsor of the specification. This JSR specifies the JAIN
Web Tier event and we are holding our quarterly API through which access to protocol
In the past month or so four new JCP training and face-to-face Execu- stacks that support the MEGACO/H.248
JSRs have been submitted to the JCP tive Committee (EC) meeting nearby, protocol may be achieved.
program that focus on Java technology hosted by IBM. We will have a booth in
interfaces for Web services. You can the Expo Hall (#405) and a free tutorial On the J2ME Side
read more about these JSRs in my Web on developing Web services with Java For the J2ME environment, one new
services column also in this issue. technologies on Tuesday, from 8 a.m.–11 JSR has been submitted and approved
JSR 267, a JSP tag library for Web a.m. I will also be leading a panel ses- by the EC – JSR 266, Unified Message
services, proposes a happy union of sion with JCP EC members on Tuesday Box Access API (UMBA-API). This JSR
standard Web services protocols and afternoon at 3 p.m. and a technical will define an API to access and manage
JavaServer Pages (JSP) that will help JSP session on Thursday afternoon at 4 p.m. the mobile device’s message boxes and
page authors integrate Web services into Hope to see you there! their contents.
their Web applications with minimal The Expert Groups of two J2ME JSRs
effort and quick turnaround times. Telecommunications Community – have recently posted Propose Final
JSR 265, API for Utilizing Web Services OSSJ and JAIN Drafts. JSR 238, Mobile International-
Policy, aims to standardize a basic Two new JSRs have been submitted ization API, defines an API that provides
framework in Java for utilizing the Web and are supported by the OSS through culturally correct data formatting,
services constraints and capabilities. the Java community. JSR 264, Order sorting of text strings, and application
JSR 262, Web Services Connector for Management API, defines an interface resource processing for J2ME MIDlets
Java Management Extensions (JMX ) to an Order Management component, running in MIDP over CLDC. JSR 211,
Agents, defines a connector for the JMX with specific extensions for activation Content Handler API, will enable J2ME
Remote API that uses Web services to and work order management use cases. applications to handle multimedia and
make JMX instrumentation available JSR 263, Fault Management API, pro- Web content, and can give developers
remotely. vides for the monitoring and manage- and users a seamless and integrated
JSR 261, Java APIs for XML-Based ment of alarms within an information user environment on mobile phones
Onno Kluyt is the Web Services Addressing (JAX-WSA) or a telecommunications network. Both and wireless devices.
director of the 1.0 specification, will define APIs and JSRs were approved by the JCP EC in That’s it for this month. I’m very inter-
JCP Program a framework for supporting transport- January. ested in your feedback. Please e-mail
Management Office, neutral addressing of Web services. In addition, the JAIN Community me with your comments, suggestions,
Sun Microsystems. In addition, two JSRs that directly has two JSRs completing Public Review and questions. I look forward to seeing
support the ease of development goals in February. JSR 186, JAIN Presence, you at the Web Services Edge 2005 East
onno@jcp.org of J2EE 5.0 (JSR 244) are JavaServer is a generic and protocol-agnostic API Conference!