File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes [EJB 2.0 Spec] WHERE IS THE TRICK???!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "[EJB 2.0 Spec] WHERE IS THE TRICK???!!!" Watch "[EJB 2.0 Spec] WHERE IS THE TRICK???!!!" New topic
Author

[EJB 2.0 Spec] WHERE IS THE TRICK???!!!

Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 3204
    
    5
Reading EJB 2.0 Spec,
Chap 6.4 (page 60)

The container provides the implementation of the local home interface for each session bean that defines
a local home interface that is deployed in the container. The object that implements a session bean�s
local home interface is called a session EJBLocalHome object. The container makes the session beans�
local home interfaces available to the client through JNDI.
The local home interface allows a local client to do the following:
� Create a new session object.
� Remove a session object.

HOW CAN WE REMOVE SESSION BEAN VIA LOCAL HOME INTERFACE ???


Free SCDJWS 5.0 Study Guide - SCDJWS 5.0 Quiz (How to get SCDJWS 5.0 Quiz)
Java Platform, Enterprise Edition 6 Web Services Developer Certified Expert Exam Study Guide and Quiz
Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 3204
    
    5
forgot to add that Chapter 6.4 title is :
6.4 Session bean�s local home interface
Vipin Mohan
Ranch Hand

Joined: Nov 15, 2003
Posts: 79
yeah that looks like a mistake. Maybe it just means that the EJBLocalHome interface defines a remove method.
public void remove(Object pk);
However, in the case of session beans, we cannot invoke this method, since session beans do not have a primary key.
vipin
Ed Tse
Ranch Hand

Joined: Sep 18, 2003
Posts: 183
Mikalai Zaikin, I have just saw your link, I can afford a book, but while I am waiting for HFejb, I am going to read yours, all I can say is WOW!!!


SCJP, Pre-SCJD (URLyBird 1.3.1), Teradata Cert'd Prof
Nauman Khan
Ranch Hand

Joined: Aug 07, 2003
Posts: 49
HI,
It's a mistake,but in section 6.4.2 Removing a session object, in which it described that javax.ejb.EJBLocalHome.remove(Object primaryKey) method on a session object result a javax.ejb.RemoveException because of no support of primary key in session bean.
The same kind of issue is mentioned in Section 7.7.3 and Section 7.7.4 in iteration diagrams that javax.transaction.UserTransaction interface and SessionSynchronization interface methods afterBegin,beforeCompletion and afterCompletion have been shown in stateless diagram together, However javax.ejb.SessionSynchronization is used in Stateful Session bean with Container managed transaction and UserTransaction interface is not supported by Container managed transaction.
Regards,


Nauman Khan <br />SCJP,MCSE,SCWCD,SCBCD,SCWCD1.4
Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 3204
    
    5
Edward,
Thanks for favourable comments !!!
Unfortunately, it's not finished yet.
This is work in progress... And it's approx. 50% done.
Thanks.
Ed Tse
Ranch Hand

Joined: Sep 18, 2003
Posts: 183
You got it up to topic 8, that's not bad. I'll waiting for your updates.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [EJB 2.0 Spec] WHERE IS THE TRICK???!!!