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 Valid operation in ejbCreate for stateless session bean Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Reply Bookmark "Valid operation in ejbCreate for stateless session bean" Watch "Valid operation in ejbCreate for stateless session bean" New topic
Author

Valid operation in ejbCreate for stateless session bean

Rekha Rao
Greenhorn

Joined: Jan 23, 2001
Posts: 15
Can a statless session bean acess EJBObject in ejbCreate method ? The EJB specification lists getEJBObject and getEJBLocalObject under operations allowed in ejbCreate method.

I am under the impression that EJBOjbect is created when the client invokes create method on home. For a statless session bean however, ejbCreate could be invoked much earlier for a stateless session bean unrelated to any calls from the client.

So, how can getEJBObject be a valid operation in ejbCreate for a statless session bean ?
Rudy Harianto
Ranch Hand

Joined: Dec 01, 2003
Posts: 94
i've got your point. and confuse too

adding in your concern, there's an evident to this case on Object Interaction Diagram in page 227 HFEjb.
ejbCreate() is called at a completly different/unrelated time with client's create(). so it can be assume that there's no EJBObject.

can anyone explain this?


SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJA<br /> <br />blog: <a href="http://jroller.com/page/rharianto" target="_blank" rel="nofollow">http://jroller.com/page/rharianto</a>
Adrian Pang
Ranch Hand

Joined: Feb 20, 2004
Posts: 40
Kathy's answer


SCJP 1.4, SCWCD 1.4, SCBCD 1.3
Rudy Harianto
Ranch Hand

Joined: Dec 01, 2003
Posts: 94
Adrian Pang,
Thanks for the link. It really helps.

But now i've got another doubt about ejbCreate/ejbRemove from stateless session bean.
From HFEjb page 228, it cannot call getUserTransaction() method. But according to spec page 90 on table 3 (column BMT) it can.
Which one is right?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Valid operation in ejbCreate for stateless session bean
 
Similar Threads
Stateless session
confusion on ejbCreate
Access and meaningful transaction context
Getting EJBObject from ejbCreate() on stateless bean
getEJBObject in ejbCreate (stateless session bean)