Java IoT Authors: Stackify Blog, Yeshim Deniz, Pat Romanski, Matt Lonstine, Glenda Sims

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
DX World EXPO, LLC, a Lighthouse Point, Florida-based startup trade show producer and the creator of "DXWorldEXPO® - Digital Transformation Conference & Expo" has announced its executive management team. The team is headed by Levent Selamoglu, who has been named CEO. "Now is the time for a truly global DX event, to bring together the leading minds from the technology world in a conversation about Digital Transformation," he said in making the announcement.
"Space Monkey by Vivent Smart Home is a product that is a distributed cloud-based edge storage network. Vivent Smart Home, our parent company, is a smart home provider that places a lot of hard drives across homes in North America," explained JT Olds, Director of Engineering, and Brandon Crowfeather, Product Manager, at Vivint Smart Home, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
SYS-CON Events announced today that Conference Guru has been named “Media Sponsor” of the 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. A valuable conference experience generates new contacts, sales leads, potential strategic partners and potential investors; helps gather competitive intelligence and even provides inspiration for new products and services. Conference Guru works with conference organizers to pass great deals to gre...
The Internet of Things will challenge the status quo of how IT and development organizations operate. Or will it? Certainly the fog layer of IoT requires special insights about data ontology, security and transactional integrity. But the developmental challenges are the same: People, Process and Platform. In his session at @ThingsExpo, Craig Sproule, CEO of Metavine, demonstrated how to move beyond today's coding paradigm and shared the must-have mindsets for removing complexity from the develop...
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...
"Evatronix provides design services to companies that need to integrate the IoT technology in their products but they don't necessarily have the expertise, knowledge and design team to do so," explained Adam Morawiec, VP of Business Development at Evatronix, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to work together. The number of software platforms, apps, hardware and connectivity standards is creating paralysis among businesses that are afraid of being locked into a solution. EdgeX Foundry is unifying the community around a common IoT edge framework and an ecosystem of interoperable components.
Large industrial manufacturing organizations are adopting the agile principles of cloud software companies. The industrial manufacturing development process has not scaled over time. Now that design CAD teams are geographically distributed, centralizing their work is key. With large multi-gigabyte projects, outdated tools have stifled industrial team agility, time-to-market milestones, and impacted P&L stakeholders.
"Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...
In his session at 21st Cloud Expo, Carl J. Levine, Senior Technical Evangelist for NS1, will objectively discuss how DNS is used to solve Digital Transformation challenges in large SaaS applications, CDNs, AdTech platforms, and other demanding use cases. Carl J. Levine is the Senior Technical Evangelist for NS1. A veteran of the Internet Infrastructure space, he has over a decade of experience with startups, networking protocols and Internet infrastructure, combined with the unique ability to it...
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 ...
"Cloud Academy is an enterprise training platform for the cloud, specifically public clouds. We offer guided learning experiences on AWS, Azure, Google Cloud and all the surrounding methodologies and technologies that you need to know and your teams need to know in order to leverage the full benefits of the cloud," explained Alex Brower, VP of Marketing at Cloud Academy, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clar...
Gemini is Yahoo’s native and search advertising platform. To ensure the quality of a complex distributed system that spans multiple products and components and across various desktop websites and mobile app and web experiences – both Yahoo owned and operated and third-party syndication (supply), with complex interaction with more than a billion users and numerous advertisers globally (demand) – it becomes imperative to automate a set of end-to-end tests 24x7 to detect bugs and regression. In th...
"MobiDev is a software development company and we do complex, custom software development for everybody from entrepreneurs to large enterprises," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, discussed how from store operations and ...
"There's plenty of bandwidth out there but it's never in the right place. So what Cedexis does is uses data to work out the best pathways to get data from the origin to the person who wants to get it," explained Simon Jones, Evangelist and Head of Marketing at Cedexis, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buye...
SYS-CON Events announced today that Telecom Reseller has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.