Java Technology Home Page
A-Z Index

Java Developer Connection(SM)
Chat

Downloads, APIs, Documentation
Java Developer Connection
Tutorials, Tech Articles, Training
Online Support
Community Discussion
News & Events from Everywhere
Products from Everywhere
How Java Technology is Used Worldwide
Print Button
 
JavaLive Transcripts Index

EJBTM 2.0
September 19, 2000



Guest Speakers are Linda DeMichiel and Umit Yalcinalp

This is a moderated forum

EdO:Welcome to today's Java Live session on EJBTM 2.0. Our guests are Linda DeMichiel and Umit Yalcinalp. They are both EJBTM architects and authors of the EJBTM 2.0 spec. Public draft 2 of the spec is now available through the Java Community Process. Linda and Umit will answer your questions about EJB -- especially EJBTM 2.0. So let's begin.

skot: This is a 3 part question. Where is the EJB spec going? What new services should we expect to see in the next revision? What new services will be most important in you opinion? Thanks, Scott H.

linda: skot, as you know, we have just released Public Draft2 of the EJB 2.0 spec. We expect to follow this in mid-late October with the Proposed Final Draft. EJB 2.0. The EJB 2.0 Final Draft will come out in synch with J2EE 1.3 in 2001. In my opinion, the most important new features of this EJB release are integration with JMS, and the new architecture for container managed persistence and EJB QL. We are always in the process of gathering input for what should be considered for inclusion into future releases of the EJB spec. You can send us your input at ejb-spec-comments@eng.sun.com

Floyd: Will EJB 2.0 solve the problem of having n+1 db calls when using ejbFinders to find n entity beans?

umit: This is the answer to Floyd's question regarding finders. We have introduced the role of the Persistence Manager whose responsibility is to provide the implementation of finders using EJB QL in 2.0. We also introduced the ejbSelect methods which allow the bean provider to access persistent data for a related set of entity beans and dependent objects. This allows the Bean Provider to utilize different levels of granularity in accessing the persistent store and different ways of formulating queries which was not possible previously. We do not prescribe the caching strategies for the Persistence Manager of how to optimize ejbFind or ejbSelect methods. As you know, however, materializing each entity bean with an ejbLoad is only necessary when the returned results of the query is accessed one by one, not when the results are generated.

Floyd: Are there any plans to formally specify the behaviour of entity beans across different transaction isolation levels?

linda: Floyd, as we have noted in the spec, we anticipate that Persistence Manager tools will allow some configuration of "logical" isolation levels at which their runtime caching mechanisms run. Specification of such isolation levels is very difficult because of the wide range of caching strategies that are possible, particularly in view of optimistic concurrency control. This is certainly an area in which we would like to gather further input from users and vendors before proceeding.

Floyd: Where do you see JDO fitting into EJB, as a replacement or a complement to entity beans?

linda: Floyd, JDO can be used in conjunction with Bean Managed Persistence, as can other tools-based approaches. We do not see EJB as a replacement or complement to entity beans, but rather as an approach that certain developers might choose to use with bean managed persistence.

prabu: Weblogic has triggers that can execute the method at specified time. We are trying to build an application that is not Weblogic specific but more generic. I know we could get something equivalent to trigger using JMS in EJB2.0. My question is: will there be some sort of scheduler also that comes along to trigger these messages?

umit: In answer to prabu's question, timers and triggers are not currently within the scope of the EJB 2.0 specification. Having said that, we are currently thinking about what we can do in this area beyond 2.0.

jw: Can you clarify this for me: can I (or can I not) start *any* threads in my EJB's ? Is this just not recommended, or is it forbidden (by the spec) ?

linda: jw, starting threads in a bean is not permitted.

aigen: Please tell us more about EJB QL.

umit: aigen, it is a declarative SQL-like language which is based onthe CMP 2.0 data model and it is for writing portable finder methods and select methods which we introduced in 2.0. The queries in CMP 2.0 are defined using this language by the Bean Provider and implemented by the Persistence Manager. I recommend reading Chapter 10 of the specification and sending us feedback.

Shenoy: It is a general impression that Entity Beans are a problem for scalability? Can you give some inputs w.r.t. future EJB specs?

linda: Shenoy, one of the main goals of the new architecture for container managed persistence in EJB 2.0 is to provide the hooks for a high-performance, scalable implementation of entity beans. The persistence manager now has a high degree of control and choice in its implementation and can use such techniques as lazy loading, dirty detection, optimistic concurrency control strategies, local transaction optimizations, etc. We are looking at adding hooks for read-only entity beans in a future draft.

jw: Have you had a chance to review any of the application servers, that already support EJB2.0 (partially anyway)? Do you think these early adoptions are useful to study EJB2.0?

linda: jw, we interact regularly with the member companies of the EJB 2.0 Expert Group who are constantly sending us feedback on the specification. Since EJB 2.0 is not yet final, however, and there are not yet compatibility tests for J2EE 1.3 (and EJB 2.0), to say that an application server already supports EJB2.0 is not really accurate.

karniar: I am using the DOCTYPE as specified in new release of EJB2.0 specs. DTD for EJB2.0 does not exist at http://java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd. This is a wrong URL to the DOCTYPE DTD. What is the correct URL to ejb-jar_2_0.dtd?

umit: karniar, you could not find the dtd because we have not published it yet, except listing it in the specification. This is because we currently have a draft of the specification and we needed to be flexible as we make changes to the spec. We plan to make it available when we have the Proposed Final Draft released.

jeff: On the subject of threads: I understand that starting threads from a bean is problematic because the threads make it difficult to control the lifetime of the bean. Does this restriction extend to threads created in methods on non-bean objects called by the bean?

linda: jeff, if you mean dependent objects, they too cannot start threads.

jw: Question about rule engines: Are there any plans to incorporate a rule engine (for user-adjustable business rules) into EJB ? (like ILOG's JRules product)

umit: jw, we have not looked into incorporating rule engines and how EJBs can utilize rule engines in this version of the specification. However, if this is an area that we should think about for the future, we definitely would like to hear from you.

karniar: From your answer, I guess that I cannot use the EJB 2.0 DTD by SUN. Weblogic 5.1 have come up with a trial support for EJB2.0 - messaging bean. If I want to use EJB 2.0 messaging bean right now, what are the options? Why are there no plans to release a draft version of EJB 2.0 DTD?

umit: karniar, you will be able to use the dtd as we will provide it with the Proposed Final Draft. As you know, this is currently the second public draft and the dtd is expected to change until we have the Final Draft. Until then, you risk using a changing dtd which will not be finalized until Final Draft.

jw: Out of curiosity: How many people actually do the writing of a spec like EJB2.0 ?

linda: jw, we listed the authors of the EJB 2.0 specification on the title page--there were three of us :-). EJB 1.1 was authored by Vlada Matena and Mark Hapner -- on whose work we clearly built.

jharby: I'm not entirely clear about the interoperability - does this mean for container-to-container communication I have to use RMI/IIOP? What if I wanted to use XML?

linda: jharby, it is a requirement that container vendors support IIOP-based interoperability, as is specified in Chapter 18.

EdO: Well our hour has quickly come to a close. I'd like to thank all our participants, and especially our guests Linda and Umit.

linda: Goodbye, and thanks for participating. Please continue to send us your feedback to ejb-spec-comments@eng.sun.com .

umit: Thanks for joining us. Sorry we could not get to all the questions but send us your feedback to the spec comments mailing list.

EdO: Last moderator (me) signing off. The forum is now unmoderated.

coffeecup


Reader Feedback

Tell us what you think of this transcript.

Duke

Very worth reading Worth reading Not worth reading

If you have other comments or ideas for future articles, please type them here

_______
1 As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.


Print Button
[ This page was updated: 21-Sep-2000 ]
Products & APIs | Developer Connection | Docs & Training | Online Support
Community Discussion | Industry News | Solutions Marketplace | Case Studies
Glossary | Feedback | A-Z Index
For more information on Java technology
and other software from Sun Microsystems, call:
(800) 786-7638
Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first.
Sun Microsystems, Inc.
Copyright © 1995-2000 Sun Microsystems, Inc.
All Rights Reserved. Terms of Use. Privacy Policy.