Welcome!

Java IoT Authors: Jason Bloomberg, Elizabeth White, Liz McMillan, Pat Romanski, Kevin Benedict

Related Topics: Java IoT

Java IoT: Article

Are Vendors Becoming More in Charge of Java Enterprise Edition...

...or is Sun losing control over Java EE?

One of the things that kept me and my team busy over the past couple of years was starting to support J2EE 1.4 in OptimalJ - a goal that we accomplished with the release of OptimalJ 4.2. Now that this job is complete, it's interesting to look back and ponder the experience and learn from it.

As OptimalJ is a vendor-neutral modeling tool that generates J2EE applications, we tend to avoid application server-specific features that are not mandated by J2EE. Typically our first take is to implement our code-generation modules by the letter of the spec and then ensure we fill in the necessary bits for a particular vendor by generating additional vendor-specific deployment descriptors. This task, quite feasible at first sight, proved rather intricate with J2EE 1.4. Why? One reason is incomplete implementations of certain parts of the spec. However, there were more causes as you'll see later. But first let's recap the history of J2EE 1.4.

The spec was released in November 2003. The first J2EE product certified by Sun was JBoss 4.0.0 released in July 2004. IBM's WebSphere 6.0 went out in October 2004, while BEA's WebLogic offering hit the market in July 2005. All these products passed Sun's J2EE 1.4 CTS. For an idea of what the J2EE CTS embodies, take a look at this interview: www.theserverside.com/tt/articles/article.tss?l=SunInterview. Here's a relevant quote from http://java.sun.com/javaee/overview/faq/j2ee.jsp (my emboldening):

J2EE technology is a set of standards that many vendors can implement. The vendors are free to compete on implementations but not on standards or APIs. Sun supplies a comprehensive J2EE Compatibility Test Suite (CTS) to J2EE licensees. The J2EE CTS helps ensure compatibility among the application vendors, which helps ensure portability for the applications and components written for the J2EE platform. The J2EE platform brings Write Once, Run Anywhere (WORA) to the server.

Problems Encountered
Our first surprise was with the new MDB (message-driven bean) contract. One vendor's product simply couldn't cope with the new activation configuration concept. This is really the core functionality of EJB 2.1 and JCA 1.5. In EJB 2.1, MDBs are decoupled from JMS and their component contract is changed to be extremely generic and extensible. They can receive messages from virtually any inbound resource adapter, not necessarily a JMS adapter. If you want to learn more about the interaction between resource adapters and MDBs in J2EE 1.4, take a look at this article: www.theserverside.com/tt/articles/article.tss?l=J2EE1_4. It is amazing how the product could pass Sun's J2EE 1.4 CTS without implementing this support.

The next wrinkle was with the timer service - a long-asked-for missing piece of J2EE that enables enterprise components to have a reliable and transactional timer. An enterprise component can request that a callback method be invoked on it after a given passage of time (possibly repeatedly). The component can query for pending callbacks, cancel some of them, add new ones, etc.

An important consideration here is to note that in EJB 2.1 all instances of the same stateless session bean (SLSB) and the same MDB are considered equal, i.e., if the container has created and pooled n instances of SLSB BeanA and one such bean instance has scheduled a time notification, the container can pick any of the n instances in the pool to service the request. While the timer notification is pending, any of the n BeanA instances that the container invokes can query for pending timer notifications and see that the notification is pending. That instance can cancel it, so that the timer event will be annulled and not invoked on any of the n instances.

Great was my surprise when I saw that one vendor implemented the timer service without regard for the above fact. The vendor's product sometimes allowed one instance of BeanA to observe the pending timer notification as cancelled and then suddenly again as pending - all in the same transaction!

A friend of mine, who works at another company, had a similar experience with his vendor (also certified by Sun as J2EE 1.4 compliant). He was deploying his application in a cluster and used the timer service with SLSBs. The phenomenon he witnessed was this: he had a pool of n BeanA instances deployed to multiple nodes in the cluster. When any of the n BeanA instances scheduled a timer notification, only the BeanA instances running on the same node as the bean instance that scheduled the notification could see and service it. BeanA instances running on different nodes would neither see the pending notification nor be able to examine or cancel it, which essentially breaks the EJB requirement that all instances of the same SLSB have the same object identity.

With such surprises from certified J2EE 1.4 servers, how can you write a portable J2EE component that uses the timer service and enjoy the "Write Once, Run Anywhere" experience?

All this was small time compared to the issues we ran into when dealing with the highlight of J2EE 1.4 - support for Web services. The details of a compliant J2EE 1.4 Web services implementation are spelled out by three constituent specs that J2EE 1.4 includes by reference: Web Services For J2EE, Version 1.1 (aka JSR-109/JSR-921), JAX-RPC, Version 1.1, and WS-I Basic Profile, Version 1.0. The last specification is crucial in ensuring interoperability of Web service components developed with J2EE.

One cardinal requirement of a compliant Web services stack is that it can handle literal serializations/deserializations of Java Data Models into/from XML. The need to support literal serialization of data calls for an XML Schema-aware Web service. If a vendor's Web service stack is not XML Schema aware, you will very likely have issues with the interoperability of the Web services you deploy to the vendor's product.

When we started testing our code generation modules on one vendor's product, we were in for a big surprise. The application server had a non-XML Schema-aware Web services stack, which effectively meant no proper support for WS-I Basic Profile. Why wasn't such a major omission caught by J2EE 1.4 CTS?

That wasn't all. Two products we tried couldn't handle overloaded methods in service endpoint interfaces (SEIs) of J2EE components. For an idea of what the SEI is, refer to my earlier article "Moving to SOA in J2EE 1.4" (http://java.sys-con.com/read/180362.htm).

Another major obstacle was with document-literal bindings. One of the three vendor products we support required that additional Java code artifacts called "wrapper beans" be generated and registered in a JAX-RPC type mapping DD for every operation of a SEI that is exposed as a Web service component with a document-literal binding, while two other products wouldn't work when such extra code artifacts were generated and registered. Yet more unfortunate was the fact that the product requiring the extra code artifacts left it up to the component developer to provide these rather than generate them automatically during deployment. Being quite unhappy with such a state of affairs, I decided to contact the "Web Services for Java EE" specification lead with a view to ensuring that the issue be resolved to the benefit of Java EE developers and the "Write Once, Run Anywhere" goal. One reply I got back from the spec lead was this:

We had clarified to you before on this issue that there is not much we can do for the JAX-RPC case with JSR-109 v1.1 or v1.2. There are J2EE 1.4 compliant application server vendors who have passed the CTS (Compatibility Test Suite) and changes proposed by you would mean that they would now need to fix their implementations to conform to this new requirement. This will not be received well by vendors who have all ready spent their resources getting J2EE 1.4 certification. While I do appreciate your intentions of improving developer experience, this may be a bit too disruptive for the application server vendors/licensees.

We have made improvements in the deployment/packaging process with the latest release of JSR-109 v1.2 (part of Java EE 5.0) for JAX-WS endpoints. Unfortunately we found more inconsistencies with document-literal bindings. One J2EE 1.4 certified vendor couldn't deal with Web service components featuring methods without a return type when a component's binding was document-literal.

Another problematic area was the JavaBean-based nature of SOAP serialization rules (http://java.sys-con.com/read/180362.htm). When a J2EE Web service component receives or returns a value mapped to a JavaBean, the container is supposed to serialize it to/deserialize it from XML by using the java.beans.Introspector class to examine its properties. Two out of three products we tried didn't do that in the initial version of their products.

It's true that it is all but inevitable that a complex product has bugs, still most of the issues I presented above are of a bigger scale than simple bugs and should have been flagged with the J2EE 1.4 CTS.

Where Does Modeling Come In?
With the differences in implementing the same J2EE 1.4 features I described, you should probably start questioning how feasible it would be to maintain a J2EE 1.4 application that needs to run on more than one application server and not be rigged toward a given vendor. Based on the experience we have gone through, I've come to the conclusion that doing that might be quite a pain and will definitely not scale as the size of your application's code base increases. This, in my opinion, is a valid example in which model-driven architecture and development delivers the fruits so long as you have chosen a mature and reputable MDA product that supports J2EE.

You are welcome to discuss the topic on my blog: http://blogs.compuware.com/cs/blogs/andrei_iltchenko/default.aspx.

More Stories By Andrei Iltchenko

Andrei Iltchenko is a development lead at Compuware Corporation where he works on the MDA product OptimalJ and is responsible for the business logic area of OptimalJ-generated J2EE applications. He is also a Sun certified Java developer for Java Web Services, a Sun Certified Business Component Developer, a Sun Certified Developer, and a Sun Certified Programmer.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


@ThingsExpo Stories
The 22nd International Cloud Expo | 1st DXWorld Expo has announced that its Call for Papers is open. Cloud Expo | DXWorld Expo, to be held June 5-7, 2018, at the Javits Center in New York, NY, brings together Cloud Computing, Digital Transformation, Big Data, Internet of Things, DevOps, Machine Learning and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding busin...
Smart cities have the potential to change our lives at so many levels for citizens: less pollution, reduced parking obstacles, better health, education and more energy savings. Real-time data streaming and the Internet of Things (IoT) possess the power to turn this vision into a reality. However, most organizations today are building their data infrastructure to focus solely on addressing immediate business needs vs. a platform capable of quickly adapting emerging technologies to address future ...
Nordstrom is transforming the way that they do business and the cloud is the key to enabling speed and hyper personalized customer experiences. In his session at 21st Cloud Expo, Ken Schow, VP of Engineering at Nordstrom, discussed some of the key learnings and common pitfalls of large enterprises moving to the cloud. This includes strategies around choosing a cloud provider(s), architecture, and lessons learned. In addition, he covered some of the best practices for structured team migration an...
No hype cycles or predictions of a gazillion things here. IoT is here. You get it. You know your business and have great ideas for a business transformation strategy. What comes next? Time to make it happen. In his session at @ThingsExpo, Jay Mason, an Associate Partner of Analytics, IoT & Cybersecurity at M&S Consulting, presented a step-by-step plan to develop your technology implementation strategy. He also discussed the evaluation of communication standards and IoT messaging protocols, data...
With tough new regulations coming to Europe on data privacy in May 2018, Calligo will explain why in reality the effect is global and transforms how you consider critical data. EU GDPR fundamentally rewrites the rules for cloud, Big Data and IoT. In his session at 21st Cloud Expo, Adam Ryan, Vice President and General Manager EMEA at Calligo, examined the regulations and provided insight on how it affects technology, challenges the established rules and will usher in new levels of diligence arou...
In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, led attendees through the exciting evolution of the cloud. He looked at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering m...
In his session at 21st Cloud Expo, Raju Shreewastava, founder of Big Data Trunk, provided a fun and simple way to introduce Machine Leaning to anyone and everyone. He solved a machine learning problem and demonstrated an easy way to be able to do machine learning without even coding. Raju Shreewastava is the founder of Big Data Trunk (www.BigDataTrunk.com), a Big Data Training and consulting firm with offices in the United States. He previously led the data warehouse/business intelligence and B...
Recently, REAN Cloud built a digital concierge for a North Carolina hospital that had observed that most patient call button questions were repetitive. In addition, the paper-based process used to measure patient health metrics was laborious, not in real-time and sometimes error-prone. In their session at 21st Cloud Expo, Sean Finnerty, Executive Director, Practice Lead, Health Care & Life Science at REAN Cloud, and Dr. S.P.T. Krishnan, Principal Architect at REAN Cloud, discussed how they built...
22nd International Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, and co-located with the 1st DXWorld Expo will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud ...
22nd International Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, and co-located with the 1st DXWorld Expo will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud ...
DevOps at Cloud Expo – being held June 5-7, 2018, at the Javits Center in New York, NY – announces that its Call for Papers is open. Born out of proven success in agile development, cloud computing, and process automation, DevOps is a macro trend you cannot afford to miss. From showcase success stories from early adopters and web-scale businesses, DevOps is expanding to organizations of all sizes, including the world's largest enterprises – and delivering real results. Among the proven benefits,...
@DevOpsSummit at Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, is co-located with 22nd Cloud Expo | 1st DXWorld Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time to wait...
Cloud Expo | DXWorld Expo have announced the conference tracks for Cloud Expo 2018. Cloud Expo will be held June 5-7, 2018, at the Javits Center in New York City, and November 6-8, 2018, at the Santa Clara Convention Center, Santa Clara, CA. Digital Transformation (DX) is a major focus with the introduction of DX Expo within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive ov...
SYS-CON Events announced today that T-Mobile exhibited at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. As America's Un-carrier, T-Mobile US, Inc., is redefining the way consumers and businesses buy wireless services through leading product and service innovation. The Company's advanced nationwide 4G LTE network delivers outstanding wireless experiences to 67.4 million customers who are unwilling to compromise on qua...
SYS-CON Events announced today that Cedexis will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Cedexis is the leader in data-driven enterprise global traffic management. Whether optimizing traffic through datacenters, clouds, CDNs, or any combination, Cedexis solutions drive quality and cost-effectiveness. For more information, please visit https://www.cedexis.com.
SYS-CON Events announced today that Google Cloud has been named “Keynote Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Companies come to Google Cloud to transform their businesses. Google Cloud’s comprehensive portfolio – from infrastructure to apps to devices – helps enterprises innovate faster, scale smarter, stay secure, and do more with data than ever before.
SYS-CON Events announced today that Vivint to exhibit at SYS-CON's 21st Cloud Expo, which will take place on October 31 through November 2nd 2017 at the Santa Clara Convention Center in Santa Clara, California. As a leading smart home technology provider, Vivint offers home security, energy management, home automation, local cloud storage, and high-speed Internet solutions to more than one million customers throughout the United States and Canada. The end result is a smart home solution that sav...
SYS-CON Events announced today that Opsani will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Opsani is the leading provider of deployment automation systems for running and scaling traditional enterprise applications on container infrastructure.
SYS-CON Events announced today that Nirmata will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Nirmata provides a comprehensive platform, for deploying, operating, and optimizing containerized applications across clouds, powered by Kubernetes. Nirmata empowers enterprise DevOps teams by fully automating the complex operations and management of application containers and its underlying ...
SYS-CON Events announced today that Opsani to exhibit at SYS-CON's 21st Cloud Expo, which will take place on October 31 through November 2nd 2017 at the Santa Clara Convention Center in Santa Clara, California. Opsani is creating the next generation of automated continuous deployment tools designed specifically for containers. How is continuous deployment different from continuous integration and continuous delivery? CI/CD tools provide build and test. Continuous Deployment is the means by which...