Current area: HOME -> Java -> Enterprise Java Beans Articles
Enterprise Java Beans
A Convenient Means for Mapping Persistent Data
Entity Enterprise JavaBeans (EJBs) are a convenient means to map persistent data to Java components. Container-Managed persistence (CMP) provides rapid development since the EJB container automatically handles loading and storing the persistent data. However, along with their many advantages, Entity EJBs can lead to very slow performance when used incorrectly. This column details a few common pitfalls which trip up EJB programmers and hinder the performance of their Entity beans.
A Peek at EJB 2, Part 2
We continue our look at the upgraded Enterprise JavaBeans spec with details on its support of entity bean persistence and management of relationships among entity beans
Automating EJB Unit Testing
Enterprise Java Beans, or EJBs, cannot be tested on their own as can plain Java classes. There are additional steps to deploy them to an EJB container before they can be tested. This means that our testing process must include the additional process of deployment and re-deployment of EJBs. The deployment must be automated as well.
Building Your Own JSP Components
This article is written for developers who want to create their own Beans for use as JSP components, and for interested web designers who want to understand how these components are implemented behind the scenes.
Creating EJB clients using the Eclipse Rich Client Platform
This article shows how to build a sample EJB client using the Eclipse Rich Client Platform (RCP), which has become increasingly popularity due to its extensible nature. Besides focusing on how to use IBM Rational Application Developer to build an RCP application, this article also details how to configure an Eclipse RCP application to act as a J2EE application client.
Creating One File That Does the Work of Three
Sick of working with all of those different Java files and deployment descriptors when developing EJBs for WebLogic Server? A couple of tools out there allow you to work with just the bean code, and use special Javadoc comments to define what should be in the other interfaces (Home, Remote), and the XML deployment descriptors (ejb-jar.xml, weblogic-ejb-jar.xml). After using these tools, you quickly realize how clean it is to just have one Java source file representing your EJB.
Customized EJB security in JBoss
The current EJB (Enterprise JavaBeans) specification supports basic declarative, role-based access-control mechanisms, but provides limited support for coding application-specific security checks. Moreover, it doesn't define any way to factor out access-control code from business logic, or to integrate external authorization services. The open source, J2EE-compliant (Java 2 Platform, Enterprise Edition) JBoss application server features a protection-proxy security architecture that will help you overcome these restrictions.
Dissecting a Simple Stateless Session Bean
A (hopefully) painless introduction to the world of enterprise
java beans technology through a code dissection of the simplest
functional example possible. If EJB scares you, this might be a
good starting point (for EJB newbies).
EJB 2.0 Specification Release Review
This article will discuss local interfaces, their proposed implementation, and issues that developers may expect to encounter when dealing with this technology.
EJB Clustering Approaches
The Enterprise JavaBeans (EJB) component model is rapidly gaining in popularity as the component framework of choice for enterprise development among Java developers. The EJB specification goes to great efforts to define characteristics that give containers the ability to manage transactions, persistence management, environment variables, resource connections, and other infrastructure services. What is peculiarly missing from the specification, however, is any reference to techniques or standards for instrumenting EJBs as clusterable objects. This aspect, which is required for any large-scale system, has been completely left to the application server vendors to instrument as value add in their systems. This article will provide a systematic breakdown of the different possibilities that application server vendors may incorporate into their systems to instrument clusterable EJBs.
Enterprise Java Beans roles and types
Summary article for java developers describing the different
Enterprise JavaBean models. The article highlights session
beans, entity beans and message-driven beans and the
differences between them and their applications.
Enterprise JavaBeansTM Components and CORBA Clients: A Developer Guide
This paper discusses how to enable a client written in any language supported by CORBA to access Enterprise JavaBeansTM components ("EJBTM components"). This paper is directed at programmers with advanced knowledge of both the JavaTM 2 Platform, Enterprise Edition ("J2EETM") and CORBA (Common Object Request Broker Architecture).
Futuristic EJB Facades
Enterprise Java Beans (EJB) is Java 2 Enterprise Edition's major technology stream, which is a server-side component architecture that simplifies the process of building enterprise-class distributed component applications. This article focuses on the best ways of exposing EJB components as services in the context of EJB2.1. It also speaks on the importance of appropriate layering in the EJB tier.
Handle Exceptions in Web Applications with EJB and Struts
A lot have been discussed on various aspects of exception handling in java. This article presents a concrete end-to-end strategy to design and handle exceptions in a typical web application with EJB and a web framework such as Apache Struts.
HTTP Session Object vs Stateful EJB
One of the big controversies of session handling concerns the performance difference between storing session state in an HTTP session object and using a stateful session bean. My colleagues and I expected that it would be more efficient to store data in an HTTP session object, as we were under the impression that there is more overhead involved with the infrastructure of session beans in the EJB container. Therefore, we were interested in measuring the performance of each method, to prove or disprove our initial notion.
Magic with Merlin: Long-term persistence
In this installment of Magic with Merlin, this article shows you how to use the new XMLEncoder and XMLDecoder classes, bypassing serialization and allowing you to generate fully initialized bean instances.
Optimistic Locking pattern for EJBs
This article shows how to construct an optimistic locking solution that produces transactionally safe EJB code, portable across all application servers.
Options for Apache Geronimo EJB Transactions: Part 3
Jonathan Sagorin wraps up his thorough coverage of Enterprise JavaBeans (EJB) transactions in this last installment of a three-part series. In Part 1 and Part 2 of this series, you briefly looked at bean-managed and container-managed EJB transactions and how to implement them in the Apache Geronimo application server. In Part 3 discover the quirks and additional implementation and configuration choices related to both types of transactions.
Orion EJB tutorial
This tutorial is supposed to explain how to make simple enterprise java beans and how to deploy them in the Orion Application Server. First we will make a simple stateful session bean without using any of the GUI tools.
Reduce EJB network traffic with astral clones
Because of the numerous remote set methods that have to be called when working with EJBs, even the simplest data-entry screens produce performance problems. Working with a client-side astral clone of a bean implementation provides an elegant and nearly transparent approach to resolve these problems. In this article, Martijn Res describes the simple yet powerful technique of using astral clones.
Shared Session: Using EJBs to Access Persistent Data
We have a J2EE application where clients with the same userid need to share the session data that is maintained on the server side. In addition, clients aren't just Web clients, but applets and applications as well. How should we implement that?
Test infect your Enterprise JavaBeans
Software can never be tested sufficiently, and testing usually starts too late, particularly for J2EE applications. Since components often behave differently when they are alone than when they have been assembled, testing each component individually before two or more components are joined together ensures each piece of code in a J2EE application will work as it was designed to do. Then, if an error occurs in the application, the developer knows the application's assembly may be the cause. This article presents unit testing techniques and how to apply unit testing to Enterprise JavaBeans (EJBs).
The art of EJB deployment
This article tackles the issues you might encounter when deploying the same EJB code on different application servers -- namely BEA's WebLogic, IBM's WebSphere, and the open source community's JBoss.
Try Declarative Programming with Annotations and Aspects
Learn how to combine the power of annotations with aspects to provision enterprise services declaratively, in an EJB 3.0-compatible manner, while still providing container independence.
Tutorial: Simplifying EJB Component Development
Building EJB technology applications can be professionally
lucrative. However, the process of doing so traditionally has
been extremely labor intensive. This tutorial introduces you to
the EJB technology tools in the latest version of IBM WebSphere
Studio Application Developer that can help you build a variety
of EJB components with a minimum of coding.
Unlocking the True Power of Entity EJBs
I've heard too much debate in the application developer community about how flawed the entity EJB model is, and that its performance isn't on par with a stateless session EJB (SLSB). I've sat, listened, and watched the debates. The conversations center around performance, the meaning of distributed component architecture, the relevance of JDO, the cumbersome nature of EJBs, and on and on. And through all of this, my concerns for the community grew, as no one was touting the real reasons entity EJBs are monstrously powerful. I told myself that they must see it -- that it should be clear -- but I still pondered, as the community seemed to be blinded to the true power of entity EJBs.
Using a Generic SQL Entity EJB Wrapper to Simplify EJB Development
This article shares a design pattern that generalizes the use of entity EJBs to simplify EJB development. The design pattern retains the intuitive SQL interface, yet delivers the reusability and built-in distributed transaction support of EJBs. Many common cases can be handled. Because it is generalized, it can be used for automatic code generation. Given a database table, the bottom-up approach can generate code from Container-Managed Persistence (CMP) entity beans, session beans, up to a Java Server Page (JSP) or even a Web service.
Using XDoclet: Developing EJBs with Just the Bean Class
Have you developed an EJB? Have you been frustrated at having to create and manipulate the XML deployment descriptors, as well as the interfaces? I certainly have. I was recently working on an EJB for the Xbeans open source project and I decided to use another open source tool -- XDoclet -- to generate the XML descriptors and interfaces for me.
Who Says EJB 2.1 is Too Hard?
The EJB 2.1 architecture has a reputation of complexity, but this need not be the case. In this article, Dick Wall proposes an approach of aggressively using IDE tools to help simplify development and increase productivity when using EJBs.
Why Choose A CMP Architecture? Find Strengths in Performance
Last month, I talked about the power of CMP entity EJBs and provided a number of scenarios where leveraging the CMP model would be preferable to developing stateless session EJBs that use JDBC or JDO. This month, I'll talk about the reasons for using a CMP architecture over a BMP one in entity EJBs.
Oracle Magazine contains technology-strategy articles, sample code, tips, Oracle and partner news, an all-new Oracle Developer section for Java developers, and more.
subscribe now