|
Sponsored Links
Resources
Enterprise Java Research Library
Get Java white papers, product information, case studies and webcasts
|
News
News
News
|
Messages: 26
Messages: 26
Messages: 26
Printer friendly
Printer friendly
Printer friendly
Post reply
Post reply
Post reply
XML
XML
XML
|
 |
Simplifying EJB Development with EJB 3.0
Many developers feel EJB is like an extra layer of sugar syrup on a doughnut. In an age where low carb and Atkins diets are the craze, the EJB expert committee has no option but to produce a low carb incarnation of EJB, thus simplifying the development of EJB. The EJB 3.0 expert committee released a sample picture of the lightweight model during JavaOne 2004 when it announced release of the first public draft of the EJB 3.0 specification.
Read Simplifying EJB Development with EJB 3.0
|
|
Message #142230
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Annotation Clarification
Just to clarify...Although the current EJB 3.0 draft does not specify any XML mappings, the specification will not require the use of annotations.
Bill
|
|
Message #142232
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Annotation Clarification
Here some EJB3 limitations i have got:- Objects must come from JNDI to be injected - No ability to manage finer-grained objects than you might want to put in JNDI - No ability to manage "singleton" (shared instance) - No support for complex types such as lists and maps - No support for configuration properties (Strings, ints etc.) - No ability to apply custom interception to managed objects - It's Java 5.0 only - DI won't work with existing classes because it needs custom annotations Any disclaimer from you ?
José.
|
|
Message #142243
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Annotation Clarification
DI won't work with existing classes because it needs custom annotations I think Bill just mentioned that annotations won't be required.
I have a question. Will EJB 3.0 support the automated persistence of JDK 1.5 Enum Types?
|
|
Message #142251
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Asynch?
Does anyone know where the EG is at wrt an asynch call model for stateless beans?
Last time I heard (around J1 time) they were thinking about it - but werent sure whether it would make it...
-Nick
|
|
Message #142259
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Magic methods
Are we still going to have the "magic methods" there were many caoumplaints about this a few months ago...?
Cheers
Smythe
|
|
Message #142305
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Sliced bread or Spring
I wonder why people still want to use EJB 3.0. Look at Spring, it is the best thing that has happened since sliced bread. Declarative transactions, constructor and setter based DI, superior exception handling based on **runtime** exceptions, dynamic proxy based and byte code amendment based AOP, IoC based excellent JDBC framework .... what more would you want!!!!
The whole community should be grateful to Rod and the Spring folks for what they have given us.
|
|
Message #142309
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Sliced bread or Spring
Are you referring to EJB3.0 for its Entity Beans or for the Session or Message Bean implementations. Session beans are useful for distributed systems (as would be Web services), where you don't want to ship the same business function with every application. E.g a calculation engine where for performance reasons, it might be good to have this sort of service running in its own JVM. Message Driven Beans are simple to program and deploy and provide useful asynchronous queue facilities. You would need to write your own queue listeners without them.
So in general, I think EJB3.0 will still be useful.
Regards
|
|
Message #142311
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Sliced bread or Spring
Stateless session beans are useful, however, there are numerous open source products that provide clusterable remoting. You can implement Web services without having a heavy-weight J2EE container. Come on, you don't need EJBs for web services. How do you think Microsoft provided web service support in their software, they don't have EJBs. Spring supports JAX-RPC, similar to the existing support for Hessian, Burlap, and RMI.
Only compelling argument for using EJBs is message driven beans. Anyway, MDBs were far from usable till EJB 2.0 with tight coupling with JMS. However, they have improved it with protocol agnostic reception with JCA 1.5 in EJB 2.1. However, I am yet to see some one using MDBs for a non-JMS transport.
|
|
Message #142323
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Sliced bread or Spring
Stateless session beans are useful, however, there are numerous open source products that provide clusterable remoting. You can implement Web services without having a heavy-weight J2EE container. Since the beginning JBoss has been pluggable in nature. Our microkernel was written for plug-and-play and use-what-you-need from the very beginning.If you just need Tomcat and local EJBs, then you can remove JMS, etc... If you just need Tomcat and Hibernate, we have a nice Hibernate Deployer so that you can package and hot deploy your hibernate components. If you need a clustered cache, drop in the JBoss Cache .SAR archive. If you need web services, drop in the ws4ee archive in the deploy directory. The main difference here between JBoss and these other "lightweight" containers, is that JBoss actually provides a packaging solution that can be hot deployed, classloader scoped, and UI managed.
Our memory footprint and startup times can be made very quick with little configuration. JBoss 4.0 for instance takes 18secs to startup on my laptop with the "bloated" implementation.
Bill
|
|
Message #142325
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Sliced bread or Spring
Have you seen Hani's blog on JBoss taking more than two and a half minutes to start up? JBoss
I thought JBoss didn't have scoped classloading with its unified classloader repository, where everything could see everything else. I have been through some of the JBoss codebase. I am sorry to say that compared to Spring I found the code quality to be abysmal.
JBoss had its time. Now it is a thing of the past. I know numerous corporates moving away from heavy-weight bloated EJB architecture and embracing the revolution of light weight containers like Spring and transparent persistent solutions like Hibernate, iBatis and JDO.
|
|
Message #142343
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Annotation Clarification
I think Bill just mentioned that annotations won't be required.I have a question. Will EJB 3.0 support the automated persistence of JDK 1.5 Enum Types? Good question, Corby. I was just reading a blog (http://jroller.com/page/dsmith/20041011) that was just starting to scratch the surface of the enum mapping issues. The spec will include support for mapping enums at the reference data level (which seems like the only sensible way to use them). If you have other thoughts, though, make them known.
-Mike
|
|
Message #142351
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Why so polarizing Robert?
Robert, I'm a big Spring and Hibernate advocate as well, but why do you have to be so polarizing? Those "numerous corporations" you mentioned aren't *all* corps, and I can tell you for a fact that the biggest financial shops are still squarely in the EJB camp, approaching lightweight containers very cautiously (well, more cautiously than they did EJBs).
|
|
Message #142354
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Sliced bread or Spring
Have you seen Hani's blog on JBoss taking more than two and a half minutes to start up? JBoss Maybe you shouldn't believe everything you read and instead try it out for yourself. Hani isn't exactly the most trustworthy source...I thought JBoss didn't have scoped classloading with its unified classloader repository, where everything could see everything else. JBoss has classloader flexibility. Scoped and non-scoped. This has been around for years...Maybe you should actually read our documentation instead of relying on blogs for your information.
Bill
|
|
Message #142366
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Annotation Clarification
Here some EJB3 limitations i have got:- Objects must come from JNDI to be injected- No ability to manage finer-grained objects than you might want to put in JNDI- No ability to manage "singleton" (shared instance) - No support for complex types such as lists and maps- No support for configuration properties (Strings, ints etc.)- No ability to apply custom interception to managed objects- It's Java 5.0 only- DI won't work with existing classes because it needs custom annotations Any disclaimer from you ?José. Sure there is support for configuration properties. Its called inheritance and constructors:
public class BaseSessionBean implements SessionRemote
protected int variable; protected String stringVar;
@Tx(TxType.REQUIRED) public void someEjbMethod() {...}
}
@Stateless public class ConfiguredSessionBean extends BaseSessionBean public ConfiguredSessionBean() { variable = 10; stringVar = "hello"; } }
As for interception...Ask Mike Keith. He has put forward a great proposal in the EJB3 committeee.
As for "singleton" services. There's been some talk about that too and I hope it gets in. Going from the CORBA to J2EE world, I really missed the concept of a stateful service.
Bill
|
|
Message #142390
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
JBoss + EJB-3.0 = Nice
JBoss + EJB 3.0 = Nice
Really nice, in fact. Play around and you will know. Thanks to JBoss for letting us feel the pulse and make useful comments before it becomes too late.
Spring and the likes will never replace an open standard technology like EJB with strong vendor backing/support.
I have used JBoss for almost as long it has been around. It is quite robust. For plain servlet development I prefer Tomcat, but when it comes to J2EE or EJB dev, my first preference is JBoss (with JBoss plugin in Eclipse). After reading Hani's blog, I am quite certain that I hate WebSphere!
Question to the EJB 3.0 expert group: Are you giving the "new-life-aproach" (by Ganesh and Rajat) some thought/consideration? Many ppl had a positive opinion about it (obvious from the forum postings) and it definitely deserves some thought.
aXe!
|
|
Message #142414
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Annotation Clarification
<quote>As for "singleton" services. There's been some talk about that too and I hope it gets in. Going from the CORBA to J2EE world, I really missed the concept of a stateful service.</quote>
Why not use JMX for singletons?
|
|
Message #142430
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Annotation Clarification
<quote>As for "singleton" services. There's been some talk about that too and I hope it gets in. Going from the CORBA to J2EE world, I really missed the concept of a stateful service.</quote>Why not use JMX for singletons? That's what we, JBoss, promote for our userbase, but I'm not sure you would be able to use JMX as a service within other application servers. Somebody will have to answer for me on that...
Bill
|
|
Message #142431
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
JBoss + EJB-3.0 = Nice
Spring and the likes will never replace an open standard technology like EJB with strong vendor backing/support. Vendor backing may, may not matter, but the ease of use of EJB 3.0 will really entice away some of the Spring users who like Spring better than EJB 2.1 because of its self-proclaimed simplicity, IMO.
Personally, it was a joy writing the tutorial for JBoss's EJB 3.0 release because it was so freaking easy to write the code and deploy EJB3's. Annotations make things so, so nice. Session beans in particular. I write the session bean as a pojo, tag it as @Stateless, then use IntelliJ's refactor to extract/generate the remote interface, then @Remote tag the extracted interface. Then just jar up the classes and copy the jar to the JBoss deploy directory.
Bill
|
|
Message #142444
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Annotation Clarification
That's what we, JBoss, promote for our userbase, but I'm not sure you would be able to use JMX as a service within other application servers. Somebody will have to answer for me on that...Bill Understood. Although, I would suggest that JMX be added to the J2EE topology as a requirement for being spec compliant. This makes more sense to me then creating another standard just for singleton services. JMX seems to fit the bill rather nicely IMO and it is an already established standard.
|
|
Message #142500
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Simplifying EJB Development with EJB 3.0
Day in day out I get more and more conviced to abandon Java/Net "SPAM technologies" in favor of the "Just Work" Python.
|
|
Message #142578
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Sliced bread or Spring
Errm. I didn't say use EJBs for Web Services. I said you could use Web Services for distributed computing as an alternative to EJB.
|
|
Message #142588
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
JBoss + EJB-3.0 = Nice
Bill-
I just got through reading the draft of the spec and I think it's all great.
Thanks for posting to the serverside. I know how these committees can sometimes go - I was a member of the OMG back in the CORBA days. And I know it can be more difficult than people realize to get everyone in the room to agree on the gory details.
Thanks for keeping us up to date.
-Scott
|
|
Message #142625
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
JBoss + EJB-3.0 = Nice
I was a member of the OMG back in the CORBA days. And I know it can be more difficult than people realize to get everyone in the room to agree on the gory details. More than you know....Linda DiMichel has a real tough job...
Bill
|
|
Message #142626
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Sliced bread or Spring
Errm. I didn't say use EJBs for Web Services. I said you could use Web Services for distributed computing as an alternative to EJB. Correct me if I'm wrong, but with the current final draft with webservices, it doesn't support security, transaction propagation, asynchronous messaging, etc...
|
|
Message #142675
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Sliced bread or Spring
Bill,
I am sure you are absolutely correct. You seem to be well on top of the specifications. :-)
Chris
|
|
 |
New content on TheServerSide.comNew content on TheServerSide.comNew content on TheServerSide.com |
 |
 |
Reza Rahman explores the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6.
(November 2, Article)
SAML is an XML-based standard for exchanging authentication and authorization data between security domains. The single most important problem that SAML was created to solve is the Web browser Single Sign-On problem. Many organizations are debating whether to stay with version 1.1 or move to 2.0. This article makes observations about both options.
(September 28, Article)
Joe Ottinger takes a look at how people learn, and applies it to the practice of programming. He notes that understanding how people learn is an essential part of working in a programming team.
(September 22, Article)
Stephen Maryka gave us an article about the Asynchronous Web and posed a number of questions that get examined like an approach to delivering Asynchronous Web capabilities through extensions to existing Java EE technologies.
(July 14, Article)
JavaServer Faces Flex goal is to provide users capability in creating standard Flex components, part of flexSDK which is open sourced through MPL license, as normal JSF components. This article by Ji Hoon Kim will provide an overview of creating a simple multilingual JSF page consisting of JSF Flex tags.
(June 29, Article)
In this session Jeff explores the key characteristics of successful SOA projects. He covers some of the patterns, and anti-patterns, tool sets, and strategies that he himself learned the hard way. Last, he provides a strategy and blueprint for achieving a high likelihood of success in your SOA project.
(June 23, Tech Talk)
Ari Zilka, CTO of Terracotta, Inc., talks about the new features in Terracotta 3.1, announced during JavaOne and available now.
(June 15, Tech Talk)
In this Tech Talk, Josh Long explores an integration challenge using Spring Integration and walks through the implementation, employing and expanding on the basic patterns of Enterprise Application Integration to tie together components into a function integration solution, and then demonstrates how Spring Integration helps address the integration requirements.
(June 15, Tech Talk)
In this Tech Talk, David Geary teaches you: The basics of Google Web Toolkit; How to implement Ajax-enabled applications in Java; Internationalization; Hooking into the browser history mechanism; Remote procedure calls.
(June 4, Tech Talk)
Jon Kern discusses the best architecture/technical solutions and ensure that they are repeated by all developers. By tackling the architecture up-front in a serial manner, subsequent parallel development will be much more manageable and predictable.
(May 28, Tech Talk)
This keynote describes the frustrations of modern knowledge workers in their quest to actually get some work done, and solutions for how to guard yourself against all those distractions. Neal Ford talks about environments, coding, acceleration, automation, and avoiding repetition as ways to defeat the misguided attempts to sap your ability to produce good work.
(May 26, Tech Talk)
Gil demonstrates how new, aggressive uses of already abundant compute capacity by common applications offer competitive value for application designers.
(May 21, Tech Talk)
Chris Keene introduces WaveMaker as a new way to automate the ability to generate Hibernate classes in order to more quickly bring OR mapping into an application.
(May 19, Article)
In this session Nati Shalom demonstrates how to take a standard Java EE web application and scale it out or down dynamically without changes to the application code. Seeing as most web applications are over-provisioned to meet infrequent peak loads, this is a dramatic change because it enables growing your application as needed, when needed, without paying for unutilized resources.
(May 19, Tech Talk)
Mastering EJB was one of the original and most influential EJB books in the industry. Mastering EJB III now returns with two new expert co-authors, updated for EJB 2.1 and 30% new chapters including security, integration, best practices, open source, and more.
(Book PDF Download)
The Application Server Matrix is a detailed listing of J2EE vendors and their application server products, with information on latest version numbers, J2EE spec support and licensing, pricing, platform support, and links to product downloads and reviews.
(Application Server Comparison Matrix)
|
|