recentpopularlog in

java

« earlier   
Migrating EJB 2.x applications to EJB 3.0 | JavaWorld
RELATED ARTICLES

Kotlin tutorial: Get started with Kotlin

Open source’s existential dilemma: the meaning of ‘free'

The future of Java: How Jakarta EE will unfold under Eclipse
See all Insider
Enterprise JavaBeans 3.0 simplifies the enterprise bean architecture and provides enhanced and more powerful features. The new specification leverages the annotations metadata facility introduced in Java 5, persistence and object-relational mapping best practices from tools such as Hibernate and TopLink, and the Dependency Injection pattern made popular by lightweight Java frameworks such as Spring.

This article discusses possible migration strategies for moving applications written using EJB 2.1 or an earlier specification to an EJB 3.0-based architecture. The possible migration paths are evaluated from both the perspectives of design and implementation. This article does not intend to be exhaustive in illustrating the migration options. After reading this article, you should be able to choose the best option, within your own specific context, for migrating the legacy EJB code to the new specification.

This article assumes you are familiar with the enterprise bean, Java 5, and object-relational mapping features and concepts.

EJB 2.1 to EJB 3.0: What has changed?
To provide a context for this article's discussion of possible migration paths, I begin by discussing the changes in the new specification in the context of each of the different bean types and then at a generic level pertinent across multiple bean types.

Session bean
In EJB 2.1 and earlier specifications, two interfaces—the home and the local, or remote, business interfaces—and the bean implementation class were required for each session bean. The home interface was required to extend the EJBHome or the EJBLocalHome interface and declare the lifecycle method, such as create(). The local, or remote, business interface was required to extend the EJBObject or the EJBLocalObject interface and declare the business methods. The bean implementation class itself was an EnterpriseBean type and, in the case of session beans, extended the SessionBean sub-interface. Callback method implementations in the bean class had to be provided so that the container could trigger them on occurrence of the appropriate lifecycle events. In addition, critical elements of the bean, including its transaction and security definition, and whether it was stateful or stateless, were defined in the associated deployment descriptors.
jobhunt2018  java 
4 hours ago by dieraray
Jodd | The Unbearable Lightness of Java
Jodd is set of micro-frameworks and developer-friendly tools and utilities.
jodd  java  web  framework  microframework  programming 
10 hours ago by vicchow
jooby - do more! more easily!!
Scalable, fast and modular micro web framework for Java.
jooby  java  web  framework  microframework  programming 
10 hours ago by vicchow
Pippo
It’s an open source (Apache License) micro web framework in Java, with minimal dependencies and a quick learning curve.
pippo  java  web  framework  microframework  programming 
10 hours ago by vicchow
Arrays of Wisdom of the Ancients
The Java Language and JDK Class Library have two distinct, yet connected, ways to group elements: arrays and Collections. There are pros and cons for using either one, so both are prevalent in real programs. To aid conversion between the two, there are standard methods to make a reference array appear as a Collection (e.g. Arrays.asList), and to copy from Collection to array (e.g. several Collection.toArray methods). In this post, we will try to answer a controversial question: which toArray conversion pattern is faster?
jvm  performance  Java 
12 hours ago by lenciel

Copy this bookmark:





to read