• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

About BMT

 
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all,
Why BMT is illegal for entity beans?

Thanks a lot
Benson
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
bcz u cant guess when 1 particular brand/implmn of app server is going to call ejbLoad/ejbStore...so ur trnscn boundaries might conflict i mean another 'begin trans' come before actually 'commiting/rollbkg' the first one and things like that...as the seq of calling of methods ejbLoad,ejbStore, <bus method>---is not defined by specs....so bmt is just out of pic for entityB
 
Benson Fung
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Nishant.
One thing I need to confirm is
1. When the ejbLoad and ejbStore are called?
As I know, ejbLoad and ejbStore are called in three senario :
1. ejbLoad is called during from Pooled state to ready State
2. ejbStore is called during from ready state to Pooled State
3. ejbLoad and ejbStore are called simultaenously when business method is being invoked.
Am I right? If that is the case, why you said we cannot guess when ejbLoad and ejbStore are called by the app. server?
That is the one I don't understand. Please help to clarify.

Thanks
Benson
 
Nishant Anshul
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if u talk abt transition between states like pooled, method-ready etc...then the calling of load/store is more or less defined. But when the instance is servicing the client, then calling of load/store bfr/after every bus method call, or bus method->interejb call..etc etc Or during swapping...its difficult to predict for the developer abt the bhvr of cntr. Ur app might very well work on 1 app svr but may not on the other. hope it helps...
 
Benson Fung
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Nishant.
Why it is difficult to predict? It has been defined that during servicing a client, ejbLoad and ejbStore are called during invoking a business method.
Am I right?
Benson
 
Nishant Anshul
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
y r u getting in the same loop again and again??...it is assumed that load and store r called before/after every bus.method...but when there r method to method calls in ejb invocations,or external calls to some other processes ..container may decide to persist or synchronise according to the necessity IT FEELS which CAN be diff from the neccesity which a PROGR FEELS and so ur illegal nesting of transactions might happen...so BMT isn't for entityB...i hope i m clear this time ...Is it that i m not able to put it..so u r not getting it...tell me
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, BMT is apply applied to Session beans and not entity beans.
Look at how you could have answered your question simply by looking at the EJB deployment descriptor
http://java.sun.com/dtd/ejb-jar_2_0.dtd
Discription of entity bean is

Discription of session bean is...

Note the difference?
And finally the descriptin for transaction-type attribute is..

There's the answer!!
[ January 15, 2004: Message edited by: Ajith Kallambella ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic