Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

permitted and not permitted operations doubt  RSS feed

 
Sudhakar Reddy Kurakula
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

See In entity beans,

In ejbLoad() mehtod, can we access the client information.
In ejbStore() method , can we acces the client infomation.

Session beans:

can we access the EJBOBJECT information in ejbCreate()method of stateful bean?
I think should not ,because ejbCreate() would return the stub for the EJBOBJect .
please clarify me with reasons if anybody knows.

Cheers
Sudhakar Reddy(SCJP1.4)
M.C.A 2006.
9989223696.
Satyam.
 
Prabhu Venkatachalam
Ranch Hand
Posts: 502
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ejbLoad() is called by container, to inform that just bean is loaded with the DB.

ejbStore is called by container, to inform that it is going to insert record whatever in the bean to DB.

In both case above, client is alive so you can get user related informations like isCallerInRole, getCallerPrincipal etc.,


For Stateful session beans, you can get reference to both HOME and EJBOBJECT. Because, when client invokes create() in home stub, it create a EJBObject interface implemented class before calling ejbCreate(). So you can still get access to it.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!