• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Anatomy of Deployment Descriptor

 
Raja Sagar Panamgipalli
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all..

What are rentrant invocations.....?

Is EJB-QL applicable to session beans ...(No! itz a dumb question) but still can any one elucidate as to why do we have the concept of EJB-QL (no more finder methods) in the first place.

Thanks and regards

Sagar
 
Miki Muzsi
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are rentrant invocations.....?


Suppose we have an entity bean A with a method a() and a bean B with method b(). Re-entrant invocation is if a() calls b() which calls a() again. Check the spec pg. 189

Is EJB-QL applicable to session beans ...(

No, ejb-ql is a query language for entity beans. It helps you to define queries so that you do not need to code JDBC (like get connection, get statement or prepared statement, fill parameters , get results set etc etc.). If you don't see the advantage try to think how would your code look like with and wothout ejb-ql if you try to retrieve all instructors of the students, which are involved in one course and the grade of a student is biggern tahn 10 :-). Just choose the simplest relational schema to model that.

Miki
 
Miki Muzsi
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Re-entrant invocation is if a() calls b() which calls a() again


Obviously what I mentioned doesn't make sense since you would end up in stack overflow :-)

What I ment is that bean A can call a method on bean B which in its turn can call a method (loopback call) on bean A again.

The bean developer can specify if an enity bean is reentrent or not in the deployment descriptor.

Miki
 
Raja Sagar Panamgipalli
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok...
i'm clear now...
thank you so much....
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See this post.
http://www.coderanch.com/t/160794/java-EJB-SCBCD/certification/MDB-concurrency-serializing-reentrant
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic