Wednesday, August 1, 2012

Serviceability gem: HTTP Session debugging in WebSphere Application Server - IBMTrackerDebug. servlet

Techniques for HTTPSession debugging in WebSphere Application Server

To dynamically view the number of sessions as a Web application is running, enable performance monitoring for HTTP sessions. This will give you an indication as to whether sessions are actually being created.

Alternatively, a special servlet can be invoked that displays the current configuration and statistics related to session tracking. This servlet has all the counters that are in performance monitor tool and has some additional counters.
  • Servlet name: com.ibm.ws.webcontainer.httpsession.IBMTrackerDebug.
  • It can be invoked from any Web module which is enabled to serve by class name. For example, using default_app, http://localhost:9080/servlet/com.ibm.ws.webcontainer.httpsession.IBMTrackerDebug.
    Note: If you have enabled the serve-by-class-name feature and want to disable the IBMTrackerDebug servlet, then specify the web container custom property, com.ibm.ws.webcontainer.donotservebyclassname.See Web container custom properties for more information on how to set this property.
  • If you are viewing the module via the serve-by-class-name feature, be aware that it may be viewable by anyone who can view the application. You may wish to map a specific, secured URL to the servlet instead and disable the serve-servlets-by-classname feature.

Monday, July 30, 2012

WebSphere Application Server V8.5 Cross Component Trace

Have you ever tried to piece together the log entries from a request that spanned multiple application servers?  When you've got lots of concurrent activity on your server it gets hard to figure out which entries are from each request using timestamps alone.  Clock skew between systems doesn't help, and coarse timestamp granularity in log and trace files can make you long for simpler days.

In WebSphere Application Server V8.5, we introduced a capability called Cross Component Trace (XCT) that augments your log files so it's easy to tell which threads and server processes were involved in processing each request.

Check out this video showing how to use XCT to mark log and trace entries with a request ID, and how to use High Performance Extensible Logging (HPEL) to find all log and trace entries that share a common request ID.

Once you see what XCT is all about, you may also want to investigate a new tool we've released for the IBM Support Assistant called the IBM WebSphere Cross Component Trace Logviewer.  As the name suggests, it takes advantage of XCT content in log and trace files.  This video shows how to use it to group log content into request hierarchies.

Wednesday, July 4, 2012

WebSphere Application Server V8.5 is Now Available

I first talked about WAS V8.5 back in October 2011 when we started the early program. And in June 2012 we shipped it...Walt Noffsinger, WAS Product Manager, describes our new release in some more detail here but the 1-line summary is that V8.5 has both big news and small news...

The big news is the inclusion of Intelligent Management capabilities in WAS Network Deployment (ND) and WAS for z/OS. This integrates capabilities into WAS that were previously only available in the separate WebSphere Virtual Enterprise and WebSphere Compute Grid offerings: all the features of WVE including application editioning, server health management, dynamic clustering and intelligent routing, and the batch processing capabilities of WCG are now included in WAS ND. And its faster, servicing more requests per core, then any other AppServer on the market.

The small news is the WAS Liberty profile, now part of all commercial editions of WAS. "Small" means a lightweight server profile of WAS for web applications along with a lightweight distribution of the WAS Developers Tools as an Eclipse feature. My previous posts talked about both the development simplicity and lightweight production characteristics of the WAS Liberty profile. Here though, I want to show how quick and easy it is to get hold of the Liberty profile and the WAS developer tools for Eclipse and become productive in 3 easy steps. Take a look at this brief video...

-



...then give it a try. The full-function, non-time-bombed developer distribution of the runtime and the tools (which are shown in the video) are free for non-production use on developer desktops so it costs nothing to try it out. Let us know what you think by visiting wasdev.net.
Ian

Thursday, January 12, 2012

WebSphere 2012 Trends And Directions

Long time no blog (from me personally).

Just wanted to shoot out a quick pointer to an excellent blog post by our WebSphere CTO, Jerry Cuomo. Jerry talks through our work in mobile platforms, PaaS, DevOps, cloud benchmarking, 20/20 Analytics, Workload Integrated Systems, DataPower-as-a-Service, Internet Scale Computing, Business API management and social business. Also, he has a facebook page to promote discussion of each. Finally he has a SMS app written that allows you to interact with the trends and be notified of updates.

Sunday, November 6, 2011

WebSphere Application Server 8.5 alpa overview session at ApacheCon 2011 in Vancouver BC Thursday November 10

If you are in Vancouver  on Thursday November 10 and interested in listening about the new faster and lighter weight footprint version of WebSphere Application Server 8.5 alpha,  please come to MacKenzie Room (1st Floor) at 7PM at theThe Westin Bayshore Vancouver 1601 Bayshore Drive, Vancouver, BC, V6G 2V4.
 
Please note that this session is open to ALL users and customers not just ApacheCon attendees.
See announcement here
http://na11.apachecon.com/posts/32726152
https://twitter.com/#!/ApacheCon/status/131098166429892609

This will be a presentation and hands-on demo followed by a Q&A session by Eric Covener and Rohit Kelapure.

Monday, October 10, 2011

Java EE 6 and the Spring Framework

Recently two sessions at JavaOne 2011 covered the relationship between Java EE 6 and the Spring Framework. 

Java EE vs Spring Framework Shootout - This session compares the Spring and Java EE stacks in terms of Web frameworks. It re-examines the motivations behind the Spring framework and explores the emergence of the Java EE programming model to meet the challenges posed. The presentation provides insight into when Spring and/or Java EE is appropriate for a building Web applications and if they can coexist.

Best Practices for Migrating Spring Applications to Java EE 6 - The Spring Framework has no doubt played a major role in evolving how we write enterprise applications on the Java platform today, but it is still a proprietary framework owned by a single company. The age of having to rely on such proprietary frameworks in order to develop decent enterprise applications is now over, and using Java EE 6 has become an even easier way to develop enterprise applications based on standards, which makes it the best choice for any enterprise application. In this session, you will experience how to migrate a typical full-stack Spring application to a standards-based, completely portable Java EE 6 application, including integration tests. 

Both these presentations bring forth Java EE as a standards based, easier and better alternative to the proprietary Spring Framework. They also cover scenarios of migrating and co-existence with Spring. Please go through these presentations for re-evaluating the usage of Spring Framework in your application stack.

For best practices on integrating the Spring Framework with the WebSphere Application Server please look at the following whitepaper.

Friday, October 7, 2011

Announcing the WebSphere Application Server V8.5 Alpha

The year was 1911. While most were trying to understand how to create accounting machines and punch card readers, one man had a vision. He created a company with the sole intent of constructing a lightweight, fast, consumable application server that was so fast and easy to use, a developer could run it on even the slowest of punch card readers. "The server must start within 5 seconds" he exclaimed! "The server footprint cannot be bigger than 50 megabytes!" he mandated. While some of his more forward-thinking colleagues questioned how a production-ready server with such strong enterprise qualities of services could run in just 50 MB of space, others were puzzled by what an application server was and baffled by this talk of a "megabyte". They called him a dreamer and questioned whether this was even possible. "I want this application server technology to be available, even if it takes a hundred years!" he replied.

The rest is a history that is very much left out of the IBM Centenary literature. However, WebSphere Application Server V8.5 Alpha provides all this and more, using the new Liberty profile. Want to know more? Why not take a look round this new development community, WASdev. You can download the alpha server and tooling. We'd love you to let us know what you think on our forums, and to collaborate with us to help create a next generation development platform that works for you.

Modularity - the next generation of programming

One of the issues that the industry has been wrestling with for quite a while has been integration. Application servers are big and integrate lots of code to provide the right set of functionality. Applications are growing in size and are integrating third party code to do the same thing. Sometimes there are conflicts. The application server may have integrated one version of Apache Commons Logging and the application needs another because the third party code they need to use requires it. This can even happen within the application itself.

The only way we're going solve this kind of problem is to remove the hierarchical classloader structure in Java and replace it with a managed classloader tree that allows versioning and control resolving dependencies. In other words, we desperately need a modular programming model.

The Java EE platform has known about this issue for some time (since before Java EE 6). It was not addressed in EE 6, but was supposed to be part of the EE 7 discussion. However, as of this month, the Java EE 7 Expert Group has dropped the ball once again on delivering modularity, citing a need for modularity in Java SE first.

However, do not despair. It's extremely unfortunate that EE 7 is not addressing industry concerns, but vendors are providing modular support today in most every app server and OSGi seems to be the predominant form. WebSphere Application Server V8.0 supports building and deploying modular apps and the WebSphere Application Server V8.5 Alpha has a Liberty Profile that shows just how much modular programming is going to change how we program. Think about WebSphere, but with roughly the size and startup speed of Tomcat and an even simpler config model than Tomcat. Best of all, it's OSGi based and gives you the control to resolve dependencies the way you want.

If you want to learn more, see http://www.ibm.com/wasdev and if you want to voice your displeasure in not addressing modular applications in Java EE 7, then send email to the spec leads (found at http://jcp.org/en/egc/view?id=342) or the public comment mailing list, users@javaee-spec.java.net.

Tuesday, June 28, 2011

Great overview of WebSphere Application Server V8.0

Tom Alcott put together a great overview of version 8.0 of the WebSphere Application Server. Take a spin through his article on developerWorks.

He covers the Java EE 6 standards, additional integrated programming models (OSGi, Service Component Architecture, Java Batch, Communications Enabled, and XQuery/XSLT 2.0), additional feature packs (Web 2.0, dynamic scriptiong), system management improvements including installation, high availability, logging, recovery, security and migration.

Well worth the read.

Monday, June 27, 2011

I'm not dead yet

From time to time, I see posts asking whether or not Java EE is dead. To paraphrase with a Java EE twist, "The reports of my demise have been greatly exaggerated." It takes a lot of effort to build and deliver a Java EE release and it should be no surprise that it takes a while for vendors to get support out the door, but WebSphere Application Server V8.0 is now out and Java EE 6 support is one of the major pieces of it.

I've been prepping education material for various groups, but I thought I'd take a moment to reflect just how far we've come in improving the platform.

Once UI frameworks start taking advantage of Servlet 3.0 web fragments, it will be a snap to drop a UI framework into a web app and have it auto configured. JSF Facelets are a great improvement on UI composition and reuse. JSF Managed Beans have been split out into their own basic component model that will serve as the core for the platform's future evolution. This means a lean and mean component model that developers can easily grasp and use. The annotated POJO programming model is used everywhere and makes developing and describing components easy. Managed Beans and EJBs now form a graduated component programming model that starts simple and lets you add capabilities as needed with nothing more than an annotation. You can now package your EJBs in your WARs and Contexts and Dependency Injection for EE (CDI) will let you use them as Managed Beans. That means you can start with Managed Beans in your web app today and easily switch to EJBs as needed without repackaging or changing coding patterns. EJBs can be used anywhere a Manage Bean is used and just as easily.

Need to provide access to resources over the web? JAX-RS provides a simple POJO pattern for RESTful services.

Want to stop writing validation logic throughout your application to ensure data integrity? Try Bean Validation and have it done automatically for you.

Lastly, there's a new set of scoped JNDI namespaces that extend beyond java:comp into java:module, java:app, and java:global scopes. These allow a developer to share resources and refs at each of their respective scopes without having to replicate resource declarations in numerous places. It also makes it easier on admins, who only have to bind the shared resources once, instead of everywhere they are used.

I'd have to say that EE 5 and EE 6 have been some of the most productive releases from a developers point of view. This is about as far from being dead as a platform can get. If you haven't tried it yet, pick up a developer or trial edition of WebSphere Application Server v8.0 for free and give it a shot.

Thursday, June 23, 2011

WebSphere ... going Mobile and the Cloud

In my recent travels, two topics have come up over and over again. The first is mobile and the second is cloud. I'll see if we can get some content on mobile, but for now here is a great overview by Chris Mitchell.

On cloud, I wanted to point folks to some excellent sources of information on cloud that are by my WebSphere colleagues, but not on this blog.

Jason McGee has alot of demos on his blog that show how the IBM Workload Deployer help you leverage your middleware in the private cloud.

Dustin Amrhein reflects on how these technologies relate to real world deployments on his blog.

Matt Hogstrom has talked about his views of the cloud based as well on his blog.

Last, but not least, Jerry Cuomo has talked about our strategy around cloud and IBM's views on what private cloud means and how to consider performance around cloud (something I'm personally involved with at this point) on his blog.

Please take some time to spin through these blogs and let me know if there are additional aspects of cloud and mobile you'd like to hear from WebSphere folks.

Saturday, June 18, 2011

WAS V8 is Here

Its been in Beta for over a year - a program in which 9000 individual companies participated, 3 time more than any previous WebSphere early program. Now, in the week that IBM turns 100, WebSphere becomes a teenager (yes, we started in 1998) and WebSphere Application Server V8 is here.

First and foremost WAS V8 is a production-ready, fully certified Java EE 6 platform. Some of the primary component technologies, such as JPA 2.0 for persistence and JAX-RS for RESTful Web Services, have been available on WAS V7 through the additive WAS V7 feature packs, and now WAS V8 brings them together as part of our complete Java EE 6 platform support. Building web applications from composable framework technologies is significantly simpler using Servlet 3.0, with the introduction of web fragments. EJB modules can now be packaged directly in WAR archives to simplify the assembly of web applications. The embeddable EJB container continues the simplification of application development, providing a lightweight standalone container for testing EJBs. A common theme here is " development simplification", something further enhanced in WAS V8 with the new monitored directory support for faster compile-edit-debug cycles - drag your new or modified app to the monitored directory and WAS will automatically update or deploy it. Comprehensive Java EE 6 productivity tools are included in RAD v8.0.3, which is also now generally available. Of course, its not all just about Java EE 6. WAS V8 and RAD V8.0.3 support a broad range of programming models to address a wide spectrum of business problems:
  • Web applications can be assembled, deployed and managed as OSGi applications to dramatically reduce the size of EARs, increase the reuse of common libraries used by multiple enterprise applications, eliminate version conflicts between applications and enable in-place managed updates of modules of running applications.
  • Service Component Architecture (SCA) enables SOA assets to be assembled into coarse-grained composites and to be exposed over a variety of protocol bindings which can be decorated with declarative policies for security, reliability and transactional integrity.
  • The Web 2.0 and Mobile feature pack extends the reach of enterprise assets and provides a rich client experience for popular mobile devices including iPhone, Android and Blackberry.
  • Communication enabled applications (CEA) simplifies the application use of IP telephony through a catalog of customizable and extensible Web 2.0 widgets.
  • Support for batch workloads, alongside standard OLTP workloads, is provided directly in WAS V8 via the POJO-based Java Batch programming model and batch container, consolidating into WAS V8 the core batch support from WebSphere XD Compute Grid. At the same time, a new V8 release of Compute Grid provides enhanced support for massive batch jobs through management of job parallelization as well as managing end-to-end jobs across disparate execution environments such as WAS and CICS.
  • Processing large XML documents using XPATH 2.0, XSLT 2.0 and XQuery, exploiting a highly-optimized XML processor and Java XML API for navigating XML data in the most efficient manner.
Operationally V8 has seen a significant investment in reducing cost through improved performance and greater efficiency in common operational tasks. We haven't wasted any time in publishing our first SpecJEnterprise2010 results for WAS V8, which immediately takes first place on EjOPS/Core to add to WebSphere's lead for overall EjOPS/AppServer.

And its not just raw throughput that is faster in WAS V8. Product installation simplification through use of the IBM Installation Manager (IM) and new template-driven cell creation has reduced product installation time by 15%, large-topology server creation time by 69% and large-topology cluster-creation time by 31%.

Look out for more WAS V8.0 posts soon from the WAS team.

Tuesday, May 3, 2011

Tuning for idleness -- Server Consolidation

Over the years, WebSphere has come to leverage server whitespace to keep our runtime hot to service the next new request as fast as possible. This has served us well in the past as our performance metrics have demonstrated over the years.

With the transition of workloads from dedicated server footprints to big machines which are logically partitioned or hosting hundreds of virtual guests, idle times in one guest or JVM may not necessarily translate to low-utilization of the entire platform. A typical development machine hosting hundreds of developer's guests may have many guests active, but idle. It is important that the idling machines impact overall system performance minimally.

We've written a whitepaper which focuses on how to configure WebSphere V7 to minimize idle-time processing available here. We hope you find the paper informative and helps you reduce the load of idling WebSpheres in your environment.

Steve Kinder

Monday, April 18, 2011

XML Feature Pack Tech Preview Available

Just in time for IBM Impact, the IBM XML team cranked out an updated tech preview of the XML Feature Pack with three key new features.

First - XQuery modules is a way to break up larger XQuery based programs into modular units. This was the last optional feature of XQuery not yet supported and rounds out the XQuery 1.0 support. Not only does this feature help you break up your own XQuery programs, but it also allows you to use open source XQuery libraries such as FunctX.

Next is support for easier to bind Java functions. In previous releases you could binding to existing Java logic and data, but now binding to existing Java logic is even easier. The support is common across both XSLT 2.0 and XQuery and supports invocation of both instance and static methods. Here is an example that I showed at Impact:


package org.company;

public class Calculator {
public static int sqrt(int val) {
return (int)Math.sqrt(val);
}
}



<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xltxe="http://www.ibm.com/xmlns/prod/xltxe-j"
xmlns:calc="http://com.example/myApp/calculator">

<xltxe:java-extension prefix="calc“ class="org.company.Calculator"/>

<xsl:template match="/">
<xsl:value-of select=“calc:sqrt(64) "/>
</xsl:template>

</xsl:stylesheet>


You can see in the XSLT that using our extention, we were able to map any functions starting with calc to Java calls to org.company.Calculator. Specifically the function sqrt was called in this example. With this support, no Java code is needed to link existing Java logic to an XSLT or XQuery program.

Finally, we spent alot of time on runtime error messages. We have made sure that error messages now include line and column numbers that help you track back to the error that caused execution to fail.

You can read more about these features on developerWorks and download the tech preview from the IBM download site.

Announcing the IBM WebSphere Application Server Migration Toolkit V3.0 Beta

The IBM WebSphere Application Server development team is pleased to announce the availability of the IBM WebSphere Application Server Migration Toolkit V3.0 Beta.

The V3.0 Beta builds upon the capabilities delivered in the V2.1 release, expanding support for migrating your Java Enterprise Edition applications to WebSphere Application Server. 
The V3.0 Beta continues to enhance the developer's migration experience with new support for migration to WebSphere Application Server V8.0 Beta. Simple remediation tools utilize Rational® source code scanning technology to identify and resolve known application migration issues. This enables developers to quickly identify changes required to migrate from previous product versions or from competitor's Application Server platforms. 

More details on the new features and beta program can be found on the IBM WebSphere Application Server V8.0 Beta home page. Just look under Integrated tooling
You can directly Download IBM® WebSphere® Application Server Migration Toolkit v3.0 Beta. 

We're excited to continue learning about your experiences with the Beta in the WebSphere Application Server 8 beta forum


Tuesday, April 5, 2011

WebSphere Application Server V8 Announced

Planned availability date
Bottom rule

  • June 17, 2011 - electronic delivery
  • July 22, 2011 - media packs

The formal announcement letter is available here.

V8 contains, as you may recall from previous blog posts, integrated versions of SCA, OSGi, XML, and CEA feature packs.

Please continue to enjoy the beta in the meantime!

--> updated link to remove mid-page jump. :-)

Saturday, March 19, 2011

WebSphere Application Server v8.0 Beta, March refresh

IBM have released a WAS v8.0 Beta refresh which includes some great new OSGi Applications functionality, including: In-place application update, a feature that allows administrators to manage and migrate their OSGi bundles at runtime, without application restart. Application extensions allow administrators to extend their applications at runtime with a Composite Bundle Archive (CBA), again with no application restart. There are also performance monitoring, security, session management, servlet 3.0 support for OSGi applications/components.

For more information on OSGi in the Beta, why not check out this short video on the Enterprise OSGi YouTube channel.  http://www.youtube.com/user/EnterpriseOSGi#p/a/u/0/3vRmzqHiJBY

To download the WAS v8.0 Beta and get playing with all the new features, visit the download site here ->
https://www14.software.ibm.com/iwm/web/cc/earlyprograms/websphere/wsasoa/download.shtml

Tuesday, March 8, 2011

Introducing the new Enterprise OSGi YouTube channel.

Over the last couple of weeks, I've been putting together a list of OSGi related talks that act as a useful resource for OSGi beginners.  I'm lucky enough to work in a development team full of talented people who are very happy to share their knowledge and experiences to customers and at conferences.  I wanted this youtube channel to provide a web resource so that we can share this information to a wider audience.

The short overview presentations are designed to giev the viewer a high level understanding of concepts without going into too much depth.  I'll put up links and follow up material which goes into more depth at our main OSGi home at

The new channel can be found at http://www.youtube.com/user/EnterpriseOSGi

Videos available right now on our new Enterprise OSGi channel include:

Big EARs and OSGi - Part 1, by Ian Robinson, IBM, Distinguished Engineer
Big EARs and OSGi - Part 2, by Ian Robinson, IBM, Distinguished Engineer
An Interview with Zoe Slattery, by Zoe Slattery, IBM, OSGi Technical Evangelist
JPA in OSGi, by Tim Ward, IBM, OSGi Applications developer in WAS.

More will be uploaded soon, so why not subscribe to the channel to get notification of when new videos are uploaded.  To subscribe, you'll need a YouTube account.  Click on the subscribe button on the top left of the Enterprise OSGi channel, shown below.


Friday, February 25, 2011

Great set of articles on Native Memory

I am currently helping a customer with a native memory issue causing OutOfMemory (OOM) exceptions. Most folks are familiar with Java heap memory issues (eg. too much caching eating up live memory or leaking objects), but native memory is also important especially when your application isn't so "pure" (spawning threads, lots of JNI, etc). How do you know if you have a native out of memory? You'll see that you'll get out of memory conditions when the Java heap still has plenty of room left over. In the case I'm working on now, we actually saw the out of memory well before the memory in the heap grew to the maximum size (-Xmx) of the heap. In trying to help the customer out, I found the following articles excellent. The first is a very good overview of native memory and how to diagnose. The second is our app server tech note on things to try in the case you believe you have a native memory issue.

Thanks for the memory - Understanding how the JVM uses native memory on Windows and Linux (Windows/Linux version, AIX version).

Troubleshooting native memory issues

Tuesday, February 8, 2011

ONLINE SAMPLES

The Samples section of the WAS V8 BETA Information Center is now live!!  http://publib.boulder.ibm.com/infocenter/wasinfo/beta/index.jsp

WebSphere Application Server V8 Beta samples are new and improved and now available for early testing to our WAS V8 Beta customers! Although clients will continue to find key samples installed with the product, additional samples are available online and can be accessed from a new section in the WAS V8 Beta Information Center. Now, samples, documentation, and other resources reside online, under one roof. This will increase availability and collaboration while providing samples in a time-sensitive manner.

Increasing Availability. The sample applications are now on the web, and users can browse individual samples with a direct link or find them using search engines. This is a first for WebSphere Application Server!


Adding Collaboration. As part of the new collaborative information center, users can comment on and rate samples, receive quick feedback, and sign up for updates.

Providing relevant samples in a time-sensitive manner. Online delivery allows samples to be added or updated periodically with regular updates to the information center.

The samples currently available in the Samples section of the WAS V8 Beta Information Center demonstrate the following technologies: Service Component Architecture (SCA), Communications Enabled Applications (CEA), OSGi applications, XML, and Internationalization service.

Look for more to come!

Monday, January 3, 2011

Help keep posts to this blog active in 2011

Unfortunately, none of my New Year's resolutions included blogging more often. I notice that the posts on this blog have fallen to approximately once a month. That likely isn't enough to keep all our great readers interested in repeating their visits (and Google analytics confirms this for me). The idea of this blog is to get experts across the WebSphere development labs blogging about topics across the application infrastructure set of products. I'm certain I will be blogging about XML, SOA, and performance topics this year. I'm also sure you'll hear more and more about WebSphere Application Server V8.0 (the forum is very active). However, what other topics and products/technologies would you like to see talked about here? If you tell me, I'll line up the right people to blog. That is a resolution I can keep.

Happy New Year WebSphereains!

Thursday, November 11, 2010

System Test Team Reports Available on developerWorks

Have you been wondering what the WebSphere system test team has been up to lately? Visit our wiki for access to our collection of test reports. The test reports document results from representative product scenarios that have been validated by IBM system test groups. They cover testing we've done with WebSphere Application Server v7.0, the v8.0 Alpha and Betas, and several Feature Packs.

For example, in a recent report, "Leverage Business Level Applications (BLA) to Improve Management and Operational Capabilities Over Stand-alone Java EE Applications", Feng Yue Li from the WebSphere system test team describes a test scenario that focused on the use of shared libraries within BLAs. She explains how she verified that shared library relationships between BLA composition units work properly when a new version of the BLA asset is rolled out and describes how command assistance can be used with BLAs.

In another recent report, "Test Infrastructure: OSGi FeP and JEE applications", tester Tam Dinh outlines a scenario in which the WebSphere system team deployed, exercised and stressed WebSphere Application Server V7.0 OSGi Feature Pack using three OSGi applications and three JEE applications in a WebSphere Application Server Network Deployment cell.

We'd like to hear your feedback about our work and your ideas about how our testing can be improved. Visit our developerWorks test team wiki and let us know what you think.

Friday, October 8, 2010

New: WebSphere Batch Feature Pack !

Announcing IBM WebSphere Application Server V7 Feature Pack for Modern Batch !

This new feature pack provides support for a Java Batch programming model, offers tools and operational controls for Batch workload execution, enables development and deployment of batch applications, and allows concurrent execution of batch and OLTP workloads.

The Batch Feature Pack is targeted toward developers and basic production deployment. It delivers a subset of the functionality of IBM WebSphere Extended Deployment Compute Grid. Batch applications built using the feature pack are fully upward compatible with the Compute Grid environment.

The Compute Grid product offers advanced features, including support for parallel processing, workload scheduler integration, usage accounting, and more. You can start with the Feature Pack (FeP) for Modern Batch and grow it into a full Compute Grid environment. The Batch Deployment Options Chart outlines the functional continuum among these offerings.



Tuesday, October 5, 2010

Joint WAS XML Feature Pack and DB2 pureXML Article on FpML Lives

I've mentioned this work a few times on the blog, so I wanted to make sure people saw the final article on DeveloperWorks.

Programming XML across the multiple tiers, Part 2: Write efficient Java EE applications that exploit an XML database server

This article uses the example of Financial Products Markup Language (FpML) to show how to program realistic native XML across the Application Server and DB2 pureXML. It shows how you can use one consistent programming model (XQuery) and one consistent data model (XML) across data access, transformation, and filtering across both the mid tier and database tier. Using this one data model which doesn't require mapping to Java objects should increase the agility of your XML centric applications as no mapping code needs to be generated or maintained across both tiers.

Even though the article is based upon FpML (which is really useful to the financial sector), the concept is applicable to all industries that have substantial amounts of XML data.

The article has code attached (both a Rational Application Developer ear project and Eclipse/ANT builds) and database load scripts, so you can play with the code to see how it works. All you need to do is define the JDBC resources to point to your DB2 instance. I also have a virtual image for this based upon the free of charge WebSphere Application Server For Developers and DB2 Express-C in case you're interested.

Monday, September 27, 2010

WebSphere V8.0 Beta Feature Focus Weeks

I hope people have been following the WebSphere Application Server V8.0 Feature Focus weeks on the beta forum. If not, you should check them our here:

IBM WebSphere Application Server V8.0 Beta Forums

Many include demos and extensive information on the features.

Some topics that recently were discussed include XML Application Programming, SIP Servlets, Communication Enabled Applications, Installation on z/OS, JSP 2.2, JAX-RS, Java EE6 Web Services, EJB 3.1, JPA 2.0, Security Enhancements, and Servlet 3.0.

Many other topics have been discussed as well. Just scroll back through the thread to find and comment on many of the new useful features coming in version 8.0.

Friday, August 13, 2010

A view from the road

It's been a very long time since I blogged. Twitter seems to keep me from thinking about blogging as often. Also, I've been hitting a second travel season.

Last week I was at Balisage 2010 talking about Web 2.0 and XML discussing how to introduce MVC frameworks into DOJO (and other Web 2.0 widget libraries) that provides all sorts of interesting value add to DOJO. Also once MVC is in place, XML centric models integrate better into the browser. Specifically I discussed Ubiquity XForms. The goal of this work would be a clean XML story of storage to mid tier joins and query that exposed REST/XML in its original form to the browser. This avoids having to write XML to POJO to JSON conversion routines for data that originates and is stored in XML - a common case in many clients I talk to.

This week, I've been between New York and New Jersey. I've been hearing about how the financial and insurance industries work with XML. I've heard about how enterprise content management systems and data storage systems are closely related. I've heard about how XQuery as a general purpose programming model on top of such data is being used. However, I've heard of challenges that relate in linking systems together. I've also heard that having "hybrid servers" that allow XML to bridge into relational and Java systems and JSON is important. Finally, I built a nice VMware based demo of FpML processing across DB2 pureXML and the WebSphere XML Feature Pack. If you're interested in seeing how to efficiently program native XML end to end (whether you're into FpML or not), let me know and we can arrange a demo.

Friday, July 9, 2010

RAD Tooling for OSGi Applications

RAD V8 Beta 2 is now available with updated support for developing, deploying and testing OSGi Applications using the WAS V7 Feature Pack for OSGi Applications and JPA 2.0. I'll describe some of the new OSGi capabilities of RAD in this post.

Built on top of the latest version of Eclipse (Helios), the RAD V8 Beta provides OSGi tools for enterprise Java developers. While most of the development activities, and hence development tools, for enterprise OSGi applications are common with Java EE there are some new considerations. Primarily, these are around the compile-time classpaths, the authoring of new metadata (the OSGi bundle and application manifests) and, optionally, Blueprint bean definition files. RAD introduces new project types for OSGi Bundle projects and OSGi application projects and a variety of new editors and tools for developing components in these types of projects. OSGi modularity semantics are honored in the project build paths to actively encourage modular design: each project has the scope of a single bundle, with Java package visibility between projects restricted to those packages explicitly imported/exported by the project's bundle manifest. This supports the careful and deliberate exposure of only those Java packages that are intended to be used external to a project . RAD's facet-based configuration enables OSGi projects to be configured as OSGi Web projects or OSGi JPA projects and integrates tools for authoring web.xml, persistence.xml and blueprint.xml. OSGi application projects - representing a complete enterprise application consisting of multiple bundles - can be imported from or exported to enterprise bundle archives, and can be tested and debugged on WAS V7 from the RAD workspace. RAD's SCA development tools are also extended to support "OSGi Applications" as a new implementation type for SCA components. The SCA tools accelerate the assembly of SCA composites; these can include OSGi application components which may selectively expose OSGi services outside the OSGi application and define remote bindings for these services. There's more about the relationship between OSGi services and SCA services here.

One of the quickest ways to explore the new OSGi features in RAD is to import one of the sample applications provided with the WAS V7 feature pack into a RAD workspace. The feature pack's Blog Sample, was described in an earlier post so I'll use that as my example. Start RAD and run the File->Import->OSGi Application (EBA) wizard, enterng the location of the com.ibm.ws.eba.example.blog.eba file (found in the WAS_INSTALL/feature_packs/aries/installableApps directory). Since one of the features this sample is designed to show is the deployment of an application which includes content provisioned from a bundle repository, you also need to make the com.ibm.json.java_1.0.0.jar available in the workspace - which you can do through File->Import->OSGi Bundle. The result is 4 OSGi bundle projects and an OSGi application project in the workspace, with everything correctly resolved.

You can see the relationships between the bundles in this application using RAD's new Bundle Explorer. The figure on the left shows the Bundle Explorer view of the Blog sample application project. Click on the image to enlarge it.

RAD gives you all the syntax assist, refactoring support, and problem quick-fixes you expect as well as new editors for bundle manifests, application manifests and blueprint bean definitions. By encapsulating business logic in POJO Blueprint beans and accessing persistent data through JPA entities, unit testing can be performed with simple frameworks like JUnit without requiring an application server to be running. And, of course, RAD includes integrated support for running and debugging entire OSGi applications on a WAS server, straight from the workspace.

WebSphere Application Server V8.0 Beta

Last week, the beta for WebSphere Application Server V8.0 went live and was announced by Dana Price on the beta forum. There were some initial issues over the weekend with the download, but that is fixed, so if you tried to download -- try it again now.

There is a download for Windows, Linux, AIX, z/OS, Linux for System Z, HP-UX, and Solaris.

You can find out about the features offered in the beta via the following links:



There are far too many features to list here on the blog, so hopefully the above gives you enough reason to give it a spin. See the InfoCenter for further information.

Go ahead, download the beta, try it out and leave feedback on the forum.

Friday, June 25, 2010

Humor for Friday - Java-4-ever

I don't want to post funny videos here too much as I think people come here for technical information. However, this is just too good to not share. There is one slightly NSFW (not safe for work) section. Even mentions XML, so its truly great.

Watch the Java 4-Ever Video

Now on YouTube

Thursday, June 3, 2010

OSGi applications and JPA2 feature pack has gone GA

WooHoo!!!!!!

Releasing any product involves a lot of hard work, sleepless nights and the occasional lost weekend, so you'll understand why I am happy that the feature pack for OSGi Applications and JPA 2 is now GA and can be installed either from the web, or locally, using installation manager.

Some highlights of what we have delivered:
  • Support for development and deployment of enterprise applications using OSGi
  • Support for Enterprise OSGi specs around Web application, Blueprint and JPA
  • The ability to update the individual bundles in an OSGi applications
  • Support for integrating OSGi and Java EE applications using SCA
  • Support for Java Persistence API 2, both from Java EE and OSGi applications
  • Development tooling for OSGi and JPA2 via the Rational Application Developer beta
  • Good performance increase measured using the SPECjEnterprise2010 benchmark.
I could go on and list some of the other cool features, like the bundle repository support for OSGi, and the JPA2 criteria API, but some of they have been discussed on the blog already, and then I wouldn't have an excuse to write more about them later.

Download, use, enjoy!
Alasdair

P.S. There is an iFix available for the feature pack and we recommend you install it.
P.P.S. You'll need to have 7.0.0.9 of the application server and JDK to install the feature pack.

Sunday, May 30, 2010

The Cure for XML in Web 2.0?

Earlier, I blogged about the Pain of XML in Web 2.0. I alluded to not being happy with the answer I ended up with. I'm happy to say that I'll finally be talking about a possible solution. As you see here, I have submitted a paper for the Balisage 2010 Conference entitled Where XForms meets the glass: Bridging between data and interaction design along with Charles Wiecha and Rahul Akolkar.

Here is the abstract:

XForms offers a model-view framework for XML applications. Some developers take a data-centric approach, developing XForms applications by first specifying abstract operations on data and then gradually giving those operations a concrete user interface using XForms widgets. Other developers start from the user interface and develop the MVC model only as far as is needed to support the desired user experience. Tools and design methods suitable for one group may be unhelpful (at best) for the other. We explore a way to bridge this divide by working within the conventions of existing Ajax frameworks such as Dojo.


Interested? Let me know and we can get a review copy of the paper to you. I have talked to many clients that want to integrate their meta data driven XML dominant data to the Web 2.0 work with DOJO and run into the impedance mismatch wall. Hopefully that wall will be coming down soon.

BTW, if you'd like to attend this great conference to hear about this topic and many others on the jam packed agenda, here is a great link to use to convince your management to let you join us in Montreal.

Thursday, May 27, 2010

XQuery: Powerful, Simple, Cool .. "Demo"

At IBM Impact this year, I did talks about the XML Feature Pack as well as basic introduction to the XPath 2.0, XSLT 2.0 and XQuery 1.0. I think one of the most useful parts of my talk was when I demoed code in XQuery. I found that people really saw the light (how simple and fully functioned XQuery is) once people saw the code in a useful application. Also, people that were experienced with XPath 1.0 appreciated the new features and people who had experience with XSLT 1.0 appreciated the syntax (closer to imperative coding). The application I used in the demo was the download stats program I have blogged about before. Let me take a second to do the same "demo" here.

First, I have an XML input file of all the downloads over a certain time period. That XML file could come from a web services, a JMS message, or be loaded from a XML database. The data looks something like:


<?xml version="1.0" encoding="UTF-8"?>
<downloads>
<download>
<transaction>1</transaction>
<userid>user1</userid>
<uniqueCustomerId>uid-1</uniqueCustomerId>
<filename>xml_and_import_repositories.zip</filename>
<name>Mr. Andrew Spyker</name>
<email>user@email.com</email>
<companyname>IBM</companyname>
<datedownloaded>2009-11-20</datedownloaded>
</download>
<!-- more download records repeating -->
</downloads>


First I want to quickly get rid of all downloads that have "education" in the filename. Next I want to split the downloads that come from IBM'ers (email or company has some version of IBM in it) vs. the downloads that come from clients. Of those groups, I want to quickly group repeat downloaders (by uniqueCustomerId). I won't include it here, but I've show how to write some of this with Java and DOM in the past. It's sufficient to say that this code is very complex (imagine all the loops through the data you'd write for each of these steps). Let's look at these steps in XQuery:


(: Quickly get rid of education downloads :)
declare variable $allNonEducationDownloads := /downloads/download[not(contains(filename, '/education/'))];

(: Split the IBM downloads from non-IBM downloads :)
declare variable $allIBMDownloads :=
$allNonEducationDownloads[contains(upper-case(email), 'IBM')] |
$allNonEducationDownloads[contains(upper-case(companyname), 'IBM')] |
$allNonEducationDownloads[contains(upper-case(companyname), 'INTERNATIONAL BUSINESS MACHINES')];

(: Get the unique IBM downloader id's :)
declare variable $allIBMUniqueIds := distinct-values($allIBMDownloads/uniqueCustomerId);

(: Get the non-IBM downloads :)
declare variable $allNonIBMDownloads := $allNonEducationDownloads except $allIBMDownloads;

(: Get the unique non-IBM downloader id's :)
declare variable $allINonIBMUniqueIds := distinct-values($allNonIBMDownloads/uniqueCustomerId);


I think the most powerful line of the above code is the "except" statement. In that one quick statement, I can quickly express that we want to take all the downloads and remove the IBM downloads which leaves us with the non-IBM downloads. I think it's quite impressive that XQuery expresses the above statements in about the same amount of lines as the English language I used to describe the requirements.

Additionally, since you are telling the runtime what you want to do instead of how you want to do it, our runtime can aggressively optimize the data access in ways that we couldn't if we had to try to understand the Java byte codes were doing on top of the DOM programming model. Also, since XQuery is functional (the above variables are final) we could span this to multi-core more safely than imperative code as we can guarantee there are no side-effects. This is why, as a performance guy, I think declarative languages are a key to the future of performance.

Back to the code. For people used to XPath 1.0 and its lack of all the built-in schema types, dealing with things as simple as dates was problematic (they were just strings). Here are a few functions that show, with schema awareness, XPath 2.0 and XQuery 1.0 are much more powerful than before:


declare function my:downloadsInDateRange($downloads, $startDate as xs:date, $endDate as xs:date) {
$downloads[xs:date(datedownloaded) >= $startDate and xs:date(datedownloaded) <= $endDate]
};

declare function my:codeDownloadsInDateRange($downloads, $startDate as xs:date, $endDate as xs:date) {
let $onlyCodeDownloads := my:onlyCodeDownloads($downloads)
return my:downloadsInDateRange($onlyCodeDownloads, $startDate, $endDate)
};


These two functions give me a quick way to look for "code" downloads within a date range. In the first function, it's very easy to understand that this functions take the downloads and returns only the subset that has a datedownloaded that is after the start date and before the end date. In the second function, you can see it's easy to call the first function. At this point, I think most Java programmers might be saying "this isn't like what I expected based on my previous work with XSLT". While XSLT is a great language for transformation (XSLT 2.0 even better), I think XQuery gets a little closer to a general purpose language with the ability to declare functions and variables in a more terse syntax.

Finally, let's cover two more important powerful features - FLOWR and output construction. Once I have sliced and diced the data, I need to output the data into a XML report. XQuery gives you a very nice way to mix XML and declarative code as shown below:


declare function my:downloadsByUniqid($uniqid, $downloads) {
for $id in $uniqid
let
$allDownloadsByUniqueId := $downloads[uniqueCustomerId = $id],
$allCodeDownloadsByUniqueId := $downloads[uniqueCustomerId = $id and (contains(filename, 'repositories'))]
return
<downloadById id="{ $id }" codeDownloads="{ count($allCodeDownloadsByUniqueId) }" >
<name>{ data($allDownloadsByUniqueId[1]/name) }</name>
<companyName>{ data($allDownloadsByUniqueId[1]/companyname) }</companyName>
<codeDownloads>
{
for $download in $allCodeDownloadsByUniqueId order by $download/datedownloaded return
<download>
<filename>{ data($download/filename) }</filename>
<datedownloaded>{ data($download/datedownloaded) }</datedownloaded>
</download>
}
</codeDownloads>
</downloadById>
};



This shows how you can create new XML documents and quickly mix in XQuery code. Some people I've talked to think this looks like scripting languages in terms of simplicity. Also, you'll see a For ($id in $uniqid) Let ($allDownloadsByUniqueId, ohters) Return (downloadsById). These three parts make up part of what people call FLOWR (and pronounce flower) which stands for for, let, order by, where, return. The FLOWR statement is a very powerful construct -- able to do all the sorts of joins of data you're used to in SQL -- but in this example I've chosen to show how it can be used to simplify code in the general case where joining data wasn't the focus. For Java people, think of it as a much more powerful looping construct that integrates all the power of SQL for XML.

In the end, I have a 200 line program that takes all the download reports and organizes them by unique IBM vs. unique non-IBM ids and produces a month by month summary. I'd be surprised if you could come up with anything shorter and more maintainable that worked with Java and DOM. I hope this "demo" encourages you to consider using XQuery in your next project where you need to work with data.

Finally, if you find people trying to convince you that XQuery isn't capable enough to be a general language, take a look at a complete ray tracer written in XQuery in a mere 300 lines of code (a real statement of XQuery's power and brevity).

PS. You can download this XQuery program here and some sample input here. You can run them by getting the XML Feature Pack thin client here. The thin client is a general purpose Java based XQuery processor that you can use for evaluation and in production when used with the WebSphere Application Server. All you need to do is download the thin client, unzip and run the below command:


.\executeXQuery.bat -input downloads-fake.xml summary.xq

Wednesday, May 26, 2010

Why the -outputfile switch in XML Thin Client is useful

A simple tip...

I was recently working with a set of files that contained non-English Unicode characters and trying to process the data with XSLT 2.0 and XQuery 1.0. I was using the Thin Client for XML that is part of the XML Feature Pack which offers J2SE and command line invocation options for XSLT and XQuery when used in a WebSphere environment.

I did something like:


.\executeXSLT.bat -input input.xml stylesheet.xslt > temp.xml
.\executeXQuery.bat -input temp.xml query.xq > final.xml


And this resulted in something like:


... executeXSLT "works" fine ...
... executeXQuery "fails" with ...
An invalid XML character (Unicode: 0x[8D,3F,E6,8D]) was found in the element content of the document
.
An invalid XML character (Unicode: 0x[8D,3F,E6,8D]) was found in the element content of the document
.


I figured something was wrong with the encodings in the XSLT output method or the xml encoding of the files themselves or -- worse yet -- something wrong with our processor. After some quick thinking by my excellent team, they had me replace the output redirection (where my OS and console got a chance to see/mess with the data between the processor and temp.xml) with the -outputfile option (which allows the processor to directly write to the file) like:


.\executeXSLT.bat -input input.xml -outputfile temp.xml stylesheet.xslt
.\executeXQuery.bat -input temp.xml -outputfile final.xml query.xq


Problem solved. No corruption of the data.

Lesson learned: Keep all the data inside of the processor and don't introduce things (like the Windows Console) into the pipeline that won't honor (or know) the encoding.

Monday, May 3, 2010

New CEA demo videos..

Here are some more demos of the WebSphere Application Server Feature Pack for Communications Enabled Applications (CEA). We'll be using some of these in the IBM Impact 2010 sessions that I referenced here

The first one is doing some of the contact center widgets (like click to call then cobrowsing) on the iPhone:



Here is the coshopping between a user on an iPhone and a Desktop:


The next is a shorter and HD version of our JavaScript widget walk through: