Think entity beans don't support inheritance? Think again.
Sometimes authors have to sell a skeptical editor on the concept of an article. This is the case with an article today, which shows how to achieve inheritance with EJB entity beans. My first reaction as an editor was "Is this such a big deal? If inheritance is a big deal to you, can't you just use a POJO-based framework?"
The key, in the case of today's Feature Article, is that this fundamentally misunderstands the question. Maybe an entity bean, understood as an object, doesn't support inheritance, but who's talking about objects? In Component Inheritance in EJB 2.0 re-frames the question around the concept of a component:
A component is a typed, deployable unit of functionality that adheres to a contract of specified interfaces and deployment rules with a component model framework. A component has no observable state despite any instances or data it may create. Further, a component such as an entity bean is not simply its interfaces, EntityBean class, and descriptor files, but also any objects, code, or other resources created by the container in its deployment.
From this, you can open your mind enough to get to the point where inheritance works:
Component inheritance can be confusing and difficult to grasp for OOP developers due to choices in implementation and demarcation. Some implementations, such as ours, rely in part on object inheritance. Other choices might use delegation, proxies, or other devices that may not fit the object-oriented inheritance definition. The hierarchy mapping is also specified in a less overt manner. In Java's object inheritance, the relationship is clearly marked by the key word
extends. Component inheritance might be declared in an XML file, as a metadata key, or via some other manner--it may not be evident in the code at all.
The article goes on to explain why you would want component inheritance and, finally, how to achieve it in EJB 2.0
Swing documentation, communication, and plain weirdness are up for review in today's Weblogs, in which Alexander Potochkin relates The story of one "not a bug":
"Recently I came across one interesting bug 4413412 which seems to discover very odd Swing behaviors and really looks like a bug. Anyway after a little investigation I closed it as not a defect."
Kohsuke Kawaguchi creates a
Hangman game by using Dalma:
"Dalma is a workflow engine that lets you write conversational programs quickly. Today, I added a little hangman game as a sample to Dalma."
18 years of toil, a lot of help from the compiler, and a small but rare personal distinction, Satya Komatineni relates
"How in 18 years the code I wrote ran the first time."
In Also in
the O'Reilly Network Databases site points out Andrew Gilfrin's blog entry A MySQL Mantra in which he passes along some sage wisdom about working with Oracle -- try to use a single line of SQL, then try as little PLSQL as possible, then try Java, etc. -- and adapts this line of thinking to MySQL.
"The paper 'A First-Class Approach to Genericity' introduces the idea of the mixin, which seems to be quite a powerful concept, and then shows that you can't do it with Java generics." In Mixins: Something Else You Can't Do With Java Generics?, Bruce Eckel (author of Thinking in Java ) asks "I wonder if anyone has any alternative approaches to this problem."
In Projects and
the blueprints project now has an extensive AJAX FAQ for the Java Developer. This J2EE-oriented FAQ covers available AJAX libraries, discusses issues with security, usability, and internationalization, and covers advanced issues like concurrency, saving state, sending images, and polling.
In the article JAXP validation, Java and XML author Brett McLaughlin looks at the improvements made to the Java API for XML Parsing (JAXP) in J2SE 5.0, including validation support, support for XML schema and RELAX NG, and more. "All of these improvements finally give Java developers an industrial-strength solution for XML validation."
In today's Forums,
neutel offers up an
XMPP Resource Adaptor for Mobicents:
"I've just added to CVS one initial version of a XMPP Resource Adaptor. In this version two types of connections are supported, client-server and component-server. To implement the component-server connection the smack library had to be changed, so, it is very important to replace the smack library in mobicents/lib for the one in ra/xmppra/lib. Comments and suggestions are welcomed."
grantsmithcontinues to track Mustang breakage in
Re: Recent builds: problem with Intellij IDEA:
"Build 57 still fails. It's been two builds since the rollback was planned. Any clue as to when it will be implemented?"
In today's java.net
News Headlines :
JavaSpaces Pure Java 1.13
- MySQL 5.0 - Final
- Sequoia ERP Suite
- Initial Release
- RFID Device
2.0 EAP Build 688
Registered users can submit news items for the
href="http://today.java.net/today/news/">java.net News Page using our
form. All submissions go through an editorial review before being
posted to the site. You can also subscribe to the href="http://today.java.net/pub/q/news_rss?x-ver=1.0">java.net News RSS
Current and upcoming Java
- October 25, 2005 - Detroit JUG Presentation: Object-Oriented Design: From Principles to Patterns
- October 28-30, 2005 - Northern Virginia Software Symposium
- November 1-4, 2005 - Enterprise Java Architecture Workshop: San Francisco
- November 4-6, 2005 - Lone Star Software Symposium 2005: Dallas Edition
- November 8-10, 2005 - JavaOne Tokyo 2005
- November 11-13, 2005 - Rocky Mountain Software Symposium 2005: Fall Edition
- December 7-10, 2005 - The Spring Experience 2005
- December 10-11, 2005 - Weekend With Experts
- December 10-14, 2005 - ApacheCon 2005
- December 12-16, 2005 - JavaPolis 2005
Registered users can submit event listings for the
href="http://www.java.net/events">java.net Events Page using our
href="http://today.java.net/cs/user/create/e"> events submission form.
All submissions go through an editorial review before being posted to the
Archives and Subscriptions: This blog is delivered weekdays as
Today RSS feed. Also, once this page is no longer featured as the
front page of java.net it will be
archived along with other past issues in the href="http://today.java.net/today/archive/">java.net Archive.
Think entity beans don't support inheritance? Think again.